Query a dashboard with a dashboard agent

Conversational Analytics, powered by Gemini for Google Cloud, lets you investigate your data by asking questions about it in conversational language through an intuitive chat interface. When you use Conversational Analytics with a user-defined dashboard or a LookML dashboard, Conversational Analytics creates a data agent for you that is connected to the dashboard. As you converse with the dashboard agent, the agent will query your dashboard and any of its query-linked tiles. You can customize user-defined dashboard agents with context and instructions that are specific to your dashboard data.

This page discusses how to use Conversational Analytics to engage with dashboard data. It covers the following topics:

Before you begin

Before you can use Conversational Analytics to engage with your dashboard data, make sure that the setup and requirements for your Looker instance have been satisfied and that you have been granted the appropriate permissions to perform the tasks that are described on this page.

Start a conversation from within a Looker dashboard

To start a conversation with a dashboard agent from a user-defined dashboard or a LookML dashboard, select spark Chat with this dashboard.

Once you have created a conversation, you can ask questions about the data in the Ask a question field within the conversation. To access your recent conversations with the dashboard agent, select more_vert Menu > Recent conversations.

In addition to asking your dashboard agent questions about the data on the dashboard or its query-linked tiles, for user-defined dashboard agents, you can customize the agent's configuration with additional context and instructions.

Conversation metadata

The Chat with this dashboard pane supports the following tasks for each dashboard type:

User-defined dashboard

  • To ask a question about the dashboard data, enter a question in the Ask a question field.
  • To edit information about the dashboard agent, select tune Manage agent. In the Editor tab, you can enter agent instructions. Select Update to save your changes to the dashboard agent. Use the Preview tab to preview your changes to the dashboard agent.
  • To expand the dashboard agent conversation pane, select open_in_full View full screen.
  • To access your recent conversations with the dashboard agent, select more_vert Menu > Recent conversations.
  • By default, conversations will be named based on your initial question. To rename a conversation, select a conversation from the Recent conversations menu option, select more_vert, and then select edit Rename.
  • To delete a conversation with a data agent, select more_vert Menu > delete Trash.

LookML dashboard

  • To ask a question about the dashboard data, enter a question in the Ask a question field.
  • To expand the dashboard agent conversation pane, select open_in_full View full screen.
  • To access your recent conversations with the dashboard agent, select more_vert Menu > Recent conversations.
  • By default, a conversation is named based on your initial question. To rename a conversation, select a conversation from the Recent conversations menu option, select more_vert, and then select edit Rename.
  • To delete a conversation with a data agent, select more_vert Menu > delete Trash.

Modify your dashboard agent

To edit information about the dashboard agent, select tune Manage agent. In the Editor tab, you can enter agent instructions. Instructions provide context to help Conversational Analytics understand how to interact with your data and provide accurate and relevant responses. Select Update to save your changes to the dashboard agent. Use the Preview tab to preview your changes to the dashboard agent.

Write agent instructions

You can add free-form instructions that define your data agent's core behavior and provide it with foundational context to consider before processing a user's prompt.

Here are some examples of the types of context that you can provide in the Instructions field:

  • Key fields: The most important fields for analysis
  • Excluded fields: Fields that the data agent should avoid
  • Filtering and grouping: Fields that the agent should use to filter and group data
  • Golden queries: Pairs of natural language questions and their corresponding Explore queries
  • Persona: A role or expertise, character, or tone that you assign to the agent

For tips and best practices for writing agent instructions, see the Best practices for configuring Conversational Analytics in Looker documentation page.

Define a Looker golden query

To define each Looker golden query for a given question, provide values for both of the following fields:

  • natural_language_questions: The natural language question that a user might ask
  • looker_query: The Looker golden query that corresponds to the natural language question

For the natural_language_questions field, consider the questions a user might ask about that Explore, and write those questions in natural language. You can include more than one question in this field's value. You can obtain the value for the looker_query field from the Explore's query metadata.

Golden queries support the following fields:

  • model (string): The LookML model that was used to generate the query. This is a required field.
  • explore (string): The Explore that was used to generate the query. This is a required field.
  • fields[] (string): The fields to retrieve from the Explore, including dimensions and measures. This is an optional field.
  • filters[] (string): The filters to apply to the Explore. This is an optional field.
  • sorts[] (string): The sorting to apply to the Explore. This is an optional field.
  • limit (string): The data row limit to apply to the Explore. This is an optional field.

Ask questions about Looker data

When you're beginning a new conversation, Conversational Analytics suggests some starting questions to ask. The questions don't need to be in a specific format or use a specific syntax. However, they do need to relate to the Explore that you've selected.

Type your question in natural language into the Ask a question field. Select a question mode and click send. After you submit your query, you can cancel Conversational Analytics' response by clicking Stop response. Conversational Analytics stops running the query and displays the following message: The query was cancelled.

For more guidance on the types of questions that you can ask, see Limitations on questions.

Select a question mode

When you ask a question, you can select the question mode from a drop-down menu that contains the options Fast and Thinking. The UI describes Fast as being intended for answering quickly and Thinking as being intended for solving complex problems. Conversational Analytics defaults to Thinking question mode. Conversational Analytics will maintain the same question mode throughout any multi-turn conversations, unless you manually change it.

Fast mode

When you ask a question in Fast mode, Conversational Analytics attempts to directly map your natural language query to the LookML parameters that are defined in the LookML models that underlie your conversation's dashboard or Explores. Conversational Analytics is able to respond quickly because it relies on the governed definitions of your LookML, and it doesn't use or display any kind of reasoning.

For example, a query like "What was our total revenue last month?" can be quickly translated into a query that selects the total_revenue measure and filters for the previous month.

Select Fast mode if your query is asking for specific facts or predefined metrics from your data.

Thinking mode

Thinking mode is intended for more complex analytical requests that require analysis beyond direct LookML lookups. In this mode, the agent "plans" its approach, deciding which tools to use and how to combine results. This mode allows for solving multi-step problems and performing advanced data science tasks that may not be possible with a single SQL-based query.

Select Thinking mode when asking why about your data, when you're comparing trends, or when you're making more complex analytical requests that may require multiple steps. This mode is also especially helpful when testing an agent to understand how it's using the underlying LookML of its data sources.

Multi-turn conversations

Conversational Analytics will take previous questions and answers into account as you continue the conversation. You can take previous answers and build on them by further refining results or changing the visualization type.

For more guidance on creating questions, see Limitations on questions.

Manage queries within a conversation

When you converse with data, you can manage the conversation by stopping an active query response while it is running or by deleting the most recent question and its response.

Delete the most recent question

To delete the most recent question and its response, follow these steps:

  1. Hold your cursor over the most recent question, and then click Delete message.
  2. In the Permanently delete message? dialog, click Delete to permanently delete the question and its response.

Understand query results and calculations

Conversational Analytics provides details about how your query was interpreted.

Determine how your query was interpreted

If you use Thinking mode to ask your question, you can see how Conversational Analytics reasoned through your query. To see its reasoning, expand the Show thinking option. To hide its reasoning, click Hide thinking.

Conversational Analytics analyzes each query and thinks about how to respond, using the keywords from your query to infer the relevant dimensions, measures, and other parameters from the semantic layer of the conversation's associated datasets and interpreting from your query what aggregations may need to be performed. When you expand Show reasoning, Conversational Analytics displays a plain text explanation of the steps that it took to interpret your query. The explanation also includes the duration that Conversational Analytics thought about the query.

Determine how an answer was calculated

To see how Conversational Analytics arrived at an answer or created a visualization, click How was this calculated? within the query results.

When you click How was this calculated?, Conversational Analytics displays a Text section. The Text section provides a plain text explanation of the steps that were taken by Conversational Analytics to arrive at the given answer. This explanation includes the raw field names that were used, the calculations that were done, the filters that were applied, the sort order, and other details.

Manage conversations

Each conversation remains in the Recent conversations section the dashboard conversation more_vert Menu. You can change the names of conversations, delete conversations, or restore them from the trash folder.

  • To access your recent conversations with the dashboard agent, select more_vert Menu > Recent conversations.
  • By default, conversations will be named based on your initial question. To rename a conversation, select a conversation from the Recent conversations menu option, select more_vert, and then select edit Rename.
  • To delete a conversation with a data agent, select more_vert Menu > delete Trash.

Delete a conversation

To delete a conversation with a data agent, select the conversation's more_vert three-dot menu, and then select delete Delete.

Restore or permanently delete a conversation

To restore or permanently delete a conversation from the trash, follow these steps:

  1. Select more_vert Menu > delete Trash.
  2. In the Trash pane, find the conversation that you want to restore or permanently delete. Select the conversation's more_vert three-dot menu, and then select one of the following options:

    • Restore: Restores the conversation. The conversation can be accessed from the Recent conversations menu option.
    • Delete Permanently: Permanently deletes the conversation.

Known limitations

Conversational Analytics dashboard agents have the following known limitations:

  • Advanced Analytics isn't supported for dashboard agents.
  • Dashboard agents query the Production Mode of dashboard data.
  • Dashboard agents can't be shared with other users.
  • Dashboard agents aren't supported when Conversational Analytics is embedded in a website or application.
  • You cannot modify the context or instructions for LookML dashboard agents.

Limitations on visualizations

Conversational Analytics leverages Vega-lite for conversation chart generation. The following Vega chart types are fully supported:

  • Line chart (one or more series)
  • Area chart
  • Bar chart (horizontal, vertical, stacked)
  • Scatter plot (one or more groups)
  • Pie chart

The following Vega chart types are supported, but you may encounter unexpected behavior when rendering them:

  • Maps
  • Heatmaps
  • Charts with tooltips

Chart types that exist outside the Vega catalog are not supported. Any charts that are not specified in this section are considered unsupported.

Limitations on data sources

Conversational Analytics has the following data source limitations:

  • Conversational Analytics can return a maximum of 5,000 rows per query.
  • Conversational Analytics cannot set the value of a filter-only field that is defined using the LookML parameter or filter parameters.

Limitations on questions

Conversational Analytics supports questions that can be answered by a single visualization, for example:

  • Metric trends over time
  • Breakdown or distribution of a metric by dimension
  • Unique values for one or more dimensions
  • Single metric values
  • The top dimension values by metric

Conversational Analytics doesn't yet support questions that can only be answered with the following types of complicated visualizations:

  • Prediction and forecasting
  • Advanced statistical analysis, including correlation and anomaly detection