<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Megha Saini on Medium]]></title>
        <description><![CDATA[Stories by Megha Saini on Medium]]></description>
        <link>https://medium.com/@meghasaini?source=rss-58bf96a2bd6c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XBG94eRva5wPS8Ux.jpeg</url>
            <title>Stories by Megha Saini on Medium</title>
            <link>https://medium.com/@meghasaini?source=rss-58bf96a2bd6c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 08:11:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@meghasaini/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Engineering Agent Observability with BigQuery]]></title>
            <link>https://medium.com/google-cloud/mastering-agent-observability-with-bigquery-f6de99cd18ce?source=rss-58bf96a2bd6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6de99cd18ce</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Megha Saini]]></dc:creator>
            <pubDate>Sun, 13 Sep 2026 09:28:49 GMT</pubDate>
            <atom:updated>2026-09-17T04:07:13.548Z</atom:updated>
            <content:encoded><![CDATA[<h4>Transitioning from Batch Logging to Systems of Action</h4><p>The transition from experimental LLM chats to production-grade autonomous agents represents a fundamental shift from “Systems of Record” to “Systems of Action.” In this new paradigm, traditional batch logging is an operational liability. Why? Because when an agent hallucinates, fails to trigger a tool, or enters an infinite loop, post-mortem analysis is insufficient.</p><blockquote>Architecting for immediate intervention requires real-time telemetry that treats <strong>BigQuery not just as a passive data warehouse, but as a high-velocity engine for agentic triggers.</strong></blockquote><p>Most operational systems that rely on scheduled batch queries suffer from massive operational delays in scenarios like credit card fraud detection or supply chain bottlenecks. Human investigators piece together log entries and run ad-hoc SQL. Conversely, pushing raw data streams straight into LLMs is cost-prohibitive due to token burn. We need a hybrid model where high-speed, stateful SQL filters out the noise so AI agents only process targeted, enriched anomaly context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sek9PPoNbNxfFQHjlUu2bg.png" /><figcaption>Mastering Agent Observability with BigQuery</figcaption></figure><h3><strong>The 3-Pillar Hybrid Architecture: Detect, Route, Resolve</strong></h3><p>To solve this, Google Cloud provides a three-pillar event-driven architecture-</p><ol><li><strong>Detection (BigQuery Continuous Queries)</strong>: Persistent SQL runs continuously over streaming ingestion tables (<em>via the Storage Write API) </em>to evaluate rules and windowed heuristics. Rather than polling, BigQuery uses stateful operations like tumbling windows ( TUMBLE ) <em>and</em> stream-to-stream JOINs to compute rolling metrics and detect complex conditions, such as a customer making transactions in two distant countries within minutes (‘Impossible Travel’)<em>. </em>When an anomaly condition is met, EXPORT DATA immediately streams the structured alert payload to a Pub/Sub topic without leaving the data warehouse</li><li><strong>Routing (Pub/Sub &amp; Single Message Transforms)</strong>: Pub/Sub intercepts exported events, using lightweight JavaScript UDFs to reshape payloads into the exact schema expected by Vertex AI Agent Engine, and pushes it directly to the agent’s webhook endpoint.</li><li><strong>Resolution (ADK &amp; Agent Engine)</strong>: Autonomous agents hosted on Vertex AI Agent Engine receive the event, execute reasoning loops using custom tools, and either resolve the issue or escalate to human-in-the-loop workflows.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N5FFBJwy9Suope3PQieiJQ.png" /></figure><h3><strong>Real-World Scenario: Cymbal Bank Fraud Detection</strong></h3><p>Architecting for high-stakes environments such as fraud detection requires an event-driven loop where detection triggers autonomous action. In this pattern, <strong>BigQuery Continuous Queries</strong> monitor a stream of incoming data (e.g., retail transactions) for anomalies like “Impossible Travel.”</p><p>When an anomaly is detected, the query uses the EXPORT DATA statement to push the event to <strong>Pub/Sub</strong> in real-time. This message triggers an <strong>ADK Agent</strong> via Vertex AI Agent Engine, which can then use its tools to evaluate historical context and resolve the event or escalate it to a human.</p><h4>Triggering an Agent via Continuous Stream</h4><p>The following SQL demonstrates the <strong>Reverse ETL</strong> pattern used to trigger an agent from a continuous stream:</p><pre>EXPORT DATA OPTIONS (<br>  format = &#39;CLOUD_PUBSUB&#39;,<br>  uri = &#39;https://pubsub.googleapis.com/projects/[PROJECT_ID]/topics/fraud_investigator_trigger&#39;<br>) AS (<br>  SELECT<br>    customer_id,<br>    transaction_id,<br>    &#39;Anomaly Detected: Impossible Travel&#39; AS alert_reason<br>  FROM<br>    APPENDS(TABLE `project.dataset.transactions`)<br>  WHERE<br>    is_anomaly = TRUE<br>);</pre><h3>The Challenge: Black-Box of Production Agents</h3><p>When you deploy such autonomous AI agents, traditional logging falls short because of the black box execution, unexpected token burn, silent hallucinations, and unmapped multi-agent decisions, etc.</p><p>Agents can make nondeterministic choices: they invoke nested tools, hand off control to sub-agents, pause for human approvals, and retry failed prompts. Without structured tracing, debugging a failed customer interaction feels like looking into a black box. Additionally, without token-level budgeting and latency tracking per tool, API costs and latency spikes can easily spiral out of control. <strong>We need an analytics engine that treats agent execution traces as queryable, structured data.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-4fTMjxEzhaXJSEHopgx-w.png" /></figure><p>The <strong>BigQuery Agent Analytics plugin</strong> for the ADK bridges the observability gap. It provides high-throughput, low-latency telemetry essential for debugging complex multi-agent fleets. By leveraging a <strong>Reverse ETL</strong> pattern, it allows BigQuery to push insights directly into the agentic workflow, transforming raw logs into actionable intelligence. It logs your AI agents’ operational telemetry, lifecycle events, tool executions, and LLM interactions directly into BigQuery tables.</p><p>Before we jump into how BigQuery Agent Analytics gives data practitioners total visbility into agent behavior, lets briefly look at the set up.</p><h4>The Set Up</h4><p><strong>&gt;&gt; </strong>To set up the BQ Agent Analytics plugin, you have to follow these <a href="https://adk.dev/integrations/bigquery-agent-analytics/#configuration-options">config options</a> and understand the <a href="https://adk.dev/integrations/bigquery-agent-analytics/#schema-and-production-setup">schema and production setup</a>.</p><p><strong>&gt;&gt; The </strong><strong>attributes.adk envelope — </strong>In the multi-agent workflows (agents that transfer control, checkpoint their state, and compact long histories) and long-running tools that pause and resume across turns, a small metadata envelope, <a href="https://adk.dev/integrations/bigquery-agent-analytics/#the-attributesadk-envelope">attributes.adk</a>is used to build observability by tying the rows back to the ADK event that produced them.</p><p><strong>&gt;&gt; Event Lifecycle Coverage:</strong> The plugin automatically provisions a partitioned, clustered<em> agent_events</em> table that records 24 canonical event types. There are default <a href="https://adk.dev/integrations/bigquery-agent-analytics/#event-types">event types and payload generated</a> to trace LLM interactions. These events track the execution of tools by the agent and changes to agent’s state typically triggered by tools.</p><h3><strong>Unboxing the Black-Box of Agent Analytics</strong></h3><p>BigQuery Agent Analytics Unboxes Agent Behavior into 5 Observable Pillars:</p><ol><li><strong>Muti-Agent Tracing &amp; Execution Graphs:</strong> Every single action carries a persistent session_id and OpenTelemetry (trace_id, span_id). The plugin stamps an attributes.adk envelope on log rows to reconstruct multi-agent execution graphs (DAG), handle agent transfers, and track long-running pauses.</li><li><strong>Multimodal Analysis:</strong> Automatically offloads large files (such as images and audio) to Google Cloud Storage and exposes them to BigQuery ML via Object Tables.</li><li><strong>Tool Provenance &amp; Human-in-the-Loop (HITL) Tracing:</strong> Tracks the exact origin of tools with explicit provenance tags (LOCAL, MCP, SUB_AGENT, A2A, TRANSFER_AGENT) and records Human-in-the-Loop (HITL) confirmation prompts, credential requests, and user inputs.</li><li><strong>Fleet Observability to Manage Costs and Performance- </strong>Monitoring an enterprise agent fleet requires granular tracking of token consumption and responsiveness. The plugin captures detailed metrics, including usage_prompt_tokens and usage_completion_tokens, allowing for precise cost-attribution strategies. Performance is measured via total_ms and ttft_ms (Time-to-First-Token)</li><li><strong>Business Decision Intelligence: </strong>The <strong>Context Graph</strong> feature (enabled via the BigQuery Agent Analytics SDK and the bqaa context-graph CLI tool) bridges the gap between raw, unstructured agent event logs and high-level business decision intelligence. The logged events can be materialized into a property graph, allowing operators to query decision trees using Graph Query Language (GQL)</li></ol><p>Let’s look at each of these in further detail.</p><h3>1. Multi-Agent Tracing &amp; Execution Graphs</h3><p>BigQuery Agent Analytics reconstructs agent sessions using distributed tracing and execution graphs. For the failed sessions, it runs Root Cause Analysis (RCA) using BigQuery AI functions.</p><ol><li><strong>Granular Telemetry Streaming &amp; Immutable Event Capture:</strong> As an agent executes, the plugin captures every operational event (such as AGENT_STARTING, LLM_REQUEST, TOOL_STARTING, and TOOL_ERROR) and streams them asynchronously into BigQuery tables via the high-throughput Storage Write API. This guarantees a complete, chronological record of every step the agent took.</li><li><strong>Distributed Tracing via </strong><strong>trace_id, </strong><strong>span_id, and the </strong><strong>attributes.adk envelope</strong>: Every logged row is stamped with OpenTelemetry-compatible identifiers (trace_id, span_id) and an attributes.adk metadata envelope. parent_span_idis a 16-char HEX span id to reconstruct the hierarchical <strong>Directed Acyclic Graph (DAG)</strong>. For multi-agent workflows, the plugin links agent transfers, state checkpoints (AGENT_STATE_CHECKPOINT), and long-running tool suspensions (TOOL_PAUSED) back to the exact conversation turn that triggered them.</li><li><strong>Automated Diagnostics via BigQuery AI Functions (</strong><strong>AI.GENERATE): </strong>The plugin identifies the failed session and reconstructs the full conversation context. Then asks Gemini to diagnose the issue using AI.GENERATE. Instead of manual hunting, Supervisor agents automatically run AI.GENERATE over the aggregated history of a failed session to self-diagnose why an agent hit an API error or hallucinated.</li></ol><pre>DECLARE failed_session_id STRING;<br>-- Find a recent failed session<br>SET failed_session_id = (<br>    SELECT session_id<br>    FROM `your-gcp-project-id.your-dataset-id.agent_events`<br>    WHERE error_message IS NOT NULL<br>    ORDER BY timestamp DESC<br>    LIMIT 1<br>);<br><br>-- Reconstruct the full conversation context<br>WITH SessionContext AS (<br>    SELECT<br>        session_id,<br>        STRING_AGG(CONCAT(event_type, &#39;: &#39;, COALESCE(TO_JSON_STRING(content), &#39;&#39;)), &#39;\n&#39; ORDER BY timestamp) as full_history<br>    FROM `your-gcp-project-id.your-dataset-id.agent_events`<br>    WHERE session_id = failed_session_id<br>    GROUP BY session_id<br>)<br>-- Ask Gemini to diagnose the issue<br>SELECT<br>    session_id,<br>    AI.GENERATE(<br>        (&#39;Analyze this conversation log and explain the root cause of the failure. Log: &#39;, full_history),<br>        endpoint =&gt; &#39;gemini-flash-latest&#39;<br>    ).result AS root_cause_explanation<br>FROM SessionContext;</pre><h3>2. Multimodal Analysis</h3><p>Multimodal GCS Offloading in the BigQuery Agent Analytics plugin solves a core infrastructure challenge: how to capture massive text prompts or rich binary media (such as customer-submitted identity documents, transaction receipts, or voice verification audio) without bloating your analytical database or hitting row-size limits.</p><ol><li><strong>Generating Secure Signed URLs </strong>— Large text prompts (&gt;500KB) or binary media (images, audio) are automatically offloaded to Google Cloud Storage. BigQuery stores an ObjectRef reference in content_parts, allowing operators to inspect images via BigQuery Object Tables or generate signed URLs with OBJ.GET_ACCESS_URL.If an engineer or fraud analyst needs to view a specific image or listen to an audio clip associated with a flagged session, BigQuery can dynamically generate time-bound, secure access URLs using the object reference.</li><li><strong>Linking Object Tables for Direct SQL Inspection</strong>- By connecting your GCS bucket to BigQuery as an Object Table, you can query multimodal assets like traditional relational data — inspecting file sizes, update times, and mime types alongside your agent execution logs.</li><li><strong>Multimodal Auditing with BigQuery Remote Models (Gemini)</strong> — Because the assets are securely referenced via GCS URIs, you can pass offloaded images or documents straight into BigQuery ML remote models (such as Gemini) to perform automated visual audits, OCR on receipts, or anomaly classification at scale</li></ol><pre>SELECT<br>  ml_generate_text_result.candidates[0].content.parts[0].text AS ai_image_analysis<br>FROM<br>  ML.GENERATE_TEXT(<br>    MODEL `your-project.your_dataset.gemini_multimodal_model`,<br>    (<br>      SELECT<br>        CONCAT(&#39;Analyze this transaction document for signs of tampering: &#39;, <br>               ML.SET_DOCK_IMAGE(JSON_VALUE(content_part, &#39;$.object_ref.uri&#39;))) AS prompt<br>      FROM `your-project.your_dataset.agent_events`,<br>           UNNEST(JSON_EXTRACT_ARRAY(payload, &#39;$.content_parts&#39;)) AS content_part<br>      WHERE trace_id = &#39;target_suspicious_trace_id&#39;<br>    )<br>  );</pre><h3><strong>3. Tool Provenance &amp; HITL Tracing</strong></h3><p>BigQuery Agent Analytics plugin provides deep visibility into <em>who</em> executed a tool, <em>where</em> it came from, and <em>when</em> a human had to step in.</p><p>When an agent calls a tool, the plugin logs its execution payload and stamps its exact <strong>origin classification</strong> (origin). This prevents &quot;black-box&quot; confusion when multiple agent tiers or external servers interact. To query tool provenance in BigQuery, query v_tool_completed to audit which tool origins are consuming resources or failing most frequently.</p><pre>SELECT<br>  JSON_VALUE(payload, &#39;$.tool_name&#39;) AS tool_name,<br>  JSON_VALUE(payload, &#39;$.origin&#39;) AS tool_origin,<br>  COUNT(1) AS total_invocations,<br>  AVG(CAST(JSON_VALUE(payload, &#39;$.latency_ms&#39;) AS FLOAT64)) AS avg_latency_ms<br>FROM<br>  `cymbal-fraud.analytics.v_tool_completed`<br>GROUP BY<br>  tool_name,<br>  tool_origin<br>ORDER BY<br>  total_invocations DESC;</pre><h4>3.1 HITL Tracing</h4><p>In high-stakes financial pipelines like a $2,500 cross-border fraud check, automation must occasionally yield to a human expert. When an agent encounters an ambiguous risk threshold, it pauses execution and triggers a Human-in-the-Loop event . The plugin records dedicated event types for these interactions:— <strong>HITL_CREDENTIAL_REQUEST, HITL_CONFIRMATION_REQUEST, HITL_INPUT_REQUEST, *_COMPLETED. </strong>Under ADK 2.0 multi-agent workflows, when an HITL request is emitted, the plugin logs a <strong>TOOL_PAUSED</strong> event and stamps an attributes.adk envelope on the row.</p><h3>4. Monitoring Fleet Health in Real-Time</h3><p><strong>Fleet observability</strong> shifts the focus from debugging a single isolated agent run to monitoring an entire production ecosystem of enterprise AI agents. In high-volume environments like Cymbal Bank’s fraud prevention pipeline — which processes thousands of concurrent transaction alerts — platform operators need microscopic visibility into two critical pillars: <strong>cost attribution (token burn)</strong> and <strong>responsiveness (latency SLAs)</strong>.</p><p>The BigQuery Agent Analytics plugin streams these vital telemetry markers directly into BigQuery tables, giving engineering and finance teams the granular data needed to optimize performance and control operational spend.</p><h4>4.1 Granular Token Consumption &amp; Cost-Attribution</h4><p>LLM API costs scale directly with token volume. Rather than receiving a generic, aggregated monthly bill from your AI provider, the plugin captures detailed usage attributes on every model call:</p><ul><li><strong>usage_prompt_tokens</strong>: Measures the exact size of the incoming context window (system instructions, user prompts, retrieved customer profile data, and event payloads).</li><li><strong>usage_completion_tokens</strong>: Measures the length of the model&#39;s generated response (reasoning steps, risk scoring rationale, and final decisions).</li></ul><p>By storing these metrics natively in BigQuery alongside metadata like trace_id and agent names, users can run precise <strong>cost-attribution models </strong>such as breakdown token burn by specific departments, identifying which agents or instruction sets are bloated &amp; allowing engineers to optimize system prompts, or set up automated BigQuery alerting thresholds when token consumption spikes.</p><h4>4.2 Responsiveness &amp; Latency Tracking (total_ms &amp; TTFT)</h4><p>In real-time fraud detection, seconds matter. If an agent takes too long to analyze a transaction, downstream systems time out or user experience degrades. The plugin tracks performance through two core latency metrics:</p><ul><li><strong>total_ms (Total Execution Latency):</strong> Measures the complete end-to-end duration of an LLM request or a tool execution from start to finish.</li><li><strong>ttft_ms (Time-to-First-Token):</strong> Measures how quickly the model begins streaming its response back. This is crucial for real-time applications where perceived responsiveness depends on getting that first token instantly.</li></ul><p>Users can query the v_llm_response view to track rolling averages, spot performance degradation across regions, and ensure SLAs are met.</p><pre>SELECT<br>  JSON_VALUE(payload, &#39;$.model&#39;) AS model_name,<br>  DATE(timestamp) AS execution_date,<br>  COUNT(1) AS total_requests,<br>  ROUND(AVG(CAST(JSON_VALUE(payload, &#39;$.latency_ms&#39;) AS FLOAT64)), 2) AS avg_total_latency_ms,<br>  ROUND(AVG(CAST(JSON_VALUE(payload, &#39;$.ttft_ms&#39;) AS FLOAT64)), 2) AS avg_ttft_ms,<br>  MAX(CAST(JSON_VALUE(payload, &#39;$.latency_ms&#39;) AS FLOAT64)) AS max_total_latency_ms<br>FROM<br>  `cymbal-fraud.analytics.v_llm_response`<br>GROUP BY<br>  model_name,<br>  execution_date<br>ORDER BY<br>  execution_date DESC;</pre><h4>4.3 Combining Token Burn and Latency in Fleet Dashboards</h4><p>Because all fleet metrics reside natively in BigQuery, teams can easily connect BI tools (like Looker or Looker Studio) to build comprehensive executive dashboards showing:</p><ol><li><strong>Cost vs. Latency Trade-offs:</strong> Comparing cheaper, faster models (e.g., flash tiers) against heavier reasoning models to find the optimal balance for fraud classification.</li><li><strong>Spike Detection:</strong> Correlating sudden surges in usage_prompt_tokens with unexpected data bloat or recursive tool loops.</li></ol><h3>5. Business Decision Intelligence</h3><p>Instead of treating agent traces as isolated lists of API requests, responses, and tool errors, the Context Graph transforms them into a <strong>queryable BigQuery property graph</strong> that maps out how decisions are made.</p><p>Using a scheduled refresh (bqaa context-graph) or event-driven pipeline, the SDK reads raw agent telemetry and distills session logs into structured decision components: <em>DecisionRequest, DecisionOption, DecisionOutcome</em></p><p>The extracted components are mapped into a native BigQuery property graph schema using declarative table DDL and a CREATE PROPERTY GRAPH statement. Crucially, <strong>no separate external graph database or complex ETL pipeline is required</strong>—everything lives and runs natively within BigQuery.</p><p>Once materialized, you can use standard <strong>Graph Query Language (GQL)</strong> inside BigQuery via GRAPH_TABLE to traverse the decision network. For example, auditors or engineers can trace the exact chain of reasoning and confidence scores for a transaction review.</p><pre>SELECT * FROM GRAPH_TABLE (<br>  cymbal_fraud_graph<br>  MATCH (req:DecisionRequest) -[eo:evaluatesOption]-&gt; (opt:DecisionOption),<br>        (req) -[ri:resultedIn]-&gt; (out:DecisionOutcome)<br>  COLUMNS (<br>    req.request_id AS transaction_id,<br>    req.request_text AS alert_summary,<br>    opt.option_label AS risk_strategy_considered,<br>    opt.confidence AS confidence_score,<br>    out.status AS final_decision,<br>    out.rationale AS audit_rationale<br>  )<br>);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwC-HcvjuXwiLLSD-CkJZQ.png" /><figcaption>Decision Graph using BigQuery Agent Analytics Plugin</figcaption></figure><h3>The Future of Autonomous Operations</h3><p>The shift toward autonomous operations demands that we view telemetry not as an afterthought, but as a <strong>core agentic skill</strong>. The combination of the <strong>BigQuery Agent Analytics SDK </strong>and Looker dashboards<strong> </strong>turns raw operational traces into competitive business intelligence. By materializing execution graphs and utilizing AI-powered RCA, organizations can finally peer inside the “black box” of agentic AI, ensuring that every autonomous action is observable, accountable, and optimized for performance.</p><p>Hope this was a helpful read.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6de99cd18ce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/mastering-agent-observability-with-bigquery-f6de99cd18ce">Engineering Agent Observability with BigQuery</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Architect’s Guide to GraphRAG: From Decoupled Stacks to Multi-Model Engines]]></title>
            <link>https://medium.com/google-cloud/architects-guide-to-graphrag-from-decoupled-stacks-to-multi-model-engines-a2b00d47e2c6?source=rss-58bf96a2bd6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2b00d47e2c6</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Megha Saini]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 00:31:35 GMT</pubDate>
            <atom:updated>2026-09-18T05:55:15.320Z</atom:updated>
            <content:encoded><![CDATA[<h4>[Part 2] Architectural Decisions in Building Data Foundations for Agentic AI</h4><p>Welcome to the series where we discuss architectural design decisions in building data foundations for agentic workflows.</p><h3><strong>The Series:</strong></h3><blockquote><em>- </em><a href="https://medium.com/@meghasaini/architectural-trade-offs-in-building-data-foundations-for-agentic-ai-9a2be5ce5fde?postPublishedType=repub"><em>Part 1: Operational vs Analytical Datastores — Choosing the Right Datastore for the Right Loop</em></a><em><br>- </em><strong><em>Part 2 : GraphRAG: From Decoupled Stacks to Multi-Model Engines</em></strong><em><br></em><strong><em>- </em></strong><em>Part 3 ++ : More design decisions</em></blockquote><h3>From Decoupled Stacks to Multi-Model Engines</h3><p>When engineering teams transition AI agents from prototype to production, it is likely they hit a performance and accuracy wall. Standard Vector RAG, while easy to spin up, fails at complex enterprise reasoning. Meanwhile, assembling a “polyglot” stack of dedicated databases creates an operational nightmare. When autonomous agents need to make real-time, deterministic decisions over complex enterprise data, relying on fragmented vector databases and brittle ETL pipelines quickly leads to latency bottlenecks, sync lag, and ballooning operational costs.</p><p>In this post, we will explore the architectural trade-offs powering production AI systems — from why <strong>GraphRAG</strong> outperforms standard vector search, to how running native multi-model capabilities inside an i<strong>ntegrated Operational Database</strong> can slash infrastructure TCO while delivering sub-50ms context to your AI agents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-2BPAqLoI-24c-w71iHhoA.png" /><figcaption>From Decoupled Stacks to Multi-Model Engines (Source: Author)</figcaption></figure><h3>A. Choosing Your Retrieval Strategy (Vector RAG vs Graph RAG)</h3><ol><li><strong>Vector RAG (Semantic &amp; Similarity Search)</strong></li></ol><p><strong>How it works:</strong> Documents are split into text chunks, converted into vector embeddings, and stored in a vector database. At query time, the system performs a cosine similarity search to retrieve the most semantically relevant chunks.</p><p>✅ <strong>Use Vector RAG when:</strong></p><ul><li>Your queries are point-in-time or direct lookup questions: e.g., “What is the policy for expense reimbursement?” or “How do I configure logging in Python?”</li><li>You are working mostly with unstructured text: Documents, PDFs, knowledge base articles, customer support tickets.</li><li>You need low latency and fast indexing: Vector embeddings can be generated quickly and searched in milliseconds.</li><li>You care about semantic similarity, not exact matching: Finding concepts that mean the same thing even if different words are used.</li></ul><p>❌<strong> Limitations of Vector RAG:</strong></p><ul><li>Multi-hop reasoning is weak: Struggles with questions like “Which engineers worked on services that depend on Database X, and who are their stakeholders?”</li></ul><p><strong>2. Graph RAG (Knowledge Graph &amp; Entity-Relationship Reasoning)</strong></p><p><strong>How it works:</strong> An LLM extracts entities (nodes) and relationships (edges) from your data to build a Knowledge Graph.</p><p>✅ <strong>Use Graph RAG when:</strong></p><ul><li>Your domain is heavily interconnected: Financial transactions, fraud detection, supply chain logistics, legal contracts, healthcare/drug discovery, or organizational hierarchies.</li><li>You need multi-hop and relational reasoning: e.g., “If Component A fails, which downstream customer-facing APIs and third-party vendors are impacted?”</li><li>You need global corpus summarization: Questions like “What are the conflicting viewpoints across all project proposals?” Graph RAG traverses community summaries to synthesize global answers.</li><li>Preventing relational hallucinations is critical: Explicit graph edges guarantee that facts like A is married to B or Company X acquired Company Y are preserved accurately.</li></ul><p>❌ <strong>Limitations of Graph RAG:</strong></p><ul><li>Higher indexing cost &amp; latency: Extracting entities and edges using LLMs during ingestion is computationally expensive and slow compared to simple embedding generation.</li><li>Schema &amp; Maintenance complexity: Requires managing graph schemas and entity resolution (e.g., deduplicating “Google”, “Google LLC”, and “Alphabet” into a single node).</li></ul><p><strong>Hybrid RAG combines both:</strong></p><ul><li>Use Vector Search to quickly locate the initial entry points (e.g., the top 5 most relevant document chunks or entity nodes).</li><li>Use Graph Traversal to expand out from those nodes along their relationship edges, gathering vital context that standard vector search would have missed.</li></ul><h3>B. Real-World Architectural Approaches</h3><p>Imagine a enterprise customer reports: <em>“Our primary VoIP gateway is dropping packets during peak traffic hours after the recent network policy patch.”</em></p><p>An AI agent powered <strong>only by a Vector Database</strong> processes this prompt by looking for semantically similar text chunks across unstructured support tickets, KB articles, and incident logs.</p><ul><li><strong>What Vector RAG retrieves:</strong> 10 different documents discussing “packet drops,” “VoIP gateways,” and “network policy updates.”</li><li><strong>Where Vector RAG fails:</strong> Vector embeddings measure <em>semantic similarity</em>, not <em>causal structure</em>. The vector database returns generic troubleshooting steps for VoIP packet loss. It cannot tell the agent that <strong>Router-7B</strong> (where the issue occurred) is physically tied to <strong>Subnet-104</strong>, which relies on <strong>Security Policy v4.2</strong> updated 20 minutes ago.</li><li><strong>The Result:</strong> The agent gives a generic, unhelpful answer or hallucinates a non-existent root cause because it lacks the structural topology of the system.</li></ul><p><strong>GraphRAG</strong> combines semantic vector search with explicit graph traversals (Entity -&gt; Relationship -&gt; Entity). When the agent uses GraphRAG, it first uses vector search to identify the relevant entities (“VoIP Gateway”, “Network Policy”), and then traverses the Knowledge Graph. Because the agent receives both the <strong>unstructured knowledge</strong> (what packet loss means) and the <strong>exact operational topology</strong> (which specific policy deployment touched this exact gateway), it can deterministically identify the root cause and execute a precise rollback.</p><p>When building infrastructure for agentic AI, you have two ways to execute a GraphRAG pattern depending on your choice of database storage.</p><h3>Approach I: GraphRAG on Specialized, Multi-Database Stacks</h3><p>Implement GraphRAG by gluing together disparate systems:</p><ol><li>An agent queries a <strong>Dedicated Vector Database</strong> (e.g., Pinecone) to find relevant document chunks.</li><li>The agent takes those entity IDs and queries a <strong>Dedicated Graph Database</strong> (e.g., Neo4j) over network calls to traverse relationships.</li></ol><p><strong>The Drawback:</strong> High operational friction, sync lag across systems, and multiple database clusters to manage.</p><p><strong>Four critical limitations of multi-database stacks:</strong></p><p>(i) <strong>Distributed Consistency and Sync Lag (Stale Context): </strong>When an agent acts on live transactional data, an ETL/CDC pipeline must sync that state to both the Vector DB and the Graph DB. Because this synchronization is asynchronous/eventually consistent, Agent Race Conditions occur. The agent might query the Vector or Graph DB immediately after an operational update and retrieve stale data, causing hallucinations or wrong decisions.</p><p>(ii) <strong>Network Hop Latency: </strong>To resolve a single step in a reasoning loop, the agent must make multi-stage network roundtrips: query the operational DB for user context, hit the Vector DB for semantic matching, and hit the Graph DB for relationships. Latency stacks up fast, killing real-time agent responsiveness.</p><p>(iii) <strong>Security &amp; Governance Friction:</strong> Enforcing row-level security (RLS) across three separate databases means maintaining duplicate permission models in three places. If a security policy changes in the primary DB but hasn’t propagated to the Graph DB, your AI agent might leak sensitive data in its context window.</p><p>If User A is denied access to Document X in the Operational DB, you must ensure that same restriction is seamlessly enforced during Vector KNN search and Graph traversal. Fragmented IAM leads to data leaks.</p><p>(iv) <strong>DevOps &amp; FinOps Overhead: </strong>You must manage three separate backup/restore schedules, Point-in-Time Recoveries (PITR — which must be synchronized across all three stores!), scaling policies, monitoring alerts, and vendor billing models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k-6qHyekQ6dQl-6B7vUk5Q.png" /><figcaption>Critical Limitations of Multi-Database Stacks (Source: Author)</figcaption></figure><h3>Approach II: GraphRAG inside an Integrated Operational Database</h3><p>Execute GraphRAG directly within a single unified database system like <strong>Spanner Graph</strong> or <strong>AlloyDB</strong>:</p><ol><li>The database holds operational data, vector embeddings, and graph edges inside the same physical cluster.</li><li>The agent sends <strong>one single SQL/GQL query</strong> that performs the vector similarity search <em>and</em> traverses the graph edges natively on disk.</li></ol><p><strong>The Benefit:</strong> Zero network hop latency between databases, zero sync lag, and drastically simplified data governance.</p><blockquote><strong>GraphRAG</strong> is the intelligent <em>retrieval method</em> your AI agents need to understand complex domain relationships. An i<strong>ntegrated Operational Database</strong> is the modern <em>infrastructure platform</em> that allows you to run patterns like GraphRAG without building complex, fragile ETL pipelines.</blockquote><h3>C. <strong>Converged Multi-Model Databases</strong></h3><p>The most efficient production alternative for operationalizing enterprise agents is moving toward Converged / Multi-Model Database Architectures, where operational, vector, and graph capabilities reside within a single engine or a closely coupled ecosystem.</p><ol><li><strong>Google Cloud Spanner (Operational + Graph + Vector in One Engine)</strong></li></ol><ul><li>Spanner Graph allows Cypher queries (graph traversals) directly over the ACID relational operational tables with zero ETL.</li><li>Spanner supports native Vector Search (K_NEAREST_NEIGHBORS) to store embeddings, relational entity data, and graph structures inside a single, globally distributed, strongly consistent database.</li></ul><p><strong>2. AlloyDB / PostgreSQL (Operational + Vector + Lightweight Graph)</strong></p><ul><li>Use AlloyDB as core relational operational store.</li><li>Use pgvector for high-performance vector indexing directly inside Postgres tables.</li><li>Use relational views or JSON/Graph extensions for entity relationships.</li></ul><p><strong>Benefit:</strong> Single backup, unified Row-Level Security (RLS), ACID transactions, zero sync lag.</p><p><em>When to still use a decoupled Graph DB (like Neo4j): Only decouple if your graph structure is massive (billions of nodes/edges with deep 5+ hop traversals) and requires complex graph algorithms (like PageRank or Louvain community detection). For 90% of enterprise RAG and Agent workflows, a converged engine is vastly superior operationally.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EiHXGPv6INlNEYL6Rs-Omg.png" /><figcaption>Converged Multi-modal Databases (Source: Author)</figcaption></figure><h3>D. Bringing It Together — Native GraphRAG inside Multi-Modal Integrated Operational Database</h3><p>The most advantageous architectural design for enterprise agentic workflows is executing GraphRAG directly inside a single, Multi-Model Integrated Operational Database (such as Google Cloud Spanner with Spanner Graph or AlloyDB).</p><h4>Real-World Example: Real-Time Fraud &amp; Automated Account Containment</h4><p>Consider an autonomous financial agent tasked with detecting and mitigating complex, multi-account fraud in real time.</p><p><strong>The Workflow:</strong></p><ol><li>A transaction arrives with an unusual prompt/payload.</li><li>The Agent must instantly answer three questions:</li></ol><ul><li><em>Semantic:</em> Is this transaction description similar to known fraudulent phishing patterns?</li><li><em>Graph/Structural:</em> Is this account connected via shared IP, device ID, or wire destination to known malicious accounts?</li><li><em>Operational:</em> What is the customer’s current live balance and active status <em>right now</em>?</li></ul><p>Instead of orchestration code managing three separate database calls over the network, the agent issues a <strong>single hybrid GQL/SQL query</strong> directly to the engine:</p><pre>GRAPH FraudGraph<br>MATCH (acct:Account)-[e:TRANSFERRED_TO]-&gt;(target:Account)<br>WHERE COSINE_DISTANCE(acct.last_transaction_embedding, $flagged_pattern_vector) &lt; 0.15<br> AND acct.status = &#39;ACTIVE&#39;<br> AND target.risk_score &gt; 80<br>RETURN acct.id AS compromised_account, SUM(e.amount) AS total_at_risk;</pre><h3>E. Technical Deep-Dive: Schemas, Co-location, and Execution Mechanics</h3><p>To understand why an integrated database outpaces a decoupled architecture, let’s look past the API abstractions down to the disk storage and query optimizer levels.</p><p>Below is the blueprint for building a <strong>Real-Time Fraud &amp; Automated Account Containment Engine</strong> inside a single database instance.</p><h4>E.1 Spanner Graph: Multi-Model Schema Interleaving &amp; Hybrid GQL/SQL</h4><p>Let’s explore under-the-hood details when implementing with Spanner Graph:</p><ol><li><strong>The Unified Schema Blueprint — </strong>Instead of maintaining a relational database for transactions, a vector database for embeddings, and a graph database for relationships, we define <strong>Nodes</strong> and <strong>Edges</strong> using standard SQL tables co-located in physical storage.</li></ol><blockquote><strong>The Architectural Secret: Interleaved Co-location: </strong>Notice the INTERLEAVE IN PARENT Accounts clause on the AccountTransfers table. In standard relational databases, joining Accounts and Transfers causes high disk IOPS or distributed cross-network scans.</blockquote><pre>-- -----------------------------------------------------------------------------<br>-- 1. NODE TABLE: Accounts<br>-- Holds core transactional state AND vector embeddings for fast pattern matching.<br>-- -----------------------------------------------------------------------------<br>CREATE TABLE Accounts (<br>    account_id STRING(64) NOT NULL,<br>    customer_id STRING(64) NOT NULL,<br>    status STRING(32) NOT NULL, -- e.g., &#39;ACTIVE&#39;, &#39;SUSPENDED&#39;<br>    risk_score INT64 NOT NULL,<br>    last_login_ip STRING(45),<br>    -- 768-dimensional vector embedding of recent account behavior/notes<br>    behavior_embedding ARRAY&lt;FLOAT32&gt;(vector_length=&gt;768), <br>    updated_at TIMESTAMP NOT NULL OPTIONS (allow_commit_timestamp=true)<br>) PRIMARY KEY(account_id);<br><br>-- Create a Search Index on vectors directly inside the operational database<br>CREATE VECTOR INDEX idx_accounts_behavior_embedding <br>ON Accounts(behavior_embedding)<br>OPTIONS(distance_type=&#39;COSINE&#39;);<br><br>-- -----------------------------------------------------------------------------<br>-- 2. EDGE TABLE: AccountTransfers<br>-- Interleaved directly beneath &#39;Accounts&#39; on disk for zero-latency traversal.<br>-- -----------------------------------------------------------------------------<br>CREATE TABLE AccountTransfers (<br>    source_account_id STRING(64) NOT NULL,<br>    transfer_id STRING(64) NOT NULL,<br>    target_account_id STRING(64) NOT NULL,<br>    amount NUMERIC NOT NULL,<br>    transaction_time TIMESTAMP NOT NULL OPTIONS (allow_commit_timestamp=true),<br>) PRIMARY KEY(source_account_id, transfer_id),<br>  INTERLEAVE IN PARENT Accounts ON DELETE CASCADE;<br><br>-- -----------------------------------------------------------------------------<br>-- 3. GRAPH PROPERTY DEFINITION<br>-- Exposes the relational tables to ISO GQL (Graph Query Language) without data duplication.<br>-- -----------------------------------------------------------------------------<br>CREATE PROPERTY GRAPH FraudGraph<br>  NODE TABLES (<br>    Accounts <br>      KEY (account_id)<br>      LABEL Account <br>      PROPERTIES (account_id, status, risk_score, behavior_embedding)<br>  )<br>  EDGE TABLES (<br>    AccountTransfers<br>      KEY (source_account_id, transfer_id)<br>      SOURCE KEY (source_account_id) REFERENCES Accounts(account_id)<br>      DESTINATION KEY (target_account_id) REFERENCES Accounts(account_id)<br>      LABEL TRANSFERRED_TO <br>      PROPERTIES (amount, transaction_time)<br>  );</pre><p>2. <strong>The Unified Agent Query </strong>— When an AI agent detects a potential incident, it executes a single hybrid GQL/SQL statement that combines <strong>Vector Similarity Search</strong>, <strong>Graph Hop Traversal</strong>, and <strong>Relational State Filtering</strong> in one database call.</p><pre>GRAPH FraudGraph<br>MATCH (src:Account)-[e:TRANSFERRED_TO]-&gt;(target:Account)<br>WHERE COSINE_DISTANCE(src.behavior_embedding, @flagged_pattern_vector) &lt; 0.15<br>  AND src.status = &#39;ACTIVE&#39;<br>  AND target.risk_score &gt; 80<br>RETURN <br>  src.account_id AS compromised_account,<br>  target.account_id AS suspicious_target,<br>  e.amount AS transfer_amount,<br>  e.transaction_time AS transfer_time;</pre><p><strong>What Happens Step-by-Step Under the Hood:</strong></p><ol><li><strong>Vector Index Probe:</strong> The optimizer uses the Vector Index to perform an Approximate Nearest Neighbor search, rapidly narrowing millions of rows down to a candidate set of vectors matching <em>@flagged_pattern_vector</em>.</li><li><strong>Local Edge Pushdown:</strong> Because the edge table <em>AccountTransfers</em> is physically interleaved, the engine traverses from candidate source nodes to target nodes <strong>in local storage memory</strong>, completely bypassing network serialization overhead.</li><li><strong>Inline Relational Filtering:</strong> Real-time operational constraints (<em>src.status = ‘ACTIVE’ </em>and<em> target.risk_score &gt; 80</em>) are applied during the memory scan step — preventing the engine from evaluating graph paths for accounts that are already disabled or low-risk.</li></ol><blockquote>By pushing graph reasoning and vector math down into the co-located operational storage layer, data teams eliminate entire classes of pipeline infrastructure while providing AI agents with sub-50ms deterministic reasoning capabilities.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V14ZnPVyiWl89uPYKCHFTA.png" /><figcaption>Spanner Graph Query (Source: Author)</figcaption></figure><h4>E.2 AlloyDB AI: Adaptive Filtering &amp; ScaNN Vector Indexing</h4><p>When deploying standard PostgreSQL with <em>pgvector </em>for an agent, engineering teams possibly hit a wall called the “Pre-filtering vs. Post-filtering Dilemma.” If an agent applies a traditional SQL filter (e.g., <em>WHERE status = ‘active’</em>) alongside a vector search, a standard database either scans the entire B-Tree index first and drops the vector index, or vice-versa.</p><p>This can be fixed with AlloyDB AI at the database engine layer using <strong>ScaNN (Scalable Nearest Neighbors)</strong> and <strong>Adaptive Filtering</strong>.</p><h4>The ScaNN Index</h4><p>AlloyDB integrates Google’s proprietary ScaNN algorithm, which scales linearly up to billions of vectors using anisotropic quantization (compressing vectors while preserving the directional accuracy that LLMs depend on).</p><pre>-- Enable the core engine extensions<br>CREATE EXTENSION IF NOT EXISTS vector;<br>CREATE EXTENSION IF NOT EXISTS alloydb_scann CASCADE;<br><br>-- Create the ultra-high-performance ScaNN index<br>CREATE INDEX idx_documents_embedding_scann <br>ON documents USING scann (embedding cosine) <br>WITH (num_leaves = 1000);</pre><h4>How Adaptive Filtering Saves Agent Computations</h4><p>For an autonomous agent, data constraints change dynamically based on user prompts. AlloyDB’s query planner uses <strong>Inline Filtering</strong> to execute vector distance calculations and relational metadata filtering in tandem.</p><pre>SELECT id, content, 1 - (embedding &lt;=&gt; $1::vector) AS similarity<br>FROM documents<br>WHERE category = &#39;Security_Logs&#39;<br>  AND tenant_id = &#39;enterprise_tenant_A&#39;<br>ORDER BY embedding &lt;=&gt; $1::vector<br>LIMIT 5;</pre><p><strong>The Execution Plan:</strong></p><ol><li><strong>Bitmap Generation:</strong> AlloyDB hits standard B-Tree indexes on category and tenant_id to generate a rapid, internal bitmap (a list of valid row IDs).</li><li><strong>Quantized Vector Scan:</strong> Instead of searching the entire global ScaNN index, the engine matches the pre-filtered bitmap against the ScaNN index cluster (num_leaves).</li><li><strong>Anisotropic Distance Computation:</strong> It calculates vector distances <em>only</em> for the intersections, eliminating thousands of vector distance math operations (&lt;=&gt;) that would otherwise waste CPU cycles.</li></ol><h4>Eliminating the Data Pipeline: In-Database Embeddings</h4><p>One of the slickest production detail is AlloyDB’s ability to generate embeddings natively via SQL. You can link your database directly to Vertex AI embedding models using virtual generated columns:</p><pre>-- Let the database handle the pipeline automatically<br>ALTER TABLE documents ADD COLUMN embedding vector(768) <br>GENERATED ALWAYS AS (<br>    google_ml.embedding(&#39;text-embedding-005&#39;, content)<br>) STORED;</pre><p>When your data ingestion pipeline writes new text data to the <em>content</em> column, AlloyDB intercepts the transaction, securely hits the Vertex AI model endpoint, populates the <em>embedding</em> column, and commits the row atomically. For an agent, this guarantees <strong>zero sync lag</strong> — as soon as operational data is committed, it is instantly discoverable by the AI.</p><h3>F. Conclusion: Stop Building Plumbing. Start Building Intelligence.</h3><p>In a decoupled environment, senior data engineers spend their sprint capacity writing “glue code” — building retry logic, handling dead-letter queues, and debugging state drift across disparate database vendors. Consolidating into a multi-model integrated engine reclaims their time, allowing them to focus on building core AI capabilities rather than managing plumbing. The future of data infrastructure isn’t a stack of more specialized databases. <strong>It’s multi-model convergence.</strong></p><p>Hope you found this article helpful.</p><p>Thank You.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2b00d47e2c6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/architects-guide-to-graphrag-from-decoupled-stacks-to-multi-model-engines-a2b00d47e2c6">Architect’s Guide to GraphRAG: From Decoupled Stacks to Multi-Model Engines</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Architectural Trade-offs in Building Data Foundations for Agentic AI]]></title>
            <link>https://medium.com/data-science-collective/architectural-trade-offs-in-building-data-foundations-for-agentic-ai-9a2be5ce5fde?source=rss-58bf96a2bd6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a2be5ce5fde</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Megha Saini]]></dc:creator>
            <pubDate>Sun, 28 Jun 2026 08:58:39 GMT</pubDate>
            <atom:updated>2026-08-03T00:35:09.349Z</atom:updated>
            <content:encoded><![CDATA[<h3>Operational vs Analytical Datastores — Choosing the Right Datastore for the Right Loop</h3><h4><strong>[Part 1] </strong>Architectural Decisions in Building Data Foundations for Agentic AI</h4><p>Hi! As a data practitioner for more than a decade, I have often observed that there are many architectural trade-offs in building data foundations for agentic workflows. This series is an attempt to document those trade-offs honestly — for data engineers, platform architects, and technical leads who are past the “what is agentic AI” stage and need to make real decisions about how to build systems that support it. In this series, we are discussing the engineering design decisions that matter in real-world scenarios; ones that determine whether an agentic system holds up under real load, real users, and real data.</p><h3>The Series:</h3><blockquote><strong><em>- Part 1: Operational vs Analytical Datastores — Choosing the Right Datastore for the Right Loop</em></strong><em><br>- </em><a href="https://medium.com/@meghasaini/architects-guide-to-graphrag-from-decoupled-stacks-to-multi-model-engines-a2b00d47e2c6"><em>Part 2 : GraphRAG: From Decoupled Stacks to Multi-Model Engines</em></a><em><br></em><strong><em>- </em></strong><em>Part 3 ++ : More design decisions</em></blockquote><h3>Operational vs Analytical Datastores</h3><h4>The Moment It Breaks</h4><p>You’re building an AI agent that handles live customer interactions. It needs to check an account balance, validate a subscription state, and apply a credit — all inside a single conversation turn. You point it at BigQuery because that’s where your clean, governed data lives. It works great in testing.</p><p>In production, your agent starts double-applying credits. Not because your logic is wrong — because your data warehouse hasn’t reflected the first write yet when the second query lands. You just learned the difference between <strong>ingestion speed </strong>and <strong>execution consistency </strong>the hard way.</p><p>This article focuses on the foundational split every data practitioner hits early: <strong>when to anchor your agent in an operational datastore versus an analytical one</strong>, and why getting this wrong cascades into everything downstream.</p><h3>Part 1: Real-Time Operational Data vs. High-Throughput Analytics</h3><p>Let’s say an agent needs to look up a customer’s live order status while simultaneously understanding their 12-month lifetime value (LTV) to resolve a billing dispute.</p><h3>A. The Core Conflict</h3><ul><li><strong>Operational Datastores (e.g., AlloyDB / Cloud SQL):</strong> Exceptional for ultra-low latency, single-row lookups, or small transactional vector queries via the <em>pgvector</em> extension. However, running large multi-table joins or analytical aggregations directly on production operational databases to feed an agent’s context will rapidly exhaust compute threads and tank transactional performance.</li><li><strong>Analytical Datastores (BigQuery):</strong> Capable of scanning petabytes of data, handling structured, semi-structured, and unstructured data natively. However, even with BI Engine or advanced runtimes, BigQuery’s query latency floor sits in the hundreds of milliseconds which can choke an agentic loop that requires dozens of rapid-fire sub-queries to complete a single task</li></ul><blockquote><strong>The Architectural Trade-Off </strong>— Do you point your agent’s tools toward a centralized analytical lakehouse (BigQuery) or a decentralized operational mesh (AlloyDB/Cloud SQL clusters)?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKDKd-LmcdOS30YDlp4NqQ.png" /><figcaption>Choosing the Right Data Foundation for Agentic AI (Source: Author)</figcaption></figure><h3>B. The Blueprint Matrix: Operational vs. Analytical</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*o7525Zt4xW_VjwGOO_iL9w.png" /><figcaption>The Blueprint Matrix (Source: Author)</figcaption></figure><h4>Blueprint 1: The Low-Latency Operational Path (AlloyDB / Memorystore)</h4><p>The Use Case: Real-Time Telecom Customer Retention &amp; Fraud Mitigation Agent</p><p>An AI agent handles live chat interactions for a major telecommunications provider. A user signs in because their mobile data roaming isn’t working abroad, and they are threatening to cancel their service.</p><p>To resolve this, the agent must execute a multi-step loop:</p><ol><li>Validate the user’s current account standing and active subscription state.</li><li>Check the real-time network telemetry logs from the past 10 minutes to see if a roaming block is active on the SIM card.</li><li>Check if the user has already been issued a data credit in the current billing cycle to prevent promotional fraud.</li><li>Execute a writeback tool to clear the network flag and apply a temporary $10 goodwill credit if eligible.</li></ol><p><strong>Why the Operational Layer Wins — </strong>This scenario requires <strong>sub-second user-facing SLAs</strong> and <strong>strict transactional consistency (ACID)</strong>. If the agent uses a data warehouse that suffers from a 5-minute ingestion lag or a 2-second query execution delay, the conversational experience breaks down. Worse, if the agent lacks immediate read-after-write consistency, a malicious user could open three parallel chat windows and trick the agent into applying multiple $10 credits simultaneously because the data warehouse hasn’t reflected the first writeback yet.</p><h4>Blueprint 2: The High-Throughput Analytical Path (BigQuery)</h4><p>The Use Case: Autonomous Supply Chain Re-Routing &amp; Procurement Agent</p><p>An enterprise agent monitors a global manufacturing supply chain. It identifies that a major shipping port in Asia is facing a 4-day typhoon delay. The agent is tasked with autonomously re-routing a multi-million dollar shipment of microchips.</p><p>To build its plan, the agent must:</p><ol><li>Scan 5 years of historical vendor performance metrics to identify alternative suppliers.</li><li>Cross-reference past shipping delays across 10,000 global routes during similar weather events.</li><li>Calculate the moving average of spot-market freight prices across the entire logistics network to find the most cost-effective alternative.</li><li>Generate a comprehensive procurement proposal for senior leadership.</li></ol><p><strong>Why the Analytical Layer Wins</strong> — This use case requires scanning <strong>hundreds of millions of rows across deep historical datasets</strong>. Attempting to run complex multi-year aggregations, moving averages, and federated joins across historical tables on an operational database like AlloyDB or Cloud SQL will exhaust its CPU threads, balloon its memory usage, and risk knocking the transactional system offline. The agent does not care if the shipping data from 3 years ago takes 1.5 seconds to compute, nor does it require sub-millisecond updates; it requires massive scale and parallel compute capacity.</p><h4>The Architectural Anchoring Matrix</h4><p>When deciding where your agent’s tools should point, evaluate these six core dimensions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cvCGFMAbYTwUGzPrEKfiig.png" /><figcaption>The Architectural Anchor (Source: Author)</figcaption></figure><h4>Data Practitioner’s Rule of Thumb</h4><p>If your agent’s tool call is driving a <strong>User Experience Loop</strong> (interacting with a human or executing a transactional change), anchor it in the <strong>Operational Layer</strong>. If your agent’s tool call is driving an <strong>Asynchronous Analysis Loop</strong> (generating strategies, reports, or deep intelligence), anchor it in the <strong>Analytical Layer</strong>.</p><h3>C. The Real-Time Trap: Why Ingestion Speed &lt;&gt; Execution Latency</h3><p>When evaluating an architectural foundation for Agentic AI workflows, the distinction between “high-throughput streaming” and “operational freshness” is a common design consideration. It is common to bypass this operational/analytical split by asking, <em>“Can’t we just stream real-time data directly into BigQuery using the Storage Write API and point our agent there?”</em></p><p>It’s a valid question, but it falls apart under three specific mechanical constraints:</p><h4>1. Stream Modes and Deliberate Lag</h4><p>The Storage Write API operates in different stream states that directly impact when data becomes visible to an agent’s analytical query tool. While the Storage Write API’s <strong>Committed Mode</strong> offers immediate visibility, high-volume enterprise architectures (such as high-volume log or financial transaction ingestion) often rely on <strong>Pending Mode</strong> or use Dataflow buffers, i.e. data is buffered in a private, isolated stream state. If your architecture introduces a triggeringFrequency (e.g., 30–60 seconds) to ensure transactional integrity across the lakehouse, you’ve already introduced a micro-batch lag that breaks real-time agentic decision-making. While the API is technically streaming continuously, the <em>business logic</em> introduces a deliberate micro-batch lag to ensure transactional integrity across the lakehouse before an agent can see it.</p><h4>2. The Mutation Constraint: Append-Only vs. Low-Latency Updates</h4><p>An AI agent often acts as a state controller — it doesn’t just read data; it updates a user’s status, adjusts an inventory balance, or flags a transaction as fraudulent.</p><ul><li>The Storage Write API is strictly designed for <strong>high-throughput append operations</strong> (e.g., pushing clickstreams, IoT telemetry, or new agent conversation logs into storage).</li><li>If an agent needs to change an existing row’s value (e.g., changing an order status from Processing to Shipped), BigQuery must run a Data Manipulation Language (DML) UPDATE statement.</li></ul><p>Running rapid, highly concurrent DML statements against a data warehouse will quickly run into BigQuery’s concurrent mutation quotas. Conversely, an operational database like <strong>AlloyDB</strong> uses multi-version concurrency control (MVCC) to mutate specific database blocks with sub-millisecond row locks, making it the preferred choice for agents handling fluid, fast-changing operational state machines.</p><h4>3. Ingestion Speed vs. Analytical Execution Latency</h4><p>This is the hidden trap for agentic loops. Even when using the Storage Write API’s default stream to achieve near-zero ingestion lag, you still face <strong>Query Execution Latency</strong>. To verify a piece of information that arrived two seconds ago across a massive table, BigQuery must still compile the query, allocate slots, and execute the scan. The data is “fresh” on disk, but the agent’s tool execution loop will still swallow a 500ms to 2-second processing pause.</p><p>If that same pinpoint lookup is aimed at a B-Tree indexed column in AlloyDB or a key-value store in Memorystore, the response returns in &lt;10 milliseconds.</p><h3>D. Conclusion &amp; The Refined Rule of Thumb</h3><p>The architectural decision shifts from <em>how fast the data can get onto the disk</em> to <em>how the data is consumed and mutated by the agent.</em></p><p>The decision isn’t about the data, it’s about how the agent consumes it. Agents make the cost of getting it wrong immediate and user-facing. A missing write consistency guarantee doesn’t just produce a stale report — it lets a user claim the same credit two or more times in parallel chat windows.</p><p>The practical decision framework comes down to three questions:</p><ol><li><strong>Is a human waiting for this response?</strong> If yes, you need sub-second latency and write consistency. That’s your operational layer.</li><li><strong>Does the agent need to mutate existing state, not just append to it?</strong> If yes, a data warehouse will hit concurrency limits fast. That’s your operational layer.</li><li><strong>Is the agent scanning historical depth — months or years of data — to generate a plan or recommendation?</strong> If yes, operational databases will buckle under the compute load. That’s your analytical layer.</li></ol><p>The real engineering work is in designing the seam between these layers: what gets replicated where, at what frequency, and with what consistency guarantees. The three-question framework gives data practitioners something actionable to take away after reading this article.</p><p>In the next part of this series, we’ll move past structured data storage and tackle the architectural trade-offs of<em> Vector Index Scaling: Centralized Vector Databases vs. In-Database Extensions. </em>It’s a decision with real consequences for latency, operational complexity, and how tightly your vector search couples to the rest of your data stack.</p><p>Hope you found this article helpful.</p><p>Thank You.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a2be5ce5fde" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science-collective/architectural-trade-offs-in-building-data-foundations-for-agentic-ai-9a2be5ce5fde">Architectural Trade-offs in Building Data Foundations for Agentic AI</a> was originally published in <a href="https://medium.com/data-science-collective">Data Science Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Semantic Brain & Operational Muscle: Solving the Enterprise AI Context Deficit]]></title>
            <link>https://medium.com/google-cloud/the-semantic-brain-operational-muscle-solving-the-enterprise-ai-context-deficit-eba0485cdb50?source=rss-58bf96a2bd6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/eba0485cdb50</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[bigquery]]></category>
            <dc:creator><![CDATA[Megha Saini]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 07:32:17 GMT</pubDate>
            <atom:updated>2026-09-25T04:29:29.530Z</atom:updated>
            <content:encoded><![CDATA[<h4>With Google Cloud Knowledge Catalog and Gemini Enterprise</h4><h3>Motivation for Writing</h3><p>As a Tech Lead in Data &amp; AI, I have often observed in my own practice that the new capabilities in agentic AI, business context, data cloud, and security are black boxes for many developers. There is not only a lack of granular understanding regarding the internal execution steps, but also how these technologies are <strong>orchestrated to build a foundational data layer </strong>for an enterprise organization<strong>.</strong></p><p>To bridge this critical knowledge gap, and skipping high-level marketing stuff, I am sharing my own investigative research into the architecture of <strong>modern data layer</strong>. Documenting this paradigm shift from rudimentary “data &amp; analytic toolkit” to sophisticated “agentic data cloud” with AI workflows will not only formalize these mechanisms but also provide vital insights for data engineers that are architecting a scalable, enterprise-grade data and AI ecosystems within their organization.</p><h3><strong>Abstract</strong></h3><p>Every enterprise leader is chasing the same vision: autonomous AI agents that can confidently execute complex workflows, diagnose customer issues, and handle supply chain anomalies.</p><p>But behind closed doors, engineering teams are running into a frustrating wall. They build a sophisticated agent, pair it with top-tier LLMs, and give it access to their data platforms — only for the agent to hallucinate, misunderstand a basic business metric, or stall entirely.</p><p>The problem isn’t the AI model. The problem is that your enterprise data lacks <strong>context</strong>.</p><p>Many vendors claim to solve this with a standard data catalog. But a traditional data catalog is just a passive phonebook — it tells you a table exists, but it doesn’t teach the AI how your business actually breathes. To move the needle, enterprises need a fully fleshed, dynamic <strong>Context Substrate</strong>.</p><h3>A. The Current State: The Enterprise Context Deficit</h3><p><em>Let’s look at the customer’s current operational reality, grounded in shared pain points before we talk about any technology solution.</em></p><p>Every enterprise is racing to deploy AI agents, but they are hitting a hard ceiling. The reality on the ground today is defined by a deep context deficit:</p><ul><li><strong>Context-Blind Agents:</strong> AI agents are deployed into the wild with massive cognitive power but zero localized business intelligence. They don’t have enough context to be truly useful.</li><li><strong>The Tribal Knowledge Sinkhole:</strong> Employees spend hours every day searching across disparate documents, disconnected systems, and unwritten tribal knowledge just to execute routine tasks.</li><li><strong>Semantic Anarchy:</strong> Different teams interpret the exact same data differently. A metric like “revenue” or “active customer” changes meaning depending on who you ask. Variations of these definitions exist across internal applications and reports.</li><li><strong>Fragmented Foundations:</strong> AI outputs are wild and inconsistent because the business context is fragmented across databases, chats, and individual heads.</li></ul><h4>The Consequence: Why It Matters</h4><p>This context deficit isn’t just an IT headache — it creates a cascading wave of business friction, delays, and operational inefficiencies:</p><ul><li><strong>Paralyzed Decision-Making:</strong> When data cannot be trusted or found, business execution slows to a crawl.</li><li><strong>Bloated Operational Costs:</strong> Endless hours spent manually reconciling data and recreating workflows eat directly into profit margins.</li><li><strong>Eroded Trust from Hallucinations:</strong> Unreliable AI responses and hallucinations force teams to constantly double-check AI work, defeating the purpose of automation.</li><li><strong>Stagnant Productivity:</strong> High-value employees remain trapped acting as human routers, hunting down information instead of driving growth.</li></ul><h4>The Anatomy of True Enrichment: What “Good” looks like</h4><p>To solve the problem, an enterprise data foundation must actively enrich its metadata. Here are three core principles:</p><h4>1. Mining Reality, Not Just Schemas</h4><p>Most data catalogs rely on data stewards manually entering descriptions for database columns. It is a losing battle. It should continuously analyze database schemas, BI models, and — critically — <strong>historical query logs</strong> to automatically construct natural language glossaries and surface verified business logic. It maps how your teams <em>actually</em> query data, turning dark infrastructure into real-world business context.</p><h4>2. Illumination of “Dark Data”</h4><p>Up to 80% of an enterprise’s true knowledge doesn’t live in structured SQL tables. It is buried in PDFs, strategy briefs, market analyses, and policy documents stored in object storage. Context layer should actively extract structural metadata and core business entities from this unstructured “Canonical Knowledge,” ensuring your AI agents don’t miss the narrative context behind the numbers.</p><h4>3. Seamless Accessibility</h4><p>Context is useless if your AI applications can’t access it seamlessly. Context data should be democratized and accessible via open standard protocols like, <strong>Model Context Protocol (MCP)</strong>. This open standard acts as a universal translator, allowing autonomous AI agents to directly retrieve secure, real-time enterprise context without complex, custom-coded middleware.</p><h3>B. The Knowledge Catalog</h3><p>Knowledge Catalog is an <strong>AI-powered context engine</strong> designed to transform fragmented enterprise data into a unified context graph. Unlike traditional metadata registries, this platform uses Gemini to actively mine business intent from structured databases and unstructured “dark data,” such as contracts and manuals. By integrating with the Model Context Protocol (MCP) and Gemini Enterprise, the system provides a reliable foundation for agentic workflows, enabling AI to execute complex tasks with deterministic accuracy.</p><p>Knowledge Catalog unifies governance and context via three pillars:</p><ul><li><strong>Governance foundation:</strong> It automates technical metadata collection from Google Cloud services like BigQuery, Spanner, etc., alongside third-party systems, enabling centralized business glossaries, data quality checks, and policy-based governance.</li><li><strong>Context curation:</strong> Gemini analyzes schemas and logs to infer intent, generating descriptions and verified SQL patterns that capture complex business logic.</li><li><strong>Context retrieval:</strong> AI applications use semantic search and the Model Context Protocol (MCP) to access organizational truth for reliable decision-making.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xKTdZCMcrXy3r41J6jnJwA.png" /><figcaption>Architecture of Knowledge Catalog (source: Google Cloud Documentation)</figcaption></figure><h3>C. The Transformation: Activating the Enterprise Operating Engine</h3><p>To build a true <strong>Enterprise Operating Engine</strong>, an organization must fuse two distinct halves of its digital architecture:</p><ol><li><strong>The Semantic Brain (Knowledge Catalog) —</strong> Manages data assets and semantics. It understands what a data point means, where it lives, and how it relates across silos.</li><li><strong>The Operational Muscle (Gemini Enterprise)- </strong>Manages skills, execution, and orchestration. It understands <em>how</em> the business runs, executes playbooks, and automates active workflows.</li></ol><p>Combination of <strong>Google Cloud Knowledge Catalog </strong>and <strong>Gemini Enterprise </strong>transforms the organization from a passive archive of tables into a dynamic operating system. Knowing <em>what</em> data exists (Knowledge) and <em>what</em> it means (Semantics) is only half the battle. For an agent to act autonomously, it needs the operational playbook and tribal knowledge of <em>how work actually gets done</em>.</p><h3>D. The Power of One: An Integrated Context Ecosystem</h3><p>A tight architectural integration between <strong>Knowledge Catalog</strong> and <strong>Gemini Enterprise </strong>provides a comprehensive, end-to-end context engine that bridges the gap between raw enterprise data and cognitive execution.</p><p>Knowledge Catalog is not just as a metrics store, but as a <strong>universal context engine</strong> that bridges the massive gap between raw infrastructure and autonomous AI agents. For an enterprise data team, it solves the “last-mile” hallucination and governance problem for AI applications. The vertical integration with Gemini Enterprise enables a seamless pathway from low-level infrastructure to autonomous logic, ensuring every layer reinforces the next.</p><ul><li><strong>Infrastructure &amp; Storage:</strong> Raw files land in Cloud Storage; real-time application events land in Spanner.</li><li><strong>Compute:</strong> BigLake and BigQuery manage the open formats seamlessly across engines.</li><li><strong>The Semantic Context Layer (Knowledge Catalog):</strong> Gemini actively maps the relations between the Spanner app logs, Cloud Storage PDFs, and BigQuery historical datasets. It continuously tests data quality and saves optimized “example queries” that act as guardrails.</li><li><strong>AI Application Orchestration (Gemini Enterprise):</strong> Autonomous AI agents use the Knowledge Catalog’s MCP server to pull these exact, pre-verified SQL snippets and context rules. The agent never writes raw SQL from scratch based on a blind guess, eliminating structural query errors and hallucinations.</li></ul><p>Google Cloud takes raw, unstructured data lakes and real-time streaming warehouses, synthesizes them, and exposes them as a secure, production-grade agentic environment through the vertically integrated stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xK0rZ9ZAl7KY8AhuqAErOA.jpeg" /><figcaption>Google Cloud Integrated Stack with Knowledge Catalog (Source: Author)</figcaption></figure><h3>E. The End-to-End Enterprise Workflow</h3><p><em>Let’s look at how this vertically integrated stack handles a real-world crisis: </em><strong><em>A critical supply chain delay where a key manufacturing component is stuck at a port.</em></strong></p><h4>1. Context Curation (Multimodal Entity Extraction)</h4><p><strong>The Reality:</strong> A vendor sends a chaotic PDF update regarding shipping bottlenecks.</p><ul><li>Gemini parses the unstructured PDF contracts and shipping manifests stored in Cloud Storage. It extracts entities and maps obscure database columns (e.g., vnd_id_v2) to their true business identity (Global Vendor Identifier), binding unstructured document data directly to live operational data.</li></ul><h4>2. Storage &amp; Relation Synthesis (Spanner Graph &amp; BigQuery Graph)</h4><p>Once relationships are extracted, they are stored across Google Cloud’s unified graph modeling engine using standard GoogleSQL, splitting the load by intent:</p><ul><li><strong>Spanner Graph (Operational Engine):</strong> If an AI agent needs to instantly verify a live inventory level, check a customer’s active subscription status, or modify a pending order routing, Spanner Graph delivers millisecond lookups with global consistency.</li><li><strong>BigQuery Graph (Analytical Engine):</strong> If the system needs to run deep multi-hop aggregations — such as tracing historical lineage across five years of supplier performance to see if this port delay requires replacing the vendor entirely — BigQuery Graph processes it at petabyte scale</li></ul><h4>3. Real-Time Dynamic Updates (BigQuery Continuous Queries)</h4><p>Instead of waiting for a nightly batch window, <strong>BigQuery Continuous Queries</strong> process incoming telemetry or transactional rows the split-second they arrive.</p><ul><li>As new sensor metrics or vendor shipping notifications stream into the business, a continuous query uses an inline Gemini function (e.g., AI.GENERATE_TEXT) to instantly flag anomalies, parse schema mutations, and push live delta updates to Spanner or Pub/Sub. This ensures the AI agents are never working off stale context.</li></ul><h4>4. <strong>Activating Truth with Model Context Protocol (MCP)</strong></h4><p><strong>The Security Gap:</strong> Letting an LLM write raw SQL from scratch based on a blind guess results in catastrophic syntax errors, broken joins, or security vulnerabilities.</p><ul><li>The Knowledge Catalog exposes its unified context graph through the <strong>Model Context Protocol (MCP)</strong>. When a Gemini Enterprise agent needs to act, it connects as an MCP client. Instead of guessing, it requests a <strong>Verified Example Query</strong> — a pre-vetted, optimized SQL template generated by the catalog’s automated lineage and profiling engine. The agent executes precise data retrieval within safe, deterministic boundaries.</li></ul><h4>5. Cross-SaaS Identity Preservation (The Enterprise Shield)</h4><p>A supply chain agent can’t make smart decisions if it doesn’t know what’s happening in your CRM or issue trackers.</p><ul><li><strong>Gemini Enterprise</strong> leverages native connectors to ingest and synchronize data across third-party ecosystems (Jira, Salesforce, SharePoint) directly into the Knowledge Catalog. Crucially, it respects and preserves native <strong>Identity Access Control Lists (ACLs)</strong>. If a specific customer success agent or an external supplier queries the AI, the underlying agent can only reason across data that the specific user has explicit compliance permissions to see.</li></ul><p>By unifying context across SaaS, your platform eliminates the risk of fragmented “context islands”. Gemini Enterprise leverages native connectors to ingest, parse, and synchronize unstructured and structured data across disparate third-party SaaS ecosystems. This ensures that when an AI agent queries the data foundation, it can reason across the entire corporate landscape while strictly maintaining user permissions and compliance boundaries. This cross-platform data is mapped directly into the Knowledge Catalog, giving agents a secure, holistic, and secure view of the enterprise without requiring costly, hardcoded integration pipelines.</p><h3>F. Realizing the Blueprint: Moving from Static Data to Autonomous Action</h3><p>Building a production-grade agentic environment is fundamentally an architectural challenge, not an algorithmic one. By unifying the <strong>Semantic Brain</strong> (<a href="https://docs.cloud.google.com/dataplex/docs/introduction">Google Cloud Knowledge Catalog</a>) with the <strong>Operational Muscle</strong> (<a href="https://docs.cloud.google.com/gemini/enterprise/docs">Gemini Enterprise</a>), organizations can finally transition away from brittle, prompt-engineered AI patches toward a coherent, stateful <strong>Enterprise Operating Engine</strong>.</p><p>This vertically integrated stack changes the fundamental calculus of enterprise AI execution:</p><ul><li><strong>Determinism Over Guesswork:</strong> Through the Model Context Protocol (MCP), agents stop generating speculative code and begin executing pre-vetted SQL query guardrails directly tied to verified metadata.</li><li><strong>Real-Time Synthesis Over Stale Batches:</strong> Continuous queries ensure that live telemetry, transactional changes, and incoming dark data continuously refresh the context graph as anomalies unfold.</li><li><strong>Absolute Compliance by Design:</strong> Security boundaries are enforced natively by preserving Identity ACLs across third-party SaaS ecosystems, neutralizing the risk of data leakage.</li></ul><p>The enterprise context deficit cannot be resolved by upgrading to a larger model or deploying more standalone applications. It requires a foundational layer that teaches your systems how your business actually runs. By anchoring your data infrastructure in a dynamic context substrate and tying it directly to agent orchestration, you stop building isolated AI experiments — and start operating an automated enterprise</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ooImXAi0Z3p-EfKTt8i3uQ.png" /><figcaption>The Enterprise Operating Engine (Source: Author)</figcaption></figure><p>Hope you enjoyed reading and it was helpful.</p><p>Here are my other blogs on the topic of Knowledge Catalog:</p><ol><li><a href="https://medium.com/@meghasaini/google-cloud-knowledge-catalog-power-ai-agents-to-execute-complex-tasks-with-accuracy-ead1773eaf5e">Google Cloud Knowledge Catalog: Power AI Agents To Execute Complex Tasks with Accuracy</a></li><li><a href="https://medium.com/@meghasaini/the-store-of-tomorrow-demands-a-knowledge-catalog-0aff0b2f118c">The “Store of Tomorrow” Demands a Knowledge Catalog</a></li></ol><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eba0485cdb50" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/the-semantic-brain-operational-muscle-solving-the-enterprise-ai-context-deficit-eba0485cdb50">The Semantic Brain &amp; Operational Muscle: Solving the Enterprise AI Context Deficit</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The “Store of Tomorrow” Demands a Knowledge Catalog]]></title>
            <link>https://medium.com/@meghasaini/the-store-of-tomorrow-demands-a-knowledge-catalog-0aff0b2f118c?source=rss-58bf96a2bd6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/0aff0b2f118c</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Megha Saini]]></dc:creator>
            <pubDate>Tue, 02 Jun 2026 07:53:14 GMT</pubDate>
            <atom:updated>2026-06-07T02:16:39.665Z</atom:updated>
            <content:encoded><![CDATA[<h4>Scaling Agentic AI in Retail — The FairPrice Group Blueprint.</h4><p>As Tech Lead at Google Cloud, I’ve watched enterprises move from AI experiments to embedding AI into the fabric of their daily operations. Using large-scale retail as a framework, this article explores why scaling these systems requires <a href="https://docs.cloud.google.com/dataplex/docs/ai-overview">Knowledge Catalog</a> to build intelligent, trustworthy, and scalable solutions.</p><p><a href="https://cloud.google.com/customers/fairpricegroup?e=48754805#chapter-2">Singapore’s FairPrice Group is a masterclass in this shift</a>. Their <em>Store of Tomorrow</em> program demonstrates how a retailer can apply agentic AI across an entire value chain, from in-store customer experience to workforce operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*_PtA3F2DOGjSnHS75IymTg.png" /><figcaption>Source: Google Cloud Blog</figcaption></figure><p>They proved that the real challenge in production isn’t the AI model; it’s ensuring systems maintain a shared business understanding, akin to how human teams collaborate effectively. Without a common framework, fragmented interpretations emerge across applications, databases, dashboard, and AI agents, leading to inconsistent insights that stall enterprise-wide scaling.</p><p>This is where a Knowledge Catalog becomes essential. Rather than a mere data management tool, it serves as an <strong>organizational knowledge layer, connecting concepts, data assets, policies, relationships, and context so both humans and AI can collaborate.</strong></p><blockquote>The value isn’t the catalog itself, but the experiences it enables.</blockquote><p>Let’s start with a few real-world retail challenges, using the public framework of the <strong>FairPrice Group (FPG)</strong> case study and their <em>Store of Tomorrow</em> initiative. Here’s the blueprint.</p><h3><strong>The Blueprint: Agentic AI Shift at FairPrice Group</strong></h3><p>FairPrice Group operates an immense, multi-format grocery and food court ecosystem in Singapore. Their strategy with Google Cloud relies on moving past simple chatbots into an <strong>interoperable ecosystem of AI agents</strong> (Smart Carts, Digital Price Cards, Wine Sommeliers, and <em>Grocer Genie</em> for store operations) that reason and act across a complex grocery value chain to deliver enhanced customer experience, and faster daily operations.</p><ol><li><strong>Smart Carts:</strong> In-cart tablets using speech recognition and multimodal models to give shoppers real-time, hyper-personalized product recommendations and recipe mappings as they walk the aisles. This experience has driven up to an 18% click rate for in-cart recommendations.</li><li><strong>Grocer Genie &amp; Video Analytics:</strong> A mobile operational system for store managers that analyzes in-store CCTV feeds, tracks real-time queue lengths, spots empty shelves, and automatically routes tasks to frontline workers. According to FairPrice, this creates an “agentic workflow” that helps teams respond proactively within a short time window.</li><li><strong>Omnichannel Loyalty &amp; Schemes:</strong> Digital integration via the FPG App matching user profiles against government support programs to apply automated discounts instantly.</li></ol><h3><strong>The Challenge: Scaling AI in Grocery Retail</strong></h3><p>Shifting from generative AI to agentic AI represents a massive leap for enterprise retail. In a sector defined by thin margins, massive supply chains, and zero tolerance for customer-facing blunders, large-scale retailers face a highly specific set of hurdles when moving agentic systems out of the “pilot phase” and into production.</p><p><strong>According to </strong><a href="https://www.mckinsey.com/~/media/mckinsey/business%20functions/quantumblack/our%20insights/seizing%20the%20agentic%20ai%20advantage/seizing-the-agentic-ai-advantage.pdf"><strong>McKinsey</strong></a><strong>, top three most critical challenges to scale AI in retail sector are:</strong></p><ol><li><strong>Cascading Errors: </strong>If an agent misinterprets a data spike as surging demand for premium durians and triggers an automated procurement loop, the retailer autonomously commits capital to perishable inventory based on a hallucination. In multi-agent setups, such errors can amplify unreliability by 40%</li><li><strong>API &amp; Legacy Brittleness: </strong>Agents struggle to adjust prices or place orders when legacy systems return null values or fail within narrow timeout windows. Currently, agents resolve real-world API integration issues only 14% of the time.</li><li><strong>Compound Opacity: </strong>If a network slashes premium wagyu beef prices by 80% causing immediate flash losses, developers cannot easily reconstruct the causal loop. This “black box” liability renders standard explainable AI techniques ineffective for distributed decision pathways.</li></ol><h3>The Knowledge Catalog</h3><p>Knowledge Catalog is Google Cloud’s AI governance platform, evolved from Dataplex Universal Catalog to provide an organizational knowledge layer for business operations.</p><p><strong>The platform operates across three pillars:</strong></p><ol><li><strong>Aggregation: </strong>Unifying technical metadata from BigQuery, Spanner, and third-party systems.</li><li><strong>Enrichment: </strong>Inferring business intent by mapping relationships across schemas and query logs.</li><li><strong>Search &amp; Retrieval: </strong>Providing agents with high-precision access to organizational truth.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k0nxKqF4Afqvz4E2nNK-4w.png" /><figcaption>Source: Author</figcaption></figure><p>To learn more about what is Knowledge Catalog, refer to my previous blog here (<a href="https://medium.com/@meghasaini/google-cloud-knowledge-catalog-power-ai-agents-to-execute-complex-tasks-with-accuracy-ead1773eaf5e">Google Cloud Knowledge Catalog: Power AI Agents To Execute Complex Tasks with Accuracy</a>)</p><blockquote><strong>Disclaimer: Note on FPG Use Case Context: The following deep-dive applies these technical architectural concepts to the public framework of the FairPrice Group (FPG) case study and their Store of Tomorrow initiative. Please note that while FPG leverages advanced Google Cloud AI tools, their actual live production deployment may differ structurally or utilize a variation of these exact internal components that we discuss here. We are examining this specific retail landscape as an ideal, rigorous proxy to illustrate exactly how a Knowledge Catalog operates beneath the hood for end-user systems in the real-world.</strong></blockquote><h3><strong>Operationalizing Knowledge Catalog for Grocery Retail</strong></h3><p><strong>Business Use Case: </strong>With close to 570 physical touchpoints, e-commerce applications, and the Link rewards program, data is flowing constantly. Lets say, the marketing team decides to launch a time-sensitive, localized mobile app flash promotion: <em>“50% off Premium Ribeye Steaks for the next 2 hours.”</em></p><p>To ensure the flash promotion is executed successfully, <strong>here’s how Knowledge Catalog’s 3 core pillars come into play to solve the critical challenges for grocery retail:</strong></p><h3><strong>#1: Eliminating Data Silos to solve Cascading Errors:</strong></h3><p><strong>Inventory Gap problem. </strong>Fragmented architectures across POS, e-commerce, and legacy ERPs create synchronization risks for flash promotions. Without a unified stream, unmapped schema changes or sync delays cause apps to read stale data, leading to overselling non-existent stock.</p><p><em>In other words, executing a localized price drop across hundreds of physical and digital touchpoints without a unified foundation triggers severe operational failures, such as selling 5,000 steaks that physically do not exist in the store, causing immediate transactional margin loss, and systemic damage to consumer brand trust.</em></p><p><strong>How Knowledge Catalog Fixes It:</strong></p><ul><li>It acts as an automated semantic library that builds a live <strong>Context Graph </strong>which automatically extracts metadata from both structured and unstructured data to provide a reliable “enterprise truth” for Gemini-driven workflows.</li><li><strong>Change Data Capture (CDC) </strong>If a store engineer renames <em>qty_on_hand </em>to <em>available_stock_count</em>, the system instantly updates downstream APIs to prevent Smart Carts from hallucinating inventory for the ribeye promotion.</li><li>It introduces <strong>verified SQL patterns (Example Queries)</strong> and semantic guardrails directly into the agent’s loop. When the inventory agent queries live BigQuery or Spanner stock levels, it relies on pre-validated logic rather than “guessing” complex table joins, virtually eliminating the hallucinated logic that triggers cascading system errors.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IhuoPdASZQlzPxf5nj6s-g.png" /><figcaption>Source: Author</figcaption></figure><h3>#2: Standardizing Meaning with Ontologies</h3><p><strong>The Translation Barrier problem:</strong> Disparate shorthand like <em>PROD_M_RIB_04</em> (ERP) and <em>SKU_99412_REG </em>(Web) blocks automated pricing engines from executing a single “Ribeye” promotion across all channels.</p><p><strong>System Glitch Problem: </strong>A data stream might be flowing perfectly, but a glitch in the warehouse system starts dropping zeros from the inventory counts. Instead of showing 100 steaks on hand, it shows 10. The automated promotion engine reads this validly formatted number and instantly cancels the promotion for that store, assuming they are out of stock.</p><p><strong>How Knowledge Catalog Fixes It:</strong></p><p>Knowledge Catalog applies an AI-driven ontology, business definitions, and continuous automated data profiling over the raw infrastructure.</p><ul><li><strong>Logical Taxonomy Matching: </strong>The enrichment engine recognizes that <em>PROD_M_RIB_04</em>, <em>SKU_99412_REG</em>, and others like <em>DEPT_MEAT_10</em> share identical data shapes, purchase histories, and transaction behaviors.</li><li><strong>Business Glossary Binding:</strong> The catalog applies a logical taxonomy, binding these cryptic signatures to the human-readable term <em>“Premium Ribeye Steak.”</em> It maps the overarching business hierarchy (Meat -&gt; Beef -&gt; Ribeye), meaning any downstream AI agent or marketing tool can instantly query the plain English term and pull data from every database format simultaneously.</li><li><strong>Automated Data Profiling &amp; Quality Checks</strong>: Knowledge Catalog continuously runs automated profiling routines on the incoming data streams in the background: It tracks historical data patterns. If the inventory column for a high-velocity urban store suddenly shows a 90% drop in row variance or an unexpected spike in null fields, the profiling engine flags an anomaly. It stops a glitched system from prematurely canceling the flash sale.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vMaMohBb3NsjoaFXGXjOfA.png" /><figcaption>Source: Author</figcaption></figure><h3>#3: <strong>Enabling Low-Latency Decision Grounding</strong></h3><p><strong>The Latency Risk:</strong> Shoppers abandon carts if pricing lookups take seconds. Directly connecting LLMs to raw warehouses risks runtime crashes and hallucinated SQL joins that disrupt the checkout experience.</p><p><strong>How Knowledge Catalog Fixes It:</strong></p><ul><li><strong>Golden Query Templates: </strong>The catalog delivers sub-second results by mapping natural language inquiries like “ribeye inventory” to verified, pre-compiled SQL templates. It maps the query to its underlying relational ontology graph within a multi-dimensional vector space, instantly matching “luxury beef” to the business glossary term Premium Ribeye Steak and returns accurate structural references in milliseconds.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2Ij1FpScR-rDkHBOKOx_Q.png" /><figcaption>Source: Author</figcaption></figure><h3>#4: Semantic Aggregation via MCP</h3><p><strong>The Problem:</strong> Retailers suffer from a patchwork of legacy systems (ERP, POS, warehouse databases) with brittle interfaces that agents fail to navigate autonomously.</p><p><strong>How Knowledge Catalog Fixes It:</strong></p><ul><li><strong>Broad Metadata Aggregation</strong>. It automatically harvests data and intent from Google Cloud data stores (BigQuery, Spanner, Cloud SQL) but also extends context federation to foundational retail backends like Oracle ERP, SAP, and Salesforce.</li><li><strong>Model Context Protocol (MCP). </strong>Knowledge Catalog serves as a single, governed API abstraction layer. AI agents do not need to deal with the individual quirkiness or brittle formatting of a 20-year-old database mainframe; they query the Knowledge Catalog via MCP to fetch structured, unified real-time data.</li></ul><h3>#5: Automated Data Lineage to Solve Compound Opacity</h3><p><strong>The Problem: </strong>When multiple autonomous agents converse, trade intermediate data, and hand off control signals to one another, tracing <em>why</em> a final decision was made becomes nearly impossible. This is known as <strong>compound opacity.</strong></p><p><em>If an agentic pricing network autonomously slashes the cost of a luxury item by 80% — causing a massive flash loss before humans notice — auditors and developers cannot easily reconstruct the exact causal loop across five interacting agents to figure out who or what was responsible. This creates massive legal, financial, and compliance risks.</em></p><p><strong>How Knowledge Catalog Fixes It:</strong></p><ul><li>While it cannot fix the “black box” nature of a neural network’s inner reasoning, it completely opens up the <strong>data journey</strong> via automated <strong>Data Lineage Tracking</strong>. Knowledge Catalog allows compliance teams to mathematically map how that data flowed, transformed, and was accessed across the data estate.</li></ul><p>And finally, here’s the creative moat…</p><h3>The Creative Moat: Why Retail Vendor Stick to the Product</h3><p>Knowledge Catalog turns ontology catalog into a system that gets smarter automatically through everyday use.</p><p>Every single time a FairPrice Group employee uses the <em>Grocer Genie</em> app to resolve a task, or a consumer converses with a Smart Cart assistant to find a local recipe, the catalog logs the interaction. It learns:</p><ul><li>Which localized business definitions map to specific SKUs most accurately.</li><li>Which inventory data pipelines are the most reliable under heavy load.</li><li>How physical store layout modifications correlate with digital search behaviors.</li></ul><p>This creates a <strong>knowledge flywheel</strong>. The software isn’t just an indexing database tool; it becomes the actual repository of the company’s daily operational intelligence and customer behavior patterns.</p><p>If a competitor pitches a cheaper or flashier data catalog platform, the switching cost is functionally prohibitive. Leaving the platform means abandoning a <strong>live, self-correcting semantic graph that holds the context for their entire automated <em>Store of Tomorrow</em> ecosystem</strong>. That structural dependency is how software providers win the enterprise market and ensure long-term retention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*myzOrzk4hGV3ZUhXYym-bw.png" /><figcaption>Source: Author</figcaption></figure><p>Hope you enjoyed reading and found it useful!</p><p>Thank You.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0aff0b2f118c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Cloud Knowledge Catalog: Power AI Agents To Execute Complex Tasks with Accuracy]]></title>
            <link>https://medium.com/google-cloud/google-cloud-knowledge-catalog-power-ai-agents-to-execute-complex-tasks-with-accuracy-ead1773eaf5e?source=rss-58bf96a2bd6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ead1773eaf5e</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Megha Saini]]></dc:creator>
            <pubDate>Sun, 31 May 2026 08:38:08 GMT</pubDate>
            <atom:updated>2026-09-22T10:44:15.094Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi! I’m the Tech Lead at Google Cloud, and in this blog I am going to share why Knowledge Catalog is crucial for your AI agents to solve deep, complex problems with accuracy. There is a definitive opportunity to solve not just for the business operational bottlenecks but also enhancing the end user experience by solving for latency, security, and accuracy.</p><p>In the cloud industry we have spent the last two decades solving the data <em>storage</em> and <em>compute</em> problems. Today, a new bottleneck has emerged: <strong>the semantic problem.</strong></p><p>As businesses deploy generative AI, autonomous agents, and automated decision-making engines, the core risk is no longer whether we can process petabytes of information. The risk is whether these decision engines understand what the data <em>means</em>, where it came from, and if it can be trusted.</p><p>If you feed an autonomous system raw schemas without context, you get fragile integrations, inaccurate automation, and systemic risk. This is why a simple index of tables is no longer sufficient. Modern architectural design requires a <a href="https://cloud.google.com/blog/products/data-analytics/introducing-the-google-cloud-knowledge-catalog?e=48754805"><strong>Knowledge Catalog</strong></a> , a system component that unifies technical metadata, operational intelligence, and business semantic models into an executable context graph.</p><h3>Why the Knowledge Catalog is Crucial for AI Agents</h3><p>When we build AI agents to execute complex tasks, search databases, or write code, we face a major challenge: <strong>Large Language Models (LLMs) do not inherently understand an enterprise’s specific business context.</strong></p><p>If you ask an AI agent to calculate “Q3 churn rate,” it cannot guess how your organization defines “churn,” which BigQuery table holds the most accurate data, or how columns link together. This is where the Knowledge Catalog becomes critical.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iw-MHZsuRmByb74yottUUg.png" /><figcaption>Google Cloud Knowledge Catalog (illustrative diagram)</figcaption></figure><h4>1. It Eliminates Guesswork and Hallucinations</h4><p>One of the most common reasons AI agents fail or hallucinate is that they guess SQL joins or column definitions. Knowledge Catalog provides <strong>verified SQL patterns, semantic guardrails, and central business glossaries</strong>. Instead of guessing the unwritten rules of a database, the agent references pre-validated logic, resulting in precise and deterministic data retrieval.</p><h4>2. Sub-Second Semantic Search and Tool Grounding</h4><p>AI agents don’t use data like humans do; they need real-time, high-precision retrieval. Knowledge Catalog integrates with the <strong>Model Context Protocol (MCP)</strong>, allowing AI agents to perform semantic searches and fetch highly relevant organizational context in milliseconds. The catalog acts as a “context layer” that feeds the exact right documentation or schema metadata into the agent’s prompt window.</p><h4>3. Proactive Impact Analysis</h4><p>Data structures change constantly. If a data engineer alters a column from a <em>String </em>to a <em>Boolean</em>, an AI agent utilizing that column might completely break. Because Knowledge Catalog actively tracks data lineage, developers or automated workflows can map <strong>downstream impacts</strong>. You can see exactly which AI features or Vertex AI models rely on a specific column before deploying a change, preventing agents from breaking in production.</p><h4>4. Unlocking “Dark Data” via Multimodal Extraction</h4><p>Enterprises have massive amounts of unstructured data — contracts, manuals, and reports — stored in places like Cloud Storage. Knowledge Catalog uses generative AI to parse these raw files, automatically extract entities, and map their relationships back into the central context graph. This transforms unorganized documents into searchable, context-rich knowledge that an AI agent can reliably use.</p><h4>5. Strict Security and Access Governance</h4><p>You cannot allow an AI agent to read sensitive data (like HR or financial records) unless it is explicitly authorized. Knowledge Catalog automatically enforces global, policy-based access permissions. When an AI agent queries the catalog, the search layer respects Identity and Access Management (IAM) permissions, ensuring the agent <em>only</em> retrieves and acts on data it has rights to see.</p><h3>The Three Core Pillars of Google Cloud Knowledge Catalog</h3><p>To serve as the brain of an enterprise decision system, a Knowledge Catalog operates across three foundational pillars:</p><ol><li><strong>Aggregation</strong>: Unifying context and resolving conflicting definitions</li><li><strong>Enrichment</strong>: Generating continuous meaning and mapping relationships</li><li><strong>Search</strong>: Empowering agents with high-precision retrieval</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MwOLhYLX0PzJ2dwIVmysmA.png" /><figcaption>An illustrative technical flow of Google Cloud Knowledge Catalog building blocks</figcaption></figure><h4>1. Data Aggregation Layer</h4><p>The aggregation layer automatically harvests technical metadata directly from your operational runtime environment. It continuously monitors structured databases, analytical warehouses, data streams, and unstructured object storage. Crucially, it records <strong>data lineage</strong> — the exact step-by-step physical path data takes as it moves across systems, ensuring historical provenance is built in from day one.</p><h4>2. Data Enrichment Layer</h4><p>Aggregation tells you a table exists; enrichment tells you what it <em>means</em>. This pillar uses machine learning to infer business intent by evaluating data shapes, schemas, and usage logs. It maps raw technical assets to a centralized business glossary, profiles data to generate live quality scores, and identifies deep data relationships. This turns raw bits into highly organized, discoverable <strong>Data Products</strong> — packaged, governed units of data that carry operational SLAs.</p><h4>3. Search &amp; Analyze</h4><p>This layer exposes business context to the end user. It provides natural-language semantic discovery, allowing both human teams and autonomous applications to locate assets without knowing specific database naming conventions. More importantly, it surfaces pre-verified semantic queries and implements open interoperability standards (such as the Model Context Protocol (MCP)). This allows automated systems to dynamically pull verified business logic and strict organizational guardrails at runtime.</p><h3>Real-World Architecture: Building an Autonomous Logistics Decision System</h3><p>To understand how these concepts operate in practice, let us examine a real-world system architecture: an <strong>Autonomous Supply Chain Optimization Engine</strong> for a global retail enterprise.</p><p>The objective of this system is to automatically re-route shipments, adjust vendor purchase orders, and modify regional pricing in real time based on incoming operational disruptions (e.g., severe weather patterns, factory shutdowns, port delays).</p><h4>The Architecture Without a Knowledge Catalog</h4><p>Without a centralized knowledge plane, the decision system must directly query multiple underlying platforms: a relational database for inventory, an object store filled with unstructured vendor contracts, and a streaming pipeline for live transport updates.</p><p>The decision engine must blindly trust that the column <em>qty_avail </em>in the European database means the exact same thing as <em>available_stock</em> in the North American database. If an upstream data engineer changes a schema or alters a pipeline definition, the decision engine breaks, or worse, processes an incorrect data point—leading to a multi-million-dollar supply chain mistake.</p><h4>The Architecture Guided by the Knowledge Catalog</h4><p>In a well-designed ecosystem, the Knowledge Catalog sits between the underlying data landscape and the autonomous decision engine.</p><p>When a port closure occurs, the Autonomous Decision Engine executes a clear three-step workflow through the Knowledge Catalog:</p><ol><li><strong>Context Resolution (Search &amp; Analyze):</strong> The engine asks the catalog for all data assets related to “Alternative West Coast Vendor Capacity.” It does not need to know table names. The catalog uses its semantic search layer to locate the relevant assets across both structured databases and unstructured vendor PDF contracts stored in object storage.</li><li><strong>Logic Execution (Data Enrichment):</strong> Instead of trying to dynamically write complex SQL queries to join these disparate datasets (which easily causes severe hallucinations or syntax errors), the engine pulls a pre-generated, verified query archetype directly from the catalog. This query contains embedded, corporate-approved logic for calculating net transport cost.</li><li><strong>Trust Verification (Data Aggregation):</strong> Before modifying an actual purchase order, the engine checks the catalog’s data quality and lineage ledger. It verifies that the inventory data was refreshed within the last 15 minutes and ensures that the data stream hasn’t suffered from an upstream transformation failure.</li></ol><p>By building the architecture this way, you decouple your decision-making applications from the underlying physical infrastructure.</p><h3>The Product Standpoint: Solve Your End User’s Problem</h3><p>To win trust with your end user and to drive genuine retention, a product must address concrete frustrations rather than hide behind abstract frameworks. Solve for their current operations that suffer from concrete, costly technical bottlenecks.</p><p><strong>Example Use Case 1: </strong>When an engineer modifies a column type in a CRM or billing system, downstream reporting dashboards and machine learning models break silently. Teams spend days manually tracing code to locate the failure point.</p><ul><li>Build your data product on top of the Knowledge Catalog’s <strong>Automated Data Lineage. </strong>The moment a schema changes upstream, the catalog maps the downstream impact. Your product alerts the admin: <em>“We detected a schema change in your source ERP. Your Financial Agent has automatically updated its internal query structure to prevent failure.”</em> This changes a catastrophic failure into a silent, automated patch.</li></ul><p><strong>Example Use Case 2: </strong>If your engineer gives an LLM a schema of 40 messy enterprise tables and say “calculate customer lifetime value,” it will guess the JOIN syntax. Invariably, it will guess wrong, double-count revenue, and lose user trust quickly.</p><ul><li>Leverage Knowledge Catalog’s<strong> Verified SQL Patterns and Semantic Guardrails (preview at the time of writing)</strong>. One leading cause of AI failure is hallucinated logic and guessed SQL joins. To prevent this, the catalog provides verified SQL patterns and pre-generated natural language questions. Instead of the agent guessing a join, it retrieves pre-vetted, “golden” query fragments directly from the catalog. The customer buys because they can trust the output enough to put it in front of their leaders.</li></ul><p><strong>Example Use Case 3: </strong>The critical business logic required to train a customer support agent isn’t in a neat database; it’s trapped in thousands of messy PDFs, legacy wikis, and vendor agreements.</p><ul><li>Use the catalog’s <strong>Multimodal Extraction and Object Context APIs </strong>(preview at the time of writing). The end-user points your product at a messy blob storage bucket. In minutes, the platform extracts those entities, connects them to the structured data schema, and builds a searchable business glossary automatically. The user gets an immediate, functional knowledge graph without hiring a team of data engineers to clean it up first.</li></ul><p>With Google Cloud Knowledge Catalog, you can convert these engineering roadblocks into automated software features.</p><p>And finally…</p><h4>Know What Your End User Actually Needs</h4><p>Every customer values <strong>Time to Value</strong> and <strong>Zero Security Liability</strong>.</p><ol><li><strong>They need data agent to work on day one</strong> without asking their data engineering team to spend six months building a vector pipeline, tagging data, or writing custom connectors.</li><li><strong>They need bulletproof security.</strong> They are terrified that an autonomous agent will accidentally read restricted payroll data or leak PII to the wrong employee.</li><li><strong>They need predictability.</strong> They need to know <em>why</em> an AI agent took a specific action or made a specific calculation.</li></ol><p>In a market crowded with vendors using standard vector search (RAG), data leaders can build deep product differentiation by treating the <a href="https://docs.cloud.google.com/dataplex/docs/ai-overview">Google Cloud Knowledge Catalog</a> as a highly optimized contextual engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*Tr0BxashXPC8tpG9kcB2ig.png" /></figure><p>Hope you find this article useful.</p><p>Thank You.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ead1773eaf5e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/google-cloud-knowledge-catalog-power-ai-agents-to-execute-complex-tasks-with-accuracy-ead1773eaf5e">Google Cloud Knowledge Catalog: Power AI Agents To Execute Complex Tasks with Accuracy</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unified Data Platform: Merck’s Transformation Journey from AI to Impact]]></title>
            <link>https://medium.com/@meghasaini/unified-data-platform-mercks-transformation-journey-from-ai-to-impact-5843ccc7d45f?source=rss-58bf96a2bd6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5843ccc7d45f</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Megha Saini]]></dc:creator>
            <pubDate>Sun, 24 May 2026 07:52:17 GMT</pubDate>
            <atom:updated>2026-06-02T17:34:40.470Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi! I’m the Tech Lead at Google Cloud and this blog is not about sharing just another customer story or anecdote, it is about key topic of building a Unified Data Layer and driving AI transformation that many customers in the industry are asking about.</p><p>If you have hit on the ultimate truth of enterprise automation and recognize that <strong>you cannot code your way out of a broken process, </strong>then this blog is for you<strong>.</strong> Building a brilliant, intelligent AI tool on top of fragmented, ungoverned data just gives you an expensive machine that generates bad insights faster.</p><p>If you have worked on data, you know that there is a difference between a useful answer and a confident hallucination. Recognizing this early is a massive win for you as a data leader. It shifts your value from “the engineer who built the AI app” to “the strategic partner who is fixing the organization’s operations engine.”</p><p>Your next step shouldn’t be <em>either</em> fixing the data silos <em>or</em> just focusing on building the app. It should be a blended approach.</p><p>Merck is approaching the shift to Agentic AI and why, Dave Williams, their Chief Information and Digital office, said “<em>the technology is actually the least interesting part of the story</em>”.</p><blockquote>According to him, there are three barriers to AI adoption:</blockquote><blockquote><strong>1. Enterprise data and process is not exactly agentic ready.</strong> People don’t appreciate that. It’s still in silos.</blockquote><blockquote><strong>2. Human capacity to embrace change</strong>. It’s really overwhelming for people to transform how they run their function in doing their daily job.</blockquote><blockquote><strong>3. Companies chase tools</strong>. They look for the shiny toy that’s going to solve all their problems.</blockquote><p>Merck’s focus is not just building their technology stack, it’s about co-investing with Google Cloud to solve data, process, and people upskilling challenges. It’s about building an operating model &amp; culture that allows Merck to adopt AI faster than ever.</p><p>Merck exemplifies how a traditional, highly regulated enterprise is successfully transitioning from standard “systems of intelligence” to autonomous “<strong><em>systems of action</em></strong>” by prioritizing its data foundation besides just focusing on model capability.</p><p>As Merck’s team mentions in their blog, ”<a href="https://www.merck.com/stories/5-ways-were-transforming-artificial-intelligence-into-impact/">It all starts with Data</a>”.</p><p>In Williams’ words:</p><blockquote>“Focus on the foundation. Without the data, none of this works, reimagining your processes is essential. Focus on the human side, change management. And focus on your lighthouses.”</blockquote><p>The biopharmaceutical giant <strong>Merck</strong> <a href="https://www.merck.com/news/merck-and-google-cloud-partner-to-accelerate-agentic-ai-enterprise-transformation/">announced</a> a landmark, multi-year <strong>$1 billion enterprise AI and data transformation partnership with Google Cloud</strong>.</p><p>Merck’s architecture illustrates how a traditional enterprise builds a <strong>unified data platform</strong> specifically designed to ground and power multi-step, autonomous AI agents. What’s differentiating about Merck’s problem statement is their approach in solving for it.</p><ol><li><strong>A Unified Data Analytics Platform Tailored for Operational Excellence and R&amp;D Acceleration- </strong>Merck recognizes that “Data powers AI”. They leverage Google Cloud’s data ecosystem specifically to solve the “data silo” problem that historically plagues the pharmaceutical industry (e.g., separating chemical synthesis data from clinical trials and manufacturing telemetry).</li><li><strong>Security and Compliance in a Highly Regulated Industry (HIPAA &amp; IP Protection)- </strong>For a biopharmaceutical giant handling sensitive patient health information and multi-billion-dollar molecular intellectual property is key. They partner with Google Cloud to provide the necessary data security &amp; compliance without restricting innovation.</li><li><strong>Embracing a Multi-Cloud Ecosystem with Google Cloud as the Strategic Core- </strong>Merck embraces an open, multi-cloud ecosystem. They did not abandon their existing technology stack; rather, they use a highly strategic, layered approach. Over the top of this distributed multi-cloud environment, Merck layers Google Cloud’s <strong>Gemini Enterprise Agent Platform</strong>, <strong>Vertex AI Agent Builder</strong>, and <strong>Dataplex</strong></li><li><strong>A Step-Wise, Transformational Process Over “Shiny Object” Hype- </strong>Merck avoids getting stuck in an endless loop of isolated “Proof of Concepts” (PoCs). Merck ensures that workflow engineering happens <em>before</em> any code is deployed. They map how information moves and isolate the exact structural bottlenecks where an autonomous agent can drive real value. Their focus on AI fluency is not about cost-cutting workforce reduction, but an elevation of employee capability. They are investing heavily in upskilling manual task executors into agent supervisors and compliance validators.</li></ol><h3><strong>Building a Global “Agentic Ecosystem”</strong></h3><p>Merck’s transformation bypasses basic conversational chatbots in favor of an <strong>intelligent agentic ecosystem</strong> deployed across its global workforce of 75,000 employees. Instead of building fragmented siloed solutions, the enterprise strategy targets multiple real-world operational scenarios across the entire biopharmaceutical value chain:</p><ul><li><strong>Commercial Realignment:</strong> Reimagining engagement with Healthcare Professionals (HCPs) and medical networks by using agents to instantly generate hyper-personalized, compliant scientific communication and market dossiers.</li><li><strong>R&amp;D Accelerators:</strong> Deploying multi-agent reasoning to evaluate complex biological datasets, streamline end-to-end drug discovery pipelines, and cut late-stage drug time-to-market by a projected 15% to 20%.</li><li><strong>Regulatory &amp; Corporate Automation:</strong> Automating heavily constrained tasks like compiling thousands of pages of unstructured data for clinical trial dossiers and regulatory submissions.</li></ul><h3>The Architectural Shift: Unified Data Platform as an Enabler for Agents</h3><p>Historically, large pharmaceutical companies have struggled with highly fragmented, domain-specific data silos. Chemical synthesis data lived apart from clinical trial documentation, which was isolated from manufacturing telemetry.</p><p>To safely deploy <strong>Agentic AI</strong>, and build systems that don’t just summarize text but plan, reason, and execute multi-step tasks independently, Merck realized that <strong>model capability is only half the battle; the real constraint is enterprise data control and unification.</strong></p><p>Merck stated in their <a href="https://www.merck.com/stories/5-ways-were-transforming-artificial-intelligence-into-impact/">blog,</a> “Data powers AI”. They have a vast repository of proprietary and secure data, but for it to be usable, it must first be structured and organized.</p><p>Their main focus is to create a frictionless data flow so AI can reliably and accurately drive faster, more targeted and personalized outcomes. For an agentic ecosystem to act autonomously, it must be grounded in an immutable, compliant data tier. If the data foundations are fragmented, the agents fail. Merck’s architecture treats data governance not as a restriction, but as a critical technical enabler.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_fvNx4ur6Hge51t3KP9fjw.png" /><figcaption>Merck’s Journey to Build an AI-ready Unified Data Platform</figcaption></figure><h3>From AI Vision To Impact</h3><p>To move beyond the high-level AI vision, Merck had to structurally bridge the gap between raw data and agentic autonomy. Their implementation is highly strategic, operating a <strong>layered, multi-cloud data fabric</strong> that uses specific operational milestones to justify their <strong>$1 billion Google Cloud / Gemini Enterprise</strong> rollout.</p><p><strong>Real-world Impact:</strong> A key target of Merck’s multi-year Vertex AI and Agentic roll out is to trim safety stock by 30%. By shifting from “system of intelligence” (standard dashboards) to a “system of action” (agents runing real-time supply look checks), they free up massive amounts of working capital that can be directly reallocated to drug discovery pipelines.</p><h3>The Technical Layering</h3><ul><li><strong>The Foundation (The Digital Backbone):</strong> Using <strong>BigQuery</strong> and <strong>BigLake</strong>, Merck unifies highly structured operational data, multi-cloud tables, and massive volumes of unstructured scientific and medical data into a singular, semantic fabric.</li><li><strong>Enterprise Control &amp; Compliance:</strong> Because pharma data handles sensitive patient health information and multi-billion dollar molecular intellectual property, the platform heavily utilizes <strong>Dataplex</strong> (now called <a href="https://docs.cloud.google.com/dataplex/docs/introduction">Knowledge Catalog</a>) and isolated governance catalogs. Merck retains 100% data ownership; all agent applications process information inside strict boundaries ensuring data is never leaked or used to train public foundational models.</li><li><strong>Orchestration &amp; Reasoning:</strong> The foundational logic runs on Google Cloud’s <strong>Gemini Enterprise Agent Platform</strong> and <strong>Vertex AI Agent Builder</strong>. These frameworks allow developers to deploy multi-turn autonomous workflows capable of <em>Reasoning, Planning, and Tool-Calling</em> against the corporate data lake.</li></ul><h3>The Agentic Architecture</h3><p><strong>Example Use Case</strong>: Supply Chain Optimization &amp; Manufacturing Predictive Maintenance</p><p><strong>The Bottleneck: </strong>In pharmaceutical manufacturing, tying up excess capital in “safety stock” (holding onto surplus inventory due to volatile demand signals or unexpected machine downtime) costs hundreds of millions of dollars. An extra percentage point of unoptimized inventory can freeze between <strong>$200 million and $300 million</strong> in working capital.</p><p><strong>Here is an example 5-layer GCP technical stack to solve this supply chain and predictive maintenance bottleneck (for illustrative purpose only):</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5X8Q6zFUidOZToSffw2xxg.png" /><figcaption>Reference Architecture: For Illustrative Purposes Only (Not an Active Customer Deployment)</figcaption></figure><p>The 5-layer GCP Agentic stack:</p><h4><strong>1. Unified Pharma Data Layer (The Sources)</strong></h4><p>To address machine downtime and inventory freezes, we first ingest siloed data. In this specific use case, two primary sources from this layer are activated:</p><ul><li><strong>Manufacturing Telemetry:</strong> Real-time data from factory floors, supply chain logs, IoT sensor data (vibration, temperature, pressure) from manufacturing plant machinery</li><li><strong>Real-World Evidence (RWD/E) &amp; Clinical Documentation:</strong> While typically for R&amp;D, in a supply chain context, clinical trial timelines and broader health market demand signals dictate <em>how much</em> drug inventory actually needs to be manufactured.</li></ul><h4><strong>2. Google Data Cloud (The Unified Data Platform)</strong></h4><p>This layer acts as the “digital backbone,” ingesting, storing, governing, and preparing raw pharma data for AI consumption.</p><ul><li><strong>Cloud Storage (Raw Data Staging):</strong> The continuous stream of high-velocity manufacturing telemetry and unstructured logistics documents are initially landed here as raw object storage.</li><li><strong>BigQuery / BigLake (Unified Analytics Engine):</strong> This is where the magic happens for predicting safety stock levels. BigQuery processes historical maintenance logs alongside real-time telemetry to build predictive maintenance models, calculating exactly when a machine will fail and how that failure impacts inventory buffers.</li><li><strong>AlloyDB for PostgreSQL (Operational Vector Memory):</strong> This operational database stores highly contextual data (e.g., equipment manuals, maintenance histories, standard operating procedures) as vector embeddings. If an AI agent needs to know <em>how</em> to fix a failing machine to minimize downtime, it pulls from this memory.</li><li><strong>Knowledge Catalog:</strong> Ensures strict data governance, making sure that sensitive manufacturing formulas or proprietary trial data comply with regulatory standards during the analysis.</li></ul><h4><strong>3. Secure Agent Ingress (The Perimeter Guard)</strong></h4><p>Before any request or workflow touches the intelligent orchestration core, it must pass through a dedicated security barrier:</p><ul><li><strong>Cloud Armor</strong> enforces security policies and protects the entry point against DDoS attacks.</li><li>Route clean, authorized traffic directly through a <strong>Cloud Load Balancer</strong> to manage demand and ensure high availability.</li></ul><h4><strong>4. Intelligent Agentic Orchestration Layer (Gemini Enterprise Agent Development Platform)</strong></h4><p>Instead of just showing static dashboards, this layer <em>acts</em> on the data.</p><ul><li><strong>Vertex AI Agent Builder:</strong> This platform hosts custom AI agents tailored to supply chain logistics and plant operations.</li><li><strong>Multi-Turn Reasoning &amp; Autonomous Task Execution:</strong> If BigQuery flags an imminent machine failure that would typically trigger an over-ordering of safety stock, the AI doesn’t just send an alert. It reasons through the problem: <em>“Machine X will fail in 4 days. If it does, production drops by 15%. However, current regional warehouse stock can cover the deficit without ordering emergency surplus raw materials.”</em></li></ul><h4><strong>5. Cross-Functional Agent Workforces (The Business Impact)</strong></h4><p>This is where the $200M to $300M in frozen working capital is unlocked. The orchestration layer passes specific, actionable instructions to dedicated workforces, primarily:</p><ul><li><strong>Predictive Manufacturing Agent Workforce:</strong> This workforce receives the multi-turn reasoning output. It automatically schedules preventive maintenance for the at-risk machinery during a <em>planned</em> low-demand window, orders the necessary replacement part, and dynamically adjusts the safety stock threshold downward because the risk of “unexpected” downtime has been mitigated.</li></ul><p>By connecting <strong>Manufacturing Telemetry</strong> directly to <strong>Vertex AI Agents</strong> via <strong>BigQuery</strong>, the architecture transitions your supply chain from a <em>reactive</em> model (holding millions in safety stock “just in case”) to a <em>predictive</em> model. The AI agent seamlessly balances asset health with inventory capital, ensuring you only hold the exact amount of stock required.</p><h3>The Enterprise Change Transformation: Data, People, and Avoiding “Shiny Tools”</h3><p><strong>How did Merck drive the AI transformation effort? </strong>The most instructive component of Merck’s strategy is that its leadership explicitly focuses on <strong>people and processes</strong>, resisting the common trap of chasing technology for technology’s sake. A $1 billion technology stack is irrelevant if the organization suffers from low AI fluency or operational friction.</p><p>The step-wise change management framework follows a strict, non-negotiable playbook:</p><h4>A. Transitioning from “Systems of Intelligence” to “Systems of Action”</h4><p>Most companies use data simply to look backward or build static dashboards (Systems of Intelligence). Merck’s approach uses its process and data foundation to shift toward autonomous <strong>Systems of Action</strong> via an agentic ecosystem across its 75,000 employees.</p><h4>B. Process Mining Before Agent Deployment</h4><p>Merck’s operational philosophy ensures that workflow engineering happens <em>before</em> code is deployed. Merck systematically tracks how data and information move through its global shared services and corporate functions. Rather than deploying generalized AI chatbots everywhere, process mapping allows them to pinpoint precise operational friction points (such as heavy manual data transfer or inventory backlogs). AI agents are only deployed where they can drive mathematically verifiable business value.</p><h4>C. Building “AI Fluency” Over Layoffs</h4><p>While the implementation aligns with broader corporate productivity goals, the transformation’s explicit intent is not workforce reduction, but a fundamental elevation of employee capability. Merck is investing heavily in internal training to build global <strong>AI Fluency</strong>. Employees are actively upskilled to transition from manual task executors (e.g., spending 180 hours copy-pasting data for regulatory reports) into agent supervisors and compliance validators.</p><blockquote>The first time someone introduced AI to a radiologist, they assumed it meant replacement. What they discovered is it doesn’t replace them. It just lets them get through more scans faster — higher productivity, able to treat more patients.</blockquote><p>By layering Google Cloud’s reasoning and orchestration tools (Gemini Enterprise and Vertex AI) cleanly over their carefully mapped processes and existing multi-cloud architecture, Merck has created a highly practical, step-wise blueprint for moving AI out of the sandbox and into scaled global execution.</p><h3>Summary Principles for Enterprise Architects</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JTCIw0qquh9hFklwe0hObQ.png" /><figcaption>Leading your AI Transformation Journey</figcaption></figure><p>Hope you enjoyed reading and found it useful.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5843ccc7d45f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ontological Operating Leverage]]></title>
            <link>https://medium.com/@meghasaini/the-ontological-operating-leverage-2787a0831d02?source=rss-58bf96a2bd6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2787a0831d02</guid>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <dc:creator><![CDATA[Megha Saini]]></dc:creator>
            <pubDate>Fri, 22 May 2026 17:05:14 GMT</pubDate>
            <atom:updated>2026-05-22T17:05:14.949Z</atom:updated>
            <content:encoded><![CDATA[<h3>Achieving Infinite AI Scale without Infinite Data Engineering using Google Cloud</h3><p>Here’s the operational reality that every CTO and Data Product Manager recognizes: the gap between raw data and a human decision.</p><p>— — — — — — — — — — — — —</p><p>Storyline: “The Friday Afternoon Fire”</p><p>The Scene: It’s 4:15 PM on a Friday. Sarah, a Senior Risk Operations Manager at a fast-growing fintech company, gets an automated high-severity alert: Account #88419 just triggered a velocity flag for making three rapid $10,000 international wire transfers.</p><p>The Traditional Way (The Friction):</p><p>To figure out if this is actual fraud or just a VIP client moving money, Sarah begins a frantic, multi-tab detective hunt.</p><ul><li>She opens Tab 1 to look up the account owner.</li><li>She opens Tab 2 to search the corporate registry for their parent company.</li><li>She opens Tab 3 to copy-paste the account’s physical billing address into a legacy database, trying to see if it links to any previously banned entities.</li><li>She opens Tab 4 to check if the associated email address was used in a chargeback dispute last month.</li></ul><p>Sarah is manually executing SQL JOINs in her head under intense time pressure. It takes her 45 minutes of stressful clicking across mismatched UIs to finally realize that Account #88419 shares a phone number and a hidden beneficial owner with a known fraud ring banned two weeks ago. By the time she hits “Freeze,” the money is gone.</p><p>The Ontological Shift (Scaling Mechanics):</p><p>Now, imagine Sarah’s company replacing their rigid database setup with a data product built using ontology (<a href="https://docs.cloud.google.com/bigquery/docs/graph-overview">BigQuery Graph</a>).</p><p>When the alert fires, Sarah opens a single page. Because the software inherently understands how people, addresses, and transaction histories are interconnected, it doesn’t just show her a transaction log. It displays a visual, 3-degree map showing a direct, bright-red link between the new account and the banned fraud ring via a shared device ID.</p><p>Beside the map, a Vertex AI sidebar reads: “<em>Freeze recommended. This account is structurally linked to Fraud Ring X</em>.” Sarah clicks one button. Total time elapsed: 12 seconds.</p><p>— — — — — — — — — — — — -</p><h3>The Problem</h3><p>Talk to any B2B SaaS user and you’ll find they spend roughly 70% of their workday on translating business context so it maps accurately on the SaaS front end UI. They are actively bridging the gap between how the software stores data and how their actual business operates.</p><p>While the software sees a series of disconnected rows in separate Customers, Transactions, and Addresses tables, the business user wants to quickly see a coordinated fraud ring, an at-risk enterprise account, or a failing supply chain. Every time they have to open five tabs, run three nested filters, or export data to a spreadsheet just to connect those dots.. your data product is failing them.</p><p>Data product leaders often try to solve this by throwing nicer UIs at the front end or slapping generic LLM wrappers on the back end that will eventually hallucinate over raw text.</p><p>If you want to build a data product that customers actually buy and stay with, you have to build a system that incorporates ontology — a system that encodes the real-world relationships of your industry directly into your data foundation. <a href="https://docs.cloud.google.com/bigquery/docs/graph-overview">BigQuery Graph</a> allows you to ship this differentiation at scale before your next business catastrophe beat you to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*EZ9H4fMAi8K2OmEvmAQlDg.png" /><figcaption>Power of Graph Foundations in Building Impactful Data Products</figcaption></figure><h3>The Ontological Shift: What your Customer Wants to Pay For</h3><p>Look past the ivory-tower definitions, an ontology is just a structured map of how things in a specific domain relate to one another.</p><p>To a data product builder, ontology is a “business translation” layer. Customers don’t pay money for “nodes and edges”; they care when your software stops asking them to map their real-world problems to your software’s rigid database tables. In other words, the software finally understands the user’s world and takes (or recommends) an action to drive desired outcomes.</p><blockquote><em>If you want to know what customers actually need, look at </em>what they do outside your software.</blockquote><p>The core customer frustration can be captured by the sentiment — “<em>The software doesn’t know what I’m trying to accomplish. It just knows what button I’m clicking.</em>”</p><p>Here is the raw truth about what customers need and the features that they actually want to pay for. Consider three specific user personas:</p><h3>Persona: Business User</h3><ul><li>Traditional Way: The user wants to find “High-risk accounts in Europe.” They manually set up three nested filters: Country = France OR Germany AND Health Score &lt; 60 AND Open Support Tickets &gt; 3.</li><li>What They Want: A single natural language or omni-search bar where they type “Show me vulnerable European clients.”</li><li>Why Ontology works: Ontology maps “vulnerable” to the relationship between health scores and open tickets, and knows which countries constitute “Europe” in their specific business context. It eliminates the cognitive load of building queries.</li></ul><h3>Persona: Data Engineer</h3><ul><li>Traditional Way: The data engineer changes a line of code, a marketing campaign budget, or a product SKU. To know what else that change breaks, they have to open five different tabs or message three colleagues.</li><li>What They Want: A “<em>What Breaks If I Touch This?</em>” sidebar panel. The moment they click on an object (e.g., a specific database server, a product line, a vendor contract), the system instantly lists the downstream dependencies.</li><li>Why Ontology works: It solves a deep psychological pain point: fear. It stops the data engineer from making catastrophic mistakes because the ontology inherently maps dependencies (e.g., Component A is used in Product B, which is owned by Client C).</li></ul><h3>Persona: On-call Engineer or System Engineer</h3><ul><li>Traditional Way: A system alerts a user: “Server 4 is down”. The on-call engineer has to pivot to a playbook to figure out what to do next.</li><li>What They Want: The system doesn’t just alert; it generates a tailored remediation checklist based on the type of entity affected. If Server 4 hosts the checkout page, it surfaces the on-call engineer for the checkout team. If it hosts internal staging, it suggests a low-priority reboot.</li><li>Why Ontology works: It replaces static dashboards with active problem-solving.</li></ul><h3>Create A Real Moat</h3><p>Don’t just build a nice UI, or put an LLM API onto your traditional database. Instead find complex, hidden relationships between data points that would be challenging to find using SQL. This is your leverage point. An LLM combined with a graph database is a moat. The ontology serves as the “ground truth” or the guardrails for the AI.</p><p>Don’t get bogged down into a three-year data engineering project. Leverage the benefits of <a href="https://docs.cloud.google.com/bigquery/docs/graph-overview">BigQuery Graph</a> and <a href="https://cloud.google.com/products/spanner/graph?e=48754805">Spanner Graph</a> to deliver the “unfair” advantage.</p><blockquote><em>Business users stick when your data product becomes their operating memory. When a user realizes that your data product understands the ripple effects of their business decisions better than their own team does, your data product ceases to be just another software tool. It becomes a piece of infrastructure they cannot afford to live without.</em></blockquote><p>You achieve that not by pitching the framework of an ontology, but by delivering the exact features, like a button that tells them exactly what will break before they commit a change, that protects them every single day.</p><h3>Let’s Do It</h3><p>Let’s ground this in a brutal, high-stakes fintech reality. In retail fintech and e-commerce, bad actors mask fraud networks by scattering a single phone number, address, or email across 50 different customer accounts, placing orders that look entirely disconnected to standard SQL databases. Traditional relational databases can struggle to query these complex, multi-hop relationships efficiently. Leverage BigQuery Graph to analyze these relationships at scale.</p><p>Here is the <a href="https://codelabs.developers.google.com/codelabs/fraud-bigquery-graph?authuser=1#0">CodeLab</a> to walk you through this step by step for Fraud Detection use cases.</p><h3>Why This Implementation Approach Moves Faster</h3><ol><li>Zero Data Movement: Traditional graph architectures require exporting raw text logs out of a data warehouse into a separate graph store (like Neo4j or Amazon Neptune). With BigQuery Graph, your ontology operates directly inside the warehouse. There is no ETL lag, data duplication, or additional infrastructure cost.</li><li>Unified Data Layer: Break down the silos between transactional data and analytical data. BigQuery Graph and Spanner Graph share the same graph schema and query language. You can execute operational graph workloads in Spanner and run complex graph analytics in BigQuery without needing to remodel your data or translate your queries.</li><li>Deep Reasoning Engine: Because your Vertex AI prompts are anchored in a deterministic ontology, along with rich vector and full-text search capabilities integrated with graph, users can use semantic meaning and keywords in graph analysis. Your data engine never invents relationships that don’t exist.</li><li>Sub-second Graph Traversal: Mapping a 5-degree relationship chain using standard SQL joins across multiple tables, the system will timeout or lag heavily. Your ontological architecture traverses those 5 degrees natively in milliseconds, allowing users to take actions in real-time for critical business use cases.</li></ol><h3>Productize Your Data Engine to Create Value</h3><p>Understand user journey to identify and solve primary pain point and then highlight the differentiation.</p><p>Step 1: Don’t map the ocean, map the “Pivot Points”. Identify the one concept in your user’s workflow where they constantly have to open multiple tabs to connect the dots. Example, if you’re building a HR tool, it’s the link between <em>Skills</em>, <em>Projects</em>, and <em>Employee Burnout</em>.</p><p>Step 2: Build zero-effort data ingestion. The biggest mistake SaaS vendors make is forcing the customer to build the ontology for them. Customers will not sit down and fill out form after form to map their data relationships. Build features that infer relationships implicitly based on user behavior.</p><p>Step 3: Deliver the “Unfair Advantage” Report. To keep customers from churning, you must show them insights they literally cannot get anywhere else. Example: <em>“We noticed that whenever Vendor X delays a shipment of Component Y, your Customer Satisfaction scores in Region Z drop 14 days later.”</em></p><p>And finally…..</p><h3>Secure Executive Sponsorship &amp; Buy-in</h3><p>The Ontological Operating Leverage means that a small, one-time investment in mapping your business logic (the ontology) yields a compounding, massive increase in output every time you build a new application, launch a new AI agent, or onboard a new department.</p><blockquote><em>Without an ontology, your tech stack scales linearly:</em></blockquote><p>5 Data Sources X 5 New AI Agents = 25 complex custom integrations to build and maintain.</p><blockquote><em>With an ontology, your tech stack scales exponentially:</em></blockquote><p>5 Data Sources mapped to 1 Ontology -&gt; Scaled infinitely to 100+ AI Agents or Apps with zero new data engineering.</p><p>Ontology that is integrated within the unified agentic stack turns a 4-hour manual investigation into a 10-second definitive decision, saving millions in implementing critical use cases.</p><p>The <a href="https://cloud.google.com/data-cloud?e=48754805">Agentic Data Cloud</a> on GCP gives you operating leverage at the Infrastructure and AI Scale Layer. Because Google embeds the ontology directly inside BigQuery (via Cortex and LookML), you get leverage by letting thousands of independent AI agents query a single, trusted “source of truth” without duplicating data or processing power.</p><p>Turn data into a universal dictionary. Once the dictionary is written, every AI model, database query, and dashboard speaks the exact same business language inherently, eliminating data chaos at massive scale.</p><p>Views are my own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QqdAsetc0YNR6u3MhJx1WA.png" /><figcaption>The Ontological Advantage on Google Cloud</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2787a0831d02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Our Evolutionary Journey of Building the LLM-powered Data Agent]]></title>
            <link>https://medium.com/@meghasaini/our-evolutionary-journey-of-building-the-llm-powered-data-agent-e6109b943923?source=rss-58bf96a2bd6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6109b943923</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Megha Saini]]></dc:creator>
            <pubDate>Fri, 11 Oct 2024 14:56:02 GMT</pubDate>
            <atom:updated>2024-10-11T14:56:02.519Z</atom:updated>
            <content:encoded><![CDATA[<p>Empowering Business Leaders with AI-Driven Data Insights</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F97sWgxdLwXvmbZ-0kCNRg.jpeg" /><figcaption>Image generated by Imagen3. It depicts a network of interconnected data points expanding outwards, representing the concept of scalability and the management of large, diverse datasets.</figcaption></figure><p>Reflecting on my six-year journey with <a href="https://www.linkedin.com/company/amazon-web-services/">Amazon Web Services (AWS)</a>, spanning various roles, teams, and business functions, I’ve observed that business leaders constantly seek precise, accurate, and all-encompassing data summaries to enable rapid decision-making, from business reviews to talent evaluations. Working backwards from this audience shaped our mission, i.e. we aimed not only to deliver data through filters and reports but also to: 1/build insights that drive strategic decision-making for business impact, 2/craft tools that integrate diverse data sources and scale organization-wide, and 3/design user experiences that expedite path to insights, all while holding importance of data integrity to earn trust.</p><p>In my recent chapter at AWS, my team and I embarked on creating an internal data intelligence platform to <a href="https://aws.amazon.com/blogs/business-intelligence/empowering-amazons-solution-architects-with-intuitive-and-performant-business-intelligence/">Empower Solution Architect teams with intuitive and performant business intelligence</a>. To keep the momentum on innovation, we built an automated Data Summarization Tool by leveraging the analytical pipeline of the data intelligence platform and explored the path to build LLM-powered Data Agent for deeper analysis. Herein, I share our journey, learnings, and key considerations in building this tool. It is a journey that has been a testament to both our achievements and the challenges we’ve embraced along the way.</p><h4>The Genesis</h4><p>Our journey began with an ambitious goal: to construct a Data &amp; Insights Summarization Tool for encapsulating key business insights into the automated, customized narrative summaries for business leaders. We had initial success such that the <a href="https://www.linkedin.com/posts/msaini_oneteam-oneteam-articificalintelligence-activity-7130585271175180288-KByP?utm_source=share&amp;utm_medium=member_desktop">Data Summarization Tool slashed the manual summary creation time from 1 hour to 30 seconds</a>. Leveraging relational databases (Amazon Redshift), we developed an initial framework that utilized a Retrieval Augmented Generation (RAG) pipeline (Amazon SageMaker, Amazon Bedrock, Claude v2). This mechanism was designed to meticulously extract relevant data and build summaries using prompt engineering principles and templates. Business leaders had access to top-level summaries, in custom desired format, that answered their most pressing questions. It was a promising start, but it was just the beginning.</p><h4>Identifying the Void</h4><p>As we delved deeper into building data summaries to solve more complex business questions, it became apparent that our ambitions extended beyond the capabilities of our initial creation. We envisioned a tool that was not just a repository of answers but a dynamic interface that could:</p><ul><li>Seamlessly integrate both structured and unstructured data sources for more holistic impact summaries.</li><li>Deconstruct complex business inquiries into simpler, more manageable sub-questions.</li><li>Evolve by incorporating historical data, thereby enriching the context and relevance of its outputs.</li><li>Facilitate an interactive dialogue between the user and the system, allowing for real-time Q&amp;A driven summaries.</li></ul><p>It was clear that what we needed was not just an enhancement of our existing tool but a revolutionary leap forward. We wanted to build LLM-powered data application that could handle nuanced data analysis tasks and generate business summaries on-the-go.</p><h4>The Evolution</h4><p>We embarked on the development of a Large Language Model (LLM)-powered Data Agent. It would extract information from a wide range of data sources, help with assistive reasoning tasks, maintain history, and plan multi-query steps. In addition, we also needed a business semantic layer that not only managed heterogeneous data integration in the data lake, but also the metadata that provided meaning and semantics to the data in the lake. This is to make data access more expressive and interoperable when queried by different users through API or web UI.</p><h4>Anatomy of the Data Agent</h4><p>At its core, the LLM-powered Data Agent is a complex ecosystem consisting of:</p><ol><li><strong>Agent Core:</strong> The directive center that outlines the overarching objectives and operational guidelines for the Agent. An example prompt will look like, “You are a Data Agent capable of using a variety of Tools to answer a data analytics business question.”</li><li><strong>Tools: </strong>A curated selection of different tools, including relational databases and vector stores, each chosen for their specific utility in the data retrieval and analysis process based on the question asked by the user. It could also be a simple API service to access dataset from another internal tool. An example could be defining a Tool that leverages RAG pipeline to run queries on transactional data stored in the data warehouse, and another Tool to access unstructured data like workshops or customer field trip details to collate business impact of an activity.</li><li><strong>Planning Module:</strong> Facilitates the question decomposition into the sub-parts and orchestrates the assignment of these components to the appropriate Tools for resolution. An example question to ask this Data Agent could be, “What are the different types of activities done in Q1 for a customer X?” Fundamentally it can be broken down into 3 sub-questions, like: 1. What are the total 1:1 customer activities done for Customer X in Q1?2. What are the total number of field trips done for Customer X in Q1 ?3. What are the total number of thought leadership activities done for Customer X in Q1?Planning module will prompt LLM to break down the question into less complex parts. Each sub-question is assigned to a respective Tool as listed in example above. If a complex question inquires disparate internal systems of records, those will be directed to the API-based services defined under Tools.</li><li><strong>Memory:</strong> This module is equipped with both short-term capabilities for immediate “chain of thought” processing, and long-term retention for sustaining relevant dialogues with users to allow real-time Q&amp;A driven summaries. The short-term memory keeps track of all the sub-questions and answers for a given complex query. We implemented chains in LangChain to implement this chain of actions. The long-term memory could be used for self-learning mechanism by the Agent and refining the answers in future interactions based on the historical questions asked by the user.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*zF9l6Avqv851WF2ZA_VTFQ.png" /><figcaption>Image by Author.</figcaption></figure><h4>Key considerations and Path Forward</h4><p>Below are some of the key considerations while building the LLM agent application. These are some necessary additional development phases for crucial elements:</p><ul><li><strong>Build for Scale</strong>- In real-world, we have 1000s of tables and thousands of records of the unstructured data within an organization. It is important to identify right set of Tools for the Agent to select from. Right Tool for the Right job/query is critical to provide accurate data &amp; insights.</li><li><strong>Semantic Data Management-</strong> Extend capabilities of the traditional data lake through semantic layer that enriches and connects the stored data. The semantic modeling approaches for enriching metadata in data lakes makes the data access more expressive and interoperable.</li><li><strong>Data integrity is key- </strong>A robust feedback loop serving as a self-correcting mechanism for enhancing query accuracy; the development of a “chain of thought” methodology for the effective execution of sub-queries; and an adaptive learning model for the LLM, enabling continuous improvement and refinement, will be key to build data integrity at scale.</li><li><strong>Extensive Toolkit-</strong> Recognizing the limitations and potentials of our toolkit, particularly in the context of detailed analyses and queries is necessary for generating summaries across large amounts of heterogeneous data for modern data analytics.</li></ul><p>This post is based on our experimental learning and concepts we applied while building the LLM agent application for generating data &amp; insights summaries. I highly recommend considering additional factors for building a production-ready Data Agent and selecting the best framework for your application.</p><p>Going forward, I plan to continue this path of innovation and discovery with a commitment to empower business decision-makers with the AI-based data &amp; insights tools. This journey is far from over, but every step brings me closer to realizing my vision of a world where data is not just accessible but truly understandable. I look forward to craft “user experiences” that expedite the speed to insights, rather than just another series of dashboards and reports for our end-users.</p><p>Onwards, and upwards! 📈</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6109b943923" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlock AI accuracy using LookML Semantic Layer]]></title>
            <link>https://medium.com/@meghasaini/unlock-ai-accuracy-using-lookml-semantic-layer-1e9c704c79ca?source=rss-58bf96a2bd6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e9c704c79ca</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Megha Saini]]></dc:creator>
            <pubDate>Wed, 09 Oct 2024 06:53:47 GMT</pubDate>
            <atom:updated>2024-10-09T19:14:24.206Z</atom:updated>
            <content:encoded><![CDATA[<p>Enhance your level of trust in model-generated insights by building a Business Semantic Layer using LookML</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XNrAnKQNDpAnhrti96SSSQ.png" /><figcaption>Graphic illustrating a Data Agent converting Natural Language to SQL queries for answering business questions. Image created by author using ChatGPT-4o</figcaption></figure><p>As a Full-Stack Product Lead, I have experienced the need for a Semantic Layer for building smarter LLM-powered data agents. This article is about leveraging LookML as a Semantic Layer to bridge the gap between business language and the technical understanding of Large Language Models (LLMs) in Data Agent applications. Readers will find this article useful if they are building a data agent that can translate natural language questions into SQL queries and are facing challenges of driving meaning from organizations’ voluminous data and centralized business metrics. They need a semantic layer in the data stack to ensure LLM responds to user questions with higher accuracy and meaningful business insights.</p><h4>What is LookML?</h4><p>Looker is a browser-based SaaS platform that connects directly to SQL databases. One major benefit of Looker is its <em>agile modeling layer</em> that allows developers to define, through LookML (Looker Modeling Language), how SQL database is structured and how the tables and columns relate to each other. In other words, LookML is an abstraction layer for SQL that developers use to tell Looker what data to use from the connected database and how it should interpret that data. It defines the relationships between data in a way that is both human-readable and machine-understandable.</p><h4>The Problem Statement</h4><p>If you are tasked with building LLM powered data agent that:</p><ul><li>Seamlessly integrates both structured and unstructured data sources for more holistic data analysis.</li><li>Deconstructs complex business inquiries into simpler, more manageable sub-questions and convert to SQL queries to run on SQL database on behalf of the user.</li><li>Derive meaning &amp; understand relationships of data in the underlying data layer to generate relevant SQL results for the end user</li><li>Adhere to the standard metric definitions to uphold trust with business stakeholders &amp; data community across the org</li><li>Facilitates an interactive dialogue between the user and the system, allowing for real-time Q&amp;A driven summaries.</li><li>Ensure data governance policies aligned with user access policies in the organization.</li></ul><p><a href="https://www.linkedin.com/pulse/our-evolutionary-journey-building-llm-powered-data-agent-megha-saini-irxrc/">Building a data agent prototype</a> in my previous role at AWS taught me the challenges of scale, data governance, and data accuracy as we planned to productionize the data agent application across 1,000s of internal users. Clearly, we needed a business semantic layer to help address these challenges:</p><ol><li><strong>Data Volume and Complexity</strong>: We had hundreds of database tables spanning traditional and modern data warehouse. Finding the right table and data column was like searching for a needle in a haystack without any additional metadata. Data agent would often hallucinate while navigating on its own the complexities of data volume, types, and disparate sources.</li><li><strong>Managing Query Build Complexities</strong>: Increasing volume, types, and sources of data led to query complexity that involved a lot of logic and advanced SQL features, such as sub-queries, aggregation, filtering, joining tables, etc. Data agent needed to understand data relationships, lineage, and transformations to distill users’ complex questions into understandable SQL queries to execute against the database.</li><li><strong>Building Queries using standard Business Metrics:</strong> Data agent needed domain understanding to minimize the risk of hallucinations. Understanding standard definitions, business metrics, and data nuances became critical in earning trust with end users.</li><li><strong>Data Governance:</strong> While generating results, data agent needed to follow user based data access rules as defined by the organization.</li><li><strong>Interoperability with other BI &amp; Analytical Tools: </strong>In order to source structured and unstructured data, data agent had to be interoperable with other SaaS applications, business planning tools, web analytics products, etc. The agent core of this application needed to identify right data source based on the user question, and build the relevant SQL query.</li></ol><p>To address these pain points, and in order to save data teams and business analysts time that would otherwise be spent manually verifying SQL queries prepared by LLM and testing results, we needed an agile modeling layer that allowed developers to enrich the data agent with metadata about the data layer (data warehouse, data marts, data lake) so that LLM can convert natural language based user question to SQL SELECT queries with higher accuracy.</p><blockquote>This agile modeling layer could be integrated within the BI tool as semantic model or with LLM to enable orchestration and query building on top of the data layer.</blockquote><h4>LookML role in BI Data Agent</h4><p>In Looker BI tool, LookML serves as a liaison between user and SQL database and exposes query results in the form of 1/Explores through web based report-builder interface, 2/as scheduled data deliveries, and 3/as REST API to build custom data experiences.</p><p>Users leverage Explore to build SQL queries.<strong> </strong>An Explore is composed of one or more views. In SQL terms, each view represents a database table, and tables are pre-joined in the LookML model file to define the overall Explore. <a href="https://medium.com/@meghasaini/my-learning-journey-on-lookml-73212646079e">Here is my post that explains the concept of measures &amp; dimensions in Explore and how LookML models SQL queries</a>. From within the Explore IDE, user can build reports using measures and dimensions in a report. Behind the scene, the LLM extension of Looker generates a SQL query for the columns and data aggregations selected by the user.</p><p>Here is the <a href="https://cloud.google.com/looker/docs/how-looker-generates-sql">canonical form of Looker SQL query</a>:</p><pre>SELECT<br>   &lt;dimension&gt;, &lt;dimension&gt;, ...<br>   &lt;measure&gt;, &lt;measure&gt;, ...<br>FROM &lt;explore&gt;<br>LEFT JOIN &lt;view&gt; ON ...<br>LEFT JOIN &lt;view&gt; ON ...<br>WHERE (&lt;dimension_filter_expression&gt;) AND (&lt;dimension_filter_expression&gt;) AND ...<br>GROUP BY &lt;dimension&gt;, &lt;dimension&gt;, &lt;dimension&gt;, ...<br>HAVING &lt;measure_filter_expression&gt; AND &lt;measure_filter_expression&gt; AND ...<br>ORDER BY &lt;dimension&gt; | &lt;measure&gt;<br>LIMIT &lt;limit&gt;</pre><p>Here is the <a href="https://cloud.google.com/looker/docs/how-looker-generates-sql">example SQL query generated by Looker</a> based on user selected measures and dimensions in a view within an Explore. Consider we have an e-commerce store that has a database with two tables, <em>orders</em> and <em>users</em>, to track users and orders. We find the number of orders (<em>orders.count</em>) grouped by state (<em>users.state</em>) and filtered by the creation date of the order (<em>orders.created_at</em>) in a Looker Explore.</p><pre>SELECT COALESCE(users.state, &#39; &#39;) AS &quot;_g1&quot;,<br>   users.state AS &#39;users.state&#39;,<br>   COUNT(DISTINCT orders.id) AS &#39;orders.count&#39;<br>FROM orders<br>LEFT JOIN users ON orders.user_id = users.id<br><br>WHERE<br>  orders.created_at BETWEEN (CONVERT_TZ(DATE_ADD(CURDATE(), INTERVAL -29 day), &#39;America/Los_Angeles&#39;, &#39;UTC&#39;,)) AND (CONVERT_TZ(DATE_ADD(DATE_ADD(DATE_ADD(CURDATE(), INTERVAL -29 day), INTERVAL 30 day), INTERVAL -1 second), &#39;America/Los_Angeles&#39;, &#39;UTC&#39;))<br>GROUP BY 1<br>ORDER BY COUNT(DISTINCT orders.id) DESC<br>LIMIT 500</pre><blockquote>Rather than writing this SQL query manually, it is easy for the business user to click on some fields and get this SQL output automatically. This is all because LookML developer had created Explores, defined views, specified dimension and measure in each view, and defined SQL logic for those dimensions and measures. This is the agile modeling layer built using LookML.</blockquote><p>Similar is the case of building the LLM powered data agent that facilitates real-time Q&amp;A by effectively translating complex business questions into SQL queries for which we require a semantic layer that provides the necessary schema information to the LLM. LookML file offers metadata of the database describing data relationships, models, and views within the data layer, enabling the agent to accurately interpret, build relevant SQL query, and query the database.</p><blockquote>LookML provides an agile modeling layer that enriches data agents with metadata about the data layer. This allows LLMs to convert natural language questions into SQL queries with higher accuracy.</blockquote><h4>The Proposed Solution</h4><p>This approach of building data-agent using LookML builds a semantic layer that is tightly integrated with the LLM and performs two-step function:</p><ol><li><strong><em>Providing Metadata- </em></strong>LookML provides schema information on models, views, column fields, and metrics, enabling LLMs to retrieve relevant tables and dimensions corresponding to user question.</li><li><strong><em>Enriching the Orchestration Layer- </em></strong>LookML provides details on data relationships across different entities &amp; data sources in the data layer. This provides contextual information and business logic to create merged results and/or custom metrics enabling the orchestration of complex queries.</li></ol><h4>How LookML works with LLMs</h4><p>To execute upon the two-step function, LookML works with LLM for some of the key workflows:</p><ol><li><strong>Vector Embeddings</strong>- LookML metadata is converted into vector embeddings, allowing for similarity searches to find correct files that contain metadata on relevant tables and measures based on user questions.</li><li><strong>LLM prompting</strong>- User question and relevant LookML files are passed to the LLM with specific Prompt Templates to construct answers in a specific format.</li><li><strong>Query Refinement</strong>- Train the LLM model on a few examples by giving these examples to the model within the prompt (i.e. few-shot prompts) Share some examples on complex business metrics that LLM needs to build to answer future user inquires. It also helps break down complex business questions into simpler SQL queries, which makes a material difference in the output generated by the LLM.</li><li><strong>Reasoning Explanation:</strong> The LLM explains its reasoning process (through Chain-of-Thought) that allows for verification of query building and further training with specific examples and LookML metadata.</li></ol><h4>Application Flow of LookML powered Data Agent</h4><p>LookML integrates with LLMs and provides schematic &amp; contextual information that helps understanding and querying the data effectively. Here’s a simplified workflow:</p><ol><li>A web-based conversational UI (AI chat bot) is created using LangChain and user inquiry is passed to the foundation model.</li><li>The LookML file with schema information is passed to the LLM, and vector embedding is created.</li><li>Relevant views and tables are fetched from LookML metadata using the retriever component of Retrieval Augmented Generation (RAG)</li><li>Provide LLM prompts with clear instructions on generating SQL statements from natural language, leveraging the LookML orchestration layer to build complex queries.</li><li>Output is refined using few-shot prompting with examples that demonstrate breakdown of complex business questions into a sequence of simpler SQL queries.</li><li>The LLM explains its reasoning process using the Chain-of-Thought (CoT) process. This helps verify the SQL query build and train the LLM with more specific examples &amp; LookML metadata if needed.</li><li>Data store is queried to fetch results for user inquiry which are then passed to the end user via chat bot or virtual assistant.</li></ol><p>Here’s what the Data &amp; AI stack looks like with LookML based Semantic Modeling Layer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AUPTQolHTM7hv2ETn3GyYw.png" /><figcaption>Fig: Data &amp; AI Stack with LookML based Semantic Layer. Image by Author.</figcaption></figure><h4>Benefits of the Semantic Layer</h4><ol><li><strong>Reduced Hallucinations</strong>. Semantic layer provides crucial context on standard business metrics, data definitions, complex calculations, dimensions, and data relationships across voluminous data in the data warehouse. This ensures the LLMs understand the data contextually, and build meaningful SQL queries. Using Chain of Thought workflow in LLM, developers can evaluate query build rationales and provide prompts for additional context needed. This leads to reduction in hallucinations caused by lack of human reasoning and understanding of LLMs. <strong><em>Semantic layer is a the critical step in building Trusted AI applications.</em></strong></li><li><strong>Simplified Data Modeling. </strong>LookML based semantic layer simplifies data modeling by ensuring a consistent understanding of various data sources, definitions, and lineage tracking. Users can <a href="https://docs.looker.com/exploring-data/exploring-data/merged-results">merge results </a>from different Explores or two different databases to provide consolidated analysis. When integrated with BI tooling, it enables connections across clouds which means that users can connect 3rd party applications to access range of data sources and build data semantics in LookML for query orchestration.</li><li><strong>Handle Voluminous Data with ease.</strong> For very large tables in the database, LookML can help create smaller aggregate tables of data, grouped by various combinations of attributes. The aggregate tables act as roll-ups or summary tables that the BI tool can use for queries instead of the original large table. <a href="https://cloud.google.com/looker/docs/reference/param-explore-aggregate-table">Aggregate awareness</a> logic can also speed up the average query by orders of magnitude. This is particularly useful in datasets where there is a high level of granularity, stored at a transaction level.</li><li><strong>Ensures Data Governance. </strong>LookML is an abstraction layer between the user and SQL databases in the data stack. Being a metadata layer, it is well-positioned to enable precise data controls when users interact with the data agent via the application layer, hence allowing only the authorized users to access fields, take actions, or access other data models via authentication and role-based access control. LookML is also version controlled via Git process, hence allowing seamless collaboration across teams for iterating and managing changes in the semantic layer.</li><li><strong>Improved Productivity, Decision- Making, and Trust</strong>. LookML empowers the data agent with a <strong>unified view of business metrics.</strong> This means that the semantic model serves as a single source of truth for data definitions, pre-defined metrics, and built-in transformations that can be reliably used across many teams within an org. These reusable metrics also boost productivity when they are built as intermediate fields for building complex calculations, hence simplifying the complex logic and improving readability and usability across teams. It follows the principle of <em>build once, use many, also called DRY (Don’t Repeat Yourself) LookML, hence ensuring all users use same definitions and calculations for data analysis, hence promoting data consistency and accuracy across the org.</em></li></ol><blockquote><a href="https://services.google.com/fh/files/misc/forrester-study-the-total-economic-impact-of-looker-2021.pdf">Forrester released a report on the Total Economic Impact of Looker</a> which clearly states employee productivity boosts by over 24% through self-serve AI data platform leveraging LookML. With this semantic model, business teams don’t have to wait for technical teams to prepare business metrics and analysis for decision-making.</blockquote><h4>Conclusion</h4><p>In summary, LookML acts as a semantic bridge between business language and LLM-powered data agents. It helps to break down complicated business questions into simpler SQL queries by using the metadata &amp; contextual information about the data layer to reference the correct tables and views. This structured and human-readable representation of data relationships gives LLMs the business context it needs to generate accurate queries, hence building a <strong><em>Trusted AI model</em></strong> that enhances the reliability and trust worthiness of model generated business insights.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>*Opinions are my own.</p><p>*Thank you for taking time to read. If you are interested in following my journey on building AI-powered Data Products at FAANG companies for operational effectiveness, please follow on LinkedIn (<a href="https://www.linkedin.com/in/msaini/">https://www.linkedin.com/in/msaini)</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*9PEx1NS7d1kl7Ie7xq3Csg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e9c704c79ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>