Step 1: Create a Text2SQL robot
The robot is located in the second column of the function column. Click it to enter the robot search page. Click Create Robot to execute the corresponding robot creation function.
-
Click to create a robot
-
Icon: Upload this robot icon (optional)
-
Name: The name of this robot (required)
-
Description: Fill in the description of this robot (optional)
-
Category: Select the type of robot to be created (required)

Text-to-SQL Robot: This robot can connect to the corresponding database and provide users with a natural language method to search for information in the database. Currently MSSQL and MySQL are provided.
Fill in the following information:
- Commands and prompts: The prompt field can be adjusted to show the system prompts of the text-to-SQL robot. Fill in the rules you want to follow in every reply, for example: Please provide me with the SQL command for each query execution
- Capabilities:
-
Host: The location of the Database Server of the main Host
-
User: The user name of this Database Server
-
Password: corresponding to the password of the Database Server user
-
Database: The name of the Database in the Database Server
-
Query quantity limit: the number of query records
-
Port number: The port number corresponding to the Database Server
-
Database type: The type of the Database, currently supports MSSQL and MySQL
-
SSL: If the Database has set up related SSL certificate items, you can check this option and click the CA field to upload the relevant certificate file. If you still have Cert and key, you can fill in the optional fields below
-
Parameters: The parameter settings used by the large language model applied by the text-to-SQL robot will affect the LLM's answer. From top to bottom, they are temperature, Top-P, Top-K and search scope
- Preview: You can enter the test prompt word here to preview the robot output results
- Robot name: Click the edit option next to the robot name in the upper left corner to edit
-
Test connection: After filling in the Database Server information in the capability item, the test connection status will be displayed in the upper right corner. If the connection is successful, it will show Connected; if the test connection fails, it will show Connection Failed
-
Save: In the upper right corner of the editing page, you can save the robot editing information. Click it to display the publishing object. Currently, the text-to-SQL robot can only be published to the creator himself
-
Other options: Click on the edit page… and the Import/Delete options will appear
Import: You can fill in the Json information of the text-to-SQL robot provided by others. After filling in, you can copy the "capability" information filled in by others.
Delete: Delete this robot.

- After setting up the robot, you can return to the robot page, find the robot you just created, and pin it. After pinning, the robot will be fixed in the function bar on the left.
- You can click on the Text2SQL robot on the left to start a conversation. The purpose of the Text2SQL robot is to allow you to use natural language to query the content in the database. There is no need to enter complex SQL statements. It will help you query and provide SQL Statements for your reference. Common applications include pivotal analysis of accounting accounts, summary query of employee salaries, and query of historical performance distribution.
