- On Tables manually created in Folders (CSV upload, or API)
- On Tables automatically discovered by Dust from Google Drive (Sheets), Notion (Databases), Microsoft (Sheets), Snowflake, BigQuery (beta)
- On Tables uploaded in the conversation (CSV upload).
Example
The following question is well suited for a Table Query but poorly suited for Data Source search:
What is the most common color for cars produced between 2000 and 2010 ?
The following question is poorly suited for a Table Query but well suited for Data Source search:
What is the best car to buy if I live in NYC ?
Creating agents with Table Queries
When creating or editing an agent, in theAction & Data sources section select Add a tool with the Query Tables method.
Select one or more tables that you would like your agent to use.
Joining tables together (advanced)
Agents have the ability to use data from multiple tables at once, and even join tables together, even if the tables come from different data sources. To enable this, you can simply pick several tables when creating your agent. If you want your agent to join data between tables, it is useful to explain how to join the tables in the agen’s instructions. Consider this example with ausers table and an orders table:
To help the agent properly join data between these tables it is desirable to add something like this in the instructions:
You can join data between the users and orders tables using respectively the email and user_email columns
This is especially true in more complex use-cases where the ideal join columns are not obvious.
Creating Tables
Creating Tables from CSV files
- Make sure you have
builderrights on your Dust workspace. - Go to the
Knowledgetab and go toFoldersinto the space of your choice. Pick the folder you want to add your table to, or create a new folder by clicking onAdd a new folderat the top of the page. - Go to the
Tablestab and click onAdd table. - Upload a file in CSV format, and enter a good description for your table. Providing a detailed description for your table will help the AI generate better queries !
Based on this example, a good table description would be:
This table is an extract from our CRM. Each line represents a potential customer, and includes the date of the last meeting we had with them and what stage they are at in our sales pipeline.