TL;DR
Google Cloud’s guidance says standard exact-match and table-diff scores can mark useful NL2SQL agent outputs wrong when SQL results differ only in labels, ordering, formatting or helpful extra columns. It recommends combining ADK tool-trajectory checks, a deterministic comparison of normalized results and a rubric-based review of the final answer.
Google Cloud has published guidance for evaluating natural-language-to-SQL (NL2SQL) data agents built with its Agent Development Kit, arguing that exact SQL-string matching and rigid table comparisons can mislabel valid results as failures. The post recommends evaluating tool use, semantic result equivalence and answer quality separately, a distinction that matters as agents move beyond translating a question into one query and begin inspecting schemas and working with live warehouse data.
Get business pricing on tech for your team
- Business-only prices and quantity discounts
- Tax-exempt purchasing
- Multiple users, one account, clear invoices
The post, written by Google Cloud AI Engineer Rupjit Chakraborty, says ADK’s built-in criteria can be too rigid when applied without adjustment. The tool_trajectory_avg_score can require exact tool arguments, including the raw SQL string, while response_match_score uses ROUGE-1 word overlap. Those checks may penalize a valid query or a useful response simply because it differs in wording or syntax from a reference.
Chakraborty proposes a three-layer evaluation. First, check whether the agent called the expected database tools in the right sequence, using the trajectory criterion with match type IN_ORDER and ignore_args set to true. Second, use a custom, deterministic ADK metric to normalize the reference and predicted result sets before comparing their data. Third, apply the rubric_based_final_response_quality_v1 criterion to judge whether added context is useful and whether the natural-language answer matches the returned data.
The post identifies five sources of false negatives in conventional SQL evaluation: renamed column headers, columns returned in a different order, rows in a different order, equivalent values represented with different numeric precision or types, and extra context columns. It says row order should be enforced when a prompt requests a ranking or sorted list, but not treated as meaningful by default when the query does not require sorting.
What to measure in ADK NL2SQL agents
Google Cloud recommends evaluating how an agent works, whether its data matches, and whether its answer is accurate. Rigid SQL and table comparisons can mislabel useful results as failures.
A three-layer evaluation
Keep tool use, returned data, and the final explanation distinct so teams can diagnose failures.
Verify expected database tools run in order without requiring identical SQL arguments.
Use a deterministic custom metric to compare normalized reference and predicted data.
Use a rubric to judge whether the explanation is useful and supported by the returned data.
Differences that can mislead
A different representation does not always mean the agent returned the wrong answer.
Renamed headers
Column labels can differ while the underlying result remains equivalent.
Rows or columns reordered
Order may be immaterial unless the prompt asks for a ranking or sorted list.
Precision or type changes
Equivalent values may use different numeric precision or types.
Extra columns
Additional fields still need to be relevant and accurate.
When does order matter?
Judge row order against what the user asked for.
- Different row order need not count as an error.
- Compare the returned data for semantic equivalence.
- Enforce the requested ordering.
- Order is part of the answer the user asked for.
Why SQL-Aware Scoring Matters
Evaluation scores influence whether teams believe an agent is ready for production. If a benchmark treats every difference in SQL text or table layout as a substantive error, it can understate an agent’s performance and reward outputs that imitate a reference query rather than answer the user’s question. A semantic comparison of returned data can make the test more relevant to the task, while separate checks preserve scrutiny of the agent’s process and explanation.
The recommended layers also address different failure modes rather than collapsing them into one score. Tool sequencing can reveal whether the agent used the intended database workflow; normalized result comparison checks whether it produced equivalent data; and rubric-based review considers whether its explanation is supported by that data. This separation is useful for developers diagnosing errors, though it does not by itself establish that an agent is safe, reliable or production-ready.
Products Worth Considering

Bose QuietComfort Wireless Bluetooth Noise-Cancelling Headphones, Sandstone

Bose QuietComfort Wireless Noise-Cancelling Over-Ear Headphones, Petal Pink

Jackery Explorer 300 Portable Power Station with 40W Solar Panel
As an affiliate, we earn on qualifying purchases.
From SQL Translation to Agents
The blog frames NL2SQL systems as having developed from single-shot query translators into agents that can inspect schemas, validate queries and synthesize answers from live data. It describes ADK as a framework for building such systems and BigQuery as an example of a cloud data warehouse they can use. The supplied post is guidance on evaluation design, not a report of a newly released product or an independently validated benchmark.
Its central distinction is between query-form equivalence and answer equivalence. Different SQL statements can produce the same requested result, and equivalent results may have different labels, row or column order, or numeric formatting. At the same time, not every difference is harmless: an explicitly requested sort must be tested, and added columns or prose still need to be relevant and accurate.
“The evaluator’s dilemma stems from a fundamental mismatch between rigid test assertions and flexible SQL semantics.”
— Rupjit Chakraborty, Google Cloud AI Engineer
Limits of the Proposed Evaluator
The supplied material does not provide benchmark results, measured accuracy gains, or a comparison across different evaluation systems. It outlines an approach and examples, but does not establish how well the custom metric performs across databases, business domains or difficult query types. The available excerpt also ends during its discussion of extra context columns, so it does not include the full treatment of that fifth scenario or all implementation details.
Semantic equality can also depend on the question. A different row order is immaterial for an unordered result, but material for a requested ranking; an extra column may help one user and distract another. The post recommends rubric-based review for such judgments, but the supplied text does not specify a complete rubric, acceptable tolerance rules for every data type, or safeguards against errors shared by both the reference and predicted results.
Putting the Metrics Into Practice
Teams following the guidance would configure ADK’s trajectory check to assess tool order without requiring identical SQL arguments, then implement a custom metric that normalizes result sets before comparing them. They would also need test cases that distinguish unordered queries from requests for ranking or sorting, and decide how to treat numeric precision, aliases and additional fields.
The next step described by the post is to run the combined checks alongside a rubric-based review of the agent’s final response. The supplied material does not announce a new ADK release, a deadline or a broader rollout. How the method performs in production, and what normalization rules teams should adopt for their own data, remain matters for implementation and testing.
Key Questions
What is the main evaluation problem identified in the post?
Exact SQL-string checks and strict table diffs can flag semantically equivalent outputs as wrong when labels, column order, row order or numeric formatting differ.
Which three evaluation layers does Google Cloud recommend?
The post recommends checking tool trajectory, comparing normalized results with a deterministic custom metric, and reviewing the final response with a rubric-based ADK criterion.
Should an evaluator ignore row order?
Not in every case. The post says row order need not count for queries that do not request sorting, but evaluators should enforce it when a prompt asks for a ranked or sorted result.
Does the post show that this method improves production accuracy?
No measured improvement is given in the supplied material. It presents an evaluation approach and examples of where conventional checks may fail, not benchmark results proving production performance.
Source: Google Cloud Blog
