Deep Dive Conversations
Deep Dive Conversations are chats for users that are familiar with SQL or with the underlying data systems. Deep Dive conversations expose the underlying SQL, the data assets (tables and queries) considered during generation, and the AI's reasoning.
Starting a Deep Dive Conversation
To start an Deep Dive Conversation, navigate to the Chat
section in the left sidebar and click New Conversation
. If you have multiple types of conversations available to you, make sure you select the Deep Dive
tab.
Deep Dive Answers
There are many parts to a Deep Dive Answer. Answers will contain free-text with information about the answer and the AI's reasoning, queries for you to execute, a list of sources, and follow-up questions to better understand your intent.
SQL Code
The core primative of Deep Dive converstations is the executable SQL code. There are a few different actions available for working with SQL code blocks (from left-to-right, top-to-bottom):
- Create Golden Query - Creates a Golden Query to capture a cannonical answer.
- Pin - "Pin", or save, a query for reference later.
- Edit - Open a SQL query in the Query Builder.
- Copy - Copies a query to the clipboard.
- Execute - Executes a query in-line, showing a result subset.
- Flag as Incorrect - Allows a user to correct an incorrect query and save the corrected version as a Golden Query.
AI Suggested Revisions
In the event that the SQL query generated on the AI's first try is not executable, the Execute button will be disabled. When this happens, the AI will work in the background to come up with a better query. This query will appear in a popup titled AI Suggested Revision
and is guaranteed to be executable. You can accept this query or close the popup.
Sources
The sources section shows you the assets (tables, queries, etc) that the AI considered when creating the query. Blue assets are tables while purple assets are Golden Queries. You can click any type of asset to preview it.
Understanding Your Question
After answering your question, the AI will ask a follow-up question to better understand your intent. You can select any number of the prepopulated answers, as well as type your own answer. Clicking Clarify
will have the AI attempt to answer your question again with the new information.
Pinning
Pinning gives you a way to save assets (queries, charts, datasets) for later. It also gives you a way to manually control the scope of the AI.
How to Pin
You can pin any asset by clicking the "Bookmark" icon above a query, chart, or table. Pins will always be saved to the current active conversation (Deep Dive view).
Viewing Pins
To view pins, click the sidebar on the right of a Deep Dive conversation to expand it.
Changing Chat Context
Clicking pins in the sidebar will change the context of the chat. By default, the chat considers all data available to you. Clicking pinned items selects a subset of charts, queries, and tables to chat directly with them. Use context to:
- Iterate on one or multiple queries in the chat flow.
- Create queries from specific datasets.
- Learn about the data in specific datasets.
When you click pinned items in the sidebar, you will see the text above the chat box change from ContextL All Data
to Context: X Selected
.
Query Builder
The Query Builder is a way to quickly edit specific queries, both with natural language and manually.
Opening the Query Builder
You can open the Query Builder by clicking "Edit" on any query in a Deep Dive conversation, or by clicking <>
on any table in the Search View.
Editing Queries
To edit queries, either edit the query directly in the query box or type instructions into the text box at the bottom of the page. Some example instructions:
- Add category to this query.
- Join this query by column X instead of column Y.
- Aggregate on column XYZ and reverse the ordering.
Executing Queries
You can execute a query by clicking Execute
below the query box. You can also click Dry Run
to see a cost estimate before executing the query. This can be helpful before executing potentially long-running or expensive queries.
Generating Charts
To generate a chart from a query, simply Execute
the query and then click the Chart
tab after the result set has loaded. When the Chart
tab is selected, you can edit the chart via natural language. Try commands like:
- Make it a pie chart.
- Add stacks to the bar chart along value xyz.
- Change the X axis to "Name".
- Add labels to each of the bars.
Saving
There are a few ways to save a query:
- Click the "Bookmark" icon above the query to pin it for later.
- Click "Save" in the bottom right corner to pin it for later.
- Click the "+ Book" icon above the query to create a Golden Query.
You can also pin charts for later by clicking the "Bookmark" icon above a chart.