Google Embeds Native AI Agents in BigQuery to Slash Analytics Costs

Transforming Multimodal Data into Enterprise AI Agents with BigQuery and Gemini [HANDS ON; LAPTOP — Ai4

Ai4

Unifying multimodal foundation models and conversational agents directly inside the data platform eliminates data movement bottlenecks while cutting token consumption by up to twentyfold through on-the-fly query distillation.

AI-assisted summary of Transforming Multimodal Data into Enterprise AI Agents with BigQuery and Gemini [HANDS ON; LAPTOP — original source. Check the original for full context.

Source published:

Detailed notes

## Background Published on YouTube by the channel Ai4 on August 15, 2026, this presentation features Google Cloud Product Manager Vaibhav Sethi. The session covers strategies for unifying structured and unstructured data analytics directly within BigQuery using Gemini, demonstrating how to build and deploy governed conversational AI agents across an enterprise.

## TL;DR Vaibhav Sethi details BigQuery's evolution into a multimodal, agentic data platform capable of processing unstructured assets natively through `Object Ref` types and built-in SQL AI functions. He explains key capabilities including serverless ScaNN vector search, token cost governance, zero-shot time series forecasting with TimesFM, and in-context tabular learning via TabFM. Through a hands-on demonstration diagnosing product returns for a mock retailer, Sethi shows how functions like `KEY_DRIVERS`, `AI.AGGREGATE`, and multimodal `AI.GENERATE` isolate business anomalies and audit catalog discrepancies. The presentation concludes by configuring and executing persistent, conversational data agents within BigQuery Studio that turn natural language prompts into secure SQL workflows.

## Atmosphere & style The session has the energetic, practical, and highly technical atmosphere of an advanced developer conference demo. Sethi delivers a fast-paced walkthrough with engaging authority, blending architectural diagrams seamlessly with live query consoles. The tone remains grounded and empowering, maintaining audience interest during live SQL troubleshooting with lighthearted real-world examples of humorous catalog image mismatches.

## Key takeaways - [00:04](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=4s) Moving data between disparate systems creates massive friction for enterprise AI initiatives; data platforms must natively unify structured data, unstructured content, and governance. - [04:03](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=243s) BigQuery handles unstructured assets natively using the typed `Object Ref` pointer to Cloud Storage, enabling SQL and Python queries to combine tabular metrics with images, documents, and audio. - [08:42](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=522s) In-database generative AI functions like `AI.generate` execute LLM prompts across millions of rows in parallel with a 50% discount via Gemini batch inference. - [12:05](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=725s) Native document processing functions such as `AI.chunk_document` parse and chunk thousands of PDFs directly in SQL for vector indexing and RAG workflows. - [12:05](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=725s) BigQuery optimizes semantic operations through query distillation, training a lightweight ML model on the fly to reduce token consumption by hundreds of times. - [16:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=978s) Governance tools like `AI.count_tokens` calculate token costs prior to execution, allowing administrators to enforce project-level quotas and developer limits. - [18:34](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1114s) Serverless vector indexing leverages Google's ScaNN technology and native Gemma embeddings to deliver hybrid keyword-and-vector retrieval across billions of records without dedicated vector databases. - [20:05](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1205s) TimesFM provides zero-shot transformer-based forecasting and anomaly detection across thousands of time series simultaneously, accessible via SQL and Connected Sheets. - [21:51](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1311s) TabFM enables in-context learning for structured classification and regression directly within BigQuery, surpassing custom-tuned XGBoost models on evaluation benchmarks. - [26:10](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1570s) The built-in `KEY_DRIVERS` function automates multidimensional root-cause analysis by pruning low-impact dimensional combinations in flight to pinpoint performance anomalies. - [34:35](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2075s) Optimized classification benchmarks demonstrate a 20x token reduction and 5x faster execution time while maintaining a 99.992% parity match with pure LLM inference. - [38:21](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2301s) BigQuery Studio allows domain experts to configure conversational AI agents grounded in tables, verified SQL metrics, and Knowledge Catalog glossaries for enterprise-wide deployment.

## Detailed walkthrough ### [00:04](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=4s) The Enterprise AI Bottleneck: Why the Data Platform Matters

Vaibhav Sethi introduces the session as a deep dive into BigQuery and multimodal data processing, bridging from the preceding primer into architectural concepts followed by a live demonstration. While surveys show around 92% of enterprises are rushing to deploy AI—a figure Sethi jokes "should be probably 100% at this moment"—very few organizations allocate adequate attention to their underlying data platform. Overlooking the data tier introduces severe friction into enterprise AI initiatives. When platforms force developers to continuously move data between disparate systems to run AI analytics, they introduce heavy operational barriers that slow down both engineering teams and business stakeholders.

A modern enterprise data platform must be inherently multimodal. Storing structured tables apart from unstructured media creates artificial silos, and fragmenting governance controls across isolated systems makes enterprise-wide security impossible to manage. To truly accelerate deployment, the core data platform itself must unify structured data, unstructured content, and security policies under a single engine.

[01:46](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=106s) BigQuery's Evolution: From Serverless Warehouse to Agentic Platform

BigQuery originated in 2011 as Google's serverless, exabyte-scale data warehouse—a pioneer capability that Sethi points out many market competitors still fail to match fifteen years later. Over the last decade and a half, its scope broadened far beyond simple analytical querying. BigQuery added in-database machine learning capabilities in 2019, evolved into a multicloud architecture via BigQuery Omni to query data residing outside Google Cloud, and introduced BigLake to query open table formats like Apache Iceberg and Parquet. It then incorporated object tables for unstructured assets, followed by deep native Gemini integrations, Vertex AI vector search, and direct agentic execution.

Architecturally, BigQuery functions across several integrated tiers: - **Storage and Lakehouse Layer:** Supports BigQuery's native managed format alongside open formats such as Apache Iceberg and Parquet. - **Serverless Core Engine:** Provides the distributed, auto-scaling analytical processing backbone. - **Advanced Capabilities Layer:** Exposes analytics through SQL and Python, vector search, knowledge graphs, stream processing, and multimodal AI functions. - **Developer and Agent Layer:** Delivers conversational analytics agents and integration surfaces built directly into BigQuery.

```mermaid flowchart TD accTitle: BigQuery Platform Architecture accDescription: Architectural breakdown of BigQuery across the Lakehouse, Core Engine, Capability, and Developer Agent layers.

subgraph Top["Developer & Agent Layer"] A["Conversational Analytics Agents"] B["Dataform Pipeline Agents"] end

subgraph Mid["Capability Layer"] C["SQL & Python Analytics"] D["AI Functions & Vector Search"] E["Graph Analytics & Streaming"] end

subgraph Core["Core Engine Layer"] F["Serverless Distributed Query Engine"] end

subgraph Base["Lakehouse Storage Layer"] G["Native BigQuery Storage"] H["Iceberg & Parquet / BigLake"] I["Object Tables / GCS References"] end

Top --> Mid Mid --> Core Core --> Base ```

[04:03](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=243s) Unstructured Data Foundation: The `Object Ref` Data Type

In traditional data warehouses, structured tables reside completely insulated from unstructured media. BigQuery handles multimodal data natively by leaving large unstructured assets—such as audio recordings, images, or documents—inside Google Cloud Storage (GCS), while BigQuery maintains a typed pointer called an `Object Ref`. Represented as an internal struct, an `Object Ref` holds the target object's GCS URI along with associated technical and business metadata.

Because `Object Ref` is a native first-class BigQuery data type, the analytical engine and custom Python User Defined Functions (UDFs) query both the content and the metadata directly. If an asset in Cloud Storage contains custom annotation tags, users can inspect, filter, and aggregate those attributes using standard SQL. Multiple `Object Ref` columns can reside within the same table alongside standard tabular types, persisting through transformations and ETL pipelines. This allows teams to execute multimodal queries that were previously intractable, such as querying a product catalog for electronic items with high return rates while simultaneously analyzing customer-submitted return photos to identify items showing "damage on arrival."

[06:45](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=405s) Full-Stack AI and ML Inside BigQuery

BigQuery has evolved into a complete, end-to-end machine learning platform managed directly through SQL. Without moving data outside the warehouse boundaries, data teams can perform large-scale feature engineering, train classification and clustering models, evaluate performance, and run distributed, serverless batch inference with full MLOps tracking through Gemini Enterprise.

For standard operational requirements, BigQuery provides pre-trained predictive transformer models for time-series forecasting, anomaly detection, classification, and regression. Users no longer need to design custom features or train architectures from scratch for everyday analytical workloads; pre-trained foundations can be invoked immediately against the data. Beyond predictive modeling, BigQuery integrates serverless vector indexing capable of generating and searching across billions of high-dimensional embeddings, as well as specialized developer tooling such as autonomous data engineering agents designed to draft and maintain Dataform pipelines.

[08:42](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=522s) Generative AI Inference with `AI.generate` and Structured Extraction

To perform generative AI inference at scale, BigQuery exposes specialized SQL functions, highlighted by `AI.generate`. By wrapping LLM invocations in basic SQL syntax, developers can run prompts across millions of table rows in parallel. For instance, summarizing an entire corpus like the BBC news dataset requires only invoking `AI.generate` against each row's article body column to produce a concise, single-sentence summary.

Beyond open-ended semantic tasks like text summarization, enterprises frequently need to transform messy unstructured text into strict tabular formats. By passing a defined output schema (such as a JSON schema) directly into `AI.generate`, the model is strictly constrained to output structured attributes—such as parsing unstructured clinical notes into distinct `name` and `age` columns. Helper functions like `AI.generate_table` automate this process further by directly expanding generated outputs into queryable relational columns without requiring intermediate JSON parsing steps.

- **Model Choice:** While Gemini serves as the optimized native default, users can route queries to Anthropic Claude or any custom Hugging Face model deployed onto a Vertex AI Model Garden endpoint. - **50% Batch Discount:** Queries executed via `AI.generate` run through Gemini's batch inference pipeline, slashing model inference costs by 50% compared to standard synchronous API rates. - **Real-World Production Uses:** Enterprises actively use BigQuery AI functions for entity extraction across text and imagery, customer review sentiment scoring, synthetic content generation, and automated IT log classification and root-cause summarization.

[12:05](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=725s) Document Processing and Managed AI Functions: Semantic Joins and Distillation

Preparing unstructured documents for Retrieval-Augmented Generation (RAG) typically requires brittle external pipelines. BigQuery streamlines this into SQL using `AI.chunk_document`. The function accepts an object table pointing to a Cloud Storage bucket containing thousands or tens of thousands of PDFs, parses the documents, chunks the text, and returns clean, embeddable segments directly into a BigQuery table ready for downstream vector indexing.

```mermaid flowchart LR accTitle: Document Chunking to RAG Pipeline accDescription: Flow showing how PDFs in GCS are converted to chunks in BigQuery using AI.chunk_document and fed to downstream RAG workflows.

A["GCS Bucket\n(10,000+ PDFs)"] --> B["Object Table\n(Object Refs)"] B --> C["AI.chunk_document\n(Native BigQuery SQL)"] C --> D["BigQuery Chunks Table"] D --> E["Vector Embeddings & RAG"] ```

Alongside raw inference, BigQuery provides specialized managed AI functions engineered for specific semantic operations: - `AI.if`: Executes semantic filtering and complex joins. It allows cross-modal joins that are otherwise impossible, such as joining an image table with a catalog text description table based on whether the image advertisement actually depicts the described product. - `AI.classify`: Performs classification across text or images based solely on user-supplied labels. - `AI.score`: Computes normalized semantic relevance scores across multiple rows concurrently rather than evaluating individual rows in isolation. - `AI.aggregate`: Synthesizes semantic takeaways across vast numbers of rows (similar to e-commerce review rollups) using an intelligent hierarchical pattern that prevents hitting LLM context window boundaries.

For `AI.if` and `AI.classify`, BigQuery introduces an innovative optimization: query distillation. Rather than routing every individual row through a costly LLM call, BigQuery dynamically trains a classical machine learning model on the fly using the data's vector embeddings as input features. The query engine then uses this compact distilled model to execute the evaluation across the remaining dataset. By selecting the `minimize_cost` optimization mode, users achieve a "multiple hundred times reduction in the amount of tokens you spend," accelerating query speeds to thousands of rows in seconds and scaling seamlessly across billions of records.

[16:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=978s) Productionizing Enterprise AI: Token Governance, Streaming, and Orchestration

Deploying AI workflows into production requires strict operational governance over compute and token consumption. BigQuery provides `AI.count_tokens`, enabling developers to calculate exact token requirements prior to query execution at zero cost. Administrators can enforce programmatic token quotas at the project and user levels—such as capping a specific department at 100 million tokens per day—while developers can assign hard limits on individual experimental queries during testing before deploying them into production.

For real-time operational workloads, BigQuery's continuous queries allow developers to embed generative functions like `AI.generate` directly into continuous streaming pipelines. Engineering workflows are maintained through Dataform, which provides Git versioning, testing, and modern software development life cycle (SDLC) practices for SQL-based ETL pipelines. Complex operational directed acyclic graphs (DAGs) can be orchestrated either through BigQuery's built-in scheduling capabilities or via Cloud Composer, Google's managed Apache Airflow service.

Turning to embedding generation, BigQuery supports scalable, cost-effective Google-managed embedding models out of the box, while also allowing teams to bring proprietary or open-source embeddings from Hugging Face by linking to Vertex AI Model Garden endpoints.

[18:34](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1114s) Serverless Vector Search and Hybrid Retrieval with ScaNN

BigQuery allows smaller machine learning models, such as the Gemma class of models used for embeddings, to run directly and natively inside the data warehouse. Once embeddings are generated across billions of rows, BigQuery leverages Google's proprietary ScaNN (Scalable Nearest Neighbors) indexing and search technology—the exact same infrastructure underpinning Google consumer products serving billions of users. This vector search capability is entirely serverless, eliminating the need to provision, configure, or manage dedicated third-party vector databases and their operational lifecycles.

Tables can be set up to maintain embeddings autonomously: whenever data is mutated, inserted, or updated, corresponding embeddings refresh automatically in the background. Beyond pure vector search, BigQuery supports hybrid search. In queries combining strict keyword constraints with broader semantic meaning, BigQuery executes both exact text matching and semantic vector retrieval simultaneously, applying smart reranking algorithms to return the highest-relevance output.

- **Native Gemma Embeddings:** Runs smaller embedding models directly in BigQuery without external API round-trips. - **ScaNN Technology:** Scalable Nearest Neighbors index architecture handling billions of rows. - **Fully Serverless:** No external vector database instances or lifecycle management required. - **Autonomous Embeddings:** Automatic recalculation as underlying table data changes. - **Hybrid Search & Reranking:** Merges exact keyword matching and semantic vector scoring into a single unified result.

---

[20:05](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1205s) Zero-Shot Forecasting and Anomaly Detection with TimesFM and Connected Sheets

Large language models represent only one facet of analytical intelligence in BigQuery; foundational models designed for numerical patterns are equally critical. Google integrates TimesFM, a zero-shot, transformer-based foundation model trained specifically to predict time series data rather than language tokens. Because it is pre-trained, TimesFM requires no bespoke customer training or fine-tuning: users supply historical records, specify a future prediction horizon, and can forecast hundreds or thousands of separate time series simultaneously in a single SQL query. For instance, a retailer managing numerous physical stores and thousands of individual SKUs can project demand 30 days into the future without spinning up specialized infrastructure.

TimesFM powers both historical anomaly detection and real-time outlier flagging on incoming data streams. Recognizing that many business users operate primarily in spreadsheets rather than SQL consoles, Google exposes these enterprise capabilities directly within Google Sheets through Connected Sheets. Formulas executed inside the spreadsheet push down computation to BigQuery, letting spreadsheet users run large-scale time series forecasting and anomaly detection on massive cloud data tables transparently.

```mermaid flowchart TD accTitle: BigQuery TimesFM and Connected Sheets Architecture subgraph DataLayer["BigQuery Analytical Engine"] Hist["Historical Data\n(Retail Stores & SKUs)"] --> TFM["TimesFM Transformer Model\n(Zero-Shot Time Series)"] TFM --> FC["Multi-Series 30-Day Forecasts"] TFM --> AD["Outlier & Anomaly Detection"] end

subgraph Interfaces["User Interfaces"] SQL["SQL Interface\n(AI.FORECAST Queries)"] --> TFM CS["Connected Sheets\n(Google Sheets UI)"] -->|Pushdown Computation| TFM end ```

---

[21:51](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1311s) Introducing TabFM for In-Context Tabular Classification and Regression

Building upon the transformer principles of TimesFM, Google introduced TabFM to handle structured classification and regression directly within BigQuery. Rather than requiring data science teams to manually train, tune, and evaluate traditional gradient-boosted decision trees (like XGBoost) on new labeled datasets, TabFM relies on in-context learning. Through a straightforward `AI.PREDICT` statement, users provide reference training data alongside unlabelled inference rows and target labels, executing the entire predictive pipeline natively inside BigQuery.

In published benchmark evaluations measuring model accuracy across tabular tasks, TabFM achieves superior Elo ratings compared to existing alternatives. It outscores traditional tree-based models custom-trained on target datasets as well as state-of-the-art pre-trained tabular foundation models out of the box, offering a frictionless path for fraud detection and risk scoring without dedicated machine learning pipelines.

- **In-Context Learning:** Eliminates iterative model training loops by passing training exemplars and inference rows into `AI.PREDICT`. - **Classification and Regression:** Generalizes tabular prediction across discrete label and continuous target use cases. - **State-of-the-Art Elo Scores:** Outperforms both custom-tuned decision tree models (e.g., XGBoost) and competing pre-trained tabular models on standard evaluation benchmarks.

---

[23:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1398s) Conversational Analytics, Agents in BigQuery, and the Data Agent Kit

Recognizing that "nobody likes to write code these days, especially when you're working with simple analytical queries," BigQuery includes conversational analytics natively within the BigQuery console. Users can define a targeted "bounding box"—restricting context to specific tables, schemas, and datasets—and engage in natural language chat. The agent translates user questions into secure SQL queries executed under the user's existing IAM credentials. Power users can configure domain instructions and schema context, then publish and share agents across the enterprise, including direct deployment into Gemini Enterprise.

Conversational agents in BigQuery are not limited to SQL `SELECT` aggregations; they are wired directly into underlying ML and multimodal primitives. A user can prompt the chat agent to categorize unstructured customer search queries, and the agent autonomously structures an `AI.CLASSIFY` invocation or applies TimesFM and TabFM models for predictive requests. For software engineers, Google offers the Data Agent Kit, featuring a VS Code extension with a data catalog browser, development tooling, and specialized agent skills that teach AI assistants how to orchestrate BigQuery, Apache Spark, and other GCP services across coding environments like Codex, Antigravity, and Cloud Code CLI.

```mermaid flowchart LR accTitle: Conversational Analytics and Data Agent Ecosystem subgraph AgentDef["BigQuery Agent Studio"] BB["Define Bounding Box\n(Tables, Schemas, Permissions)"] --> Agent["Conversational Agent"] Agent --> ExtCap["AI Primitives\n(AI.CLASSIFY, TimesFM, TabFM)"] end

subgraph Consumption["Consumption Surfaces"] Agent --> BQConsole["BigQuery Studio Chat"] Agent --> GemEnt["Gemini Enterprise Users"] Agent --> DAK["Data Agent Kit\n(VS Code / Antigravity / CLI)"] end ```

---

[26:10](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1570s) Hands-on Demo: Diagnosing Cymbal Pets' Spike in Returns with `KEY_DRIVERS`

To demonstrate these multimodal and agentic capabilities, a real-world scenario centers on a business manager at "Cymbal Pets", an e-commerce retailer selling pet accessories. The business encounters a sudden spike in monthly product returns: monthly return volume jumps from a baseline of roughly 1,500 items up to 2,000 items. Standard operational practice requires tedious manual slicing across dozens of dimensional combinations (brands, categories, geographies) to identify the driver behind the delta.

BigQuery automates this multidimensional root-cause analysis through the built-in `KEY_DRIVERS` analytical function. Users supply the target metric (`return_count`) alongside an array of categorical dimensions (`brand`, `category`, `product_name`). Rather than experiencing the exponential combinatorial explosion typical of manual pivot tables, the underlying algorithm prunes low-impact permutations in flight. Executing `KEY_DRIVERS` isolates the primary culprit immediately: the "Cat Costume" brand within the "Apparel" category accounts for the overwhelming majority of excess returns, giving the team their initial "smoking gun."

- **Data Tables Used:** - `catalog`: Product metadata, brand, category, product descriptions, and product image references. - `returns`: Return timestamps, order/product IDs, and unstructured return comment text. - `support`: Customer support cases with narrative descriptions and pre-computed embedding vectors. - **`KEY_DRIVERS` Efficiency:** Replaces hours of manual dimensional slicing by evaluating cross-dimensional metrics and automatically pruning statistically negligible combinations.

---

[29:32](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1772s) Multimodal Root Cause Analysis with `AI.AGGREGATE`, `AI.CLASSIFY`, and `AI.GENERATE`

With the issue narrowed to the "Cat Costume" brand for March, an aggregation function (`AI.AGGREGATE`) processes all unstructured return comments to summarize the top reasons for customer dissatisfaction. Within seconds, the LLM-backed function identifies the three main complaints: the product failed to match its catalog description, items arrived damaged, or customers simply no longer needed the item.

```mermaid flowchart TD accTitle: Multimodal Root Cause Analysis Workflow KD["Run KEY_DRIVERS Function"] --> FoundBrand["Isolate Spike:\nCat Costume Brand in Apparel"] FoundBrand --> Agg["AI.AGGREGATE on Return Comments"] Agg --> Reasons["Top Issue Identified:\nProduct Not Matching Description"] Reasons --> Classify["AI.CLASSIFY Across Catalog Returns"] Classify --> SelectItem["Inspect Product 215 via OBJECT_REF"] SelectItem --> VisualCheck["Image Mismatch Found:\nLion Mane Title vs. Shark Costume Image"] VisualCheck --> BatchGen["AI.GENERATE Catalog-Wide Audit:\nMultimodal Discrepancy Scoring"] ```

To quantify the distribution, `AI.CLASSIFY` tags all comments against these categories. Focusing on cases where the product did not match customer expectations, the investigation selects an exemplar (Product ID 215) and queries its metadata alongside its actual product image using BigQuery's `OBJECT_REF` construct. The query reveals a comical discrepancy: the product name reads "Lion Mane Costume," but the attached catalog image displays a cat wearing a shark costume.

To resolve catalog errors systematically rather than playing whack-a-mole, an `AI.GENERATE` query scales multimodal auditing across the entire catalog. The prompt instructs the model to inspect each product image against its corresponding title and textual description, returning a structured JSON response with a mismatch flag, a numerical severity score, and an explanation. The automated scan uncovers numerous humorous mismatches across the catalog—such as a cat shark costume illustrated by a cat dressed as a taco, several confused dog costume listings, and aquarium gravel cleaner listings with totally contradictory descriptions.

---

[34:35](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2075s) Benchmarking Optimized Classification: 20x Token Savings at 99.992% Accuracy

The demonstration shifts to classifying 50,000 customer inquiries in the `support` table to route them into categories like shipping delays, returns, or billing disputes. Executing standard classification against massive row counts using brute-force foundation model prompting is slow and cost-prohibitive. BigQuery addresses this with an internal optimization mode: it trains a lightweight, domain-specialized model on the fly using few-shot embeddings and applies that trained model across the bulk of the dataset.

Running this optimized classification query over 50,000 rows executes in 24 seconds, consuming less than half a million tokens (under 500,000 tokens). By comparison, forcing BigQuery to evaluate all rows using the standard LLM ("maximize quality" mode) takes 2 minutes and 21 seconds—a 5x increase in runtime—and burns more than 10 million tokens. A parity check comparing the outputs reveals a 99.992% exact match between the optimized pipeline and raw LLM inference, proving that BigQuery can deliver a 20x reduction in token consumption and massive speedups with virtually zero degradation in analytical accuracy.

| Metric | Optimized Mode (On-the-Fly Model) | Maximize Quality Mode (Pure LLM) | Difference / Impact | |:--- |:--- |:--- |:--- | | **Row Count** | 50,000 rows | 50,000 rows | Identical dataset | | **Execution Time** | 24 seconds | 2 minutes, 21 seconds | ~5x faster execution | | **Token Consumption** | < 500,000 tokens | > 10,000,000 tokens | 20x reduction in token spend | | **Classification Match** | Baseline comparison | 99.992% agreement | Indistinguishable quality difference |

---

[37:45](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2265s) Transition to BigQuery Studio: Creating and Configuring Agents

Having reviewed the SQL foundations—from `KEY_DRIVERS` and multimodal discrepancy audits to optimized text classification—the session moves back to the Google Cloud Platform console to showcase how these primitives transition from manual queries into autonomous, persistent business agents.

Within BigQuery Studio, the navigation interface exposes the new "Agents in BigQuery" workspace. Here, developers and data analysts configure specialized agents that package these underlying SQL functions, catalog boundaries, and classification logic into reusable, conversational assistants tailored for non-technical enterprise stakeholders.

[38:21](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2301s) Configuring Knowledge Sources and Enterprise Context in the Agent

Vaibhav walks through the customization and configuration options available when building a conversational data agent, using a sample customer returns agent as an example. To ground the agent's reasoning, he connects several core knowledge sources, including the underlying raw tables used throughout the demonstration—specifically the catalog returns and customer support cases tables. Beyond simply attaching raw structured and unstructured data, the interface allows creators to inject detailed instructions, business glossaries, and semantic definitions. Providing this explicit business context drastically sharpens the agent’s accuracy and relevance when handling domain-specific inquiries.

To ensure consistency and accuracy across standard business metrics, creators can also provide verified queries directly to the agent. These are human-vetted SQL snippets that dictate exactly how complex or sensitive metrics, such as revenue calculations, should be computed. The agent also integrates directly with Knowledge Catalog, taking advantage of its metadata enrichment features to automatically ingest and generate domain glossaries from cataloged tables. This architecture allows a single data steward or domain expert who deeply understands the dataset to configure the agent with all necessary context, business logic, and guardrails, and then publish and share it securely with the rest of the enterprise.

```mermaid flowchart TD accTitle: BigQuery Conversational Agent Architecture subgraph ContextSources["Context & Knowledge Ingestion"] A["Raw BigQuery Tables\n(Catalog Returns, Support Cases)"] B["Knowledge Catalog\n(Auto-generated Glossaries)"] C["Verified SQL Queries\n(Standard Metrics & Logic)"] D["System Instructions\n(Semantic Rules & Context)"] end

subgraph AgentLayer["Agent Configuration & Execution"] E["Conversational Returns Agent"] F["BigQuery AI Functions\n(AI.GENERATE_TEXT, AI.TAG)"] end

subgraph Consumption["Enterprise Deployment"] G["Enterprise Users\n(Natural Language Chat Interface)"] end

A --> E B --> E C --> E D --> E E <--> F E --> G ```

- **Knowledge Sources:** Combines raw relational tables, semi-structured tables, and unstructured support case transcripts into unified agent knowledge. - **Verified SQL Queries:** Prevents agent hallucination on key performance indicators by locking in predefined SQL formulations for critical metrics. - **Knowledge Catalog Integration:** Automates metadata enrichment and semantic glossary creation directly from cataloged BigQuery tables. - **Enterprise Sharing:** Enables a single subject matter expert to build, curate, and govern the agent before deploying it across the entire organization.

---

[39:38](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2378s) Conversational Querying and Agent Execution with BigQuery AI

Vaibhav illustrates the agent in action by reviewing a previously executed natural language request: asking the agent to provide a summary of the top five support case issues within the apparel category. The agent performs its internal reasoning, interprets the underlying schema and contextual instructions, and automatically translates the natural language prompt into an optimized SQL query behind the scenes.

The generated query utilizes the native `AI.TAG` function directly within BigQuery to extract, categorize, and rank the top five issues in the apparel category without requiring manual text labeling or external pipeline orchestration. Vaibhav emphasizes that this completes the full journey of modern analytics: starting with base multimodal data in BigQuery, manipulating and analyzing it using scalable SQL and built-in AI functions, and finally abstracting the entire experience into a conversational AI agent that anyone in the organization can interact with.

> "So this is just a demonstration that you know we went from the base foundations of data in BigQuery to using SQL as the way to work with this data. But you don't need to stop there. You can actually move to the agent layer and just work with this data conversationally. Right behind the scenes it's just going to use the same functions for scalability."

Wrapping up the presentation, Vaibhav summarizes the end-to-end power of BigQuery AI and concludes the session by thanking the attendees for staying through to the end of the day.

## Notable quotes > [00:04](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=4s) should be probably 100% at this moment — Vaibhav Sethi

> [12:05](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=725s) multiple hundred times reduction in the amount of tokens you spend — Vaibhav Sethi

> [23:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1398s) nobody likes to write code these days, especially when you're working with simple analytical queries — Vaibhav Sethi

> [39:38](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2378s) So this is just a demonstration that you know we went from the base foundations of data in BigQuery to using SQL as the way to work with this data. But you don't need to stop there. You can actually move to the agent layer and just work with this data conversationally. Right behind the scenes it's just going to use the same functions for scalability. — Vaibhav Sethi

## Mentioned Vaibhav Sethi, Google Cloud, BigQuery, Gemini, Gemini Enterprise, BigQuery Omni, BigLake, Apache Iceberg, Apache Parquet, Vertex AI, Dataform, Google Cloud Storage, Object Ref, Python, BBC, Anthropic Claude, Hugging Face, Vertex AI Model Garden, Cloud Composer, Apache Airflow, Gemma, ScaNN, TimesFM, Connected Sheets, Google Sheets, TabFM, XGBoost, Data Agent Kit, VS Code, Apache Spark, Codex, Antigravity, Cloud Code CLI, Cymbal Pets, Knowledge Catalog

## Video description Vaibhav Sethi - Product Manager, Google Cloud

A bulk of enterprise data is in documents, images, audio, and text, leaving a massive gap in business insights. This session explores how to bridge this gap by unifying both structured and unstructured data analytics directly within your data platform (BigQuery) with help of Gemini. We will demonstrate how to turn this unified data into actionable an actionable insights and into a conversational agent and deploy across your organization using Gemini Enterprise while maintaining robust governance and access control.

Join us to learn the blueprint for transforming your raw, multimodal data into an accessible, interactive, and governed AI experience for your entire workforce.

Takeaways:

Strategies for bringing structured and unstructured data together seamlessly in BigQuery. How to create conversational AI agents natively within BigQuery to chat with your data. Best practices for deploying these agents securely via Gemini Enterprise for broader organizational use.

[Source](https://www.youtube.com/watch?v=CE8-ZMzlY3k)

中文简报

Google 在 BigQuery 中内置原生 AI Agent 大幅降低分析成本 直接在数据平台内整合多模态基础模型与对话型 Agent,不仅消除了数据移动瓶颈,还通过实时查询蒸馏将 Token 消耗降低高达二十倍。 Vaibhav Sethi 详细阐述了 BigQuery 如何演进为一个多模态、Agent 化的数据平台,能够通过 `Object Ref` 类型和内置 SQL AI 函数原生处理非结构化资产。他讲解了多项核心能力,包括无服务器 ScaNN 向量搜索、Token 成本治理、利用 TimesFM 实现的零样本时间序列预测,以及通过 TabFM 进行的上下文表格学习。在一项针对模拟零售商退货诊断的实操演示中,Sethi 展示了 `KEY_DRIVERS`、`AI.AGGREGATE` 和多模态 `AI.GENERATE` 等函数如何排查业务异常并审查目录差异。演讲最后展示了如何在 BigQuery Studio 中配置并运行持久化的对话型数据 Agent,将自然语言提示转化为安全的 SQL 工作流。 BigQuery 原生支持 Object Ref 指针类型,可直接关联 Google Cloud Storage 中的非结构化资产,让 SQL 与 Python 查询能够无缝融合表格指标与图像、文档及音频数据。 (4:03) 内置生成式 AI 函数(如 AI.generate 与 AI.chunk_document)支持在数百万行数据上并行运行 LLM 提示词,通过 Gemini 批处理推理可降低 50% 成本,并在 SQL 内直接完成数万份 PDF 的解析与切块。 (8:42) 通过查询蒸馏与动态训练轻量级模型,BigQuery 语义分类与过滤在处理 5 万条记录时将 Token 消耗降低 20 倍且保持 99.992% 准确率;管理员还可使用 AI.count_tokens 在执行前零成本预估并管控配额。 (34:35) BigQuery 集成基于 Google ScaNN 的无服务器向量索引及原生 Gemma 嵌入,并结合 TimesFM 零样本时序预测与 TabFM 表格预测模型,提供无需外挂数据库的高性能多模态与预测分析能力。 (18:34) 企业可通过 BigQuery Studio 创建统一的对话式 AI Agent,结合 Knowledge Catalog 业务术语表与经过验证的 SQL 指令,让非技术用户安全地通过自然语言完成复杂的多模态归因与分析。 (38:21)

Reading summary

Vaibhav Sethi argues that enterprise AI bottlenecks stem from fragmented data architectures, positioning BigQuery's unified multimodal data foundation, native SQL AI primitives, and internal agent orchestration as the solution for scalable enterprise deployment. Unifying Multimodal Storage with Native SQL Primitives (0:04) Sethi reports that although roughly 92% of enterprises are rushing to deploy AI, initiatives frequently stall because organizations treat structured data and unstructured media as separate silos, requiring continuous cross-system data movement. BigQuery addresses this by introducing the `Object Ref` data type. Unstructured assets like documents, audio, and images remain in Google Cloud Storage while BigQuery stores typed pointers containing URIs and metadata as first-class attributes alongside relational columns. This unified model allows native SQL functions to operate across structured and unstructured content simultaneously. For unstructured document ingestion, `AI.chunk_document` parses and splits batches of PDFs directly into embeddable relational rows for vector indexing. Specialized functions like `AI.if`, `AI.classify`, `AI.score`, and `AI.aggregate` allow cross-modal joins and multi-row summarization. By default, `AI.generate` routes LLM requests through Gemini's batch pipeline—cutting inference costs by 50% relative to standard synchronous APIs—while also supporting Anthropic Claude or custom Hugging Face models via Vertex AI endpoints. Built-In Embeddings, Vector Search, and Tabular Foundations (18:34) Rather than relying on external vector databases, BigQuery embeds smaller models like Gemma natively and manages vector indexing through Google's ScaNN technology. Search scales serverlessly across billions of rows, automatically recalculating embeddings as source tables update and executing hybrid searches that combine exact keyword matching with semantic vector scoring. Beyond language processing, BigQuery incorporates numerical foundation models. TimesFM delivers zero-shot time series forecasting and anomaly detection directly through SQL or Google Sheets formulas via Connected Sheets, allowing retail users to project demand across thousands of SKUs without custom training. For structured predictive tasks, TabFM provides in-context tabular classification and regression via `AI.PREDICT`. Sethi notes TabFM achieves higher Elo benchmark ratings than traditional gradient-boosted trees like XGBoost and competing pre-trained models without dedicated ML pipelines. Operational Governance and Optimized Model Distillation (16:18) Deploying generative SQL into production environments introduces cost and token management risks. BigQuery provides `AI.count_tokens` to let developers estimate token requirements before running queries, alongside administrative quotas to cap project-level consumption. For continuous workloads, streaming queries can run generative functions directly over live data feeds orchestrated through Dataform or Cloud Composer. To balance latency and operational costs on massive datasets, BigQuery implements query distillation for classification tasks. Instead of sending every record to a full LLM, the engine trains a compact model on the fly using vector embeddings. In a demonstration classifying 50,000 customer inquiries, the optimized mode finished in 24 seconds and used under 500,000 tokens, compared to 2 minutes and 21 seconds and over 10 million tokens in pure LLM mode. A parity audit confirmed a 99.992% match between the distilled model and brute-force LLM inference. End-to-End Multimodal Auditing and Agent Deployment (26:10) A troubleshooting case study for retailer Cymbal Pets illustrated the end-to-end analytical pipeline. When monthly returns surged from 1,500 to 2,000 units, the automated `KEY_DRIVERS` function pruned dimensional combinations to isolate the spike within the "Cat Costume" brand. Next, `AI.AGGREGATE` and `AI.CLASSIFY` pinpointed customer complaints regarding catalog discrepancies. By referencing product images using `OBJECT_REF`, investigators spotted mismatches such as a "Lion Mane Costume" listing featuring a cat in a shark suit. An enterprise-wide audit using `AI.GENERATE` then systematically evaluated every catalog image against its title and description, returning structured JSON severity scores. Finally, BigQuery Studio allows analysts to package these underlying SQL workflows into persistent, conversational agents. Creators define a bounded data scope, attach business glossaries and Knowledge Catalog metadata, and lock in human-verified SQL queries to prevent hallucinations on core business metrics. Non-technical stakeholders can then converse in natural language, which the agent translates into underlying BigQuery primitives like `AI.TAG` to rank and categorize issues automatically. Sethi concludes that modern analytical workflows can transition seamlessly from raw multimodal storage to SQL-based AI inference, and ultimately into governed, conversational agents without requiring external database orchestration or data movement.

精炼阅读摘要

Vaibhav Sethi在Ai4大会上指出,缺乏统一的数据底座是企业落地AI的核心瓶颈;BigQuery已从传统云数据仓库演进为整合多模态数据、内置生成式与预测型基础模型并支持构建企业级智能体的统一平台。 破除数据孤岛与多模态存储架构 (0:04) 根据Sethi引用的调查数据,约92%的企业正加速推进AI,但极少有机构对底层数据平台给予足够重视。将结构化报表与非结构化媒体割裂存储,并在分散的系统间频繁搬运数据,不仅导致治理策略碎片化,也给工程实施带来了巨大的运维摩擦。现代企业数据底座必须具备原生多模态能力,将结构化数据、多媒体资产与统一安全策略纳管在同一套处理引擎之中。 BigQuery通过引入Object Ref强类型指针解决了这一痛点:音频、图像或PDF等大型非结构化资产依然存放在Google Cloud Storage(GCS)中,而BigQuery在表内保存包含GCS统一资源标志符(URI)以及业务元数据的结构体。作为第一类原生数据类型,Object Ref支持SQL与Python自定义函数直接联合检索对象内容与标签,使得以往复杂的跨模态分析(例如将电子产品退货统计与用户上传的破损照片进行关联查询)可以直接在数据仓库内部执行。 SQL级生成式推理与查询蒸馏优化 (8:42) BigQuery将AI推理能力深度封装于SQL环境,开发者利用AI.generate等函数即可对数百万行数据并行执行大语言模型推理,配合JSON Schema还可直接输出结构化字段或展开为关系型列。借助Gemini的批处理推理管道,该模式下的模型调用成本较标准同步接口降低了50%。针对非结构化文档预处理,AI.chunk_document支持在SQL中直接解析GCS存储桶中的海量PDF并自动分块,无缝对接下游向量检索流水线。 在执行语义过滤与分类(如AI.if和AI.classify)时,BigQuery引入了查询蒸馏(Query Distillation)技术。该引擎不会对每一行数据逐一调用高昂的大模型,而是利用数据的向量嵌入动态训练轻量级经典机器学习模型来推断其余数据。在对50,000条客户支持记录进行分类的基准测试中,开启成本优化模式仅耗时24秒且消耗不足50万个Token;相比之下,纯大模型模式耗时2分21秒且消耗超过1000万个Token。该机制在实现Token消耗降低20倍和运行速度提升约5倍的同时,与纯大模型推理的分类一致性达到了99.992%。 预测型基础模型与无服务器检索架构 (18:34) 除生成式语言模型外,BigQuery还原生内置了针对数值和结构化任务的基础模型。用于时序预测的TimesFM模型基于Transformer架构预训练,具备零样本预测能力,零售企业无需单独调优即可单次预测成千上万个SKU的未来需求,该算力还通过Connected Sheets下推至Google表格界面供业务人员使用。针对表格分类与回归任务,Google推出的TabFM模型利用上下文学习消除了反复训练XGBoost等树形模型的开销;基准测试显示,其Elo评分超越了针对特定数据调优的传统树模型及现有预训练表格模型。 在检索层面,BigQuery支持在库内直接运行小型模型(如Gemma)生成嵌入,并采用支撑Google十亿级用户产品的ScaNN(可扩展近邻)底层技术,实现了完全无服务器化的向量索引与查询。数据表在发生增删改时会自动在后台重算嵌入向量,同时系统原生支持关键字精确匹配与语义向量评分相结合的混合搜索与智能重排,免去了额外采购与维护专用向量数据库的负担。 多模态根因分析与对话式智能体 (26:10) 在针对电商Cymbal Pets月退货量从1,500件激增至2,000件的排查演示中,BigQuery展现了全链路排查能力:内置分析函数KEY_DRIVERS自动对多维属性进行剪枝统计,迅速将异常根因锁定在服装类目下的猫咪服装品牌;随后通过AI.AGGREGATE提炼退货评论,发现图文不符是核心抱怨;再通过Object Ref调取对应商品元数据与图片比对,发现狮子鬃毛服装配图错误显示为鲨鱼装;最终通过AI.GENERATE在全目录执行图像与文本差异审计,批量识别了目录错误。在运维治理上,平台还支持通过AI.count_tokens在事前零成本计算Token消耗并设定项目级硬性配额。 上述SQL分析与多模态AI算子可在BigQuery Studio中进一步封装为持久化的企业级对话智能体。管理员可圈定数据边界、挂载知识库及业务术语表,并配置经过人工验证的SQL代码片段以锚定核心财务与运营指标的计算规则,避免大模型产生事实幻觉。借助Knowledge Catalog的元数据治理能力,业务人员仅凭自然语言交互即可调度后台的大模型算子,完成从底层数据处理到端到端业务决策的闭环。 该方案展示了企业分析从底层多模态存储、SQL级AI算子到上层对话式智能体的全栈闭环;但演讲内容同时表明,该体系高度依托Google Cloud的专有基础设施与Gemini生态,企业在享受极简架构的同时,仍需考量平台生态绑定与多云策略之间的平衡。

Detailed notes — zh

## Background 本内容由频道 Ai4 于 2026 年 8 月 15 日在 YouTube 平台发布,主讲人为 Google Cloud 产品经理 Vaibhav Sethi。视频主题聚焦于如何利用 BigQuery 与 Gemini 打通企业结构化与非结构化多模态数据分析,并在统一受控的治理架构下构建原生对话式 AI Agent。 ## TL;DR 演讲系统介绍了 BigQuery 融合 Gemini 后的现代多模态湖仓架构演进,重点解析了 object_ref 数据类型、AI.GENERATE 批处理推理、托管 AI 函数的动态蒸馏优化以及时间序列预测模型 TimesFM 等核心技术。随后,讲者通过宠物电商退货异常排查的实战案例,演示了如何通过 KEY_DRIVERS 算子、图文跨模态质检与高性价比分类管道快速定位业务根因。最后,展示了在 BigQuery Studio 中通过挂载数据源、业务词汇与已验证查询来定制企业级数据 Agent 的全流程,实现从 SQL 驱动到自然语言对话分析的无缝跃迁。 ## Atmosphere & style 整体氛围务实、专业且极具极客极速落地的感染力。讲者以风趣幽默的开场切入企业落地的痛点,在控制台演练中条理清晰、抽丝剥茧,现场对比模型优化模式与纯大模型推理的成本差距时展现出强烈的说服力。整场演讲兼具高架构视野与深度的动手实操感,带给观众一种从底层复杂数据管道一跃贯通至上层智能体应用的畅快技术体验。 ## Key takeaways - [00:04](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=4s) 企业落地 AI 的核心瓶颈在于缺乏统一受控的多模态数据底座,传统架构中结构化与非结构化数据割裂且需频繁搬运数据,权限治理难以统一。 - [01:39](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=99s) BigQuery 演进为统一湖仓底座,通过 BigLake 支持 Iceberg 等开放格式与对象表(Object Tables),并在顶层深度集成 Gemini 与向量搜索引擎。 - [04:03](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=243s) 引入 `object_ref` 结构体类型关联 GCS 中的非结构化资产与元数据,支持通过单条 SQL 同时操作结构化数值与非结构化多模态数据。 - [06:45](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=405s) 内置 `AI.GENERATE` 等 SQL 函数实现全栈 GenAI 批量推理,并享受 Gemini 批处理最高 50% 的价格折扣,同时支持 Claude 及开源大模型。 - [11:54](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=714s) 托管 AI 函数引入动态蒸馏优化(Dynamic Distillation),基于 Embedding 快速训练轻量模型执行分类任务,节约数百倍 Token 成本并提升执行速度。 - [16:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=978s) 提供免 Token 费用的 `COUNT_TOKENS` 预算评估、多层级 Token 配额限制,以及结合 Dataform 和 Cloud Composer 的完整工程化治理能力。 - [18:34](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1114s) 内置基于 ScaNN 索引技术的 Serverless 向量搜索与混合搜索(Hybrid Search),支持随数据摄入自动化同步向量嵌入,无需单独采购专用向量数据库。 - [20:05](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1205s) 引入零样本时间序列预测 Transformer 模型 TimesFM 与表格大模型 TabFM,在预测和分类回归任务上免去微调,效果超越传统树模型。 - [23:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1398s) 支持 BigQuery Studio 原生对话式分析,结合 IAM 权限与业务知识库,自动生成 SQL 并调用内置 AI 函数回答业务问题。 - [26:10](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1570s) 通过内置算子 `KEY_DRIVERS` 可以在指标异动时自动剪枝无关维度,极速定位电商退货激增的核心归因。 - [29:32](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1772s) 结合 `AI_AGGREGATE`、`AI_CLASSIFY` 与多模态 `AI_GENERATE` 批处理,几分钟内即可完成全量商品目录图文匹配度的高并发自动化审查。 - [34:35](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2075s) 在大规模工单分类实测中,动态优化模式相比纯 LLM 全量推理耗时减少近 5 倍且节省超 95% Token 消耗,分类一致性高达 99.992%。 - [38:21](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2301s) 支持在 BigQuery Studio 中可视化配置数据 Agent,通过关联数据表、业务指令(词汇表)和预验证查询固化指标计算口径,避免大模型幻觉。 - [39:38](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2378s) 完整打通从 BigQuery 统一数据底座、SQL 级多模态计算到自然语言 Agent 的链路,底层复用同一套高性能 Serverless 分析算力。 ## Detailed walkthrough ### [00:04](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=4s) 企业落地 AI 的关键:统一的多模态数据底座 许多企业迫切希望在业务中全面铺开 AI,演讲者打趣提到虽然当前统计数据显示有 92% 的企业正在尝试引入 AI,但“眼下这个数字恐怕已经接近 100% 了”。然而,极少有企业真正意识到数据平台在这一变革中的决定性地位。如果数据平台基础没打好,企业就会面临两大严峻障碍:其一,如果进行 AI 分析时必须频繁在不同系统间搬运数据,且平台本身缺乏原生 AI 分析能力,将给开发者和业务人员带来极高的开发门槛;其二,传统数据平台往往无法原生支持多模态数据,导致结构化数据与非结构化数据被硬生生割裂在不同孤岛,权限与安全治理控制也分散在多套系统之中。构建一个统一、受控的多模态数据平台,才是加速企业 AI 真正落地的必经之路。 ```mermaid flowchart TD accTitle: 传统分离架构与现代统一多模态数据平台对比 subgraph Legacy["传统割裂架构"] L1["结构化数据 (数据仓库)"] L2["非结构化数据 (对象存储/文件系统)"] L3["分散的权限与治理系统"] L1 -.->|反复搬运数据| L4["外部 AI 计算引擎"] L2 -.->|权限策略不一致| L4 end subgraph Modern["BigQuery 统一多模态平台"] M1["统一存储层 (BigLake / GCS / Iceberg)"] M2["无服务器核心引擎 (SQL / Python / AI 原生)"] M3["统一治理与细粒度访问控制"] M1 --> M2 M3 --> M2 M2 --> M4["企业级 AI Agent 与分析应用"] end ``` ### [01:39](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=99s) BigQuery 的演进历程与现代湖仓架构 BigQuery 自 2011 年推出首个无服务器(Serverless)PB 级/EB 级数据仓库平台以来,历经十余年演进,至今在业界仍保持着差异化领先优势。从 2019 年在 SQL 中引入 BigQuery ML 机器学习功能开始,BigQuery 逐步蜕变为主流多云架构的统一分析底座: - **存储与格式兼容**:通过 BigLake 支持 Apache Iceberg、Parquet 等开放格式,并支持对象表(Object Tables)接入非结构化资产; - **AI 与引擎整合**:深度融合 Vertex AI 与 Gemini 基础大模型,原生内置向量搜索(Vector Search)及图分析与流式处理引擎; - **智能体生态**:在顶层不仅为数据工程师提供 Dataform 自动化 Agent,更直接在 BigQuery 内部构建了对话式数据分析智能体。 整个 BigQuery 架构底座由 Lakehouse 构成,中间由强悍的 Serverless 计算引擎承载 SQL、Python、向量搜索与流计算,顶层则赋予开发者灵活构建多模态 Agent 的全面能力。 ### [04:03](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=243s) 多模态数据统一管理:ObjectRef 数据类型与 GCS 联动 对于图片、音频、PDF 等非结构化数据,BigQuery 并没有强行将其二进制内容搬入数据表中,而是让非结构化源文件继续存放在高性价比的 Google Cloud Storage(GCS)中,在 BigQuery 侧引入了全新的数据类型——`object_ref`。 `object_ref` 本质上是一个结构体(Struct),完整记录了 GCS 文件的 URI 地址以及各类元数据(例如音频格式、标记标签、标注属性等)。该引用类型具有极高的可组合性: - **与结构化列自由并存**:同一张表中可以同时包含商品类别、退货率等结构化数值列,以及多个 `object_ref` 多模态数据列; - **SQL 直接查询与过滤**:BigQuery 引擎与 Python UDF 能够直接解析这些元数据,用户可以直接用标准 SQL 语句对 GCS 对象的标签进行筛选; - **跨模态联合分析**:支持执行以往极其困难的复合业务分析,例如通过单条 SQL 查询“所有退货率偏高的电子产品,且其客户上传的附图中显示有外观破损”。 ```mermaid flowchart LR accTitle: BigQuery ObjectRef 多模态数据关联流 subgraph Storage["Google Cloud Storage (GCS)"] A["音频/视频文件"] B["PDF 文档/客户照片"] end subgraph BigQuery["BigQuery 统一数据表"] C["结构化列: 商品 ID / 类别 / 退货率"] D["多模态列: object_ref (URI + 元数据)"] end Storage -->|URI 指针与元数据映射| D BigQuery --> E["SQL / Python UDF 原生分析"] E --> F["Gemini 多模态联合推理"] ``` ### [06:45](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=405s) SQL 驱动的 GenAI 推理:AI.GENERATE 与批处理优势 BigQuery 已经演化为一个全栈机器学习与大模型推理平台。除了内置的时序预测、异常检测、分类回归等免调优预训练 Transformer 模型外,最核心的突破是与 Gemini 原生集成的 GenAI SQL 函数体系,其中最具代表性的是 `AI.GENERATE` 函数。 数据分析师仅需编写标准 SQL,即可对数百万行数据直接调用 LLM 进行批量推理。例如在 BBC 新闻数据集上对每篇文章摘要成一句话,或从非结构化的病历描述中一键提取符合严格 JSON Schema 的“姓名”与“年龄”,并直接持久化写回数据表: - **模型灵活可选**:默认深度集成 Gemini 模型,同时支持直接挂载 Anthropic Claude 或在 Vertex AI Model Garden 中部署的任何开源 Hugging Face 模型; - **生成结构化表格**:提供如 `GENERATE_TABLE` 等辅助函数,自动将提取的数据转换为数据表,免去繁琐的后处理解析步骤; - **超高性价比批推理**:在 BigQuery 内部通过 SQL 调用的 `AI.GENERATE` 会被归类为 Gemini 批处理推理(Batch Inference),直接享有高达 50% 的价格折扣,非常适合海量日志分类、实体抽取、情感归纳和数据丰富等非超低延迟场景。 ### [11:54](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=714s) 文档智能分块与托管 AI 函数的“模型蒸馏”极速优化 在构建企业级 RAG(检索增强生成)系统时,解析与切分海量 PDF 往往是繁琐的工程瓶颈。BigQuery 提供了专用的文档处理函数(如 `AI.CHUNK_DOCUMENT`),能够直接读取挂载 GCS 存储桶的对象表,自动对成千上万份 PDF 进行智能分块并输出到数据表中,为后续向量化嵌入做好准备。 针对常见的特定业务场景,BigQuery 还推出了一系列“托管 AI 函数”(Managed AI Functions),并在底层进行了极富创新的工程优化: - **`AI.IF`**:支持基于语义的过滤与模糊连接(Join)。例如将一张包含商品图片的表与一张包含文字描述的表基于“广告图是否包含该商品”进行跨模态关联; - **`AI.CLASSIFY` 与 `AI.SCORE`**:对多模态文本或图片进行归一化打分与零样本分类; - **`AI.AGGREGATE`**:跨大量行聚合并提炼全量用户评论语义,底层采用分层聚合机制,彻底打破 LLM 单次调用上下文长度限制; - **动态蒸馏优化(Dynamic Distillation)**:对于 `AI.IF` 和 `AI.CLASSIFY` 等分类任务,BigQuery 在选择“成本最小化(minimize_cost)”优化模式时,不会逐行调用昂贵的大语言模型,而是利用数据向量(Embeddings)在后台即时训练一个轻量级的经典机器学习小模型,随后用该蒸馏模型高速执行查询。这一机制可实现“数百倍的 Token 成本节省”,并在短短数秒内极速处理数千行甚至上百亿行的复杂查询。 ### [16:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=978s) 企业级生产管控:Token 预算、流式处理与向量管道 为确保企业能够安全、可控地将 AI 投入生产,BigQuery 在工程管控与管道集成方面提供了完整的企业级工具链: - **Token 消耗精细管控**:在执行大规模任务前,可使用 `COUNT_TOKENS` 函数预先预估消耗,该操作不产生 Token 费用;管理员可在项目级、用户级配置每日 Token 预算上限(如单日上限 1 亿 Token),开发者亦可在单次查询级别设置限制; - **流批一体连续查询(Continuous Queries)**:所有静态批处理函数(如 `AI.GENERATE`)均可直接嵌入连续流处理管道中,实时处理流入的数据流; - **工程化全生命周期管理**:结合 Dataform 工具,开发者可以使用 Git 配合 SQL 完成 ETL 管道的软件工程生命周期管理;对于复杂依赖的有向无环图(DAG),可无缝对接托管 Airflow 服务 Cloud Composer; - **全能向量生成体系**:BigQuery 支持直接调用 Google 托管模型高性价比生成多模态向量,亦支持连接 Vertex AI 部署的专用微调向量模型,支撑数十亿级规模的 Serverless 向量检索与索引构建。 ### [18:34](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1114s) 向量搜索、ScaNN 索引与混合搜索能力 在 BigQuery 中,用户既可以直接调用大模型生成 Embedding,也可以对于较轻量的模型在内部原生运行,例如 Gemma 系列的 Embedding 模型就能直接在 BigQuery 内部原生执行。当数据量膨胀至数十亿行级别时,内置的向量搜索(Vector Search)能力便能派上用场。BigQuery 采用了为众多拥有数十亿用户的 Google 消费级产品提供支撑的高性能索引与搜索技术——ScaNN。借助 ScaNN 索引,BigQuery 能够以完全无服务器(Serverless)的架构轻松扩展到数十亿行嵌入向量的检索,用户无需单独采购、搭建或维护专用向量数据库的生命周期。 更进一步,BigQuery 的数据表还支持自动化嵌入向量生成配置:当底层数据发生变更或有新数据摄入时,系统会自动保持 Embedding 的实时同步。此外,BigQuery 还原生支持混合搜索(Hybrid Search)。当用户的查询既包含需要精准文本匹配的特定词汇,又包含需要语义匹配的上下文部分时,系统能同时提取两类信号并进行智能重排序(Reranking),从而在准确性与语义理解上实现最佳平衡。 ```mermaid flowchart LR accTitle: BigQuery Serverless 向量检索架构 subgraph DataIngestion ["数据与向量生成"] A["多模态/结构化数据变更"] --> B["Gemma/LLM 原生嵌入生成"] end subgraph Engine ["BigQuery 检索内核"] B --> C["ScaNN 索引技术<br/>(数十亿级 Serverless)"] D["精准文本匹配信号"] --> E["混合搜索与智能重排序"] C --> E end subgraph Output ["查询结果"] E --> F["高精准语义 + 精确匹配结果"] end ``` --- ### [20:05](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1205s) 时间序列预测(TimesFM)与表格模型(TabFM) LLM 并非 BigQuery 的唯一能力。在商业分析中,预测与异常检测同样不可或缺。BigQuery 引入了基于 Transformer 架构的基础模型 TimesFM,但与预测下一个语言 Token 不同,TimesFM 专门针对时间序列数据的预测进行预训练。该模型完全支持零样本(Zero-shot)预测,用户无需耗费精力进行模型微调或训练,只需在一条 SQL 语句中提供历史数据并指定未来的预测步长,就能一次性对海量时间序列发起并行预测。比如零售企业面对成百上千家门店和海量 SKU 时,单条 SQL 即可直接产出全量商品未来 30 天的销售走势。 针对更广泛的业务分析人群,Google 将这一能力延伸到了电子表格界面。通过 Google 电子表格的 Connected Sheets 功能,业务人员在表格公式层面的操作都会直接推送到 BigQuery 底层大规模并行执行。现在,基于 TimesFM 的时间序列预测与异常检测功能也已全面集成进 Connected Sheets。 不仅如此,BigQuery 最新上线了面向表格数据分类与回归的全新模型 TabFM。以交易欺诈检测为例,以往工程师需要训练 XGBoost 模型并经历繁琐的调优评估,而现在通过 `AI.PREDICT` 语句,直接传入少样本标注数据进行上下文学习(In-context learning),即可在数秒内完成推理。在最新公布的基准测试中,TabFM 在分类与回归任务的 ELO 评分上显著超越了市场上其他预训练模型,甚至击败了用户在自身数据上专门定制训练的树模型。 - **TimesFM 特性**:零样本(Zero-shot)时间序列 Transformer 模型,单条 SQL 即可完成多时间序列联合预测与异常检测。 - **Connected Sheets 集成**:业务人员无需编写代码,在 Google Sheets 原生界面中即可直接调用云端预测大模型。 - **TabFM 突破**:开箱即用的分类与回归大模型,通过 In-context learning 替代传统 XGBoost/树模型训练,ELO 评分行业领先。 --- ### [23:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1398s) BigQuery 对话式分析、智能体构建与 Data Agent Kit 针对分析师和业务人员“如今没人喜欢写样板代码”的痛点,BigQuery 推出了对话式分析(Conversational Analytics)体验。在 BigQuery 控制台内,用户可以划定核心数据集和数据表的上下文边界,然后以纯自然语言与数据交互。系统会自动编写 SQL 查询解答问题,并且由于直接继承用户的 GCP IAM 访问权限,整个交互完全受到严格的安全管控。创建者还可以为智能体补充特定业务知识和上下文定制,随后将其一键分享给全公司。 对话式分析不仅限于执行聚合统计,它完全打通了前述的多模态与预测能力。用户可以说“帮我对这些搜索词进行分类”或“预测下个季度的指标”,智能体能够自主识别并调用 `AI_CLASSIFY`、`TIMES_FM` 或 `TAB_FM` 等高级函数。 针对更广泛的生态协同,构建好的 BigQuery 智能体可以发布至 Gemini Enterprise 平台供全员使用;而针对专业开发者,Google 则推出了 Data Agent Kit,包含配套的 VS Code 插件(内置元数据目录浏览器与开发工具链)以及使智能体掌握操作 BigQuery、Spark 等 GCP 数据服务技能的 Agent Skills,可无缝对接 Codex、Anti-gravity 等各类 Agentic 编程环境。 --- ### [26:10](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1570s) 实战演练:宠物电商退货异常排查与 Key Drivers 分析 随后,演讲转入重头戏——动手实操演示。讲者设定了一个具象化的业务排查场景:假设自己是一家名为 Symbol Pets 的宠物用品电商的业务主管,发现本月退货量出现了严重异常——月退货单数从正常的 1,500 单左右激增到了 2,000 单,管理层要求立即排查根因并采取措施。 演示所依赖的底层数据包括三张表:包含商品名称、类目及展示图片等非结构化数据的 `catalog` 目录表;记录退货日期、退货原因等信息的 `returns` 退货表;以及包含客户投诉详单与预先生成的 Embedding 向量列的 `support` 售后工单表。 在面对退货指标跳涨时,分析师的直觉往往是对多维数据进行反复下钻切片,但这在海量维度组合下极其耗时且面临组合爆炸。演示中展示了 BigQuery 提供的 `KEY_DRIVERS` 自动化分析函数。用户只需输入核心指标 `return_count` 以及品牌、品类、商品名称等分析维度,该函数就会在底层智能剪枝无关组合,快速计算出贡献最大的异动驱动因素。 ```sql -- 自动化定位退货量激增的关键驱动因素 SELECT * FROM ML.KEY_DRIVERS( TABLE returns_joined_catalog, 'return_count', ['brand', 'category', 'product_name'] ); ``` 执行后,系统迅速锁定了“罪魁祸首”:在所有细分维度中,服装类目(Apparel)下的“猫咪服装”(Cat Costume)品牌贡献了绝大部分的退货增量,找到了问题排查的关键突破口。 --- ### [29:32](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1772s) 多模态数据审查:通过 AI 函数定位图文不符与全量质检 锁定受影响的品牌后,讲者使用 `AI_AGGREGATE` 函数对 3 月份该品牌的所有退货评论文本进行聚合归纳,让大模型总结出排名前三的核心退货原因。结果显示,排在首位的是“商品与描述不符”,其次是“送达时损坏”和“用户不再需要”。 为了掌握这些退货原因在整体数据中的分布,讲者随后展示了 `AI_CLASSIFY` 函数的使用方式:将前面总结出的类别及其详细定义作为参数传入,让模型逐行对退货文本进行分类标注。在分析标注结果时,系统挑出了一件典型的“与预期不符”商品(Product ID 215)。讲者利用 BigQuery 的 `Object Ref` 特性,编写 SQL 直接读取并渲染底层存储的商品展示图。 现场真相大白:该商品的名称赫然写着“狮子鬃毛变装服”(Lion Mane Costume),但商品展示图上却是一只套着“鲨鱼变装服”的可爱猫咪,图文严重不符。 ```mermaid flowchart TD accTitle: 基于 BigQuery 多模态 AI 的电商目录质检全流程 subgraph AnomalyDetection ["第一阶段:根因锁定"] T1["退货指标异常激增<br/>(1,500 -> 2,000)"] --> T2["调用 KEY_DRIVERS 算子"] T2 --> T3["锁定 Cat Costume / 服装类目"] end subgraph TextAnalysis ["第二阶段:文本聚合与分类"] T3 --> U1["AI_AGGREGATE 提取 Top 3 退货原因"] U1 --> U2["AI_CLASSIFY 分类:发现大量'图文不符'"] end subgraph MultimodalAudit ["第三阶段:多模态图像质检"] U2 --> V1["Object Ref 读取单品图片<br/>(狮子鬃毛标题 vs 鲨鱼猫图片)"] V1 --> V2["AI_GENERATE 全量图文比对 Prompt"] V2 --> V3["结构化输出图文匹配评分与不符解释"] end ``` 既然单个 SKU 存在这种问题,整个商品库是否也存在广泛的类似错误?讲者通过 `AI_GENERATE` 编写了一条多模态批处理 SQL,让模型同时读取全量商品的名称、文字描述与展示图片,分析图文是否匹配,并以结构化 JSON 格式输出匹配评分与详细解释: ```sql -- 跨多模态全量质检查询示例 SELECT product_id, product_name, AI_GENERATE( PROMPT('请比对提供的商品名称、描述与商品图片:', product_name, description, product_image_ref), STRUCT('score FLOAT64, is_mismatch BOOL, explanation STRING' AS output_schema) ) AS audit_result FROM catalog; ``` 查询结果揭示了商品目录中的诸多幽默错误:“鲨鱼服装”的配图里猫咪被裹在“墨西哥卷饼”里,还有鱼缸清洁砂石工具的描述与配图完全错位等。借助这种结构化多模态分析,业务团队在几分钟内就完成了全目录的自动化质检。 --- ### [34:35](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2075s) 规模化分类成本优化:优化模式 vs 原生 LLM 的 20 倍效率差距 在演示的后半部分,讲者针对包含 50,000 条客户投诉记录的 `support` 售后工单表进行工单类目自动归类(物流问题、退货问题、账单问题等),并重点对比了 BigQuery 的“优化模式(Optimized Mode)”与“纯大模型全量推理(Maximize Quality)”在性能与成本上的巨大差异。 - **优化模式(Optimized Mode)**:BigQuery 在底层自动提取特征并在几秒内动态训练专有轻量模型执行分类。处理 50,000 行工单仅耗时 **24 秒**,Token 消耗量**低于 50 万(< 0.5M tokens)**。 - **质量优先模式(Maximize Quality / 纯 LLM 推理)**:关闭优化模式,强制每条数据经过大模型完整推理。处理同样 50,000 行工单耗时 **2 分 21 秒**(耗时增加近 5 倍),Token 消耗量高达 **1,000 万以上(10M+ tokens)**。 在随后的准确率验证中,讲者通过 SQL 计算两种模式分类结果的一致性,匹配度达到了惊人的 **99.992%**。这意味着优化模式以 1/20 的 Token 成本和 1/5 的耗时,交付了几乎完全等同于大模型逐条精细推理的输出质量。 --- ### [37:45](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2265s) BigQuery Studio 中的智能体配置界面 最后,讲者将操作视角切回到 Google Cloud Platform (GCP) 控制台中的 BigQuery Studio,展示全新的“BigQuery 智能体(Agents in BigQuery)”原生管理模块。用户可以在该界面中直观地创建、调试与发布定制化的数据智能体,将底层构建的各类复杂 SQL 分析管道、模型函数以及数据权限直接封装为开箱即用的对话体验。 ### [38:21](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2301s) 配置与定制 BigQuery 数据 Agent:知识源、业务指令与验证查询 演讲者展示了如何在平台中对数据 Agent 进行深度定制与调变。以构建的退货分析 Agent(Returns Agent)为例,首先需要为其接入底层知识源(Knowledge Sources),例如此前分析中用到的原始数据表——目录退货表(`catalog_returns`)与客户支持工单表(`support_cases`)。除了关联基础数据表之外,用户还可以为 Agent 注入具体的业务指令(Instructions),涵盖专有词汇表(Glossary)或特定业务指标的语义定义。演讲者强调,为 Agent 提供充足的上下文背景,能够大幅提升其推理与回答的准确性——"Agent 的性能表现确实会随着上下文信息的丰富而显著提升"。 ```mermaid flowchart TD accTitle: BigQuery 数据 Agent 的架构与配置流程 subgraph ContextSources["知识与上下文配置"] A["底层数据表\n(catalog_returns / support_cases)"] B["业务指令与语义词汇\n(Business Glossaries)"] C["预验证查询\n(Verified SQL Queries)"] D["数据资产目录\n(Knowledge Catalog 自动生成元数据)"] end subgraph AgentLayer["企业级 Agent 层"] E["Gemini 赋能的数据 Agent"] end subgraph EnterpriseAccess["企业消费与协作"] F["数据专家统一配置与调优"] G["全公司业务人员\n对话式交互与洞察消费"] end A --> E B --> E C --> E D --> E F --> E E --> G ``` 为了确保关键指标计算的精准性,平台支持添加“已验证查询”(Verified Queries)。例如,针对特定口径的营收核算或业务指标,企业可以直接录入经过专业团队验证的 SQL 逻辑。此外,Agent 还能无缝集成 Knowledge Catalog(数据资产目录)中自动生成的词汇与元数据丰富信息。这种架构支持一种高效的协作范式:由一位精通该数据集、掌握完整业务上下文的数据专家完成 Agent 的创建与调优,随后即可安全地将其共享给全公司的其他业务团队使用。 - **多维知识源挂载**:直接绑定 BigQuery 中的结构化与非结构化数据表作为 Agent 检索与分析的依据。 - **验证查询保障准确性**:通过固化标准 SQL 计算模板,避免大模型在关键业务指标计算时产生幻觉。 - **数据目录自动化赋能**:利用 Knowledge Catalog 的自动丰富能力生成业务词汇表,减少手动配置工作量。 --- ### [39:38](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2378s) 驱动对话式洞察与总结:从 SQL 基础到 Agent 层的全链路演进 在功能演示环节,演讲者展示了如何以自然语言驱动 Agent 展开深入的数据分析。例如,向 Agent 提出一个具体的业务需求:“请将服装(Apparel)类别的客户支持工单总结为排名前五的问题”。在接收到自然语言请求后,Agent 自主完成了思考与推理流程,并在后台直接生成并执行了包含 `AI_TAG` 函数的 SQL 查询,精准提炼出了服装类别中最为集中的前五大退货与支持问题,其效果与此前通过复杂 SQL 手工分析得出的结论完全一致。 这一流程完整展现了从底层数据到上层智能的演进路径:企业最初以 BigQuery 为数据底座,进而通过内嵌 AI 函数的 SQL 语句实现多模态数据的规模化处理;但分析探索并不局限于编写 SQL 代码,用户可以进一步跃迁至 Agent 层,直接以自然语言对话的方式与数据交互。无论交互界面多么简单,系统在底层始终复用相同的高性能、高可扩展性 BigQuery AI 算子。演讲者最后总结道,"这就是 BigQuery AI 的核心精髓",并向坚持到全天会议尾声的现场参会者致谢,圆满结束了本次演讲。 - **自然语言到高级 SQL 的自动转化**:Agent 能够自动理解复杂统计意图,并调用 `AI_TAG` 等内置机器学习函数执行结构化与非结构化混合计算。 - **全链路能力跃迁**:构建了“BigQuery 基础数据资产 $\rightarrow$ SQL 级多模态分析 $\rightarrow$ 企业级对话式 Agent”的完整技术落地蓝图。 - **底层算力与规模保持一致**:对话式前端背后依然由 BigQuery 企业级分析引擎提供高并发与高扩展性支撑。 ## Notable quotes > [00:04](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=4s) 眼下这个数字恐怕已经接近 100% 了 — Vaibhav Sethi > [04:03](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=243s) 所有退货率偏高的电子产品,且其客户上传的附图中显示有外观破损 — Vaibhav Sethi > [11:54](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=714s) 数百倍的 Token 成本节省 — Vaibhav Sethi > [23:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1398s) 如今没人喜欢写样板代码 — Vaibhav Sethi > [23:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1398s) 帮我对这些搜索词进行分类 — Vaibhav Sethi > [23:18](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1398s) 预测下个季度的指标 — Vaibhav Sethi > [29:32](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=1772s) 请比对提供的商品名称、描述与商品图片: — Vaibhav Sethi > [38:21](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2301s) Agent 的性能表现确实会随着上下文信息的丰富而显著提升 — Vaibhav Sethi > [39:38](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2378s) 请将服装(Apparel)类别的客户支持工单总结为排名前五的问题 — Vaibhav Sethi > [39:38](https://www.youtube.com/watch?v=CE8-ZMzlY3k&t=2378s) 这就是 BigQuery AI 的核心精髓 — Vaibhav Sethi ## Mentioned Vaibhav Sethi, Google Cloud, BigQuery, Gemini, Gemini Enterprise, BigLake, Google Cloud Storage (GCS), Apache Iceberg, Parquet, Vertex AI, Vertex AI Model Garden, Dataform, Anthropic Claude, Hugging Face, Cloud Composer, Apache Airflow, Gemma, ScaNN, TimesFM, TabFM, Connected Sheets, Google Sheets, XGBoost, Data Agent Kit, VS Code, Symbol Pets, BigQuery Studio, Knowledge Catalog ## Video description Vaibhav Sethi - Product Manager, Google Cloud A bulk of enterprise data is in documents, images, audio, and text, leaving a massive gap in business insights. This session explores how to bridge this gap by unifying both structured and unstructured data analytics directly within your data platform (BigQuery) with help of Gemini. We will demonstrate how to turn this unified data into actionable an actionable insights and into a conversational agent and deploy across your organization using Gemini Enterprise while maintaining robust governance and access control. Join us to learn the blueprint for transforming your raw, multimodal data into an accessible, interactive, and governed AI experience for your entire workforce. Takeaways: Strategies for bringing structured and unstructured data together seamlessly in BigQuery. How to create conversational AI agents natively within BigQuery to chat with your data. Best practices for deploying these agents securely via Gemini Enterprise for broader organizational use. [Source](https://www.youtube.com/watch?v=CE8-ZMzlY3k)

Source quotes

[0:04] Vaibhav Sethi: 眼下这个数字恐怕已经接近 100% 了 [4:03] Vaibhav Sethi: 所有退货率偏高的电子产品,且其客户上传的附图中显示有外观破损 [11:54] Vaibhav Sethi: 数百倍的 Token 成本节省 [23:18] Vaibhav Sethi: 如今没人喜欢写样板代码 [23:18] Vaibhav Sethi: 帮我对这些搜索词进行分类 [23:18] Vaibhav Sethi: 预测下个季度的指标 [29:32] Vaibhav Sethi: 请比对提供的商品名称、描述与商品图片: [38:21] Vaibhav Sethi: Agent 的性能表现确实会随着上下文信息的丰富而显著提升 [39:38] Vaibhav Sethi: 请将服装(Apparel)类别的客户支持工单总结为排名前五的问题 [39:38] Vaibhav Sethi: 这就是 BigQuery AI 的核心精髓

Source quotes

[0:04] Vaibhav Sethi: should be probably 100% at this moment [12:05] Vaibhav Sethi: multiple hundred times reduction in the amount of tokens you spend [23:18] Vaibhav Sethi: nobody likes to write code these days, especially when you're working with simple analytical queries [39:38] Vaibhav Sethi: So this is just a demonstration that you know we went from the base foundations of data in BigQuery to using SQL as the way to work with this data. But you don't need to stop there. You can actually move to the agent layer and just work with this data conversationally. Right behind the scenes it's just going to use the same functions for scalability.

Original transcript

[0:04] Hey folks, so I'm going to be talking a lot  about Bitquery and multimodal data processing [0:08] in Bitquery. So I think the last session was a  good uh segue uh to Bitquery and what all you [0:14] can do there. Uh this session is structured a  little differently. So I have a bunch of slides [0:20] uh where I lay the foundation uh of conceptual  ideas of what Bitquery can do for you [0:25] and then I have a demo for you instead of a  workshop. So let me let me get started. Uh [0:32] let's level set. Uh so everybody wants to put AI  in their enterprise uh today. So I have the number [0:41] 92%. It should be probably 100% at this moment.  But a critical piece that very few enterprises [0:48] give attention to is the data platform. And a data  platform is really really important if you want to [0:54] do successful enterprise AI deployment. So there's  a few issues if you don't get the data platform uh [1:00] part of the equation correct. One is that if your  data platform requires you to move data around [1:06] and some of the capabilities which should be in  the data platform for AI analytics are not there, [1:11] you still leave a large barrier uh for your  developers and business users to build on top [1:16] of it. Secondly, a good data platform should be  multimodal. So you should not have a place where [1:22] structured data lives separately from unstructured  data and you should not not have a situation where [1:27] your uh governance controls uh for access  to the data are in many different systems [1:33] right so good data platform needs to solve this  and that's the way to accelerate uh AI deployment [1:39] so David gave you a very brief primer on uh on  BigQuery uh but uh I'll show you the evolution of [1:46] Bitquery uh for this agentic era. So for folks who  are not familiar, BigQuery is Google's serverless [1:53] exabyte scale uh data warehouse platform. It  started with data warehouse, we do a lot of [1:57] things now. So we introduced serverless uh data  warehousing in 2011. It's been a decade and a half [2:04] and still many of the competitors in the market  don't have this capability, right? So it's still [2:08] truly differentiated. But over the past few years,  we have done a lot more. So we started introducing [2:14] machine learning into BigQuery back in 2019. And  this is a pretty wish I could pause this diff but [2:20] it's a pretty evolved set of features now. So  we are multicloud. You can have data outside [2:25] of GCP and still use BigQuery as your data  organization uh layer and the query engine. [2:31] Uh then we have uh big lake which is we support  data which is uh in iceberg format uh for you. [2:38] Uh we have object tables which allow you to work  with unstructured data. And then finally over the [2:44] last couple of years we have had deep integrations  with Gemini in bitquery. Uh we have added [2:50] capabilities like vortex uh vector search and  more recently agentic capabilities into bigquery. [2:57] So this is a snapshot of uh what bigquery looks  like at a conceptual level today. So at the bottom [3:02] you have the lakehouse right. So you can store  data in the bigquery native format or you can [3:08] have parket files or you can have iceberg it all  works. Then you have the serverless core engine uh [3:14] which has you know the best uh scalable analytics  uh available and then you have the features and [3:20] uh and capabilities at the the second I click  yeah uh at this layer. So you have analytics [3:27] available via SQL and Python. Uh we have a lot of  AI capabilities and vector search capabilities. [3:34] We have ability to represent your data as a graph  uh and do analytics graph analytics in BigQuery [3:40] and also do stream processing in BigQuery. And  finally at the top layer uh your developers have a [3:46] lot of choice when working with BigQuery data. We  just saw one example uh but there's a lot lot more [3:51] that you can do. And then we have conversational  analytics agents built right into Bitquery. [3:57] So the red boxes are the places uh which  I'm going to go deeper into in this session. [4:03] So let's get started. So let's start with the  unstructured data foundation in BigQuery. So I I [4:09] believe folks must be familiar how structured data  is you know typically stored in warehouses. So I [4:14] won't cover too much of that. But let's look  at how Bitquery handles unstructured data. [4:19] So the way we do it is that you have structured  data stored as normal tables in BigQuery. [4:24] But for unstructured data, you can uh leave  this data in GCS which is you know the best [4:29] typically the best choice for keeping unstructured  data. And what you keep in BigQuery is instead a [4:34] pointer to this uh GCS location. So what we have  in Bitquery is what we call as object ref. So [4:41] this has the URI of your uh audio file in this  case, right? As well as all kinds of metadata. [4:48] Now the good thing is that this information  is directly queryable by the bigquery engine [4:54] or if you define things like python udfs  they can directly query this information [4:58] as well as any metadata which is  here is also queryable by our engine. [5:03] So say you have done some annotation of metadata  and have added data in GCS and you want to filter [5:09] on that particular tag or value you can do  that just with SQL queries in BigQuery. Right? [5:15] Uh so this is the foundation of multimodel data  in BigQuery. So let's uh go a little bit deeper. [5:21] So specifically how you handle multimodel data in  BigQuery is through this thing called object ref. [5:27] So it's a new data type that we have added  to BigQuery. So it's really a strct. So as [5:31] I was pointing out before, it has a URI for your  object in GCS plus all other kinds of metadata. [5:39] So because this this is a a data type for a column  in BigQuery, uh you can have one or multiple [5:44] columns of this type in a BigQuery table or you  can have uh some part of your data which is uh in [5:51] a in a table with object refs, others are purely  structured data, right? And then what you can do [5:56] with this is that this is highly composable.  So you can move this between tables. You [5:59] can uh create these uh or transform these as part  of ETL pipelines. Uh and you can also persist them [6:08] and it allows you to answer questions like this  which are traditionally very hard. Right? So for [6:12] example, I can find electronic products. So  this is like basically looking at category of [6:17] some product in a table with high return  rates. Again looking at structured data [6:22] and then I'm doing something  interesting. I'm looking at [6:25] whether the product has a customer photo and it's  showing damage on arrival. So in a so I'll show [6:32] you how to do this in a in a demo. But you went  from combining structured and unstructured data [6:37] as well as analytics on this unstructured data.  Uh you can do all this with objects in BigQuery. [6:45] So that's the that's the data foundation  layer. I'm going to be spending a few moments [6:49] to talk about what are the analytical  capabilities you have on this layer. [6:55] So just a brief overview of all the AI and  ML stuff that you can do in BigQuery first. [7:01] So as I was mentioning in that in that  GIF where we have been innovating right [7:06] we have been working on the machine learning  parts in BigQuery for a while. So Bitquery is [7:11] also actually a full-fledged ML platform. So if  you're familiar with SQL and you know you have [7:17] basic needs like training a clustering model,  classification model, you can do all of that in [7:21] BigQuery. You can do feature engineering with  SQL at scale. Uh you can do uh model training, [7:27] eval uh serverless inference which is  distributed. So this scales really really well [7:33] and you can do MLOps via the  Gemini enterprise platform. [7:38] In addition, we have been adding pre-trained uh  predictive models to Bitquery. So uh I'll again [7:44] talk about this later in my deck. Uh but uh very  quickly we have pre-trained models for forecasting [7:50] and anomaly detection as well as classification  and regression. So most of the common enterprise [7:55] tasks today don't even actually need you to  train any model or do any feature engineering. [8:00] It's a pre-trained transformer. You can just  apply to the task and it's available in BigQuery. [8:05] Then we have AI functions of all sorts  to work with this unstructured data. Uh [8:10] we have search and vector search. Uh so you  can generate embeddings at scale in BigQuery [8:15] and then uh use our serverless vector search  to index it and do searches at scales of [8:20] billions of embeddings and then we have agents for  developers on BigQuery. So you we have specialized [8:26] agents like a data engineering agent for you to  easily develop data form pipelines in BigQuery [8:31] and then tools for uh agent builders to  be able to use BigQuery as a data source [8:36] as well as a source for uh  differentiated capabilities. [8:42] So I'll go a bit deeper into the Geni capabilities  in Bitquery first. Uh so let's start with this [8:47] example. So Bitquery is very deeply integrated  with Gemini and also gives you the choice of [8:52] other models. So we have a function uh we have  several functions but the one I'm illustrating [8:57] here is one called AI.generate. With this  function you can basically do LLM inference [9:02] on any kind of data in BigQuery. So in this  case I'm asking summarization of uh this BBC [9:09] news data set. Right? So for each row  there's a body column and for each row [9:13] I'm asking it to summarize I'm asking the LLM to  summarize the uh comp the u what's in this row [9:21] in a single sentence right so this thing uh then  runs over whatever scale of data you have so it [9:27] could be millions of rows right so this is how  simple it is to express LM inference in bigquery [9:33] and and this is really powerful because in many  scenarios uh you're not you're doing sometimes [9:38] semantic tasks like summarization but what  we also see a lot of our customers doing is [9:43] starting from unstructured data. So it could be  things like even unstructured text and extracting [9:48] some structure out of it which you want to use for  your business applications or analytics. Right? [9:54] So you can do that easily by providing  a output schema in the same function [9:59] which constrains the model to provide the output  exactly according to this. So in this case say I [10:03] have a patient uh description. I can extract  the name and age and then persist this in a [10:09] big query table. Right? So with very simple SQL  statements, you unlock a lot of new use cases. [10:17] There's a lot of differentiators of by doing geni  in BigQuery. So the first is that you actually [10:22] have a choice of LMS, right? The default  is Gemini. It works really well at scale, [10:27] but you can also use cloud. You can also use  any hugging face model that you have deployed [10:30] in Vert.xi with Bitquery. uh bitquery AI is built  for SQL users. So we have a lot of functions which [10:37] simplify the life for like data workers and  analysts right so you we have for example a [10:42] function called generate table which can take  that uh structured thing that I was talking [10:47] about and just generate a table so that you  don't have to do post-processing of the result. [10:52] Uh it's multimodel as we've been talking about  and it's very scalable and attractively priced. [10:57] So on this part when you're using  a function like AI generate uh [11:03] it's categorized as a batch inference call to  Gemini and because it's a batch inference you get [11:08] like a 50% discount on the inference price right  so if you if you have use cases which are not [11:13] extremely latency sensitive this is a great way to  save costs right and be able to run these at scale [11:22] I'll quickly cover what we see our customers in  real life doing with uh with Bitquery AI. So we [11:27] have a lot of customers doing entity extraction  both from text and unstructured data like images. [11:32] Enrichment of the data with word knowledge of  LMS semantic synthesis of all kinds. So sentiment [11:38] analysis is an example of that. Content generation  based on the data that you have in BigQuery [11:43] and also a lot of log analytics use cases  right so classify my logs according to [11:47] certain categories or summarize the next  action based on the logs that we are seeing. [11:54] So that's the core uh Gemini inference core geni  functions in BigQuery. Uh but we have a lot more. [11:59] So this data platform takes care of everything  that you would need to be like as a AI builder. [12:05] So one set of functions uh we are quite excited  about is uh document processing functions. [12:10] So you have say unstructured documents and PDFs  right and you want to build rag applications on [12:16] it. uh a very important intermediate step is to  parse the documents and then chunk them right and [12:21] then embed them create vector indexes on them  and all and all of that stuff right so you can [12:26] do that very simply with SQL in bitquery with  a very simple statement like ai chunk document [12:31] and this will read uh this object table which is  pointing to say a GCS bucket with thousands or [12:37] like tens of thousands of PDFs and will give you  the chunks like this in a big query table right [12:43] so these chunks are now embeddible  and uh you can to rag easily on this. [12:50] Then we have another class of functions uh called  managed AI functions. Uh so these exist to like [12:56] really simplify uh your use cases for special  needs and uh because they're more restricted, [13:01] we are able to do a lot of optimizations  on these functions. I'll quickly cover the [13:06] the range of functions we have here. We have a  function called AI. If and this is intended for [13:11] semantic filtering and join condition uh and join  operations. So in this case I'm able to join a uh [13:19] two tables. One has a dis an image and the  other table has a product description. Right? So [13:26] normally you can't join tables like this. But in  this case I'm saying whether they are referencing [13:30] to the same product or the advertisement uh  contains the product and join based on that [13:34] condition. Then we have a classify function where  you can pass in uh structured or unstructured [13:41] data. So text, images, whatever. And just specify  the categories. Uh, and that's really it. We have [13:48] a score function. So you can score uh over a bunch  of rows semantically. And it does it intelligently [13:55] so that the score is normalized across the rows,  right? So it's not individual uh row at a time. [14:01] And then we have a semantic aggregation function.  So if you have been shopping recently, every [14:05] website has uh you know a function where it says  that this is the aggregate in aggregate what the [14:11] reviews are saying about this restaurant or this  product. So you can build something like that in a [14:17] single line of SQL with this AI.ggregate function.  So what it does is that it will go through all the [14:22] rows and aggregate the semantic meaning. So if you  do this naively, you know, you will very quickly [14:28] hit into the context limits of LLMs. But we do it  in a smarter fashion. So we are able to not uh we [14:34] not constrained by that limitation, right? So  it scales quite well to a lot of rows of data. [14:41] So so those functions uh are interesting, right?  But you could also express what you're doing there [14:46] with the base generate function, right? Like a  base LLM inference call. Uh but what we have taken [14:51] these a step further and have introduced like  uh optimizations to them which are really really [14:55] differentiated. So one thing that we do with our  AI and if uh AI if and classify function is that [15:02] instead of passing everything through an LLM for  the binary or multi-class classification task here [15:08] we actually train a classical machine learning  model on the fly using the embeddings of the data [15:14] as the input feature and then we use that [15:19] distilled model so to say for actual  query execution. So when this works, [15:24] this results in like multiple hundred times  reduction in the amount of tokens you spend and [15:30] queries execute really really fast, right?  So you can go like thousands of rows in a [15:34] couple of seconds. Uh and you can scale  to billions of rows of queries processed [15:41] and this is how it works uh in in terms of code,  right? So like we have the same if example. So [15:46] I'm just trying to pro uh classify whether the  sentiment uh is positive or negative, right? [15:52] And what I need to do is provide the  embeddings for this review column. [15:56] Uh I can have the embeddings premputed in  which case I don't need to compute it like this [16:01] or if I don't have it premputed  I can compute it in line [16:04] and then choose the optimization mode minimize  cost. So if you if you do have the embeddings [16:10] already available actually you don't need to  specify any of this and just works out of the box. [16:18] Okay. So those are the core AI capabilities  in Bitquery. Uh as you think about actually [16:23] putting this in enterprise settings, you need  controls and tools to productionize this. [16:29] So Bitquery gives you a good amount of control  for your token spend. So you can count tokens [16:34] before you execute a query with the count tokens  function. Right? So this doesn't invoke any token [16:39] charges. Uh you can as admins put controls on  the project and user level. So you can say okay [16:46] daily I don't want this project to be consuming  more than 100 million tokens or whatever right [16:52] and you can as a developer  also do this at the query level [16:55] so when you're testing something you can  set a lower limit and when you actually [17:00] are ready for a production deployment you can  set a high limit for this uh token controls [17:07] then you can also like build  much richer applications so the [17:11] uh things that I was showing to you are  like static batch things But you can [17:15] actually have the same code in a streaming  pipeline. So BigQuery has this feature called [17:19] continuous queries and you can for example put  the generate function within a continuous query. [17:25] And then for the developers in the room right  so you we have a product called data form which [17:30] allows you to basically work with SQL for uh uh  with git sorry for building your ETL pipelines. [17:36] So you can do like basically the standard software  development life cycle support is uh is there with [17:42] data form and then we have multiple ways of  deploying your pipelines with bigquery right [17:48] so you can use the bigquery's inbuilt pipeline  feature if you have very complicated DAGs you can [17:53] use our managed airflow offering called  composer uh to also orchestrate stuff [18:01] okay so that's uh AI functions and how  to deploy them and how to productionize [18:05] them let's switch gears a bit and  talk about embeddings in Bitquery. [18:10] So there's many ways to generate embeddings in  Bitquery. Basically everything is supported. [18:14] So the first thing that you can do is  use Google provided models as a service [18:19] to generate embeddings in BigQuery and they are  very cost effective and they scale quite well. [18:24] If you do have specialized models, say you have  a specialized model that from hugging face that [18:29] you want to use, you can deploy this in GCP uh  through a model garden endpoint and then use [18:34] them in BigQuery or for smaller models, you can  actually natively run them in BigQuery directly. [18:41] So the Gemma class of models for embeddings,  they run natively in BigQuery directly. [18:47] Once you have those embeddings, so this  could be over billions of rows of data, [18:50] we have inbuilt vector vector search. So we use  the same uh indexing and search technology which [18:56] is used by a lot of Google products, a lot  of Google consumer products which have like [19:00] billions of users. So they work at really large  scale. So that thing is called scan. Uh so with [19:06] this scan index uh and search we are able to scale  to multiple billions uh rows of uh embedding data [19:13] and this is completely serverless. So you don't  have to manage a separate uh vector database or a [19:18] vector database instance or manage its life cycle.  It's all it's all in BigQuery. uh and also uh [19:24] the embeddings are you can configure the bitquery  tables to generate embeddings autonomously. [19:30] So as your data is mutated or new data comes in  the embeddings are automatically kept up to date. [19:38] So in addition to vector search you can also do  hybrid search in BigQuery. So if I have a query [19:42] like this you know which has a very specific  term which needs to have a exact text match. [19:48] uh but there's also like parts of it which  need to have semantic match with other uh [19:52] uh parts of the data. Uh we we support hybrid  search. So we are able to do get both the signals [19:59] and smartly rerank uh the output so  that you get the best performance. [20:05] Okay. So that was a very quick walk through of uh  you know uh the LLM capabilities in BigQuery. But [20:13] as I was mentioning at the start of the session,  LLMs are not the only things that you can do. So [20:18] one um other thing that you can do in BigQuery is  you can do forecasting and anomaly detection very [20:24] easily and we do this through a model called times  FM. So times FM is a transformer-based model. [20:30] Uh but this is trained for predicting a time  series instead of predicting a language token. [20:36] Right? So this requires no training. So it's  zero short. you just provide some historical data [20:41] and tell us how far in the future you want  to predict and you can predict on many time [20:46] series in a single SQL statement right so if I'm a  retailer I have multiple stores multiple SKs right [20:51] so I have many different time series and I want  a prediction of all of them for the next 30 days [20:56] I can do it with a single statement like this so  no models to manage no infra to manage this just [21:02] scales very well and gives you very accurate  predictions and similar to forecasting you can [21:07] also do uh anomaly detection both on historical  data and the new data that you're seeing. [21:15] So I I talked to I I talked to you about the SQL  interface, you know, for things like forecasting, [21:19] but a lot of uh business users are also  in things like spreadsheets, right? [21:25] So uh in Google Sheets, we have a feature called  connected sheets which lets you work with BigQuery [21:30] data but from the spreadsheet interface. So  when you actually do any like formulas here, [21:35] they get executed on BigQuery. So it's super  super scalable. So what we have also done is [21:40] we have brought advanced stuff like time  series forecasting with times FM model [21:44] directly to this connected sheet experience as  well as our anomaly detection experience to this. [21:51] So next we have a new launch uh  there was a blog a few days out. I [21:56] hope some people saw it. Uh but we're adding  this new model called tab FM into BigQuery. [22:01] So tab FM uh is kind of builds on the times FM  idea but this is for classification and regression [22:08] use cases. So say I'm uh I want to detect fraud in  my transactions right and I have some labeled data [22:16] and I have some new uh data sets  that I want to detect fraud on. [22:20] So what I can simply do is instead of like  training say XG boost model evaluating it [22:24] optimizing it right I can just simply use the  AI predict statement provide the training data [22:31] this is for in context learning provide the  new prediction data and just provide the label [22:35] that you're trying to predict so again super  simple runs inside BigQuery and really accurate [22:42] and on the accuracy part uh these are some numbers  uh we published recently so this compares uh Tab [22:49] FM from Google versus other pre-trained  models. So as you can see on the ELO score [22:55] for uh classification and also regression, we  beat everybody else in the market by quite a bit, [23:02] right? So this this model is uh pretty good.  So it beats like a customtrained tree models [23:09] on your data uh as well as like all of the  sophisticated pre-trained models out of the box. [23:18] Okay, so that's the basic building blocks and  primitives of what you can do in Bitquery. Uh, [23:24] now let's talk about agents in Bitquery. So,  you know, nobody likes to write code these days, [23:31] especially when you're working with simple  analytical queries. So, for that scenario, [23:35] we have conversational analytics in Bitquery.  So what this experience lets you do is in the [23:40] Bitquery console uh you have a chat experience  where you can work with uh uh you can define [23:47] the bounding box of what's important to you,  what tables and data sets are important to you [23:51] and then you can chat with it. Uh so it will  write SQL queries to answer your questions. [23:56] Uh because you're accessing the data with your  own credentials, it's all secure, right? And [24:01] one user can define a agent, add a lot of context  and customizations to it, and then they can share [24:07] it with the rest of the organization. And I'll  show you quickly how to do that in a demo. [24:13] Uh then the nice thing is that all of  the AI capabilities that I talked about [24:18] are integrated into the conversation analytics  as well. So you can ask it to do things like uh [24:24] process unstructured data. So for example,  categorize search queries for me, right? [24:29] uh with say a a classify statement. So you can ask  a question like this and it will figure out that [24:34] it can use the a classify uh function for it. You  can also ask it to do predictive questions, right? [24:40] Uh with a times FM or a tab FM kind of a model. [24:44] So for an analyst, right, so you expand beyond  just simple aggregation or analytical queries [24:51] with SQL to also the all of the AI stuff that  I showed to you just in this chat experience. [24:59] And if you folks are using Gemini  Enterprise and I hope you are, [25:03] you can publish the agents created  in Bitquery to Gemini Enterprise. [25:07] So if your business users are in that  interface, they can get the same experience. [25:13] And then for developers, uh I think you got a  sneak peek of this already. So we have uh recently [25:19] launched a product called data agent kit. So it  has two things. So it has uh a VS code uh plug-in. [25:27] So which brings you know the familiar catalog  browser and a lot of dev tooling uh to it [25:32] as well as it has skills uh for uh telling  the agents on how to work with bitquery and [25:38] the other uh GCP data services. So including  spark and orchestration services and so forth. [25:44] So you can use this in any agentic coding tool  right so you can use this with codeexcloud uh [25:49] anti-gravity right uh and you can also use it from  the CLI tools like uh anti-gravity CLI cloud code [25:56] and so right okay so that's uh the uh slide part  of my talk let me switch gears and talk about uh [26:10] okay talk about the demo a So uh I'm going  to be doing a SQL heavy demo right but [26:20] you can see that it extends very well to  agentic interfaces and coding experiences too. [26:25] So I have a hypothetical scenario where I'm a  store manager uh or not not a store manager. [26:30] I'm a business manager of the symbol pets  company. It sells pet products, right? Uh and [26:37] I have a anomaly in my returns. So my returns  have spiked in this month versus the last month. [26:43] So my manager is asking me to evaluate what  happened like correct the issue. Right? [26:49] So there's a few tables that I'll be working with  today. So let me just walk you through it. Right? [26:52] So I have the catalog table. So this has you know  information about the product, brand, category [26:58] as well as unstructured information like what is  the product image which is being shown to the user [27:02] right? Then I have a returns table. So this is  showing which has a product ID, the return date [27:09] and why was this product returned  and then I have a support table u [27:15] which is for support cases. Right? So customers  are reaching out to to my support team. [27:20] uh they're opening some support cases  and there's some details on what the [27:24] customer is reaching out about and then  we also have an embedding column here. [27:29] All right, so this embedding column exists so  that we can optimize that classify function [27:33] in the future. Right? So that's just  showing you how the mechanics of it works. [27:39] All right, so let's start with some code. So as  I was saying, we have a anomaly in our returns, [27:44] right? So I can very quickly see  what is what is going on here. [27:48] So normally we do like say 1,500 uh returns a  month. In this last month we had 2,000 returns, [27:54] right? [snorts] So when you get a  situation like this, you know, the uh [28:00] instinct is to start slicing and dicing your data,  right? And like finding out, okay, which brand, [28:05] which category, which region actually contributed  to this delta in the in the metric. So the good [28:10] news is that you can do this automatically in  BigQuery with a function called key drivers. [28:15] And with this key drivers function, I can  specify the metric column which is of interest [28:20] to me which is the return count and the different  dimensions on which I want to do this analysis. [28:25] So I want to find out which specific brand,  category and product name combination actually [28:29] contributed most to the change. Right? So this  is like t timeconuming analysis to do manually. [28:36] Uh but we automate this with a key driver  function. The other innovation we have here [28:40] is that this scales to very large data sets. So  if you're trying to do this manually, uh this [28:46] combination of dimensions just explodes. So in our  execution of this function, we are able to prune [28:51] out uh the the combinations which are contributing  less to the final metric. Right? So all of that [28:57] complexity is taken care of for you and we can  uh run this to find out where the issue is. [29:04] All right. Right. So key drivers ran and it tell  told us that the brand cat costume in the category [29:10] apparel is actually contributing the most to  the difference and there are some other things [29:15] you know which are like much smaller in magnitude  uh which are contributing to the difference right [29:20] so we have a smoking gun like we can start  figuring out okay something is going in the [29:24] cat costume brand uh and let's see if we can  sort out like what exactly went wrong there. [29:32] So what we can do is use our AIA  function to look at our returns data set [29:39] right. So I'm joining it with products and  filtering for cat costume. So I'm looking at [29:43] basically all the returns for the cat costume  in the month of March here. So that's a that's [29:48] the latest month I'm working with and I'm I can  use a aggregate to now tell me okay at aggregate [29:54] level what happened with these returns right? So  what I'm asking the function to do is summarize [29:59] the top three reasons for these returns. So I  can run it. Uh it takes a few seconds to run. [30:06] Okay. So we have the result pack and can  people read this or maybe okay this is better. [30:14] Okay. So I have a result pack telling me that the  top reasons for return were product not matching [30:20] with description uh arriving damaged and  customer no longer needing the product. Right. [30:27] Okay. So this is interesting. Uh so I got  aggregated information uh in this way. [30:33] But now what I want to do is look at  all of my returns uh and classify each [30:41] return according to what the aggregation  function told me. Right? So it told me that [30:46] there was a scenario where the product was not  as expected and uh there was a scenario where it [30:52] arrived damaged and some scenarios where the  customers didn't need it. Right? So I'm just [30:56] trying to get a sense of what is the distribution  of these scenarios across my data set. [31:00] So again I use the comments column and I use the  AI classify function. I provide these categories [31:06] as well as description of the categories  to aid the LM to make this decision. Right? [31:11] So this uh would take a while so I'm not running  it. Uh but I'll run uh analytics function on it [31:18] to show you what does the distribution look like.  Okay. So we have a lot of scenarios where uh [31:26] you know the product is not as expected and then  uh we also ask the system to just pick a random [31:32] product for us which fits this scenario right  so there is some product 215 which was among the [31:37] products which is not as expected so we can now  uh use this object ref thing that I was previously [31:44] talking about and with SQL also like read this  image and see what's going on right so I'm looking [31:50] I'm looking at product name description as well  as what actually is in this product image which [31:55] was not matching with the user's idea of  what this product is. Right? So I run this. [32:03] Okay. All right. So this is what  happened. Right. So the product [32:06] is lion mane costume but it's like a  cute cat in a shark costume. Right. So [32:12] there's a mismatch in the product image and  the product name. Right? So this seems like a [32:17] promising direction of investigation, right?  So maybe we can do this at scale. Right? So uh [32:24] so we found that one specific product had a issue  but maybe other products in my catalog also have a [32:29] issue. Right? So what I can then do is do this at  scale. So I can use the generate function that I [32:35] initially talked to you about. Uh give it a prompt  saying okay compare the product uh provided to you [32:43] and compare its image description and analyze  whether they match or not. Right? and uh give [32:50] me the output in a structured fashion. Right? So  score the out basically tell me whether there's a [32:57] mismatch and then also score the mismatch. So  give me a number and an explanation for this [33:04] and do this for my whole catalog. Right? So I  ran this query previously because it's it's again [33:10] going to take a little bit of time. Uh so you can  see that I was able to run this analysis over my [33:17] uh full uh um full catalog and now I  have the list of my products which are [33:24] which have a mismatch right so as this as a  business manager for this line like I'm very [33:29] quickly able to get to the issues in my catalog  right and then be able then I can resolve them. [33:35] So, let's see what the what the query  sent us back, right? So, it sent us uh [33:40] okay, this supposed to be a shark costume, but it  seems like it's in in a taco, right? So, a lot of [33:46] cat cats have a lot of issues, right? But some  dogs also have issues in our product portfolio, [33:52] right? And then we have maybe other products  like this aquarium gravel cleaner looks [34:00] correct, but okay. So, the description  doesn't match in this case, right? [34:04] So we had some scenarios where the image was not  matching the product uh product name and then we [34:09] have some scenarios where description is not  matching the product image and the name right. [34:13] So uh again like example of some analytics  that you can do and processing you can do [34:19] right mixing unstructured and structured  data together and quickly get to insights. [34:24] All right. So, this was my, you know,  investigation into the issues with my product [34:29] catalog and I'm able to get to the root cause  here and I'm hopefully able to solve it. Right. [34:35] Let's do some more analysis. So, we  also had the support table, right? Where [34:40] uh we uh customers were reaching out  to us and uh you know complaining. So, [34:46] I just want to do a very similar classification.  I want to find out you know whether I'm getting [34:51] more issues with shipping more with returns  or more with billing issues and so forth right [34:56] so I can run a query like this over 50,000  rows um on uh using the classify function right [35:04] so I ran this live hopefully this works uh but  the idea here is that Bitquery is going to be [35:11] able to use the optimized mode that I was talking  about to actually run this query right so instead [35:16] of passing everything through an LLM. Hopefully,  we're very shortly going to see a result where [35:21] BigQuery trained a model on the fly uh got  good quality results from the model and then [35:29] applied that model to do the classification  task, right? So, this completed so I was able [35:33] to process this 50,000 rows in 24 seconds, right?  And I was able to do it with this optimized mode [35:41] and also take a note of the token count here,  right? So this is a half a million less than [35:46] half a million tokens, right? So this is the  amount of tokens you spend for processing 50,000 [35:52] rows. So this is like a pretty low number  and I'll also contrast it uh in a moment. [35:58] So this is like just uh so that you guys are  aware this is how the uh distribution of the [36:06] classes look. So nothing very very interesting to  see here. But let me show you another query. Um, [36:20] sorry, I'm just trying to Yeah. So the other  thing that you can do with the classify [36:26] uh function is that you can choose  maximize quality as the optimization mode. [36:32] So when you choose this, you're telling Bitquery  to always use a LLM for inference. Okay, [36:38] so this would take several minutes to run. Uh,  it's the same query, but it's just in a it's [36:43] turning essentially turning off the optimization  mode, right? So, but I just want to show you the [36:47] contrast of uh what this looks like, right? So,  this query took 2 minutes and 21 seconds to run, [36:52] like 5x more, right? And it consumed 10 million  plus tokens, right? So just in this very simple [37:01] scenario, I was able to cut my token consumption  by 20x uh in the same classification scenario. [37:09] So this is good but like did we actually  also achieve good quality on this right? [37:14] So very one very simple and a bit naive  way to measure quality is just seeing [37:19] whether our results matched between the  optimized mode and the nonoptimized mode. Right? [37:23] So I'll just run this to see okay what  is our match percentage looking like. [37:31] Okay. So you see we have 99.992% match, right? So  you get almost the same quality of results at 20x [37:40] lower price in this example, right? So these are  the kind of powerful things that you can do in [37:45] BigQuery. All right. So this is like from the SQL  interface. Uh let me switch to agents. Uh so if [37:54] you are familiar with this interface I'm showing  you the GCP console and in uh GCP oops sorry [38:01] in GCP console we have BigQuery studio which I was  showing to you and we have this new thing called [38:08] um we have this new thing called agents in  BigQuery. So here you can create and configure [38:14] agents uh in Bitquery. Uh so I have created  a agent uh previously. I'll just show you the [38:21] kind of things and customizations you can do with  this agent. So I have the symbol returns uh agent [38:27] and what I have here is uh a few knowledge sources  that I have added right. So I've added this raw [38:34] tables that I was working with. So the catalog  returns and the support cases table uh to my [38:39] agent. In addition, I can add instructions, right?  So you have like specific glossery or semantic [38:46] meanings of of the data. You can add all that  here, right? So the agent performance uh really [38:52] improves if you provide the agent that context.  You can oops uh you can also add verified queries. [39:00] So you can have SQL queries which say compute  revenue or a certain metric in a certain fashion [39:06] very specialized and you can add it here. Uh you  can add glossery from knowledge catalog. So all [39:12] the tables that I was showing to you uh were in  knowledge catalog. uh that's a cataloging product [39:18] and that has uh enrichment features so it  can autogenerate glossies for your data. [39:22] So you can add that here and then there's a bunch  of settings additionally available to you. Right? [39:27] So you can have this agent and then one  user who is expert on this data sets has [39:33] all the context can create it and then share  it with the rest of your enterprise. Right? [39:38] So what I wanted to just show you here  is I I ran this query previously uh on uh [39:45] I I want summary of the support cases for the  apples category into like top five things, right? [39:51] So this is very similar to the kind of analysis  we were doing previously uh in in the demo. And so [39:57] the agent did its thinking and everything, right?  And finally it came up with a query like this. [40:03] So it was actually able to use the AI tag function  uh to find the top five issues right uh in the [40:11] apperal category. So this is just a demonstration  that you know we went from the base foundations of [40:18] data in BigQuery to using SQL as the way to work  with this data. But you don't need to stop there. [40:24] You can actually move to the agent layer and  just work with this data conversationally. Right [40:29] behind the scenes it's just going to  use the same functions for scalability. [40:34] All right. Uh yeah. So that's uh Bitquery AI in a  nutshell. Let me see if I have anything else. Uh [40:41] yeah, so that's Bitquery AI in a nutshell. And  uh I think that's the end of my content here. [40:47] Thank you so much folks for sitting  through this to the end of the day.