Create a semantic knowledge base

Updated at:

A semantic knowledge base is an instance in DataWorks Context Graph for unified knowledge management. It automatically discovers data semantics, integrates multi-source business knowledge, and builds a unified and governable knowledge network. After you create a semantic knowledge base, you can build knowledge from personal assets, workspaces, data sources, multimodal files, and Agent conversations, and control the usage scope through administrators and sharing authorizations. A successfully built semantic knowledge base can be used by AI Assistant and Data Agent.

Overview

DataWorks Context Graph integrates metadata, semantic models, and business documents. It uses semantic knowledge bases as the unit of organization and authorization to provide intelligent applications with knowledge retrieval, relationship exploration, and reasoning. A semantic knowledge base organizes information scattered across workspace metadata, data sources, and business documents into browsable, searchable, and authorization-controlled knowledge, so that intelligent applications have consistent business context during Q&A, data retrieval, and analysis.

Semantic knowledge bases are managed as independent instances. A single semantic knowledge base can be reused by multiple intelligent applications without redundant construction in each application.

Key capabilities and use cases

  • Automatic metadata knowledge building: Scans DataWorks workspaces and automatically builds business domain and semantic knowledge for metadata such as tables, columns, tasks, metrics, and lineage.

  • Semantic model generation and management: Generates semantic models based on data sources that describe business entities, dimensions, metrics, and their relationships, unifying business definitions.

  • Multi-source business document integration: Supports uploading local files, or synchronizing documents, images, and audio and video files from sources such as DingTalk, Feishu, Lark, WeCom, Yuque, OSS, and GitHub repositories, to include unstructured materials such as policies, product manuals, and data dictionaries in unified search.

  • Agent conversation knowledge retention: Synchronizes Data Agent conversation records and the knowledge referenced in them, so that the business explanations and metric definitions formed during Q&A are retained as reusable knowledge.

  • Structured knowledge presentation: Uses a large language model to organize knowledge into a wiki with directories, topics, and pages for easy browsing and navigation by business topic. Each piece of content can be traced back to its source and supporting evidence.

  • Knowledge relationship exploration: Displays knowledge objects and their relationships in a knowledge graph, and provides reasoning paths and supporting evidence around business questions for use cases such as impact analysis and metric definition verification.

  • Empowering intelligent applications: Serves as the knowledge foundation for Data Agent and AI Assistant, enabling them to understand business terms and provide more accurate responses during natural language Q&A, data exploration, and code generation.

  • Automated updates and unified authorization: Keeps knowledge in sync through scheduled build tasks and controls the usage scope through fine-grained authorization.

After a knowledge build task runs, the system generates knowledge objects (semantic models and business documents), and a large language model further organizes the knowledge content into a wiki and knowledge graph. For information about how to view, review, and publish knowledge objects, see Manage knowledge objects. For information about how to use the wiki, knowledge graph, and knowledge search, see Use Context Graph.

Relationship with AI Assistant and Data Agent

Context Graph (knowledge base) is an independent module. In the left-side navigation pane of the DataWorks console, it is at the same level as Data Agent and AI Assistant. You create and manage knowledge base instances in this module. Knowledge bases created in Context Graph (knowledge base) can be used in AI Assistant and Data Agent.

If you previously created knowledge bases in AI Assistant, the existing knowledge bases are displayed as local knowledge bases in the interface. Newly created AI Assistant Service instances no longer support creating local knowledge bases. To create a knowledge base, go to Context Graph (knowledge base) for unified creation and management. For more information, see Local knowledge bases (for existing AI Assistant users).

Prerequisites

Complete the following preparations before you use a knowledge base:

  1. DataWorks is activated and you have entered the tenant in which you want to create a knowledge base.

  2. To build knowledge from workspace semantics, make sure that the current account has read permissions on the workspaces and related data assets to be collected.

  3. A serverless resource group and its associated project are prepared for running knowledge build tasks. The selected resource group must have network connectivity and access permissions to the data sources or cloud services required for the build, and must have sufficient available capacity to meet the Compute CU requirement of the task (4 CU by default).

  4. To synchronize the conversations of all tenant members or of specified members through Agent conversation knowledge building, the current account must be assigned the data governance administrator role. This requirement does not apply if you synchronize only your own conversations.

Key concepts

Concept

Description

Knowledge base type

  • Personal knowledge base: By default, only the owner can use it. The owner or an administrator can use Share to grant access to specified users and use Administrator Configuration to add administrators.

  • Enterprise knowledge base: All members under the same DataWorks tenant can view and search the knowledge base by default. Only the owner and administrators can manage it.

Local knowledge base

A knowledge base previously created in AI Assistant by existing AI Assistant users. It continues to be displayed in the interface and supports regeneration, export, and clearing. Newly created AI Assistant Service instances no longer generate local knowledge bases.

Source management

Configures the workspaces and data sources available for knowledge building.

Knowledge building

The process of converting personal assets, workspace metadata, data sources, multimodal files, or Agent conversations into browsable and searchable knowledge.

Build task type

Knowledge build tasks are divided into five types based on the build object: personal asset knowledge base building, workspace semantic building, data source semantic building, multimodal file knowledge building, and Agent conversation knowledge building. When you create a task, select the type that matches the form of the content to be built.

Task definition

Describes the long-term configuration of a build task, including the task name, build scope, trigger method, and runtime environment.

Run instance

An actual execution of a task definition. A single task definition can produce multiple run instances, and each instance has its own run status and logs.

Semantic model

A model that describes business entities, dimensions, metrics, and their relationships in a structured manner, with support for version management and deployment.

Business document

Business materials included in the knowledge base, such as business glossaries, design documents, and operation guides. You can upload local files, or synchronize documents and audio and video files from sources such as DingTalk, Feishu, Lark, WeCom, Yuque, OSS, and GitHub repositories. The content is parsed and included in unified search.

Wiki

Generated by a large language model based on published knowledge objects. It organizes knowledge content into directories, topics, and pages for easy browsing and navigation.

Business domain

A group of data assets categorized by business topic.

Semantic knowledge

Business names, definitions, relationships, hints, synonyms, and query examples extracted and organized from metadata and business materials.

Step 1: Create a semantic knowledge base

  1. Log on to the DataWorks console. In the top navigation bar, switch to the target region.

  2. In the left-side navigation pane, click Context Graph to go to the knowledge base list page by default. On the knowledge base list page, click Create Knowledge Base.

  3. In the Create Knowledge Base dialog, configure the knowledge base information.

    Parameter

    Description

    Name

    Required. Enter an easily identifiable name. The name can be up to 128 characters in length after leading and trailing spaces are removed. We recommend that the name reflect the business scope, such as "Retail Operations Knowledge Base".

    Type

    Required. Select Personal or Enterprise: A Personal knowledge base is visible to and manageable only by its creator. An Enterprise knowledge base is visible to all users in the same tenant, and only authorized users can manage it. For more information, see Knowledge base types and access scopes.

    Description

    Optional. Describe the business scope, target users, and update method of the knowledge base. The description can be up to 1,024 characters in length.

  4. Click Create Knowledge Base. After the knowledge base is created, you can configure administrators for it or share it with other accounts in the tenant. For details, see Manage permissions.

Important

When you delete a knowledge base, all knowledge within it is also deleted. Proceed with caution.

Step 2: Configure sources (optional)

After the knowledge base is created, click the target knowledge base in the list to open its details page, and choose the Source Management tab to open the source management page.

Because accessing online documents requires credentials, you must first configure them as document sources in Source Management before you can use them in multimodal file knowledge build tasks. Supported document sources include DingTalk Docs, Feishu Docs, Lark Docs, WeCom Docs, Yuque Docs, OSS, and GitHub repositories.

After you remove a source, new tasks can no longer select it, but the knowledge results generated by previous tasks are not deleted.

DingTalk Docs

Prerequisite: Log on to the official DingTalk MCP portal and select the official Docs MCP service, select the organization and authorize the document scope to synchronize to create the connection, and then copy the complete HTTPS URL that contains the key parameter.

  1. Go to the Source Management page of the target knowledge base and click Add Source.

  2. Set Source Type to DingTalk Docs.

  3. Configure the following parameters:

    • Source Name: Enter a custom name of up to 256 characters.

    • DingTalk Docs MCP Full URL: Paste the complete HTTPS URL obtained in the prerequisite. This parameter is required. The API key in the URL has a validity period and must be obtained again after it expires.

    • DingTalk Sheets MCP Full URL: Optional. After this parameter is configured, DingTalk sheets can be synchronized. If it is not configured, the system automatically skips sheet synchronization, which does not affect document synchronization.

  4. Select a Document Scope:

    • My Documents: Synchronizes the personal documents of the current user.

    • Specified Knowledge Bases, Directories, or Documents: Limits the synchronization scope to specified resources.

  5. Click Validate Credentials and Scope.

    • If the validation fails, check the credentials, authorization scope, document links, and network access configurations.

  6. After the validation is passed, click Add Source.

Note
  • Supported formats: Native DingTalk documents (with the .adoc extension) and separate image, audio, and video files can be synchronized. After the DingTalk Sheets MCP full URL is configured, DingTalk sheets (with the .axls extension) can also be synchronized. Multidimensional tables, mind maps, and commonly uploaded files such as PDFs, Word documents, and Markdown files are not included in the synchronization scope.

  • Content conversion: During synchronization, the document body is converted to Markdown format. Images, audio, and video embedded in the document are downloaded and their access links are retained.

  • Link validation: In Document Scope, enter a knowledge base, directory, or document link that starts with alidocs.dingtalk.com. If you enter the MCP service URL in the link input box by mistake, the validation returns an invalid DingTalk URL error.

  • Credential security: For security reasons, saved MCP Keys are not displayed on the edit page. If you do not need to change the credentials when editing a source, leave the corresponding input fields empty to retain the existing configuration.

Feishu Docs

Prerequisites: Create or select a custom enterprise application on the Feishu Open Platform and obtain its App ID and App Secret. Add the bot capability to the application and grant the following read-only permissions:

  • wiki:wiki:readonly

  • docx:document:readonly

  • drive:drive:readonly

Create and publish the application version. In each Feishu Wiki space that you want to synchronize, add the application bot as a member and grant it the "Can Read" permission.

Procedure

  1. Go to the Source Management page of the target knowledge base and click Add Source.

  2. Set Source Type to Feishu Docs.

  3. Configure the following parameters:

    • Source Name: A custom name with a maximum length of 256 characters.

    • App ID: The App ID obtained in the prerequisites.

    • App Secret: The App Secret obtained in the prerequisites.

  4. Select the document scope:

    • All Authorized Scope: Synchronizes all Wiki spaces accessible to the application bot.

    • Specified Knowledge Bases, Directories, or Documents: Precisely limits the synchronization scope. To synchronize an independent Docx document, provide its link.

  5. Click Validate Credentials and Scope.

    • If the validation fails, check the credentials, authorization scope, document links, and network access configuration.

  6. After the validation is passed, click Add Source.

Note
  • Supported formats: Only native documents in Feishu Wiki (Wiki nodes with obj_type=docx) can be synchronized.

  • Unsupported formats: Multidimensional tables (Bitable), mind maps (Mindnote), spreadsheets (Sheets), and directly uploaded files (such as PDFs and Word documents) are not included in the synchronization scope.

  • Credential security: For security reasons, saved App Secrets are not displayed on the edit page.

  • Editing rules: When you edit a saved source, if you do not need to change the credentials, leave the App Secret input field empty to retain the existing configuration. If you change the App ID, you must also provide a new App Secret.

Lark Docs

Prerequisites: Create or select a custom enterprise application on the Lark Open Platform and obtain its App ID and App Secret. Add the bot capability to the application and grant the following read-only permissions:

  • wiki:wiki:readonly

  • docx:document:readonly

  • drive:drive:readonly

Create and publish the application version. In each Lark Wiki space that you want to synchronize, add the application bot as a member and grant it the "Can Read" permission.

Procedure

  1. Go to the Source Management page of the target knowledge base and click Add Source.

  2. Set Source Type to Lark Docs.

  3. Configure the following parameters:

    • Source Name: A custom name with a maximum length of 256 characters.

    • App ID: The App ID obtained in the prerequisites.

    • App Secret: The App Secret obtained in the prerequisites.

  4. Select the document scope:

    • All authorized scope: Synchronizes all Lark Wiki spaces accessible to the application bot.

    • Specified Wiki spaces: Precisely limits the synchronization scope. Only Wiki space or settings page links are supported.

  5. Click Validate Credentials and Scope. If the validation fails, check the credentials, authorization scope, document links, and network access configuration.

  6. After the validation is passed, click Add Source.

Note
  • Supported formats: Docx documents in Lark Wiki, which are converted to Markdown format during synchronization.

  • Unsupported formats: Sheet, Base/Bitable, MindNote, and attachments are not included in the synchronization scope.

  • Credential security: For security reasons, a saved App Secret is not displayed on the edit page. When you edit a saved source without changing the credentials, you can leave the App Secret field empty to retain the original configuration. If you change the App ID, you must also provide a new App Secret.

WeCom Docs

Prerequisites: Use a WeCom smart bot in API mode and obtain its Bot ID and Bot Secret. To create a bot, perform the following steps:

  1. Log on to the WeCom admin console by using an administrator account or an account that has application management permissions.

  2. Go to Management Tools > Smart Bot, and create or select the bot that you want to connect.

  3. Select API mode, configure the bot name, avatar, and visibility scope, and then save the settings.

  4. In the bot authorization configuration, enable permissions related to documents and WeDrive.

  5. On the bot details or development configuration page, copy the Bot ID and Secret.

Procedure

  1. Go to the Source Management page of the target knowledge base, and click Add Source.

  2. Set Source Type to WeCom Docs.

  3. Configure the following parameters:

    • Source Name: A custom name that contains up to 256 characters.

    • Bot ID: The Bot ID obtained in the prerequisites.

    • Bot Secret: The Bot Secret obtained in the prerequisites.

  4. Select the shared spaces that you want to synchronize. You can enter a space name to search, or leave the field empty to query all spaces. You do not need to add the bot as a member of the shared space. The synchronization scope is determined by the shared spaces and documents that the bot can actually search and read.

  5. Click Validate Credentials and Scope. If the validation fails, check the bot credentials and permissions.

  6. After the validation is passed, click Add Source.

Note
  • Supported formats: WeCom Word, regular spreadsheets, and smart spreadsheets.

  • Credential security: For security reasons, a saved Bot Secret is not displayed on the edit page. When you edit a saved source without changing the credentials, you can leave the Bot Secret field empty to retain the original configuration. If you change the Bot ID, you must also provide a new Bot Secret. The Bot Secret is required when you re-query spaces. If you leave it empty, the currently selected spaces are retained.

  • If a Secret is leaked, lost, or reset, generate a new Secret and re-validate.

Yuque Docs

Prerequisites: Create a read-only Token for each Yuque team that you want to synchronize, and note the corresponding space Host of the team. To create a Token, perform the following steps:

  1. Create a Yuque team, or go to an existing target team.

  2. Open the Team Management page, go to the Developer section, and select Create Token.

  3. Grant only the read documents and read knowledge base permissions. Do not grant write or member management permissions.

  4. Copy the Token and note the full space Host of the team. The Token and Host must be configured as a pair.

Note

Use a team read-only Token. Do not use a personal Token as the credential for a production data source.

Procedure

  1. Go to the Source Management page of the target knowledge base and click Add Source.

  2. Set Source Type to Yuque Docs.

  3. Enter a Source Name (a custom name with up to 256 characters) and configure 1 to 32 Yuque teams. For each team, specify the following information:

    • Yuque Host: The space URL of the team, for example, https://example.yuque.com.

    • Team Read-only Token: The read-only token created for the team in the prerequisites.

  4. Select the document scope:

    • All Team Knowledge Bases: Synchronizes all knowledge bases under the team.

    • Specified Knowledge Bases: Specifies knowledge base URLs to limit the synchronization scope, for example, https://example.yuque.com/team/repository.

  5. Click Validate Credentials and Scope. The validation result is displayed for each team.

  6. After validation succeeds, click Add Source.

Note
  • Supported formats: Yuque documents and Yuque data tables. Sheets are not included in the synchronization scope.

  • Credential security: For security reasons, saved tokens are not displayed on the editing page. When you edit a saved source without changing the credentials, you can leave the Token field empty to retain the existing configuration.

  • If a token is leaked, revoked, expired, or the Host is changed, create and submit a matching new token and then re-validate.

OSS

Prerequisite: If you use the Existing OSS Data Source access method, an OSS data source is created in the target workspace. If you use the RAM Role Authorization access method, a RAM role that has OSS access permissions is created.

  1. Go to the Source Management page of the target knowledge base and click Add Source.

  2. Set Source Type to OSS.

  3. Enter a Source Name: a custom name with up to 256 characters.

  4. Select an Access Method and configure the parameters based on the method that you select:

    • Existing OSS Data Source: Reuses an OSS data source that is created in a workspace. Specify the Data Source Workspace and the OSS Data Source. The Bucket parameter is optional. Enter a bucket only if the data source does not have a bucket configured. If the data source already has a bucket, that bucket is used.

    • RAM Role Authorization: Accesses OSS directly through a RAM role. Select a role for Select Role, and then enter the Endpoint (an address that starts with http:// or https://) and the Bucket.

  5. Enter the OSS Directory or Match Expression: limits the synchronization scope. Wildcards are supported, for example, file/sub_file/*/chats/*.jsonl.

  6. Click Add Source.

Note
  • Synchronization scope: Only objects that match the OSS directory or match expression are synchronized. The match expression supports the * wildcard.

GitHub Repository

Prerequisite: Create a GitHub personal access token (PAT) that is granted only the permission to read repository content. To create a token:

  1. In GitHub Settings, go to Developer settings > Personal access tokens and generate a token.

  2. Grant the token the permission to read the target repository content, and confirm that it can access the target branch.

Procedure

  1. Go to the Source Management page of the target knowledge base and click Add Source.

  2. Set Source Type to GitHub Repository.

  3. Configure the following parameters:

    • Source Name: A custom name with up to 256 characters.

    • Repository URL: The root URL of the repository, for example, https://github.com/owner/repository. Do not use a file or directory URL.

    • Branch: The target branch to synchronize, for example, main.

    • Access Token: The personal access token created in the prerequisites.

    • Included File Patterns: Leave empty to apply no additional filtering. The ** and * wildcards are supported, for example, **/*.md.

    • Excluded File Patterns: Leave empty to apply no additional filtering. The ** and * wildcards are supported, for example, **/test/**.

  4. Click Validate Credentials and Scope.

    • If validation fails, check the token permissions, target branch, and repository URL.

  5. After validation succeeds, click Add Source.

Note
  • Supported: Text files in the target branch that match the included patterns.

  • Not supported: Files that match the excluded patterns, and repository content that the token cannot read.

  • Credential security: For security reasons, saved tokens are not displayed on the edit page. When you edit a saved source and do not need to change the credential, leave the token field empty to keep the original configuration.

DataAgent Conversation

  1. Go to the Source Management page of the target knowledge base and click Add Source.

  2. Under the Agent Knowledge group, set Source Type to DataAgent Conversation.

  3. Configure the following parameters:

    • Source Name: A custom name with up to 256 characters.

    • Agent Type: Currently only DataAgent is supported. A single source synchronizes only one type of Agent conversation at a time.

  4. Select the conversation scope:

    • All Tenant Member Conversations: Synchronizes the conversations of all members in the current tenant.

    • Specified Member Conversations: Synchronizes only the conversations of the selected members.

    • Only My Conversations: Synchronizes only the conversations of the current account.

  5. Click Validate Credentials and Scope. If the validation fails, check the account permissions, conversation scope, and Agent type configurations.

  6. After validation succeeds, click Add Source.

Note
  • Permission requirement: Synchronizing all tenant member or specified member conversations requires the data governance administrator role. Synchronizing only your own conversations has no such requirement.

  • Synchronization granularity: A single source synchronizes only one type of Agent conversation at a time. To synchronize multiple types, add a separate source for each type.

Step 3: Build knowledge

After you enter the target knowledge base, click Build Knowledge in the upper-right corner of the details page and select a build method. The system provides five build methods in card form. Select the type that matches the form of the content to be built:

  • Personal Asset Knowledge Base Building: Automatically binds the personal assets of the current user, including production MaxCompute tables and production periodic tasks.

  • Workspace Semantic Building: Select a workspace to create a knowledge build task from scratch.

  • Data Source Semantic Building: Select a data source and specify tables to build knowledge with fine-grained control.

  • Multimodal File Knowledge Building: Synchronize documents from DingTalk, Feishu, Lark, WeCom, or Yuque, or upload local multimodal files such as images, audio, and video, to parse the content and build knowledge.

  • Agent Conversation Knowledge Building: Extracts knowledge from Agent conversations and builds a knowledge graph as needed.

Personal asset knowledge base building

Suitable for quickly adding the personal assets of the current user to a knowledge base. After you select this build method, the system automatically binds production MaxCompute tables and production periodic tasks as the build scope. You do not need to specify a scope or upload files. The task is configured in five sections: Scan Scope, Runtime Environment, DataAgent Conversation Analysis, Monitoring Rules, and Update Method.

Parameter

Required

Description

Task Name

Yes

Specify a unique and easily identifiable name for the build task for easier management.

Scan Scope

Yes

The system automatically binds the personal assets of the current user, including production MaxCompute tables and production periodic tasks. You do not need to specify a scope. Expand Scan Content Description to view the list of automatically bound assets.

Data Profiling

No

A toggle, enabled by default. When enabled, data sampling and profiling statistics are added to improve knowledge semantic quality. Data profiling triggers SQL sampling queries (MaxCompute / Spark, etc.), which incurs a small amount of compute resource consumption. Tables that fail or time out are automatically skipped without affecting overall generation.

Runtime Environment

Yes

Select the runtime workspace and runtime resource group for the task. Includes the following settings:

  • Runtime Workspace (required): The workspace in which the build task runs.

  • Runtime Resource Group (required): Select a serverless resource group for running the build task. Make sure that it has network connectivity and access permissions to the required data sources and large language model services.

  • Compute CUs (optional): The compute resources allocated for the build task. The default value is 4.

  • Large Language Model (required): The large language model used for semantic analysis. The default value is auto (currently qwen3.8-flash).

DataAgent Conversation Analysis

No

Optional module. After you enable Extract DataAgent Conversation Knowledge, the system extracts knowledge from DataAgent conversations that use the current knowledge base and includes it in this build. If there are no conversations in the last 1 day, conversation extraction is skipped for this run. Use Conversation Source to select the conversations to extract.

Monitoring Rules

No

Optional module. Associate an existing task monitoring rule, or click Create Rule to create a rule that monitors exceptions such as build task failures and tasks that do not complete within the expected time.

Update Method

Yes

Defines the trigger method for the task. Includes the following settings:

  • Run Policy: Defines the trigger method for the task.

    • Manual: The task does not run automatically after creation and must be triggered manually in Build Management.

    • Scheduled: The task runs automatically on the configured execution cycle and time.

  • Execution Cycle: Required when Run Policy is set to Scheduled. Options: Monthly, Weekly, Daily, or Hourly.

  • Execution Time: Required when Run Policy is set to Scheduled. Specifies the exact start time within each execution cycle.

Note
  • Building personal assets is expected to take 12 hours to 1 day. Reserve sufficient time.

  • Knowledge scanning invokes a large language model (LLM) for semantic analysis and incurs Token consumption. Initiate build tasks based on actual needs.

Workspace semantic building

Suitable for performing a full scan and initial build from a configured workspace.

Parameter

Required

Description

Task Name

Yes

Specify a unique and easily identifiable name for this build task to facilitate subsequent management. Maximum: 128 characters.

Scan Scope

Yes

Select a DataWorks workspace as the knowledge source. The system analyzes the tasks and tables in the workspace. After you select a workspace, the page displays the estimated number of tasks and tables to be analyzed.

Data Profiling

No

A toggle option. We strongly recommend that you enable this option to improve knowledge quality.

  • Disabled: Only basic metadata analysis is performed, including parsing metadata schemas, integrating Data Modeling information, and parsing task code and lineage.

  • Enabled (default): In addition to basic analysis, deep analysis is performed, including:

    • Data sampling and profiling statistics: such as distinct/null value distribution, to assist PII identification.

    • LLM-based deep semantic enhancement: such as automatically generating table/column descriptions, data domain classification, identifying derived metrics, and aggregating synonyms and glossaries.

Runtime Environment

Yes

Select the runtime workspace and runtime resource group for this task. Includes the following settings:

  • Runtime Workspace (required): Specifies the workspace in which the build task runs, that is, the runtime location of the task. It can be different from the workspace being analyzed.

  • Runtime Resource Group (required): Select a serverless resource group for running the build task. Make sure that it has network connectivity to the required data sources and large language model services, and reserve sufficient available capacity for the Compute CUs.

  • Compute CUs (optional): The compute resources occupied by this build. You can configure 4 to 16 CUs. The default value is 4. If the number of tables exceeds 30,000, we recommend that you increase the number of CUs.

  • Large Language Model (required): Select the large language model used for semantic enhancement. Different models vary in capabilities and token consumption, which directly affects the quality and cost of knowledge building.

Update Method

Yes

This section defines the trigger method of the task and includes the following configurations:

  • Run Policy: Defines how the task is triggered.

    • Manual: The task does not run automatically after creation. You must manually trigger it in Build Management.

    • Scheduled: The task runs automatically at the interval and time you specify.

  • Execution Cycle: Required when Run Policy is set to Scheduled. Specifies the frequency of automatic execution. Options: Monthly, Weekly, Daily, or Hourly.

  • Execution Time: Required when Run Policy is set to Scheduled. Specifies the exact start time within each execution cycle.

Note
  • Knowledge scanning calls a large language model (LLM) for semantic analysis, which consumes tokens. Initiate build tasks based on your actual needs.

  • When you use workspace semantic building, the metadata collection for tables does not differentiate by data source type. Most data sources in the selected workspace can be built into structured knowledge.

Data source semantic building

Suitable for building knowledge based on specific data sources by selecting tables with fine granularity to generate semantic models.

Parameter

Required

Description

Task Name

Yes

A custom task name used to identify and search for the task in Build Management. Format: 2 to 64 characters, starting and ending with a letter or digit.

Business Objectives and Focus

Yes

Describe your business goals and focus areas in business language. The system uses this information to plan the scan scope and model output. Example: Analyze revenue and renewal metrics across all regions in a unified manner, and ensure consistent definitions for revenue metrics.

Data scope

  1. Select analysis objects:

    1. Data source type: Select the data source engine to analyze, such as MaxCompute, Hologres, StarRocks, or DLF.

    2. Data source: Select a configured data source under the selected type. If no options are available, configure a data source in DataWorks first.

  2. Configure the runtime environment and connectivity:

    1. Runtime Workspace: The workspace in which the task runs. Select it manually for the MaxCompute or DLF type. For the Hologres or StarRocks type, it is determined automatically by the selected data source and does not require manual selection.

    2. Runtime Resource Group: Select the serverless resource group for task execution. Reserve sufficient available capacity for the Compute CUs.

    3. Large Language Model: Select the large language model used for semantic enrichment. Models differ in capabilities and token consumption, which directly affects the quality and cost of knowledge building.

    4. Connectivity test: This test must pass to ensure that the resource group can access the data source.

  3. Define the analysis scope:

    1. Analysis scope: Select the scope of analysis by project or schema. Only tables within the selected scope participate in semantic model generation.

    2. Seed tables: Select starting tables for table selection, or import a schema template as seed input to help the system determine which tables to start analyzing and expanding from.

Metric import

No

Import metric definition files by using a fixed Excel template to supplement metric definitions and dependent columns, which improves the accuracy of generated results. After the import, the page displays the number of verified metrics. During task execution, the final table selection scope determines the admission results.

Preferences

No. All options are selected by default.

Configure data filtering rules. Tables that match these rules are excluded from analysis. All rules are enabled by default. You can disable rules as needed:

  • Exclude temporary tables (tables whose names contain standalone terms such as tmp, temp, bak, backup, or old).

  • Exclude version copies (tables whose names end with _v followed by a number, _new, or _copy).

  • Exclude test tables (tables whose names contain standalone terms such as test, demo, sandbox, or mock). Exclude tables in test environments (tables are excluded when their catalog, database, or schema matches test environment identifiers).

  • Exclude tables with test descriptions (tables whose comments contain keywords such as testing, joint debugging, sample, or sandbox). Retain only the latest periodic tables (identify date or period suffixes and retain only the three tables with the latest names in each table family by name sorting).

Reference files

No

Upload local files or add URLs as business reference materials to assist semantic generation and help the system understand the business context. Supported file formats include PDF, Word, Markdown, text, and YAML.

Update method

Yes

This section defines the trigger method for the task and includes the following settings:

  • Run policy: Defines the trigger method for the task.

    • Manual: The task does not run automatically after creation. You must manually trigger it in Build Management.

    • Scheduled: The task runs automatically at the schedule and time that you specify.

  • Execution cycle: Required when the run policy is set to Scheduled. Specifies the frequency of automatic execution. Options: Monthly, Weekly, Daily, or Hourly.

  • Execution time: Required when the run policy is set to Scheduled. Specifies the exact start time within each execution cycle.

Multimodal file knowledge building

This option is suitable when multimodal files such as documents, images, and audio and video are the primary knowledge source. It supports Local upload and online sources such as DingTalk, Feishu, Lark, WeCom, Yuque, OSS, and GitHub repositories. Online sources are available only after the corresponding platform source has been configured in Source Management. For configuration instructions, see Step 2: Configure sources (optional).

When you select Local Upload, upload files in the Build Scope section. The following table describes the parameters:

Parameter

Required

Description

Upload Files

Yes

This is the core input for knowledge building. You can drag and drop files or folders, or click Upload Files or Upload Folder to upload. When you upload a folder, the original directory structure is preserved. Upload limits:

  • Quantity: A maximum of 100 files can be uploaded at a time.

  • Size: A regular file cannot exceed 128 MB, and an audio or video file cannot exceed 1,024 MB.

  • Format: Six categories of files are supported: documents, structured data, technical text, images, audio, and video. For details, see the table below. Compressed files (.zip, .rar) and legacy Office files (.doc, .xls) are not supported. To upload multiple files in bulk, use the upload folder feature.

The following file formats are supported for local file uploads:

File category

Supported formats

Documents

.md, .txt, .pdf, .docx, .xlsx, .pptx, .html, .htm

Structured data

.csv, .tsv, .json, .jsonl, .yaml, .yml, .xml

Technical text

.sql, .log, .conf, .properties

Images

.png, .jpg, .jpeg, .gif, .bmp, .tif, .tiff, .webp

Audio

.mp3, .m4a, .wav, .ogg, .aac, .flac, .amr

Video

.mp4, .mov, .m4v, .avi, .mkv, .webm

Configure the following parameters in Runtime Environment:

Parameter

Required

Description

Runtime Workspace

Yes

The workspace in which this build task runs, that is, where the task is executed. It can be different from the workspace being analyzed.

Runtime Resource Group

Yes

Select a serverless resource group for running the build task. Make sure that it has network connectivity to the required data sources and large language model services, and reserve sufficient available capacity for the Compute CUs.

Compute CUs

No

The compute resources occupied by this build. You can configure 4 to 16 CUs. The default value is 4.

Large Language Model

Yes

Select the large language model used for semantic enrichment or document parsing. The default value is auto (currently qwen3.8-flash).

Agent conversation knowledge building

This option is suitable for retaining the business explanations, metric definitions, and analysis conclusions formed during Data Agent Q&A as reusable knowledge. The task synchronizes configured DataAgent conversation sources, extracts knowledge from the conversations, and builds a knowledge graph as needed.

Prerequisite: A DataAgent conversation source has been added in Source Management. For configuration instructions, see DataAgent Conversation.

Configure the following parameters in Build Scope:

Parameter

Required

Description

Task Name

Yes

Specify a unique and easily identifiable name for this build task to facilitate subsequent management.

Conversation Source

Yes

Select a DataAgent conversation source that has been added in Source Management. The synchronization scope inherits the configuration of the source in source management.

Build Knowledge Graph after Extraction

No. Enabled by default.

When enabled, the system extracts conversation knowledge and automatically builds a knowledge graph. When disabled, only conversation knowledge is extracted without building a knowledge graph.

Configure the following parameters in Runtime Environment:

Parameter

Required

Description

Runtime Workspace

Yes

The workspace in which this build task runs, that is, where the task is executed. It can be different from the workspace being analyzed.

Runtime Resource Group

Yes

Select a serverless resource group for running the build task. Make sure that it has network connectivity to the required data sources and large language model services, and reserve sufficient available capacity for the Compute CUs.

Compute CUs

No

The compute resources occupied by this build. You can configure 4 to 16 CUs. The default value is 4.

Large Language Model

Yes

Select the large language model used for conversation knowledge extraction. The default value is qwen3.8-max.

Configure the run policy in Update Method. If you select Manual, the task runs only when manually triggered. If you select Scheduled, you can set the execution cycle and time on a monthly, weekly, or daily basis, and the system runs the task automatically.

Note

Conversation content keeps growing as Data Agent is used. We recommend that you set Update Method to scheduled running to keep knowledge in sync with conversations.

Step 4: Build management

After you start knowledge building, you can view build tasks in build management. On the knowledge base details page, click the Build Management tab to manage task definitions and run instances. Each time a task runs, a run instance is generated.

  • Task definitions

    Each task definition contains the task name, task type, build scope, trigger method, runtime workspace, runtime resource group, compute CUs, large language model, and task status. You can search by task name, filter by task type, trigger method, and enabled status, and refresh the task definitions.

    Available operations:

    • Run Now: Manually triggers a build.

    • Edit: Modifies configurations such as the task name and trigger method.

    • Enable / Disable: Controls the automatic triggering of scheduled tasks.

    • Delete: Removes a task definition. A task cannot be deleted while it is running.

  • Run instances

    Run instances display the task name, type, trigger method, run status, overall progress, start time, credits consumed, and operations for each execution. You can filter by run status, task type, and trigger method. Overall Progress is the percentage of stages completed by the current instance, and Credits Consumed is the number of credits consumed by this run. Knowledge base upgrade tasks also appear in the run instance list, with the task type displayed as Version Upgrade. Available operations:

    Important

    The running time of the instance depends on the size of the knowledge content to be built. The process may take a long time. Wait patiently.

    • View Run: Opens the run instance details, where you can view the execution status of each stage in the build pipeline and the instance logs.

    • Source Files: Views the input files used for this build.

    • View Outputs: Views the knowledge objects generated by this build.

    • Export: Exports the information about this run.

    • Cancel: Cancel instances that are still eligible for termination.

    • Retry: Re-initiate execution for failed or terminated instances that allow rerun.

  • Running instance details

    Click View Run to open the run instance details. The details page contains the following content:

    • Build pipeline: Displays the build process as an execution graph, which consists of four stages in sequence: Initialization, Synchronize document data sources, Build document graph, and Global summary. You can view the status of each stage. A failed stage is marked in red.

    • Instance logs: On the Instance Logs tab, view the detailed logs of this run to identify the cause of a failure.

    When the status of a running instance is "Failed", perform the following steps:

    1. Identify the issue: In the Running Instances list, click View Run for the failed task. On the details page, locate the red failed step in the execution graph.

    2. Analyze logs: Open the logs of the failed step and troubleshoot based on the error message by referring to the following table.

    3. Resolve and retry: After you fix the issue, go back to the Task Definition page and click Run Now.

Error category

Typical log clues

Action

File format

The log indicates that formats such as .doc, .xls, and compressed files (such as .zip and .rar) are not supported, or a single file exceeds the size limit (128 MB for regular files and 1,024 MB for audio and video files).

Refer to the file format list in the Multimodal file knowledge building section. Convert the file to a supported format or split oversized files, and then upload again.

Resource group

The log indicates that the serverless resource group is unavailable, has exceeded its quota, or is not associated with a project.

Check the resource group status and associated project. Refer to the Prerequisites section to verify the resource group configuration.

Workspace permissions

The log indicates that access to metadata, data assets, or the workspace is denied.

Contact the workspace administrator to grant the required read permissions on the target workspace and data assets.

Network connectivity

The log indicates a timeout or connection failure when accessing a data source or cloud service.

Check whether the resource group can reach the required data sources and cloud services over the network.

Source data access

The log indicates that the source table or source asset does not exist or returns empty results.

Verify that the source data still exists and that the path and identity credentials are valid. If necessary, narrow the collection scope and retry.

After you fix the issue, click Run Now again in the task definition.

Step 5: Use the knowledge base

After the build task succeeds, the knowledge base becomes available. The following operations are supported:

  • Browse the wiki, and view the knowledge graph and reasoning paths.

  • Use unified knowledge search.

  • Use the knowledge base in Data Agent and AI Assistant.

For more information, see Use Context Graph.

The semantic models and business documents generated during the build can be viewed, reviewed, and deployed in Knowledge Objects. For more information, see Manage knowledge objects.

Access control

The availability of a knowledge base depends on its type and authorization status.

  • Enterprise knowledge base: Available to all members within the same tenant.

  • Personal knowledge base: Available only to the owner by default. Other users or intelligent applications must be granted access by the owner or an administrator through the sharing operation.

  • Application authorization restrictions: Data Agent and AI Assistant cannot be set as knowledge base administrators. They can only be authorized as consumers through sharing.

Step 6: Configure settings and permissions

After you configure the knowledge base, you can assign multiple administrators for daily management. You can also share the knowledge base with users, AI Assistant instances, or Data Agent instances to provide knowledge reasoning capabilities for the agent context.

Configuration management

Go to the target knowledge base and click Configuration Management at the top of the details page to modify basic information, administrators, and sharing scope. Configuration Management is available only when the current user has at least one configuration permission. The visible configuration sections are determined by permissions, and not all users can see all sections.

  1. Basic information

    Modify the knowledge base name, type, and description. The save rules are the same as those for creating a knowledge base. Closing the page during saving may be restricted to avoid losing results.

  2. Administrator settings

    In Administrator Settings, you can add tenant users as co-maintainers of the knowledge base. Administrators can collaboratively maintain the knowledge base, but only the owner can delete or clear the knowledge base. Procedure:

    1. Enter a name or account to search for users in the same tenant.

    2. Select a user and confirm the addition. The new administrator appears in the administrator list, which also displays the owner.

    3. To revoke permissions, click Remove and confirm. After removal, the user immediately loses knowledge base management permissions. The owner cannot be removed.

  3. Sharing settings

    Sharing Settings is displayed only when the knowledge base type and the current user's permissions allow it. This section is used to grant access to the knowledge base to other objects. Supported object types: users, Data Agent instances, and AI Assistant Service instances.

    1. Switch the authorization object type: User, Data Agent, or AI Assistant Service.

    2. Search for the target object by name or ID.

    3. Select an object and confirm the authorization. The authorized object is displayed in the Authorized list.

    4. To revoke access, click Remove and confirm.

    Sharing authorization allows the target object to use the knowledge base for knowledge search. It does not grant knowledge base management permissions.

Role permissions

Operation

Owner

Administrator

Regular member of enterprise knowledge base

Object with sharing authorization only

View and search knowledge

Supported

Supported

Supported

Search only

Modify knowledge base configurations

Supported

Supported

Not supported

Not supported

Configure and run builds

Supported

Supported

Not supported

Not supported

Upload and delete business documents

Supported

Supported

Not supported

Not supported

Administrators and sharing authorization

Supported

Supported

Not supported

Not supported

Clear knowledge base semantic data

Supported

Not supported

Not supported

Not supported

Delete a knowledge base instance

Supported

Not supported

Not supported

Not supported

Content language

Knowledge base content supports Simplified Chinese and English. Each knowledge base maintains only one content language.

  • During the first build, the system determines the content language of the knowledge base based on the language setting in the upper-right corner of the DataWorks console. [To be confirmed: whether the rule that the language is locked at the first build and cannot be changed remains unchanged]

  • After the language is determined, all subsequent builds use the same language. Switching the console language only changes the console interface and does not change the language of existing knowledge.

  • Directly changing the content language of an existing knowledge base is not supported. To use a different language, create a knowledge base and initiate the first build under the target page language.

  • Physical table names, column names, SQL statements, code, IDs, original tags, and reference evidence are not translated. Therefore, an English knowledge base may still contain Chinese characters from the source data.

Upgrade legacy knowledge bases

Legacy knowledge bases must be upgraded before you can use Wiki and Knowledge Graph. The upgrade can be initiated by the knowledge base owner or administrator. Regular members can view the knowledge base and use available features but cannot perform the upgrade.

  1. Open the knowledge base list, find the legacy knowledge base marked as Upgradable, and click the mark.

  2. Read the upgrade instructions and select the resource group and resource group project to use for the upgrade.

  3. Click Confirm Upgrade. After the upgrade task is created, you can view the progress and results in Running Instances under Build Management. The task type is displayed as Version Upgrade.

Note

The upgrade generates Wiki and Knowledge Graph based on all baseline data in the current knowledge base and incurs a small amount of token consumption. Do not initiate other knowledge build tasks during the upgrade. If a build task is currently running, cancel it or wait for it to finish, and then refresh the page before initiating the upgrade. The upgrade does not delete historical knowledge sources. A failed upgrade does not affect existing knowledge base data or normal usage. For information about local knowledge bases for existing AI Assistant users, see Local knowledge bases (for existing AI Assistant users).

Local knowledge bases (for existing AI Assistant users)

The knowledge base has been separated from AI Assistant as an independent module. For existing AI Assistant users, knowledge bases previously created in AI Assistant are displayed as local knowledge bases in the interface and remain usable. When the knowledge base module is embedded in AI Assistant, local knowledge bases are displayed in the personal knowledge base section of the knowledge base list. You can click a local knowledge base to go to the knowledge base management page of AI Assistant.

  • Supported operations for local knowledge bases: Existing local knowledge base features remain available, including regeneration, export, and clearing.

  • Differences from the knowledge base module

    Item

    Local knowledge base (legacy)

    Knowledge base module

    Entry

    The Knowledge Base tab on the AI Assistant instance details page

    Knowledge Base in the left-side navigation pane of the console

    Whether creation is supported

    Newly created AI Assistant Service instances no longer generate local knowledge bases.

    Supported

    Ownership

    Belongs to a single AI Assistant Service instance

    Independent instance that can be reused by multiple intelligent applications

    Knowledge base type

    No type distinction

    Supports personal knowledge bases and enterprise knowledge bases

    Sharing method

    Used only within the current instance

    Supports granting access to users, Data Agent, or AI Assistant Service through Share

  • Differences from newly created AI Assistant Service instances: Newly created AI Assistant Service instances no longer generate local knowledge bases, which means you can no longer create knowledge bases within AI Assistant Service. To create a knowledge base, go to the Context Graph (knowledge base) module for unified creation and management, and then use it in AI Assistant Service or Data Agent as needed. To use Wiki and knowledge graphs for existing knowledge bases, see Upgrade legacy knowledge bases.

FAQ

  • Q: Why are source management or knowledge building buttons not clickable?

    A: Your account may have only read-only or shared usage permissions. Contact the knowledge base owner or administrator to verify your permissions.

  • Q: Why can't I see all sections in configuration management?

    A: The system displays only the sections that you have permission to manage. For example, having permission to edit basic information does not necessarily mean you can manage the sharing scope.

  • Q: Why are there no available workspaces or data sources on the build page?

    A: The source has not been added to the knowledge base. Add it in source management first, and then return to the page. The available options will be refreshed.

  • Q: What do I do if DingTalk or Feishu source validation fails?

    A: Check the application credentials, read-only permissions, document member permissions, document scope, and the network access configuration of the resource group. After confirming these settings, click Re-validate.

  • Q: What do I do if a knowledge base cannot be upgraded?

    A: If you do not see the Upgradable tag, the knowledge base may have already been upgraded, your account may not be the owner or an administrator, or the knowledge base version information may be temporarily unavailable. Refresh the list and verify your account permissions. If the tag is visible but you cannot submit the upgrade, a build task is usually running for the same knowledge base. Cancel or wait for the task to finish, manually refresh the page, and then try again. A failed upgrade does not affect the existing knowledge base data or normal usage.

  • Q: Why does deleting a task fail?

    A: The task may still be running, in the process of being deleted, or depended on by other tasks. Terminate active instances and remove dependencies first, and then retry the deletion.

  • Q: Why can't I create a knowledge base in AI Assistant Service?

    A: Knowledge bases have been separated into an independent module for unified management. Newly created AI Assistant Service instances no longer generate local knowledge bases. Create a knowledge base in the Context Graph (knowledge base) module. After creation, you can use it in AI Assistant Service and Data Agent.

  • Q: Can existing local knowledge bases still be used?

    A: Yes. Knowledge bases previously created in AI Assistant Service by existing users are displayed as local knowledge bases in the interface. You can still regenerate, export, and clear them without affecting their original usage.

  • Q: What is the difference between an administrator and sharing authorization?

    A: Administrators can configure, upload to, and build knowledge bases. Users, Data Agent instances, or AI Assistant Service instances that are granted access through Share can only use the knowledge for search or Q&A and cannot modify the knowledge base.

Recommendations

  • Plan the source scope before the first build to avoid scanning irrelevant workspaces.

  • Assign a clear owner for the knowledge base and configure backup administrators.

  • Enable data profiling for knowledge bases that require high semantic quality, and monitor SQL sampling and token consumption.

  • After a successful build, check the running instances, knowledge graph coverage, and knowledge search results together to verify usability.

  • Unpublished versions of semantic models do not automatically replace the currently deployed version. Review them before you deploy.

  • Disabling a task pauses subsequent triggers, while deleting a task removes the task definition. Do not confuse the two operations.

  • Enrich source table and column comments, data standards, owners, lineage, and data quality rules to improve automatic build quality. Manually review core metrics, sensitive columns, and key queries.

  • Regularly clean up expired materials and test assets to reduce search noise.

  • Follow the principle of least privilege and promptly revoke access when a user no longer needs to access the knowledge base.