NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Fundamental Challenges in Evaluating Text2SQL Solutions and Detecting Their Limitations

Cedric Renggli, Ihab F. Ilyas, Theodoros RekatsinasarXiv 2025

TL;DR

Current Text2SQL benchmarks are hitting a performance ceiling, but the bottleneck might be the evaluation itself rather than the models. This paper introduces a comprehensive taxonomy of Text2SQL limitations, revealing that aggregate accuracy metrics are often compromised by noisy data, inherent natural language ambiguity, and biased evaluation functions.

What Problem Does This Paper Address?

The task of translating natural language (NL) into SQL—known as Text2SQL—has seen a surge in performance thanks to Large Language Models (LLMs). However, despite high scores on public benchmarks like Spider and BIRD, these systems often struggle in real-world production environments.

The authors argue that our current way of measuring "success" is flawed. They identify two major unaddressed challenges:

  1. Data Quality Issues: Benchmark datasets often ignore the probabilistic nature of language. They typically provide only one "ground truth" SQL query, even when multiple interpretations are equally valid. Furthermore, many labels in these benchmarks are simply incorrect.
  2. Evaluation Bias: Because testing if two SQL queries are truly equivalent is a computationally "hard" problem (and often undecidable), benchmarks use approximations called "match functions." These functions often incorporate "relaxations"—like ignoring row order or duplicate rows—which can lead to misleadingly high or low accuracy scores.

Methods

To move beyond simple accuracy scores, the authors propose a unified taxonomy that categorizes Text2SQL limitations into three levels: the Text2SQL solution itself, the evaluation data, and the evaluation metrics.

The full taxonomy of Text2SQL limitations, mapping issues to resulting errors and possible mitigations.

A key methodological contribution is their Noisy Data Detection strategy. Instead of trusting a single ground truth, they use multiple LLMs as independent "voters" to generate the top three most likely SQL queries for a given input. By aggregating these variants, they can identify cases where the benchmark's ground truth is an outlier, signaling potential noise or inaccuracy in the dataset.

Figure 2: Noisy Data Detection: For a fixed input (NL description and serialized schema), we ask multiple LLMs as independent voters to predict the top 3 most likely SQL queries. The variants across all voters are kept and compared against the single ground truth query in the benchmark dataset.

Datasets

The study primarily analyzes the Spider benchmark, the most prominent public dataset for Text2SQL. They also reference BIRD, a newer benchmark designed for more complex database interactions. Through manual inspection and their LLM-voting proxy, the authors scrutinized the test splits of these datasets to uncover specific failure modes.

Key Insights and Ideas

  • Ambiguity is Inherent: Natural language is rarely precise. A simple request like "List the names of all the people" could be interpreted as just first names, full names, or a concatenated string. Providing only one "correct" SQL query in a benchmark fails to capture this reality.
  • Information Loss in Serialization: When we turn a database schema into text for an LLM (serialization), we often lose critical metadata like integrity constraints or specific value domains. Without knowing that a "status" column only accepts 'T', 'F', or 'S', even a human expert couldn't write a perfect query.
  • The "Empty Result" Proxy: The authors found that queries resulting in an empty set on the provided database instance are a high-signal area for errors. In Spider, they found that 21 out of 25 such queries actually had wrong ground truth labels.
  • Metric Relaxations are a Double-Edged Sword: To handle ambiguity, evaluators often "relax" rules (e.g., ignoring DISTINCT keywords). While this prevents some False Negatives, it introduces False Positives where a model might get a "correct" mark for a query that is semantically different from the user's intent.

Key Results

  • Label Inaccuracy: The authors identified 43 samples (~2%) in the Spider test split that likely have inaccurate labels due to issues like wrong value comparisons or improper null handling.
  • Presupposition Failures: Roughly 15% of the Spider test set (335 samples) involves "top-k" queries (e.g., "Who is the oldest?"). These are often ill-defined if there are ties (e.g., two people with the same max age), yet benchmarks rarely account for this non-deterministic behavior.
  • Quantifying Bias: They found that roughly 1% of Spider samples have an ORDER BY clause without a LIMIT. If an evaluation metric ignores row order here, it risks a Type I error (False Positive) if the model's ordering logic is actually wrong.

Limitations and Future Work

The authors acknowledge that their taxonomy is a first step and may not be exhaustive. A significant limitation is the lack of automated tools to apply this taxonomy at scale; currently, much of the categorization requires manual expert inspection.

Future Work Directions: * Developing multi-label benchmarks that provide all plausible SQL interpretations for a single NL prompt. * Moving toward interactive Text2SQL systems that can ask the user for clarification when ambiguity is detected, rather than guessing a single query. * Creating more robust evaluation metrics that use LLMs to judge semantic equivalence while incorporating human feedback signals.

Summary updated

BibTeX
@misc{renggli2025fundamental,
  author = {Cedric Renggli and Ihab F. Ilyas and Theodoros Rekatsinas},
  title = {{Fundamental Challenges in Evaluating Text2SQL Solutions and Detecting Their Limitations}},
  year = {2025},
  eprint = {2501.18197},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.18197},
}
Figure