Build and manage DataWiki knowledge

Updated at:
Copy as MD

DataWiki knowledge can be built in bulk from metadata or created manually as SQL templates and Ossie models. This topic describes how to build DataWiki knowledge, maintain business documents, build tasks, and the graph ontology in Knowledge management, and review candidate knowledge and user feedback.

Prerequisites

  • Agent Data Gateway is activated, and you can log on to the console. For access instructions, see Quick access to Agent Data Gateway.

  • Your account can open DataWiki. By default, DataWiki knowledge is visible to all tenant members. All users and agents under the same Alibaba Cloud account have read permissions on the knowledge.

  • Only platform administrators can perform management operations, such as reviewing and publishing knowledge, editing authoritative knowledge, deleting, locking, and building knowledge. For more information about administrator permissions, see Manage agent identities and permissions.

Build knowledge in bulk from metadata

A bulk build generates candidate knowledge from metadata at the instance, database, or table level. You can attach business documents as a reference for business definitions during the build.

  1. Log on to the Agent Data Gateway console and select a region in the upper-left corner.

  2. In the left-side navigation pane, click DataWiki, and then click + New in the knowledge directory. Alternatively, go to Knowledge management > Sources & Builds and click + Build Knowledge.

  3. In the creation drawer, select Batch Build Knowledge.

  4. Confirm the scope (instance, database, or table) and the required database. Optionally, attach a business document library.

  5. Configure the following switches as needed.

    • Build & Publish / Publish directly: If enabled, knowledge is published when the task completes. If disabled, the task stays in review, and the knowledge enters the knowledge map only after it is manually adopted.

    • Build catalog / Build: If disabled, no business catalog is generated for this build.

    • Build Graph / Build: If enabled, the relationship graph is built at the same time. If disabled, the graph remains unchanged.

  6. Confirm the settings and click Create and run.

Note

Tasks without Build & Publish enabled stay in review. The knowledge enters the knowledge map only after it is manually adopted. Agents can consume only published knowledge.

Create SQL templates or Ossie models manually

  1. In the knowledge directory, click + New.

  2. Select SQL template or Ossie model.

  3. Enter the knowledge information.

    • SQL template: Enter the title, description, instance, database, SQL statement, and SQL parameters (JSON).

    • Ossie model: Enter the title, description, instance, database, and semantic definition (JSON or YAML).

  4. Click Submit.

Manage business documents

Business documents serve as a reference for business definitions when knowledge is built. On the Knowledge management > Sources & Builds tab, click Manage to open the business documents page.

You can perform the following operations on document libraries and documents:

  • Search document libraries: Search for a document library by name in the library list.

  • Add a document library: Click + Add Document Library to create a document library.

  • Manage a document library: In the Actions column of the target library, manage documents, edit the library, or delete it.

  • Upload documents: In a document library, search for a document by name, or click Upload Document to upload a new document. The list shows the document, size, parsing status, and upload time. After parsing completes, the status changes to Parsed.

Manage build tasks

On the Knowledge management > Sources & Builds tab, click + Build Knowledge to open the same build form as New > Batch Build Knowledge in the knowledge directory. The lower part of the page lists build tasks, including the task ID, status, scope, and update time.

Common task states:

  • Completed: The knowledge has been processed as configured. The scope is displayed as "N tables".

  • Pending Confirmation: Build & Publish was not enabled. Open the task details to review the candidate knowledge.

  • Failed: The build failed. Click View to open the task details and check the failure information.

Configure the graph ontology

On the Knowledge management > Sources & Builds tab, click Graph Ontology to open the ontology configuration. The page contains the Entity Types and Relation Types tabs.

  • Entity Types: The list shows the type name, display name, description, status, source, and actions. Built-in active types include COLUMN, TABLE, and DATABASE.

  • Relation Types: The list additionally shows the head entity → tail entity and cardinality columns. The following table describes the built-in relationship types.

    Relationship type Head entity → Tail entity Cardinality
    HAS_COLUMN TABLE → COLUMN N:N
    HAS_TABLE DATABASE → TABLE N:N
    JOINS_ON_TABLE_TABLE TABLE → TABLE N:N
Note

Limits: 50 entity types and 80 relationship types. Values beyond these limits are truncated. After a limit is reached, automatic extraction no longer creates new types.

Type maintenance supports the following operations:

  • Create a type: On the Entity Types or Relation Types tab, click + Create Type to create a type as needed.

  • Edit and delete: In the type list, you can edit and delete relationship types.

Click Build Graph to trigger a graph build based on the current ontology.

Review pending build tasks

  1. On the Knowledge management > Reviews and feedback tab, view the pending build tasks. Pending tasks are in the Pending Confirmation state. Click View to open the task details.

  2. Click Review Candidate Knowledge to review the candidate knowledge.

    • Search by candidate title or summary.

    • Filter by type and status. The default status filter is Pending Adoption.

    • Click View to open the details of each candidate.

    • Select all is supported. The candidate list displays 20 entries per page by default.

  3. After you verify the candidate content, adopt the candidate knowledge.

Note

Adoption publishes the candidate knowledge. Verify the content before you adopt it.

Handle user feedback

On the Knowledge management > Reviews and feedback tab, open the User feedback tab to view pending knowledge generated from conversation feedback. The knowledge enters the published knowledge map only after it is adopted.

Note

Agents can consume only published knowledge. Knowledge generated from user feedback must be adopted and published before agents can use it.