loading...
  • Main
  • /
  • Blog
  • /
  • How to Set Up Conversational Analytics in BigQuery: Creating and Testing Your Own Data Agent
bg-image
August 05, 2026

How to Set Up Conversational Analytics in BigQuery: Creating and Testing Your Own Data Agent

The cloud analytics ecosystem is evolving extremely quickly. Just a few months ago, we were discussing how to connect Claude or ChatGPT to BigQuery via MCP (Model Context Protocol), and today Google already offers an official solution directly within the BigQuery interface — Conversational Analytics.

This certainly does not mean that the Claude + BigQuery MCP option is no longer relevant. Each toolset is better suited to different tasks.

If you open BigQuery Studio in your Google Cloud console, you will notice a new section in the left-hand panel — Agents.

13.1 New Agents block new

This is where you will find a Gemini-powered AI agent that integrates deeply with your datasets, understands your company’s business context, and can write valid SQL queries based on your internal logic.

After months of testing, Conversational Analytics became generally available in early July. At the same time, Google is offering a free trial period for Data Cloud Agents AI tokens until September 30, 2026. In other words, you have an unprecedented opportunity to set up a data agent and use it completely free of charge for another two months (well, almost free: you will still have to pay for data processing in BigQuery, but you would pay for that anyway if you wrote the queries yourself). So now is a particularly good time to build the first version of your agent and test it on your own data.

And that is exactly why I prepared this guide — to help you take advantage of this opportunity. Today, we will take a detailed look at:

What Conversational Analytics Is and What Makes Data Agents Unique

In short, Conversational Analytics is a fully functional chat interface for your data. You ask a question in everyday language (for example, “Which products sold best over the past 10 days?” or “What is the average order value for new customers?”), and the system returns an answer.

Of course, things are more complex under the hood: the agent analyzes the question, identifies the required data sources, generates an SQL query, runs it in BigQuery, and ultimately returns the result in an easy-to-understand format.

13.2 ENG Agent answer гіфка

Depending on the question, the response may include:

  • a text explanation;
  • a table;
  • an SQL query;
  • a visualization (charts, graphs);
  • insights;
  • suggestions for further analysis (Follow-up questions).

Conversational Analytics runs on Gemini models. However, the solution’s main value is not simply that Google has added yet another AI chat. What matters far more is how this chat connects to data and gains an understanding of your business context.

When you try to connect a third-party AI directly to BigQuery, you are essentially reinventing the wheel. You have to configure a Python environment yourself, provide the business context manually, create CLAUDE.md or similar files containing project details, explain the key business metrics and their formulas in the instructions, and so on. Google, by contrast, has created a ready-made tool within GCP designed specifically for analytics, guiding you through the process and helping you set everything up correctly from the outset. The result is a system that works like an analyst colleague who speaks the same language as you.

For example, I ask a simple question: “What is a new customer?”

The agent did not simply provide a general definition of the concept. It consulted the glossary and explained that a new customer is a buyer who has placed their first order in the store.

What is more, the agent independently linked this business term to the data structure and indicated that such customers can be identified using the is_new_client field in the orders_t table:

  • if is_new_client = 1, the order belongs to a new customer;
  • if is_new_client = 0, it is a repeat purchase by an existing customer.
13.3 ENG What is new client ask chat

This clearly demonstrates the difference between a regular AI chat and a data agent. You do not need to know the table name, find the correct field, or phrase the question in technical language. You can use a familiar business term, and the agent will connect it to your data on its own.

And a complete understanding of the business context is not the only advantage a data agent has over a regular LLM chat. You can share the agent you have created with colleagues in a single click simply by granting access via email. And, of course, there is no need to transfer any configuration files between computers. But let us take it one step at a time.

Data Agent Architecture

Of course, an agent does not develop a detailed understanding of the business context on its own. It depends on how well you configure it.

In the previous example, we asked a simple question: “What is a new customer?” The agent not only provided a definition of the term but also linked it to the orders_t table and the corresponding field in the database on its own.

This understanding is built through the agent’s configuration, which combines four core components:

  • Knowledge sources — the data sources available to the agent;
  • Instructions — rules for working with tables and business logic;
  • Verified queries — validated SQL queries;
  • Manage terms — business terms and their definitions.

Together, these elements give the agent context that a regular chat connected to a single table does not have.

Step-by-Step Configuration of a Custom Agent for Your Business

Now let us walk through the entire process of creating your own data agent from scratch.

Step 1. Required Permissions and Roles

If you are working in your own test project and have broad Owner- or Editor-level permissions, you most likely will not need to configure most permissions separately. You can skip this section and proceed directly to creating the agent and connecting Knowledge Sources.

In a corporate project, things may be more complicated, so it is best to check that the exact IAM roles are in place from the outset:

  • Gemini Data Analytics Data Agent Creator — for creating a new agent. The user who creates the agent is automatically assigned the Data Agent Owner role for it;
  • Gemini Data Analytics Data Agent Owner — for editing, sharing, and deleting the agent;
  • Data Catalog Viewer — for adding knowledge sources;
  • BigQuery Data Viewer — for accessing the tables, datasets, or views used by the agent;
  • BigQuery Job User — for running SQL queries on behalf of the user.

For colleagues who only need to interact with a ready-made agent, the Gemini Data Analytics Data Agent User role is sufficient. The Data Agent Editor and Data Agent Viewer roles allow users to edit or only view its configuration, respectively. Pay particular attention to the Stateless Chat User (Gemini Data Analytics Stateless Chat User) role. It is required not only for chatting directly with data without a saved agent, but also for creating and editing the agent itself, so do not overlook it when granting access.

Also make sure that the BigQuery API, Gemini Data Analytics API, and Gemini for Google Cloud API are enabled in the project. The agent acts on behalf of a specific user and can access only the data that the user is already authorized to access. Therefore, sharing the agent alone is not enough: your colleague must also be granted access to its data sources.

Step 2. Create an Agent and Connect Knowledge Sources

  1. Go to BigQuery StudioAgents → click Create agent.
13.4 Create agent

2. First, enter a name and description. This is fairly straightforward: the name allows users to quickly find the right agent, while the description helps them understand what data it works with and what tasks it should be used for.

13.5 Agent setup

3. In the Knowledge sources section, click Add and select the data marts you prepared in advance.

Knowledge sources determine which data the agent can access when preparing a response. These may include:

  • BigQuery tables;
  • views;
  • user-defined functions;
  • other supported resources.

In our simple scenario, we connect two main entities:

  • an orders table from the CRM containing the deal status, creation date, amount, and customer ID;
  • marketing spend tables from advertising platforms.
13.6 Add knowledge sources

Note 1. NEVER connect tables containing raw data (for example, the initial events_* export from Google Analytics 4)!

The raw GA4 export contains complex nested event_params and user_properties arrays. The official documentation explicitly warns about working with such data in the “Known limitations” section: “Structs in BigQuery are supported but may sometimes fail.”

Solution: first, build clean, aggregated data marts and give the agent access only to those. For example, if you need traffic source data, use the following transformation.

Note 2. If a table does not appear in search: the search bar for sources sometimes does not work correctly. Open the required table in an adjacent tab, run a simple query, and it will immediately appear at the top of the Recents list.

13.7 Find tables in recents

Step 3. Review Table and Field Descriptions Within the Agent

After adding a source, click Customize next to the relevant table. The system will suggest:

  • a description of the table itself;
  • descriptions of its fields;
  • an explanation of how Gemini interprets the data structure.
13.8 Customize table descriptions with Gemini

Review these suggestions and accept only those that reflect the actual logic. You can confirm correct descriptions by clicking Accept suggestions; reject or manually edit incorrect ones.

Be sure to carefully document every column that:

  • is used to join tables;
  • defines statuses;
  • contains dates;
  • is used in calculations;
  • has an ambiguous name.

Step 4. Create Instructions

The Instructions section describes business logic that the agent cannot determine unambiguously from the table schema. For example, you can add the following rule to the agent:

“Unless otherwise specified in the question, include only successful orders with the success status.”

Once this instruction is saved, the agent will apply the corresponding filter even if the user does not repeat it in every question.

Instructions should include:

  • standard filters;
  • rules for working with dates;
  • non-standard formulas;
  • internal exceptions;
  • important constraints;
  • business logic that cannot be understood from the field name alone.

For example, PROANALYTICS.ACADEMY historically retained a column that was intended to indicate whether a student had received a certificate with distinction. However, the team no longer uses this field. Under the current rule, a certificate is considered a certificate with distinction if the student has earned at least 90% of the total points.

Therefore, the instruction must explicitly explain the following to the agent:

“To determine whether a certificate is a certificate with distinction, use the final grade field. If the grade is 90% or higher, the certificate is considered a certificate with distinction. Do not use the outdated certificate status field.”

The agent will not understand this on its own. On the contrary, the old column with the corresponding name may appear to be the most obvious option. Instructions are most valuable precisely for these kinds of historical changes, exceptions, and internal conventions.

At the same time, I would not recommend putting every possible piece of context into Instructions. Based on my testing, the following distribution works better:

  • synonyms and definitions — in Glossary;
  • complex JOIN logic — in Verified queries;
  • standard rules and exceptions — in Instructions;
  • fields that the agent should never use at all — remove them from the prepared table instead of repeatedly prohibiting their use in the prompt.

This also aligns with Google’s current approach: first, provide structured context through descriptions, verified queries, and the glossary, and use instructions for additional rules not covered by the other settings.

You do not have to write all the instructions at once. If you are creating an agent for yourself, you can gradually expand them after each test. If the agent is intended for a client or a specific department, I recommend starting with a brief interview with the stakeholders: find out which questions they will ask most often and which internal nuances need to be taken into account.

Language tip: it is recommended that instructions, the glossary, and verified queries be written in the same language that users will use to interact with the chat.

Above, I shared advice based on my own experience, but, of course, this article would be incomplete without Google’s official recommendations. Google recommends structuring instructions according to the following types of information:

13.9 ENG Google instruction examples

Step 5. Add Verified Queries

Verified queries are validated, or “golden,” queries. These are SQL queries that an analyst has already reviewed and confirmed as correct. They show the agent:

  • which tables to use when answering a particular question;
  • how to join the tables;
  • which filters to apply and when;
  • how to calculate metrics;
  • what structure the correct answer should have.

If a user’s question matches one of the verified queries, the agent can run it without changes. If there is no exact match, the SQL from Verified queries is still used as a reference for building a new query.

If you already build reports in Power BI, Data Studio, Tableau, or another system, the best place to start is with the queries used in your current reporting. They have already been validated, run on real data, and contain the correct calculation logic.

Click Add query, formulate the question that the SQL answers, paste the query itself, and run it using Run and verify. You should add the query to the agent only after confirming that it returns the expected result.

13.10 Verified queries13.11 Verified query in custom agent

If you do not have any ready-made SQL queries, you can click Review suggestions or ask Gemini to generate a query. However, automatically generated SQL must still be reviewed before it is saved.

13.12 Review suggested verified queries

For recurring scenarios, you can create parameterized verified queries. For example:

What is the total inventory of @product in the @region region?

The agent will extract the product name and region from the user’s wording and insert them into the verified SQL template. This allows a single query to cover many similar questions while maintaining control over the calculation logic.

Step 6. Create a Glossary (Manage Terms)

In the Glossary section, click Add term and then Create term. For each concept, specify:

  • the term name;
  • an exact definition;
  • synonyms, if necessary.

For example:

Term: Successful order

Definition: An order in which the status field is equal to success.

Synonyms: sale, completed order.

13.13 Manage terms

If a company has several agents — for example, separate agents for marketing, logistics, and finance — you do not need to create the same terms for each one. You can maintain the business glossary centrally in Knowledge Catalog and then connect its concepts to different agents. Local terms created directly in BigQuery remain within a specific agent.

13.14 Glossary

Step 7. Select a Model for the Agent and Set Maximum Bytes Billed (Budget Safeguard)

In the Settings section, you can select the Gemini models available to the agent’s users. At the outset, I would not spend much time on this setting: correctly preparing the data, descriptions, instructions, and verified queries is far more important initially.

If necessary, you can also add Labels to organize resources internally.

However, I recommend not skipping the Maximum bytes billed field. When the agent answers a question, it creates and runs an SQL query in BigQuery. As a result, a certain volume of data may be processed to produce the answer.

Maximum bytes billed allows you to set the maximum amount of data that may be processed for a single query. For example, you can limit a single answer to one or ten gigabytes, depending on the size of your tables.

For a small or medium-sized project, even 1 GB per query may be sufficient. For a large business, the value may be 10 GB or several dozen gigabytes. There is no universal figure — it all depends on your data and typical questions.

13.15 Maximum byte bills agent settings

For reference, under standard pricing, BigQuery costs $6.25 per tebibyte (TiB) of data processed, while the first tebibyte (TiB) each month is free. This means that a 1 GB limit per agent response costs approximately $0.006 (slightly more than half a cent) per message, while the first thousand such queries per month fall within BigQuery’s free tier.

The interface expects the value in bytes. The minimum permitted value is 10485760, or 10 MB; you cannot enter a lower value because the system will return an error. If the expected volume exceeds the set limit, the query is not run and does not incur any costs. If you leave the field blank, the default limit is taken from the project’s daily query quota. In other words, a limit still exists, but you do not control it directly. It is therefore better to set the value deliberately.

Step 8. Test the Agent

Before publishing, ask several control questions whose answers you already know. For example:

  • How many successful orders were there?
  • Which source generated the most sales?
  • Which campaign generated the most revenue?
  • What does “successful order” mean?
  • Which field is used to join CRM data and Google Analytics sessions?

Check not only the final answer, but also:

  • the tables used;
  • the fields used for JOINs;
  • filters;
  • formulas;
  • dates;
  • the generated SQL.

If the result is incorrect, it does not mean the test has failed. Think about exactly what information the agent was missing. You may need to clarify a field description, add a rule to the instructions, create a term, or save another verified query.

Google recommends testing the agent in the Preview window, changing the configuration, and repeating the test until the answers are satisfactory.

In terms of speed, the agent usually answers simple questions within 30–40 seconds, while more complex questions may take several minutes. This is longer than the instant response of a typical chatbot, but usually still faster than waiting for an analyst.

Step 9. Publish the Agent and Give Your Team Access

Once basic testing is complete, click Save and then Publish.

13.16 Publish agent

If you only save the agent and return to the catalog, it will remain in the My draft agents section. Once published, the agent becomes available for full conversations in BigQuery Studio.

If necessary, click Share, add the users’ email addresses, and select a role:

  • Data Agent User — can interact with the agent;
  • Data Agent Editor — can edit it;
  • Data Agent Viewer — can view its configuration.

Remember that each user must also have access to the tables used by the agent and permission to run queries in BigQuery.

You can also open the published agent in Data Studio and send the user a direct link to the chat. The main configuration is edited in BigQuery, but Data Studio may be a much more familiar interface for a client, marketer, or manager.

This completes the basic setup. As you can see, you really can build the first MVP version of an agent quite quickly. It will not be perfect on the first attempt — and that is normal.

The next steps are simple: test it, identify a weak point, refine the description or business rule, add a term or verified query, and test again. This is how the agent gradually evolves from a simple chat interface alongside your tables into a tool that truly understands your business logic.

Think of the process of fine-tuning this kind of chat as onboarding a new colleague to your team — it does not happen in a single day either.

Using BigQuery ML and Google Cloud Storage Data in Conversational Analytics

Data agents in BigQuery go far beyond basic queries. For example, they support BigQuery ML.

You can use machine learning algorithms directly in the chat:

  • Anomaly detection (AI.DETECT_ANOMALIES): “Find outliers in the number of orders per day in 2026, using 2025 as the baseline.”
  • Forecasting (AI.FORECAST): “Forecast the number of orders for the next month.”
  • Insight generation (AI.GENERATE): “Summarize the main content of the text field in 1–2 sentences.”

What is more, thanks to BigQuery’s integration with Google Cloud Storage, the agent can even analyze text-based PDF documents by referencing external tables.

What Else You Need to Know About Conversational Analytics

Integration with Data Studio (Looker Studio)

You do not need to give every marketer or manager access to the technical BigQuery console in GCP or teach them how to use the interface. A configured agent can be opened via a link in Data Studio. Users get a convenient chat interface alongside their dashboards.

13.17 Data Studio share agent

This is very easy to do: when copying the link for your colleagues, select the Data Studio option.

13.18 Share agent

Data Security and Monitoring (Jobs Explorer)

Your organization’s Google Workspace / GCP settings apply fully to the agent’s operation. With enterprise plans, your data is not used to train public Gemini models.

For cost monitoring and debugging, all agent queries in the Jobs Explorer system log are marked with a special label:

ca-bq-job: true

13.19 Job explorer

Conclusion

Conversational Analytics in BigQuery is a genuinely useful tool, and I definitely recommend testing it while AI tokens are still free: you can build an MVP agent in an hour or two, and even the initial version can save a great deal of time on routine data questions.

That said, do not forget one important rule: AI does not fix bad data. It only makes the output faster and more autonomous — but if you feed it messy, unstructured, or poorly documented tables, you will get the same low-quality answer, only attractively formatted and delivered in a confident tone.

Comments

Share your thoughts and ask a question


Loading comments...