A Data Management (DMS) AI agent is a customized and published agent (robot) that can be used as a unified data service layer for external users. Personnel who want to query data can use natural languages to query and analyze the data without queuing or waiting.The AI agent provides services for you throughout the day. This topic describes how to create and use an AI agent and how to copy and send the access URL of the AI agent to other users.
Procedure
Step 1: Create a workspace
- Log on to the DMS console V5.0.
Click the
icon in the upper-left corner and choose .
NoteIf you are not using the DMS console in simple mode, choose
in the top navigation bar.Click Create Workspace. In the Create Workspace dialog box, configure the Workspace Name and Region parameters and click OK.
NoteThe workspace name can contain letters, digits, and underscores (_).
You can select only the Singapore region.
Click Go to Workspace in the Actions column of the workspace to go to the workspace.
NoteBy default, only the workspace creator can access a workspace. If collaborative development is required, the workspace creator must grant the development permissions to specific users who need to access the workspace.
Step 2: Create and use an agent
Create an agent.
In the left-side navigation pane, click the
menu item. Then, click the
icon and select AI Agent.
Add one or more tables.
The AI agent can answer only questions related to the information contained in the added tables.
Double-click the created AI agent.
Click the Table Information tab, and then click Add.
In the Add dialog box, select the tables that you want to add, and then click OK.
Add a test set and ask the created AI agent.
You can add test questions to improve the accuracy of answers provided by the AI agent to future questions and optimize its performance.
Click the Test Set tab, and then click Add. In the Add dialog box, enter the questions that you want to add, and then click OK.
Example: Query orders in the O state.
After a question is created, click Regression in the Actions column. The AI agent automatically generates an answer and an SQL statement.
If the answer meets your business requirements, click Run.
NoteIf the generated SQL statement does not meet your business requirements, click the Dislike icon below the SQL statement, and then click Debug. After debugging, click Rerun. If the SQL statement generated after the rerun is accurate, click Save. All subsequent SQL statements are accurate.
Click the chart icon to specify that the query data is displayed as a chart.
Share the AI agent with other users.
Double-click the AI agent that you want to share. On the Overview page, copy and send the access URL of the AI agent to other users. Then, these users can ask the AI agent questions and receive answers in the chat interface.
Example: How many posts are generated?
FAQ
What is the scope of data that an AI agent has permissions to query? May data breaches occur?
The AI agent is authorized to query data only from tables that are added to its accessible scope. This prevents data breaches. Furthermore, the query permissions of the AI agent depend on the permissions of the agent user. If a user lacks permissions to query table data, the AI agent returns only an SQL statement without detailed data.
Does the AI agent proactively access data in the added tables when no user questions are submitted?
No. The AI agent accesses databases, tables, column metadata, and business knowledge to generate SQL statements only when it responds to user questions.