BigQuery’s New AI Functions: What They Mean for Marketing Data

Google's November BigQuery updates make AI functions cheaper to run at scale. What changed, and how we'd use them on GA4, Shopify and review data.

Written by:Marc FirthPublished: 24/11/2026

Google has spent November making BigQuery’s AI functions cheaper and easier to run over large tables. On 17 November it made an optimized mode for AI.IF and AI.CLASSIFY generally available, along with a new AI.RANK function, and on 19 November it added AI indexes and natural language search in Preview [1]. For marketing teams, the data that explains why customers buy or return is mostly text. Reviews, support tickets, return reasons and site search terms rarely fit into a dashboard.

We build marketing data pipelines on Google Cloud, so we’ve been reading the changes with one question in mind: what would we actually point these functions at for a retail or D2C brand? Below, we set out Google’s changes and where we’d start with them.

What Google changed in November

Three things in the BigQuery release notes stand out for marketing data:

  • 17 November: optimized mode is generally available. Google describes it as a way to “reduce LLM token consumption and query latency when processing large datasets” when using AI.IF and AI.CLASSIFY.
  • 17 November: AI.RANK is generally available. It reorders the rows of a table “by how well the text in a specified column answers a search query”.
  • 19 November: AI indexes and AI.SEARCH, in Preview. These allow natural language searches across table columns “without manually generating embeddings or managing models”.

There is also a smaller change worth diarising for anyone loading Shopify data into BigQuery. From 31 January 2027, Google’s Shopify connector will no longer support the legacyMode field in the DeliveryProfile schema or the permitSkuSharing field in the FulfillmentService schema, a change made in response to changes to Shopify’s API. Reporting that doesn’t use either field is unaffected, and any query that does will need updating before then.

Timeline of BigQuery changes in November 2026: Shopify connector field changes announced 6 November, optimized mode for AI.IF and AI.CLASSIFY and AI.RANK generally available 17 November, and AI indexes with AI.SEARCH in Preview 19 November.

BigQuery changes in November 2026 that matter for marketing data. Source: Google Cloud [1].

What the managed AI functions do

Google groups four of these functions as “managed AI functions”. They use Gemini without any customisation, and each returns a single value per row or group [2]. In plain terms:

  • AI.IF filters rows against a prompt. Google’s own example is finding product descriptions that describe a good gift.
  • AI.SCORE rates rows so they can be ranked. Google’s example is finding the top 10 most positive or negative reviews for a product.
  • AI.CLASSIFY sorts text into categories the team defines. Google’s example is classifying support tickets by billing, shipping, product quality or something else.
  • AI.AGG summarises many rows into one answer, for example scanning session logs to see where customers struggle.

AI.AGG is the one that changes the shape of the work. Google’s release notes list it as generally available from 13 October 2026, and a Google Cloud post on 5 November explains how it runs natural language instructions “over millions of rows of data using a single SQL query” by batching rows, summarising each batch and then summarising the summaries [3]. Before this, the same job meant pulling text out of the warehouse, chunking it and stitching the results back together in a separate script.

Four cards describing BigQuery’s managed AI functions: AI.IF filters rows, AI.SCORE rates and ranks rows, AI.CLASSIFY sorts text into categories, and AI.AGG summarises many rows.

The four managed AI functions, with Google’s own examples. Source: Google Cloud [2].

Where the marketing data comes from

None of this helps until the text and the numbers sit in the same place. For most retail and D2C brands, that starts with two sources.

GA4. Google Analytics can export raw event data to BigQuery once a day, with an optional streaming export during the day [4]. Google’s help page says standard properties have a daily export limit of 1 million events, that exports can go to the free BigQuery sandbox (those that exceed the sandbox limits incur charges), and that streaming export costs $0.05 per gigabyte, with 1 gigabyte equating to approximately 600,000 events. It also notes that user attribution in the streaming export can take around 24 hours to process, so the daily export is the safer source for channel reporting.

Shopify. Google’s BigQuery Data Transfer Service has a Shopify connector, currently in Preview, that schedules recurring transfers of objects such as Orders, Products, Customers, Refunds and Returns [5]. Google says there is no cost to transfer Shopify data into BigQuery while this feature is in Preview. It needs a custom Shopify app with the right access scopes, and Google notes that with every transfer run the connector transfers all available data from Shopify into BigQuery, which is worth knowing when planning table sizes and costs.

Once orders, returns and GA4 sessions sit next to review text and support tickets, the AI functions can work on the text while ordinary SQL joins it back to revenue. That join is the heart of data engineering for marketing, because it is what lets a theme in the reviews be weighed against the orders and returns behind it.

Diagram of GA4 events, Shopify orders and returns, and review, ticket and search text flowing into BigQuery, where AI functions label the text and SQL joins it to revenue.

How marketing data reaches BigQuery before the AI functions can use it. Sources: Google [4], Google Cloud [5].

What we’d point them at first

These are the four places we’d start for a retail or D2C brand. Each is a question a marketing team already asks, answered from text it already has.

  1. Return reasons and reviews by product. AI.CLASSIFY with a short, fixed list of reasons (fit, quality, delivery, not as described) turns free text into a column that can sit beside refund value per product.
  2. Support tickets by theme. AI.AGG can read a month of tickets grouped by category and write a short summary of what changed, which can be quicker to act on than a tag report.
  3. Site search terms. The searches people type on a site are a direct record of intent, and the ones that return nothing are the most useful. Classifying them by product line or by “we don’t sell this” is a quick way to find gaps, and it ties closely to the AI website search work we do.
  4. AI referral landing pages. If GA4 already separates AI assistant traffic, as we described in our guide to measuring AI search and referrals, AI.AGG can summarise what those landing pages have in common.

Costs and limits we plan around

The November changes are about cost, so it is worth being clear on what Google says about it.

Optimized mode works by having BigQuery train “a lightweight, distilled model during query execution” on a sample labelled by Gemini, then using that model for most rows instead of calling Gemini on every one [6]. It needs embeddings for the data, only works with AI.IF and AI.CLASSIFY, and needs approximately 3,000 rows to train. Google also warns that AI.CLASSIFY queries in this mode can fail if the distilled model isn’t good enough, so we’d read a failed run as a sign that the categories need tightening.

For AI.AGG, Google’s 5 November post is plain that the total tokens sent to Gemini will be greater than the token count of your source data, because of how it batches and re-summarises. It recommends filtering with WHERE and LIMIT first, estimating with AI.COUNT_TOKENS before running, and staying within a maximum of 20 million rows and 1,000 groups per query. The final output per group is capped at 10,000 tokens.

Card listing Google’s notes on optimized mode (AI.IF and AI.CLASSIFY only, about 3,000 rows, needs embeddings) and on AI.AGG (tokens exceed source data, up to 20 million rows and 1,000 groups per query recommended, 10,000 token output cap per group).

Cost and limit notes from Google’s documentation and its 5 November AI.AGG post. Sources: Google Cloud [3], [6].

How we’re approaching it

On the marketing data platforms we build, we start small and keep the warehouse the source of truth:

  • One question, one table. We pick a single question, such as why a product line’s returns rose, and run the functions on that slice before widening.
  • Fixed categories first. For AI.CLASSIFY, we’d agree the category list with the marketing team before running anything, so results can be compared month to month.
  • Count before we run. We estimate tokens on a sample and filter hard before any AI.AGG job over a full table.
  • Check the region and the stage. Some features above are in Preview, and we check that each function and model is supported in the region where the data is held before we plan around it.
  • Keep the raw data. AI outputs go into their own columns or tables, never over the original text, so every label can be traced back.

Where GA4 and Shopify data already land in BigQuery, these functions can be tried on one question and one table first. Where they don’t, getting the data there comes first. A call with us is how we usually start that conversation.

About Firney

Firney is a UK web development and AI engineering company. We build fast websites, AI site search, product recommendations and conversational commerce for retail and D2C brands. Firney is a Prismic partner and a Google Cloud partner.

How does your website measure up?

Our free GEO audit checks how shoppers, search engines and AI tools see your site, and what to improve first. All we need is your URL. Results in 24 hours.

FAQ

Frequently Asked Questions

References

  1. Google Cloud. “BigQuery release notes” (entries for 13 October, 6 November, 17 November and 19 November 2026). Google Cloud Documentation. Accessed 23 November 2026. https://docs.cloud.google.com/bigquery/docs/release-notes
  2. Google Cloud. “Generative AI overview”. Google Cloud Documentation. Last updated 20 November 2026. https://docs.cloud.google.com/bigquery/docs/generative-ai-overview
  3. Google Cloud. “Semantic aggregation over millions of rows in BigQuery with AI.AGG”. Google Cloud Blog. 5 November 2026. https://cloud.google.com/blog/products/data-analytics/semantic-data-aggregation-with-bigquery-and-ai-agg
  4. Google. “BigQuery Export”. Analytics Help. Accessed 23 November 2026. https://support.google.com/analytics/answer/9358801
  5. Google Cloud. “Load Shopify data into BigQuery”. Google Cloud Documentation. Last updated 10 November 2026. https://docs.cloud.google.com/bigquery/docs/shopify-transfer
  6. Google Cloud. “Optimize AI function costs with model distillation”. Google Cloud Documentation. Last updated 17 November 2026. https://docs.cloud.google.com/bigquery/docs/optimize-ai-functions
Enjoyed this article? We would greatly appreciate it if you could share it with your network.
Marc Firth
Written by
Marc Firth
CEO, Co-Founder
View full profile →

Related articles

More on this topic from the Firney team.
View all articles

Want this applied to your site? Book a 30-minute call.