Sari la conținut

Română · beta. Traducerea a fost făcută automat și este încă în curs de revizuire. Citește pagina în engleză

perspectiva aiqbenchProduse AI

analiza aiqbench

This article introduces AI.AGG, a new native function in Google BigQuery that solves the architectural challenge of aggregating semantic themes across millions of rows without relying on external map-reduce pipelines. By embedding distributed processing directly into the SQL engine, it overcomes LLM context window limitations to enable holistic analysis of massive unstructured datasets.
Surse care acoperăGoogle Cloud Blog, Latent Space, Snowflake Blog, Databricks

Semantic aggregation over millions of rows in BigQuery with AI.AGG

Google Cloud Blog11 min de cititArticolul și perspectiva sunt în engleză.

For more than a decade, BigQuery has helped set standards for structured data aggregation, calculating financial sums, counting active users, and computing historical averages at a petabyte scale in seconds. But as modern enterprises become inundated with unstructured data — application logs, customer service transcripts, product imagery, and diagnostic reports — a critical gap has emerged. Historically, relational SQL engines have lacked the native ability to aggregate, synthesize, and extract overarching semantic themes from millions of rows of text and multimodal data. While BigQuery recently introduced powerful row-level AI functions (like AI.GENERATE and AI.CLASSIFY), analyzing massive datasets holistically presents a unique architectural challenge: the large language model (LLM) context window. Even with advanced foundation models like Gemini, you cannot pass millions of rows into a single prompt without triggering severe truncation or hard execution failures. Traditionally, solving this required data engineering teams to construct complex external map-reduce pipelines, manage rate-limiting backoffs, and recursively stitch chunked summaries together. Today, we are thrilled to deep-dive into AI.AGG — currently in preview — a fully managed, multi-level semantic aggregation function natively embedded within BigQuery GoogleSQL. By conceptualizing semantic aggregation as a distributed map-reduce problem, AI.AGG enables data teams to run natural-language instructions over millions of rows of data using a single SQL query. Here is a look under the hood at how it works, transformative enterprise use cases, and best practices for deploying it in production. Turning petabytes of data into semantic insights natively in BigQuery. Multi-level batching architecture AI.AGG abstracts the immense engineering complexity of chunking and parallel execution. When you execute an AI.AGG query, the BigQuery engine automatically orchestrates a sequence natively within the database: Row-level validation: The engine helps verify no single row exceeds the maximum context window (dropping or returning an error on payloads >10 MiB). Context-safe batching: The engine dynamically groups input rows into smaller batches that safely fit within the token limits of your chosen Gemini endpoint. Parallel inference: Your natural-language SQL prompt is applied to each batch in parallel, generating intermediate semantic summaries via Vertex AI. Recursive synthesis: Finally, the system batches these intermediate outputs together and passes them back to the LLM with the exact same instruction. This reduction repeats recursively until a single, final aggregated string is produced per SQL GROUP BY clause. Because AI.AGG requires deep reasoning to synthesize concepts across disparate batches, it relies entirely on full-weight LLMs for every stage of its pipeline — differentiating it from row-level functions like AI.CLASSIFY, which can leverage distilled CPU proxy models. Built for the multimodal enterprise AI.AGG natively supports both text and multimodal inputs. By leveraging BigQuery Object Tables and the OBJ.GET_ACCESS_URL function, analytics teams can aggregate visual insights across thousands of images stored directly in Cloud Storage with no data movement or transcoding required.  Data engineering pro-tip: The NULL exclusivity rule When evaluating multiple columns, users often pass a STRUCT into the function. However, if even a single field within that composite structure evaluates to NULL, the entire row is treated as NULL and silently discarded. Always explicitly wrap nullable fields with IFNULL() (e.g., IFNULL(description, 'No data provided')) to help verify your data safely enters the pipeline. Transformative enterprise use cases The true analytical power of AI.AGG emerges when combined with standard SQL GROUP BY operations. 1. Diagnostic analysis of high-volume system logs System logs generated by globally distributed microservices often hide subtle degradations (like memory thrashing or systemic clock drift) that never throw explicit fatal errors. Using AI.AGG, DevOps teams can group millions of logs by system component and generate targeted, human-readable diagnostic summaries. Prompting Tip: Instruct the model to explicitly describe the "normal operation" of the component before hunting for anomalies. This helps suppress the LLM's tendency to hallucinate errors on completely healthy logs. 2. Building the "agentic data cloud" AI.AGG isn't just an analytical reporting tool; it’s a dynamic orchestration engine. Imagine acquiring a massive repository of legacy support tickets with no clear categorization. You can deploy AI.AGG to read the raw text, synthesize a definitive list of categories, and output them as a strict JSON array. By unpacking this array via JSON_VALUE_ARRAY and feeding those dynamic labels directly into row-level classifiers like AI.CLASSIFY, you can orchestrate an end-to-end, aut

For more than a decade, BigQuery has helped set standards for structured data aggregation, calculating financial sums, counting active users, and computing historical averages at a petabyte scale in seconds. But as modern enterprises become inundated with unstructured data — application logs, customer service transcripts, product imagery, and diagnostic reports — a critical gap has emerged. Historically, relational SQL engines have lacked the native ability to aggregate, synthesize, and extract overarching semantic themes from millions of rows of text and multimodal data. While BigQuery recently introduced powerful row-level AI functions (like AI.GENERATE and AI.CLASSIFY), analyzing massive datasets holistically presents a unique architectural challenge: the large language model (LLM) context window. Even with advanced foundation models like Gemini, you cannot pass millions of rows into a single prompt without triggering severe truncation or hard execution failures. Traditionally, solving this required data engineering teams…

Extras afișat conform termenilor RSS ai publicației · 142 cuvinte · textul integral și figurile sunt pe site-ul publicației

Subiecte conexe