[Google Cloud] Google Cloud said BigQuery has introduced AI.AGG, a preview multi-level semantic aggregation function embedded natively in GoogleSQL, which treats semantic aggregation as a distributed map-reduce problem and lets data teams run natural-language instructions over millions of rows with a single SQL query. According to Google Cloud, the engine automatically performs row-level validation, dropping or returning an error on payloads above 10 MiB; groups input rows into context-safe batches that fit the token limits of the chosen Gemini endpoint; applies the prompt to each batch in parallel via Vertex AI to generate intermediate summaries; and recursively batches and re-submits those outputs until a single aggregated string is produced per SQL GROUP BY clause. Google Cloud said AI.AGG relies entirely on full-weight LLMs at every pipeline stage, unlike row-level functions such as AI.CLASSIFY that can use distilled CPU proxy models. The function natively supports text and multimodal inputs, and with BigQuery Object Tables and OBJ.GET_ACCESS_URL, teams can aggregate visual insights from images in Cloud Storage without data movement or transcoding, according to the company. Google Cloud cautioned that when a STRUCT is passed, a single NULL field causes the entire row to be silently discarded, and recommended wrapping nullable fields with IFNULL().
Google Cloud previews AI.AGG in BigQuery for semantic aggregation over millions of rows
Sourcescloud.google.com