TL;DR
Google Cloud’s Rupjit Chakraborty describes a way to evaluate natural-language-to-SQL agents built with the Agent Development Kit without relying only on exact SQL strings or rigid table comparisons. The proposed approach combines tool-trajectory checks, deterministic comparison of normalized query results and rubric-based review of the agent’s answer.
Google Cloud’s Rupjit Chakraborty has outlined a custom evaluation approach for natural-language-to-SQL agents built with the Agent Development Kit (ADK), arguing that exact SQL-string and rigid table comparisons can mark valid answers as failures. The method combines checks of an agent’s tool use, normalized comparisons of database results and rubric-based review of its final response, addressing a practical testing challenge as NL2SQL systems take on more agent-like tasks.
Get business pricing on monitors, keyboards and dev gear
- Business-only prices and quantity discounts
- Tax-exempt purchasing
- Multiple users, one account, clear invoices
Chakraborty, identified in the source as an AI engineer, says ADK’s built-in metrics can be too strict when used alone. The tool_trajectory_avg_score criterion can require an exact match for tool arguments, including raw SQL, while response_match_score uses ROUGE-1 word overlap. Those checks may penalize an agent even when it produces equivalent results or a clearer response.
The proposed evaluation uses three layers. For tool trajectories, the post recommends configuring tool_trajectory_avg_score with match_type set to IN_ORDER and ignore_args set to true, so evaluators check the sequence of database-tool calls without treating every SQL variation as an error. For result correctness, it proposes a custom deterministic metric that normalizes the reference and predicted result sets before comparing them. A rubric-based final-response criterion, rubric_based_final_response_quality_v1, can then assess whether extra context is useful and whether the natural-language explanation matches the returned data.
The post identifies five sources of false failures in simple SQL benchmarks: different column aliases, different column order, different row order, equivalent numeric values represented with different types or precision, and extra columns that may provide useful context. The supplied examples show that labels such as “Revenue FY2025” can replace a database field name, or that 99.50 and 99.5 can represent the same value, without changing the underlying answer.
Evaluating NL2SQL agents beyond exact matches
Rupjit Chakraborty outlines a three-layer ADK evaluation for distinguishing wrong answers from harmless SQL and presentation differences.
Three layers, one evaluation
Check how the agent works, what data it returns, and how well it explains the result.
Match database-tool calls in order while ignoring argument differences such as raw SQL variations.
Normalize reference and predicted result sets, then compare them deterministically.
Use a rubric to assess whether the explanation matches the data and added context is useful.
Why literal checks fail
Valid SQL answers can differ in form while preserving the requested information.
Different aliases
“Revenue FY2025” can label the same field more clearly.
Column and row order
Column order may vary, and row order is not guaranteed unless requested.
Equivalent numbers
99.50 and 99.5 can represent the same value.
Useful extra fields
Additional columns may help readers, depending on the request.
Fit the check to the request
- The prompt asks for a ranking or sorted list.
- A top-five request needs the requested order.
- The prompt does not specify a row order.
- Aliases and equivalent numeric formatting differ.
What teams still need to define
The source gives a design and examples, but no complete normalization algorithm or reported benchmark results.
| Evaluation detail | Open question |
|---|---|
| Result normalization | How should duplicates, nulls, dates, and numeric tolerances be handled? |
| Extra columns | When does added context fit the user’s request and data domain? |
| Rubric review | How reliably does the judge assess answer quality? |
Making SQL Agent Tests Reflect Meaning
The evaluation choice affects whether teams can tell the difference between a genuinely wrong answer and a harmless change in formatting or presentation. Exact-string checks are easy to automate, but they can conflate query wording with query correctness. A result comparison that accounts for SQL semantics can give developers a more useful signal when tuning an agent for production use.
The distinction matters for business users of data agents, too. A system may return the requested records with friendlier labels or relevant additional fields; a benchmark that rejects those outputs may discourage useful behavior. At the same time, flexibility should not mean overlooking errors: the post’s layered approach separates tool-use checks, data equivalence and answer quality rather than treating any one score as a complete measure of reliability.
Chakraborty says the deterministic comparison can verify result equivalence at zero LLM token cost. That is a claim about the proposed comparison step, not evidence in the source of measured savings or a guarantee that the full evaluation pipeline has no model-related costs. The source provides a design and examples, not reported benchmark results demonstrating production performance.
Products Worth Considering

Anker SOLIX S2000 Portable Power Station, 2,010Wh, 1,500W

DJI Osmo Action 6 Capture More Combo 8K Waterproof Action Camera

Bose QuietComfort Wireless Noise-Cancelling Headphones, Sandstone
As an affiliate, we earn on qualifying purchases.
Why Exact-Match SQL Scores Fall Short
The post frames NL2SQL systems as moving beyond single-shot query translation toward data agents that inspect schemas, validate queries and produce answers from live data. It describes ADK agents connected to cloud warehouses such as BigQuery, where the system may need to interact with database tools as well as explain results.
SQL often permits multiple ways to express a query or present its output. Column aliases can improve readability, SELECT columns can appear in different orders, and results without an explicit ORDER BY are not guaranteed to arrive in a fixed row sequence. Numeric formatting can also differ while values remain mathematically equal. These properties create a mismatch with tests built around literal text or position-by-position table equality.
The source recommends preserving stricter checks where they match the user’s request. For example, an evaluation should enforce row order when a prompt specifically asks for a ranking or a sorted list, such as the top five customers. It should not impose an arbitrary order on a query that makes no such request.
““The evaluator’s dilemma stems from a fundamental mismatch between rigid test assertions and flexible SQL semantics.””
— Rupjit Chakraborty, AI engineer, in the Google Cloud blog post
Limits of the Proposed Evaluation
The source material describes the evaluation design but does not provide measured accuracy, benchmark comparisons or production results. It also does not specify a complete normalization algorithm, including how an implementation should handle duplicate rows, null values, date and time zones, floating-point tolerances, or cases where column identity matters despite different labels.
How to assess the fifth scenario—additional columns that may be helpful—also depends on the user’s request and the data domain. The post proposes rubric-based review for usefulness and consistency, but the supplied material does not give a full rubric or report how reliably a judge applies it. It is therefore not possible from this source to determine how the approach performs across different schemas, workloads or ADK deployments.
Implementing and Testing the ADK Metric
The next step described by the post is to implement and run a custom semantic SQL evaluator in ADK, using normalized result sets alongside trajectory and response-quality criteria. The supplied source excerpt introduces the five evaluation traps and the three-layer design, but ends before providing the complete implementation or instructions for running it.
Teams applying the method would need to define which differences count as equivalent for their own workloads, including when result order is required and whether extra fields are acceptable. They would also need to test the evaluator against representative queries and incorrect outputs. The source does not state a release date for further material or report a formal validation milestone.
Key Questions
What development does the Google Cloud post describe?
It describes a custom evaluation approach in ADK for NL2SQL data agents, combining tool-use checks, normalized result comparisons and rubric-based review of final answers.
Why can exact SQL matching give misleading results?
Two queries can use different SQL text or column aliases while returning equivalent data. An exact-string test can mark that valid variation as a failure.
When should an evaluator enforce row order?
According to the post, it should enforce order when the request explicitly calls for a ranking or sorted list. For queries without that requirement, row order may vary.
Does the source show that the custom metric improves production accuracy?
No. It presents the design and illustrative cases, but the supplied material reports no benchmark results or measured production outcomes.
Source: Google Cloud Blog
