A knowledge base is used to configure enterprise knowledge and word preferences. After configuration, the model learns this knowledge and uses it for data retrieval and analysis. This topic describes how to configure a knowledge base.
This feature is available only in the China (Hong Kong) and Malaysia sites. It will be available in other sites soon.
Access
You can access the Knowledge Base Management interface as shown in the figure.

You can configure rules for Business Logic, Regular Expression, and Dataset Selection.
Business logic
On the Enterprise Knowledge Base Management page, click the Business Logic tab.
Add a business logic rule

On the Business Logic tab of the Enterprise Knowledge Base Management page, click Add Business Logic in the upper-right corner.
Enter a Business Definition, Data Explanation, and Synonyms. Then, set the Effective Range and Application Method.
Business Definition: Defines a common concept in your enterprise, such as "sales progress". The definition can be up to 100 characters long. You can enter frequently used terms in this field.
Data Explanation: Provides a detailed description of the business definition and associates it with data metrics to help the model understand the concept. The explanation can be up to 300 characters long.
Synonyms: Used to define different terms for the business within the enterprise, allowing the model to recognize different ways of asking questions.
Effective Range: You can select All Enterprise Data or Specific Data Only. When a user's question falls within the effective data range, the model references this knowledge during inference.
NoteConfirm the effective range when you add the rule. You cannot modify the range after you save the rule.
All Enterprise Data: The rule applies to all data query resources in the enterprise.
Only Effective for Some Data: Effective for selected data query resources, supporting search for resource names.

For Application Method, select whether to Enable Forced Rewrite.
NoteIf you enable forced rewrite, user questions that match the Business Definition or its Synonyms are rewritten based on the Data Explanation. Enable this feature with caution.
Click Save.
If you want to continue adding, you can click Save and Continue Adding.
Batch import
Click Batch Import to go to the Batch Import Business Logic page.

Click Enterprise Knowledge Base - Business Logic Template to download the template file.

Click or drag a file to upload it.
NoteOnly .xls, .xlsx, and .csv file types are supported, with a size limit of 5 MB.
After uploading the file, click OK.

After successful upload, you can see the corresponding knowledge base.
Regular expression matching
On the Enterprise Knowledge Base Management page, click the Regular Expression tab.
Add a regular expression rule

On the Regular Expression tab of the Enterprise Knowledge Base Management page, click Add Regular Expression in the upper-right corner.
Enter a Business Definition, Regular Expression, and Data Explanation. Then, set the Effective Range and Application Method.
Business Definition: A name to label the regular expression. This name is not used for matching user questions and can be up to 100 characters long.
Regular Expression: Used to detect patterns in user questions and perform actions based on the Application Method. Write the expression in Python style. The expression can be up to 100 characters long.
You can enter text in the Text to Match field to test the expression and view the Match Result.
Data Explanation: Provides a detailed description of the business definition and associates it with data metrics to help the model understand the matched pattern. The explanation can be up to 300 characters long.
Effective Range: You can select All Enterprise Data or Specific Data Only. When a user's question falls within the effective data range, the model references this knowledge during inference.
NoteConfirm the effective range when you add the rule. You cannot modify the range after you save the rule.
All Enterprise Data: The rule applies to all data query resources in the enterprise.
Specific Data Only: The rule applies only to selected data query resources. You can search for resources by name.
For Application Method, select whether to Enable Forced Rewrite.
NoteWhen Forced Rewriting is enabled, user queries that match a Business Definition are rewritten using the content from the Data Interpretation. Use this feature with caution.
Click Save.
To add another rule, click Save and Add Another.
Batch import
Click Batch Import to go to the Batch Import Regular Expressions page.

Click Enterprise Knowledge Base - Regular Expression Template to download the template file.

Click or drag a file to upload it.
NoteOnly .xls, .xlsx, and .csv files are supported. The file size cannot exceed 5 MB.
After you upload the file, click OK.

After the upload is complete, the corresponding knowledge base is displayed.
Dataset selection
On the Enterprise Knowledge Base Management page, click the Dataset Selection tab.
Add a dataset selection rule

On the Dataset Selection tab of the Enterprise Knowledge Base Management page, click Add Dataset Selection Rule in the upper-right corner.
Enter a Business Definition, select a Dataset, and add Synonyms.
Business Definition: Defines the keywords to match in user questions. When a match is found, the specified dataset is used. The definition can be up to 100 characters long.
Dataset Selection: Selects the datasets that are used to answer questions related to this business definition and its synonyms. You can select up to 10 datasets.
Synonyms: Defines alternative terms for the business concept. This helps the model recognize different ways of asking the same question.
Click Save.
To add another rule, click Save and Add Another.
Batch import
Click Batch Import to go to the Batch Import Dataset Scopes page.

Click Enterprise Knowledge Base - Dataset Scope Template to download the template file.

Click or drag a file to upload it.
NoteOnly .xls, .xlsx, and .csv files are supported. The file size cannot exceed 5 MB.
After you upload the file, click OK.

After a successful upload, the corresponding knowledge base is displayed.
Knowledge base management
Enable or disable a rule
You can view the status of a rule in the Enable column.

If the icon in the Enable column is
, the rule is enabled. Click the icon to disable it.If the icon in the Enable column is
, the rule is disabled. Click the icon to enable it.
Edit
To edit a knowledge entry, click the
icon to the right of the entry.
Delete a rule
Click the
icon to the right of a rule to delete it.

Knowledge base configuration recommendations
For Business Definitions and Synonyms:
Avoid defining overly short common words, such as "take a look," "recent," "generate," "compare," "distribution," "trend," etc.
Avoid defining commonly used definitions in the BI realm, such as "time", "maximum", "preview", "data", "column chart", etc.
For Data Explanations:
It is recommended to use clear descriptions and explicit semantics, such as the following examples:
"Business Definition: Key Period" - "Data Explanation: March 2020 to March 2021".
"Business Definition: Business Progress" - "Data Explanation: Monthly sales and number of customers".
Avoid using vague time range descriptions, such as "next year," "end of month x," etc.
The knowledge base does not currently perform fuzzy detection or inference. The business definition or synonyms must be mentioned in the question for it to take effect.