Application of Databases
Última actualización:2024-09-20

Application of Databases

Both Agent and Flow-Agent support querying and analyzing databases. By selecting the required data tables, you can query and analyze trusted data through natural language, generating real-time interactive dynamic charts, thereby helping business personnel quickly mine data and gain insights into data value.

Adding Data Tables

Enabling Database Functionality for Agent

  1. On the Agent settings page, click the "Enable" toggle button to enable the database functionality. image-20241011183512527
  2. Click the "Add Data Table" button, select the data table, and click "Add" to select the data table. image-20241011183546274

Enabling Database Functionality for Flow-Agent

  1. Enter the LLM component settings page, click the "Enable" toggle button to enable the database functionality. image-20241011184010218
  2. Click the "Add Data Table" button, select the data table you need, and click "Add" to select the data table. image-20241011183855416

Applying Database Functionality

In the conversation window, when the user's question is related to the database, Agent will automatically invoke the database function to generate SQL statements and query data. The returned query result data will be displayed to the user in a table format and can be downloaded as a CSV file. image-20241011144209904

  • When the number of returned data entries is limited to 100, the data will be displayed in a table.
  • If it exceeds 100 entries, a download link for all queried data will be returned, allowing all data to be downloaded locally.

When the user's question involves charts, Agent will automatically invoke the database function to generate SQL statements and query data. The returned query result data will be displayed to the user in the form of 📊 dynamic charts, with the option to switch to a table format. image-20241011184126781

Database Preparation Work

To use the database functionality normally, you need to first create data tables and then add data to the data tables. Once these tasks are completed, you can use the database functionality in the agent. The specific steps are as follows: