🔬 Example: Create a workspace activity assistant


The goal of this guide is to create an assistant that can answer questions about the “Workspace Activity” CSV available in your workspace settings.

This guide will be using a Table Queries tool, meaning that our assistant will be able to run SQL queries on a CSV file that we have uploaded as a Dust datasource.



⚠️ To follow this guide, you’ll need to be an Admin of your Dust workspace.

What are Table Queries?

We’re experimenting with a way for your Dust assistants to query structured documents (think CSV files, database tables, excel spreadsheets etc…). Instead of semantic search (like for plain text documents), assistants configured for Table Queries will first generate a SQL query from the natural language query that is then used to extract relevant data from the selected Table.

Queries on Table queries enable assistants to answer quantitative questions. On these types of questions, assistants relying on semantic search typically struggle).

More info on Table queries


Download the Workspace Activity CSV file

Screenshot 2024-01-19 at 16.17.29.png
  • In Settings > Workspace, select the month you are interested in and download the file by clicking on the download button.
  • The report will contain a zip file with 4 CSV files on activity for the given month:
    • Messages: a log of all messages sent this month, with assistant and sender (without messages' content). So you can tie a user to an assistant message when applicable.
    • Users: the list of users ordered by their activity level.
    • Builders: the list of individuals who have been building and editing assistants (regardless of role).
    • Assistants: the list of assistants you have in your workspace ordered by their activity level.

Create a New Table datasource

Screenshot 2024-01-19 at 12.39.23.png

View and Manage tables

  • Tables are attached to Folders.
  • Navigate to the Tables tab: Menu Assistants > Folders > Tables

Create a new table

  • Select the Add table button.

  • Fill the form and upload your csv. Make sure to include a good description for your table, it will help the model generate precise and relevant queries.

    • For example, this is a good description of the assistant_messages CSV, which is part of your report:

      This table contains data related to our usage of the Dust chat product.
      Each line in the table represents a message sent by a user to an assistant.
      Each assistant message will have a "paren_message_id" that points to the user message that triggered this reply.
      Assistant Messages have a non-null "assistant_name" that indicates which assistant is replying.
      User Messages have non-null "user_email" that indicate which user sent the message.
      The "source" column is non-null for user messages -- this helps identify if messages were sent from the web-app or the slack integration.

Edit table data

  • ⚠️ This is not supported yet but we’re working on it!

Create an Assistant to query the table

Screenshot 2024-01-19 at 12.52.04.png
  • Configure an existing or new assistant by selecting the Query a set of tables action in the Assistant Builder.
  • Select the table you have just created.
  • You can add instructions to your assistant.
    Screenshot 2024-01-19 at 16.33.42.png

Work with the assistant

  • have conversations with this assistant about the table from the Conversations tab.
  • You can inspect the SQL query that was generated and download the query results as CSV.
    Screenshot 2024-01-19 at 12.58.19.png

Help us build our roadmap!

Below are some features we’re already thinking about. But we’d love to hear from you on what we should build!

  • Easily update tables
  • Automatically import your spreadsheets from Google Drive and your Notion Databases
  • Upload your files directly inside of a conversation
  • Query your production SQL databases

Go to the Discussions tab to tell us!