Knowledge base
The DMS knowledge base helps you manage knowledge used by Data Copilot. It allows you to view knowledge automatically generated by Meta Agent and to manually add or modify it. An enriched knowledge base improves Data Copilot's ability to understand questions, make automated decisions, and provide reasoned answers. This topic describes how to add, edit, and manage knowledge.
Knowledge sources
Business knowledge is crucial for the effectiveness of NL2SQL. DMS builds business knowledge in three ways: through interactive Q&A in the Copilot interface, manual user additions, and the DMS data augmentation pipeline. The following figure illustrates how knowledge enhances Copilot.

The data augmentation pipeline builds knowledge by extracting SQL templates from your historical SQL queries in DMS. The system then translates these queries into natural language questions and stores them as SQL records in the knowledge base.

Notes
-
The knowledge management page displays all business knowledge for the current DMS tenant, including both auto-generated and manually added knowledge.
-
Copilot automatically creates SQL records in the knowledge base from your feedback (likes).
-
The system automatically generates knowledge snippets in the knowledge base from SQL execution history and table structure.
Add knowledge
Add a single knowledge entry
Manually add knowledge
Log in to DMS 5.0.
-
In the upper-left corner of the console, click the
icon and choose .NoteIf you are using the classic console, choose from the top menu bar.
-
On the Knowledge Granularity tab, click Add.
-
In the Add Knowledge panel, enter the Description and Content, and provide a chain of thought. Select a knowledge type, knowledge level, and associated database.
The chain of thought parameter appears only when you set knowledge type to SQL record. For optimal performance, follow the template that DMS provides.
The following example shows a chain of thought (thought template):
Metric: The user asked about the academic performance of schools in California and wants to know which school is the best. Based on the context, the total average score for each school needs to be calculated. Dimension (Filter Condition): The user's question does not mention any specific filter conditions. The core dimension is the school name. In summary, this requires using the satscores table and the sname column. sname will be used as the projection. Calculate the total average score for sorting. No grouping is involved. -
Click OK.
Automatically generate knowledge
-
Copilot creates knowledge when you like or provide feedback on the information it generates. For more information, see Data Copilot (New).
-
The system automatically adds liked SQL queries and their corresponding questions to the knowledge base as SQL records with a knowledge level of pending review.
-
Your feedback and modified SQL are automatically added to the knowledge base as knowledge snippets, with the knowledge level set to pending review.
-
-
Build knowledge through the data augmentation pipeline.
Batch import knowledge
Only CSV files can be imported.
-
On the Knowledge Granularity tab, click Batch Import.
-
Download and review the template. Complete the template with your knowledge data, and then upload the CSV file.
-
Click OK.
Manage knowledge
On the knowledge list page, you can edit or delete knowledge entries.
Add tags
You can use tags to quickly find target knowledge entries.
-
At the top of the knowledge list page, click Tag Management.
-
Add a tag.
Click Add, enter a tag name, and then click OK.
NoteYou can also modify or delete tags.
-
Bind tags to knowledge.
-
In the row of the target knowledge entry, click the tag
icon, and then click Bind. -
In the Tag dialog box, click Add.
-
Select one or more target tags, and then click OK.
NoteYou can bind up to 20 tags to each knowledge entry.
-
Search knowledge
You can filter for knowledge entries by keyword, tag, knowledge level, knowledge type, and associated database.
The filtered results are displayed in a table that includes columns such as Knowledge ID, Knowledge type, Description, Tag, Knowledge level, Associated database, Associated table, Associated field, and Popularity. The Actions column provides options to Edit and Delete entries.
SQL knowledge
In the SQL window, you can edit knowledge from the knowledge base, save SQL statements to your favorites, and view the execution history.
-
Save SQL to Favorites
Click My SQL. On the Favorites tab, enter the SQL statement you want to save, and then click Add.
-
Edit knowledge
Click My SQL. On the Knowledge Base tab, find the entry that you want to modify, and then click Edit.
NoteDMS adds favorited SQL statements to the knowledge base by default.
-
View execution history
Click My SQL. On the Knowledge Base tab, view the executed SQL statements.
Business knowledge
If you have queried information about the current table in Copilot, DMS automatically adds business descriptions for the table and its fields.
In the SQL window, click the table list
icon in the upper-right corner. In the Actions column, choose to see the added business descriptions.
You can double-click the Business description for a table or field to edit it.