Knowledge base

Updated at:
Copy as MD

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. Knowledge enhances Copilot in the following ways:

image

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.

image

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

  1. Log in to DMS 5.0.

  2. In the upper-left corner of the console, click the 2023-01-28_15-57-17.png icon and choose All Features > Data Assets > Knowledge Base.

    Note

    If you are using the classic console, choose Data Assets > Knowledge Base from the top menu bar.

  3. On the Knowledge Granularity tab, click Add.

  4. In the Add Knowledge panel, enter the Description and Content. Select a knowledge type, knowledge level, and associated database.

  5. 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.image

  • Build knowledge through the data augmentation pipeline.

Batch import knowledge

Only CSV files can be imported.

  1. On the Knowledge Granularity tab, click Batch Import.

  2. Download and review the template. Complete the template with your knowledge data, and then upload the CSV file.

  3. 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.

  1. At the top of the knowledge list page, click Tag Management.

  2. Add a tag.

    Click Add, enter a tag name, and then click OK.

    Note

    You can also modify or delete tags.

  3. Bind tags to knowledge.

    1. In the row of the target knowledge entry, click the tag image icon, and then click Bind.

    2. In the Tag dialog box, click Add.

    3. Select one or more target tags, and then click OK.

      Note

      You 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.

Manage SQL knowledge

To reduce AI errors when you use Copilot, DMS introduces the knowledge base and Similar Queries features, as shown in the following figure.

image

Manage business knowledge

  • Generate business knowledge

    DMS builds business knowledge in three ways: through interactive Q&A with Copilot, manual user additions, and the data augmentation pipeline. For more information, see Add knowledge.

    When Copilot generates SQL, it references this business knowledge and indicates that the knowledge was used.

    image

  • Verify business knowledge

    On the Business knowledge tab of the Table Details page, you can review the generated business knowledge for accuracy. If it is correct, you can change the knowledge level from pending review or pending verification to verified.

    Note

    Only database developers and database and table owners can verify knowledge.

  • Adjust business knowledge

    If business knowledge is incorrect, you can edit it in the area where it is referenced by the SQL, or adjust it directly in the knowledge base. For more information on the latter, see Knowledge base.