Accurate natural language to SQL (NL2SQL) responses depend on Data Copilot having enough context about your business — your terminology, metrics, and common query patterns. The knowledge base is where you store that context. By curating SQL examples and domain-specific fragments, you give Data Copilot what it needs to generate correct SQL and make better automated decisions.
How the knowledge base works
Data Management (DMS) builds the knowledge base from three sources:
| Source | How it works |
|---|---|
| Copilot feedback | When you like a Copilot response, DMS automatically saves the SQL statement and related question as a knowledge record (type: SQL Records, level: To Be Supplemented). When you provide feedback or submit a modified SQL statement, DMS saves it as a knowledge record (type: Fragment Knowledge, level: To Be Supplemented). |
| Manual addition | Add knowledge records directly on the Knowledge Granularity tab. |
| Data augmentation pipeline | DMS extracts historical SQL statements, converts them into SQL templates, translates those templates into questions, and saves the results as SQL records. |
The Knowledge Granularity tab displays all knowledge records for the current DMS tenant, including both automatically generated and manually added records.
Knowledge types
| Type | Description |
|---|---|
| SQL Records | SQL statements paired with natural language questions. |
| Fragment Knowledge | Domain-specific context such as business rules, terminology, and metric definitions. |
Records generated from Copilot feedback start at the To Be Supplemented knowledge level, indicating they are awaiting review.
Add knowledge records
Add a single record
-
Log on to the DMS console V5.0.
-
Move the pointer over the
icon in the upper-left corner and choose All functions > Data Assets > Knowledge Base.NoteIn normal mode, choose Data Assets > Knowledge Base in the top navigation bar.
-
On the Knowledge Granularity tab, click New.
-
In the Add Knowledge panel, fill in the following fields:
Field Description Description A short label for the knowledge record Content The SQL statement or text fragment Knowledge Type Select SQL Records or Fragment Knowledge Knowledge Level The review status of the record Associated Database The database this knowledge applies to -
Click OK.
Import records in bulk
Only CSV files are supported.
-
On the Knowledge Granularity tab, click Batch Import.
-
Download the CSV template, fill in the knowledge information as instructed, and upload the completed file.
-
Click OK.
Manage knowledge records
On the Knowledge Granularity tab, you can edit and delete existing knowledge records.
Add tags to a knowledge record
Tags let you filter and locate records quickly.
Create a tag
-
On the Knowledge Granularity tab, click Tag Management above the record list.
-
Click New. In the Create Tag dialog box, enter a tag name and click OK.
NoteYou can also modify or delete tags.
Bind a tag to a record
-
Find the target knowledge record, move the pointer over the
icon, and click Bind.
-
In the Label dialog box, click Add.
-
Select one or more tags and click OK.
Limits
| Item | Limit |
|---|---|
| Tags per knowledge record | 20 |
| Bulk import format | CSV only |
Search for knowledge records
Filter records by keyword, tag, knowledge level, knowledge type, or associated database.
What's next
-
DMS Data Copilot — Learn how Copilot uses knowledge records to answer queries and how feedback automatically enriches the knowledge base.