Skip to content Skip to footer

How to Build Enterprise AI Data Agents Without Sacrificing Query Accuracy or Cost Control

What Happened

Three developments illustrate a practical direction for enterprise AI platforms: unify business data, expose it through controlled query interfaces, and evaluate agents against actual results rather than plausible explanations.

Myralis, Brazil’s largest Vitamin D producer, moved SAP to Google Cloud after infrastructure problems at its rural data center. It subsequently used Cortex Framework and BigQuery to combine SAP, sales and marketing data. With Cortex Framework 7 and Gemini, the company reports reducing supply-chain information processing from one week to one day. It also reports that an AI sales agent helped increase sales of a new medicine by 1%. These are company-specific outcomes, not general performance guarantees. [1]

Google has also introduced Conversational Analytics for Bigtable and Firestore Enterprise in public preview. It generates GoogleSQL for supported Bigtable editions and MongoDB Query Language for Firestore Enterprise, with verified queries, glossaries and value linking to ground interpretation. Generated queries execute read-only; mutations require manual review and execution. Applications can connect through an API or Model Context Protocol integrations. [2]

Separately, Google’s Agent Development Kit guidance describes a three-layer evaluation approach for natural-language-to-SQL agents: check tool execution, compare query results deterministically, and assess the final explanation. The key distinction is that different SQL statements can produce equally correct answers. [3]

Why It Matters to Businesses

The model is only one component of the business outcome. Myralis first addressed infrastructure reliability and fragmented data. Its later AI applications built on that foundation. Its use of Cortex data products to model five or six possible tax-reform outcomes without changing core SAP code also illustrates the value of separating analytical experimentation from transactional systems. [1]

Conversational access can reduce the effort required to answer operational questions, but it introduces another workload against enterprise databases. Read-only queries prevent direct modification, not expensive scans, sensitive-data disclosure or incorrect interpretation.

Evaluation therefore becomes a deployment requirement, not a demonstration exercise. Exact SQL matching can reject valid alternatives, while a persuasive final answer can conceal incorrect query results. The ADK guidance addresses this by testing execution and results separately from response quality. [3]

Kimbodo Engineering Perspective

We would treat these capabilities as components of a governed data application, not as permission to give an autonomous agent unrestricted database access.

  • Choose the data plane by workload. Cross-functional analysis and historical reporting usually belong in a curated analytical layer. Narrow, current-state questions may justify querying an operational database directly, provided capacity and access controls support it.
  • Start with a bounded workflow. A supply-chain exception assistant with defined metrics, approved datasets and known users is easier to validate than a company-wide “ask anything” interface.
  • Use managed services where they reduce operational burden. A managed query-generation service can accelerate delivery, but preview status warrants checking availability commitments, feature limits and supported deployment locations before making it a critical dependency. [2]
  • Do not confuse connectivity with governance. MCP standardizes tool access; it does not replace authorization, query policy or approval controls.

These developments concern managed data and agent services, not evidence that every enterprise should operate its own model-serving cluster. Self-hosted inference should follow a measured requirement for control, economics or performance—not an assumption that more infrastructure creates a better agent.

How We Would Implement It

1. Establish a governed data contract

Define supported questions, metric definitions, freshness requirements and access boundaries. Use curated views or data products with documented joins and business terminology. Where supported, configure verified queries, glossaries and value linking to reduce ambiguity. [2]

2. Separate orchestration from execution

Route authenticated requests through an application service that carries user identity and authorization context. Let the agent propose a query, then apply a policy gate before execution: approved datasets, permitted operations, execution timeouts and workload-appropriate cost limits. Return structured results to the agent for explanation.

Deploy the orchestration service on managed application infrastructure initially. Add queues, concurrency limits and independently scalable workers when workload measurements justify them. Keep analytical workloads isolated from latency-sensitive operational traffic where practical.

3. Make evaluation a release gate

For an ADK implementation, have the SQL tool return structured data as {“rows”: […]}. Register semantic_sql_result_match against the latest query-tool result, alongside tool-trajectory and final-response-quality metrics. [3]

Test realistic multi-row answers, aliases, reordered columns, numeric tolerances and useful extra columns. Preserve row-value alignment during comparison, and require ordering when the question asks for a ranking. Check tool order against the workflow’s required safety steps rather than imposing an arbitrary sequence. [3]

4. Instrument the complete request path

Record model and prompt versions, tool calls, query latency, database consumption, failures and evaluation outcomes. Track cost per accepted answer and analyst correction rate—not just token usage. Expand access only after the workflow meets agreed accuracy, latency and cost thresholds.

Risks, Costs and Security

  • Authorization gaps: Enforce tenant, row and column restrictions in the execution layer. Never rely on the model to decide what a user may see.
  • Overpowered tools: Conversational queries are read-only, but the separately described MCP capabilities include broader management operations. Expose only the tools a workflow needs and isolate administrative identities. [2]
  • Unbounded consumption: Retries, broad queries and agent loops can multiply database and model costs. Apply request budgets, query timeouts and concurrency ceilings.
  • Incomplete privacy assumptions: Google states that query generation does not store customer data. That does not establish the retention behavior of application logs, traces or other connected components; assess those separately. [2]
  • Evaluation blind spots: Correct results on a small test set do not establish production reliability. Maintain regression cases drawn from failures and revalidate after model, schema or prompt changes.

The production advantage comes from disciplined boundaries: trusted data, constrained tools, result-level evaluation and measurable operating costs. Natural-language access is the interface; those controls make it an enterprise system.

Where Kimbodo Comes In

Kimbodo builds and operates this in production for businesses — see our AI Infrastructure & MLOps practice, or Estimate My Infrastructure.

Sources

  1. [1] Prescribing innovation: Lessons from Myralis’ AI journey with Cortex Framework
  2. [2] Announcing Conversational Analytics for Bigtable and Firestore
  3. [3] Designing Custom Evaluation Metrics in ADK for NL2SQL Data Agents

Leave a comment

0.0/5

Engineering Founded & Customer Focused

KIMBODO LLC. © 2026. All Rights Reserved.