Google launched AI.AGG in preview. It is a multi-level semantic aggregation function inside BigQuery. It handles text and images without moving data out of BigQuery. The engine batches rows, runs parallel inference and recursively synthesizes results. Each group’s output is capped at 10,000 tokens. Rows over 10 MiB are dropped. Multimodal rows are limited to fewer than 10 images. Queries are capped at 20 million rows and 1,000 groups. It works within BigQuery’s governance and VPC Service Controls. Costs can be estimated with AI.COUNT_TOKENS. Context caching can reduce input token costs. NULL fields in a STRUCT cause the whole row to be skipped. AI.AGG relies on full-weight LLMs at every stage.
What changed
Data teams had to build external map-reduce pipelines to aggregate text and multimodal data at scale.
What it unlocks
Running natural-language instructions over millions of rows of data with a single SQL query in BigQuery.
- 10 MiB max row size
- 10,000 tokens max output per group
- 20M rows max per query
- 1,000 groups max per query
What you need to act on it
- preview access to AI.AGG
- BigQuery project
- Vertex AI enabled
Sources