Analyze data with conversations

Early access

This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.

Note: To enroll in conversational analytics early access, fill out therequest form.To request support or provide feedback for this feature, emailbq-ca-users-external@google.com.

Use this document to learn how to create, edit, and delete conversations inBigQuery. Conversations are persisted user chats with adata agent or data source.Users can ask data agents multi-part questions that use common terms like"sales" or "most popular", without having to specify table field names, ordefine conditions to filter the data. The chat response returned to the userprovides the answer to the user's question as text and code, and also generatescharts where appropriate. The response also includes the reasoning behindthe results.

You can create a conversation with a data agent, or a direct conversation withone or more tables. When you create a direct conversation, theConversational Analytics APIinterprets your question without the context and processinginstructions offered by a data agent.

Before you begin

  1. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.create permission.Learn how to grant roles.
    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

  2. Verify that billing is enabled for your Google Cloud project.

  3. Enable the BigQuery, Gemini Data Analytics, and Gemini for Google Cloud API APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enable permission.Learn how to grant roles.

    Enable the APIs

Required roles

To create conversations, you must have one of the followingConversational Analytics API IAM roles:

  • View and create conversations with any data agent that has been shared with you: Gemini Data Analytics Data Agent User (roles/geminidataanalytics.dataAgentUser) at the project level.
  • Create a direct conversation: Gemini Data Analytics Stateless Chat User (roles/geminidataanalytics.dataAgentStatelessUser)

Additionally, any user that creates a conversation must have thefollowing roles:

If a conversation user doesn't have appropriate roles on the source datatables used by the data agent, the following error is returned when theuser chats with the data agent:

Schema_Resolution: Access Denied

Create a conversation with a data agent

Use the following steps to create a conversation with a data agent. Youmustcreate a data agentbefore you can initiate a conversation with one.

  1. Go to the BigQueryAgents page.

    Go to the Agents page

  2. On theConversations tab, on theChat with your data pane,click the agent card of the data agent thatyou want to chat with. The conversation page opens.

  3. In theAsk a question field, type a question that you want the dataagent to answer. You can also click one of theGemini-suggested questions to get started.

    The data agent responds, stating the action it is taking to address yourquestion, and then returning the results.

    To see the steps that the data agent took, clickView steps.

    To see information about how the results were calculated, clickHow was this calculated?:

    Select the icon next to the initial data agent response to see details of the agent's calculations.

    TheText tab decribes the generated code, and theCode tab providesthe generated code:

    The agent's calculation details includes information about the code it generated.

    If appropriate for the data, the data agent also provides charts, tables,and other visualizations.

Create a direct conversation with a data source

Follow these steps to create a direct conversation with a data source:

  1. Go to the BigQueryAgents page.

    Go to the Agents page

  2. On theConversations tab, on theChat with your data pane,clickData sources.

  3. Select one or more tables and clickCreate Conversation.

  4. In theAsk a question field, type a question that you want the dataagent to answer. You can also click one of theGemini-suggested questions to get started.

    The Conversational Analytics API processes your question and returns theresults.

    To see the steps that the Conversational Analytics API took, clickView steps.

    To see information about how the results were calculated, clickHow was this calculated?:

    Select the icon next to the initial data agent response to see details of the agent's calculations.

    TheText tab decribes the generated code, and theCode tab providesthe generated code:

    The agent's calculation details includes information about the code it generated.

Open an existing conversation

Follow these steps to open a conversation:

  1. Go to the BigQueryAgents page.

    Go to the Agents page

  2. On theConversations tab, in the conversations list, click theconversation that you want to open.

Rename a conversation

Follow these steps to rename a conversation:

  1. Go to the BigQueryAgents page.

    Go to the Agents page

  2. On theConversations tab, in the conversations list, click theconversation that you want to rename.

  3. ClickView actions>Rename.

  4. In theRename conversation dialog, type a new name for the conversationin theConversation name field.

  5. ClickRename.

Delete a conversation

Follow these steps to delete a conversation:

  1. Go to the BigQueryAgents page.

    Go to the Agents page

  2. On theConversations tab, in the conversations list, click theconversation that you want to rename.

  3. ClickView actions>Delete.

  4. In theDelete conversation? dialog, clickDelete.

Locations

Conversational analytics operates globally, you can't choose which region touse.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.