# Text to SQL with Supabase

## What is Supabase?

Supabase is an open-source platform service designed to simplify the development workflow of modern applications. Its core features include:

* **Database:** Can store various types of data.
* **Real-time Updates:** Your application is immediately notified when data changes.
* **Account Management:** Manages user accounts and passwords for you.
* **Built-in Authentication Mechanism:** Built-in authentication mechanism simplifies user identity management processes and provides multiple authentication methods.
* **Auto-generated API (i.e., data access paths):** Allows you to retrieve data from the database in a simple way.

### What are the benefits of integrating Supabase?

* **Cross-query multiple reports:** Supabase supports multiple tables that are interrelated, allowing queries from value A in report A to find its relationship with report B
* **Create indexes to improve query efficiency:** You can create indexes for frequently queried content, allowing the AI assistant to find the content you need more precisely

## Create Your Supabase

### 1. Create a Supabase Account

* First, visit the [Supabase official website](https://supabase.com/) and click "Sign in / Start your project".

> If you haven't registered yet, please register an account first to proceed with the following steps

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-bf0575212806e98a949541e0e5580557ec520567%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(11).png?alt=media" alt=""><figcaption></figcaption></figure>

* After logging in, you can create a new organization or use an existing organization for operations. Within the organization, create a project - each project will have its own independent database.

<div><figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-db2c9828a90a645580cb195e9baad57fc94d1585%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(12).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-29297a6f3ab61e2e3c389bd76b9b2bc4d3a78d2b%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(13)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure></div>

### 2. Enter the Database Page

After entering the project, click on Database > Tables in the left navigation menu to add data

<div><figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-0984cd94b291b0bc6197739c8215cd889c8602db%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(14).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-3e9afc20ec5288f37946dd17c1e3e8fca61ac2fc%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(15).png?alt=media" alt=""><figcaption></figcaption></figure></div>

#### Create a New Table

Click "New Table" to create a new table and name it:

<div><figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-852e9ff748ffea451ffb65a229f0030cc0da1b2f%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(16).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-c1eb66684c555fad64bf60689317bb0c0adf0f26%2F%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202025-10-02%20173156.png?alt=media" alt=""><figcaption></figcaption></figure></div>

Supabase provides multiple ways to create new tables:

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-7975e8b812f1b3a6fee7fdba9752a4255e1e6d20%2Fimage%20(162).png?alt=media" alt=""><figcaption></figcaption></figure>

* **Manually add columns:** Suitable for designing table structure from scratch. You can add columns one by one and set data type, default value, etc. for each column.
* **Import .csv/.tsv or plain text:** Suitable for quickly creating tables, especially when you already have existing data.
  * **Notes:**
    * The first row of a plain text file must be the column names, with columns separated by commas (CSV) or tabs (TSV, which is the space size when pressing the Tab key on the keyboard).

Here, choose to import data: Click "<mark style="color:blue;">Import data from CSV</mark>" and paste a tab-separated text file. Scroll down to see the results formatted as a table. After import is complete, click "Save"

<div><figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-de7eb07d3c50287edb3172a1aed5654daf6c749c%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(17).png?alt=media" alt=""><figcaption><p>Choose import method</p></figcaption></figure> <figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-5ebbc65404b97b7e04acb3b873fad97618e3cd8c%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(18).png?alt=media" alt=""><figcaption><p>Import plain text</p></figcaption></figure> <figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-22112a468f01382aefe16340b67b42aa1a698f21%2Fimage%20(163).png?alt=media" alt=""><figcaption><p>Preview results</p></figcaption></figure></div>

#### Primary Key

After import is complete, you will be redirected to the settings page. At this point, you must specify a primary key. The primary key is like an ID number, serving as a unique value to identify each piece of data. Here, we choose the customer number as the primary key.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-52b64c16df2eb18301758d0df781d82a5ea7920a%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(19).png?alt=media" alt=""><figcaption></figcaption></figure>

#### Foreign Key

Scrolling down, you can see the Foreign key designation. A Foreign Key is like an address that can correspond to the source location of this data or other more detailed information.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-ddd7004933763952a591349245ddaeb331eba8c4%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(20).png?alt=media" alt=""><figcaption></figcaption></figure>

Suppose we have two tables: "Customers" table and "Orders" table.

* **Customers Table:**
  * CustomerID - Primary Key
  * CustomerName
  * Phone
  * Address
* **Orders Table:**
  * OrderID - Primary Key
  * CustomerID - Foreign Key (references CustomerID in Customers table)
  * OrderDate
  * TotalAmount

In this example, "CustomerID" in the "Orders" table is a foreign key that references the primary key "CustomerID" in the "Customers" table. Through this foreign key, we can identify which customer placed each order.

{% hint style="info" %}
In this example, the foreign key should be placed in the Order Table:

**Relationship Direction:**

* One customer → can have multiple orders (one-to-many relationship)
* One order → belongs to only one customer

**Foreign Key Principle:**

> Foreign keys should be placed on the "many" side

Therefore:

* ✅ Set `customer_id` (foreign key) in the Order Table, as it corresponds to the "many" side in the one-to-many relationship
* ❌ Customer Table doesn't need to store order information
  {% endhint %}

Therefore, in the Order Table, we set up a link where Customer ID in the Customer Table corresponds to Customer ID in the Order Table.

<div><figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-fae37edb8121b034fc4fd0ce20feb01b50c64f28%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(21).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-9e785a18b4104930fa4443a9d0da9a2f80a0d878%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(23).png?alt=media" alt=""><figcaption></figcaption></figure></div>

After the relationship is complete, click "Save" to establish the database relationship.

### 3. Creation Complete

After the table is created, you have a complete database and can query data within the database using SQL syntax!

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-89df6e4b71a6411fea1944eee21632ba1e804d7b%2Fimage%20(151).png?alt=media" alt=""><figcaption></figcaption></figure>

## How to Create a Supabase Tool

To use the Supabase tool in MaiAgent, you need to create it as an MCP tool so that the AI assistant can use Supabase functionality:

{% hint style="info" %}
For tool introduction, please refer to: [Tool Function Overview](https://docs.maiagent.ai/maiagent-user-guide/maiagent-user-guide-en/tools/tool_description)
{% endhint %}

{% stepper %}
{% step %}
**Create a Server on the MCP Service Platform and Connect with Supabase Service**

For how to connect MCP tools, please refer to: [Remote MCP Service Overview](https://docs.maiagent.ai/tech/remote-mcp/remote-mcp). Currently, only the [Composio platform](https://docs.maiagent.ai/tech/remote-mcp/composio) supports Supabase platform connection
{% endstep %}

{% step %}
**Enable Available Functions in Composio**

When connecting to Composio, please enable basic database operations such as add, delete, query, etc.

{% hint style="warning" %}
Composio has pre-selected basic content in Important, you don't need to configure it additionally, just make sure the Important option is checked
{% endhint %}

<figure><img src="https://github.com/Playma-Co-Ltd/maiagent-user-guide-gitbook/blob/main/zh-tw/.gitbook/assets/image%20(221).png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Add the Built Supabase Tool to the Available Tools List**

For how to create MCP tools, please refer to: [Creating MCP Tools](https://docs.maiagent.ai/maiagent-user-guide/maiagent-user-guide-en/tools/setup)

**Supabase Tool Connection URL**

After creating the server service on the MCP service platform, please process the URL as follows:

1. Original URL (obtained from MCP Server):\
   [https://backend.composio.dev/v3/mcp/12345678/mcp?include\_composio\_helper\_actions=true](https://backend.composio.dev/v3/mcp/5987158a-806a-4c32-9ff6-4236e8891ac2/mcp?include_composio_helper_actions=true)
2. Delete "[?include\_composio\_helper\_actions=true](https://backend.composio.dev/v3/mcp/5987158a-806a-4c32-9ff6-4236e8891ac2/mcp?include_composio_helper_actions=true)" directly
3. New URL (to be pasted on the MaiAgent tools page):\
   [https://backend.composio.dev/v3/mcp/12345678/mcp](https://backend.composio.dev/v3/mcp/5987158a-806a-4c32-9ff6-4236e8891ac2/mcp?include_composio_helper_actions=true)

{% hint style="danger" %}
Please be sure to delete the above content, otherwise the AI assistant will not be able to use the supabase tool correctly
{% endhint %}
{% endstep %}
{% endstepper %}

After the tool is created, please go to the AI assistant settings and add the Supabase tool to the assistant's available tools list:

<div><figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-baf9e7663d0bc3adc9b729a159cce27cf5bce748%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(9).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-8fff759b303a518b88e0f7f0295e5dd4404e64b1%2Fplayma%20%E6%89%8B%E5%86%8A%E7%9B%B8%E7%89%87%E5%8A%A0%E5%B7%A5%20(10).png?alt=media" alt=""><figcaption></figcaption></figure></div>

{% hint style="danger" %}
Please click Save on the tool usage page, otherwise the AI assistant still cannot use the Supabase tool
{% endhint %}

## Effects of Using the Supabase Tool

Through the MaiAgent AI assistant combined with the Supabase tool, you only need to use everyday language to describe the data you want to query, and Supabase will automatically generate the corresponding SQL syntax and extract the required information from the relational database.

### Example Database

#### 🏢 **1. Customers Table (Customer Information)** <a href="#id-1.-customers-biao-ge-gu-ke-zi-xun" id="id-1.-customers-biao-ge-gu-ke-zi-xun"></a>

<table><thead><tr><th width="242.3333740234375">Column Name</th><th width="98.6666259765625">Primary Key</th><th width="92.77777099609375">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>CustomerID</code></td><td>✅</td><td>✅</td><td>Customer unique identifier</td></tr><tr><td><code>CustomerName</code></td><td>❌</td><td>❌</td><td>Customer company or personal name</td></tr><tr><td><code>CustomerType</code></td><td>❌</td><td>❌</td><td>Customer classification (e.g., retailer, restaurant, distributor)</td></tr><tr><td><code>ContactName</code></td><td>❌</td><td>❌</td><td>Primary contact name</td></tr><tr><td><code>Phone</code></td><td>❌</td><td>❌</td><td>Contact phone number</td></tr><tr><td><code>Email</code></td><td>❌</td><td>❌</td><td>Email address</td></tr><tr><td><code>Address</code></td><td>❌</td><td>❌</td><td>Customer address</td></tr><tr><td><code>Region</code></td><td>❌</td><td>❌</td><td>Geographic region (e.g., North, South)</td></tr><tr><td><code>CustomerLevel</code></td><td>❌</td><td>❌</td><td>Customer importance level (A, B, C tier)</td></tr></tbody></table>

**🔑 Primary Key**: `CustomerID`\
**🔗 Foreign Key Relationships**: None

***

#### 📦 **2. Orders Table (Order Information)** <a href="#id-2.-orders-biao-ge-ding-dan-zi-xun" id="id-2.-orders-biao-ge-ding-dan-zi-xun"></a>

<table><thead><tr><th width="235.88897705078125">Column Name</th><th width="92.66668701171875">Primary Key</th><th width="94.3333740234375">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>OrderID</code></td><td>✅</td><td>✅</td><td>Order unique identifier</td></tr><tr><td><code>CustomerID</code></td><td>❌</td><td>❌</td><td>Links to Customers table</td></tr><tr><td><code>OrderDate</code></td><td>❌</td><td>❌</td><td>Order creation date</td></tr><tr><td><code>DeliveryDate</code></td><td>❌</td><td>❌</td><td>Expected or actual delivery date</td></tr><tr><td><code>PaymentMethod</code></td><td>❌</td><td>❌</td><td>Payment method (cash, credit card, wire transfer)</td></tr><tr><td><code>OrderStatus</code></td><td>❌</td><td>❌</td><td>Order processing status</td></tr><tr><td><code>TotalAmount</code></td><td>❌</td><td>❌</td><td>Order total amount (numeric type)</td></tr><tr><td><code>ShippingFee</code></td><td>❌</td><td>❌</td><td>Shipping cost</td></tr></tbody></table>

**🔑 Primary Key**: `OrderID`\
**🔗 Foreign Key Relationships**:

* `CustomerID` → `Customers.CustomerID` (CustomerID in Orders corresponds to CustomerID in the Customer table)

***

#### 🛍️ **3. Products Table (Product Information)** <a href="#id-3.-products-biao-ge-shang-pin-zi-xun" id="id-3.-products-biao-ge-shang-pin-zi-xun"></a>

<table><thead><tr><th width="202.3333740234375">Column Name</th><th width="88.5555419921875">Primary Key</th><th width="100">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>ProductID</code></td><td>✅</td><td>✅</td><td>Product unique identifier</td></tr><tr><td><code>ProductName</code></td><td>❌</td><td>❌</td><td>Product name</td></tr><tr><td><code>Description</code></td><td>❌</td><td>❌</td><td>Detailed product description</td></tr><tr><td><code>Category</code></td><td>❌</td><td>❌</td><td>Product category</td></tr><tr><td><code>Brand</code></td><td>❌</td><td>❌</td><td>Product brand</td></tr><tr><td><code>Size</code></td><td>❌</td><td>❌</td><td>Product specification or size</td></tr><tr><td><code>Cost</code></td><td>❌</td><td>❌</td><td>Product cost (numeric type)</td></tr><tr><td><code>Price</code></td><td>❌</td><td>❌</td><td>Product selling price (numeric type)</td></tr><tr><td><code>StockQuantity</code></td><td>❌</td><td>❌</td><td>Current stock quantity (numeric type)</td></tr></tbody></table>

**🔑 Primary Key**: `ProductID`\
**🔗 Foreign Key Relationships**: None

### Scenario 1: Tracking Incomplete Orders

* **Database State:** The `Orders` table has two incomplete orders, `OR003` and `OR004`.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-6132556cc8226f29e807b61f10f9aa51aeb198aa%2Fimage%20(190).png?alt=media" alt=""><figcaption></figcaption></figure>

* **Natural Language Input:** In the AI assistant's Q\&A, you only need to enter: "Please tell me what incomplete orders there are". The AI assistant automatically invokes the tool and generates an SQL structured query statement.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-c4e8a9ed29f5eeb9b993358e68f370cc59352892%2Fimage%20(191).png?alt=media" alt=""><figcaption></figcaption></figure>

* **Supabase Automatic Query:** The AI assistant will automatically invoke the Supabase tool, converting your natural language into an SQL query statement, for example:

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-c4e8a9ed29f5eeb9b993358e68f370cc59352892%2Fimage%20(194)%20(2).png?alt=media" alt=""><figcaption></figcaption></figure>

Combining the query results with the AI assistant's analysis, the AI assistant will respond with the following order content, sorted by priority:

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-81da3ef470e9dd0241fa8c62433075d817eb1d3d%2Fimage%20(198).png?alt=media" alt=""><figcaption></figcaption></figure>

Through the collaboration of the Supabase tool and the AI assistant, you can easily track incomplete orders and receive analysis and sorting suggestions provided by the AI assistant to process orders more effectively and improve customer satisfaction.

### Scenario 2: Querying Customer Contact Information for Incomplete Orders

* OR003 is an order still being processed, the customer is CU003, and the contact person is **Huang Purchasing**

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-a7d70645ef8249297b3a2064712b11f2f09d1657%2Fimage%20(199).png?alt=media" alt=""><figcaption></figcaption></figure>

* **Natural Language Input:** In the AI assistant's Q\&A, enter: "For orders still being processed, who should I contact". The AI assistant automatically invokes the tool and generates an SQL structured query statement.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-62b3fde90121b2a2ceb6db1e853474573d3d6dc7%2Fimage%20(204).png?alt=media" alt=""><figcaption></figcaption></figure>

* **Supabase Automatic Corresponding Query:** You can see that although the conversation content with the AI assistant all relates to the order table, through the set foreign key correspondence relationship, supabase can know that the `Customer ID` here corresponds to the `ID` query in the `Customers` table, so the returned content is from the `Customers` table.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-0c9e832eaffb85298760a3d903914a1b670c0b29%2Fimage%20(208).png?alt=media" alt=""><figcaption></figcaption></figure>

* **AI Assistant Response:** The AI assistant then comprehensively analyzes and responds with the correct contact information and other contact methods

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-4383c1d52c0b2664a6a4a76d3326622e201c7bae%2Fimage%20(169).png?alt=media" alt=""><figcaption></figcaption></figure>

Through the Supabase tool, you can fully utilize the table correspondence relationships in the database, easily extract information from multiple related tables, and receive a list of customer names provided by the AI assistant. The correspondence relationships between tables and clear definitions ensure data relevance and consistency, making query results more reliable.

## **Additional Notes:**

* You can adjust the natural language input according to actual needs, for example: "Please tell me what incomplete orders there are today", "Please tell me what incomplete orders VIP customers have", etc. The Supabase tool can accurately parse and execute queries.
* The AI assistant can further integrate other information, such as: inventory status, logistics information, etc., to provide more comprehensive order analysis.

{% hint style="warning" %}
The tool can only call content you store in the database. If you have analysis needs, please be sure to upload the data to the database before starting analysis.
{% endhint %}
