NL2SQL Agent Evaluation
3 steps1 pieces10 Sources
The evaluation of Natural Language to SQL (NL2SQL) agents is undergoing a critical shift from rigid string matching to semantic equivalence, driven by the realization that standard metrics like Exact Match and Execution Accuracy produce high false-negative rates on valid queries. Google Cloud AI engineer Rupjit Chakraborty identified five specific scenarios where traditional checks fail: column aliasing, permutation, row sorting, data type precision, and superset columns. To address this, he proposed a deterministic six-step Python normalization pipeline within Google's Agent Development Kit (ADK) that resolves these issues at zero LLM token cost, forming part of a three-layer evaluation system alongside trajectory scoring and rubric-based judging.
This practical engineering solution aligns with broader academic concerns about metric reliability. Research presented at ACL 2026 introduced ROSE, an intent-centered metric using an adversarial Prover-Refuter cascade to assess whether predicted SQL answers the user's question rather than just matching a ground-truth SQL. Similarly, NL2SQLBench highlights that existing benchmarks often contain erroneous gold-standard annotations, further undermining the validity of simple execution accuracy scores. The disagreement lies in how much weight to place on reference-dependent metrics versus independent semantic reasoning; while industry tools like ADK focus on efficient result-set comparison, academic frameworks argue for deeper intent verification to handle ambiguity and dataset errors.
How it got here
December 1, 2026: Google Cloud published a blog post detailing a custom deterministic evaluator for NL2SQL agents in ADK, addressing five common failure modes of exact string matching.
cloud.google.com ↗July 2, 2026: The paper 'ROSE: An Intent-Centered Evaluation Metric for NL2SQL' was presented at ACL 2026, proposing a new metric to overcome the limitations of Execution Accuracy.