All Products
Search
Document Center

Data Management:Publish an AI agent

Last Updated:Sep 02, 2024

This topic describes how to create and use an AI agent and share the access URL of the AI agent with other users.

Procedure

  1. Create an AI agent.

    In the left-side navigation pane, click the image menu item. Click the image icon, and then select AI Agent.

    image

  2. Add one or more tables. The AI agent can answer only questions related to the information contained in the added tables.

    1. Double-click the created AI agent.

    2. Click the Table Information tab, and then click Add.

    3. In the Add dialog box, select the tables that you want to add, and then click OK.

  3. Add one or more test questions.

    You can add test questions to improve the accuracy of answers provided by the AI agent to future questions and optimize its performance.

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

    2. After a question is created, click Regression in the Actions column. The AI agent automatically generates an answer and an SQL statement.

    3. If the answer meets your business requirements, click Run.

      Note

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

    4. View the result in a table or chart.

      image

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

    image

    Example: How many posts are there?

    image

FAQ

  • Q: What is the scope of data that an AI agent has permissions to query? May data breaches occur?

    A: 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.

  • Q: Does the AI agent proactively access data in the added tables when no user questions are submitted?

    A: No. The AI agent accesses databases, tables, column metadata, and business knowledge to generate SQL statements only when it responds to user questions.