Introduction
In the field of semantic parsing, specifically text-to-SQL, significant progress has been made using benchmarks like Spider. However, these datasets typically operate under a simplifying assumption: every natural language question maps to exactly one correct SQL query. In real-world scenarios, human language is frequently ambiguous. AMBROSIA (Ambiguity in Text-to-SQL) is a novel benchmark designed to address this "ambiguity gap," evaluating how modern Large Language Models (LLMs) handle questions with multiple valid interpretations.
The Problem: Navigating the Fog of Language
Traditional text-to-SQL systems are trained to find a single "correct" answer. When faced with ambiguity, these systems often arbitrarily select one interpretation, potentially leading to incomplete or incorrect data retrieval. For instance, a query like "Show the writers and editors on a work-for-hire" contains attachment ambiguity: does the "work-for-hire" modifier apply to both writers and editors, or only to the editors? A robust system should recognize this ambiguity and either provide all possible interpretations or seek clarification.
Methodology and Dataset Construction
The authors developed a multi-step pipeline to ensure that the AMBROSIA benchmark contains genuine linguistic ambiguity that persists even when the database schema is known.
- Controlled Database Generation: Using the OpenChat LLM, the researchers generated 846 new databases across 16 domains (e.g., Banking, Healthcare). These databases were specifically engineered to support "ambiguity templates." For example, to test scope ambiguity, databases were structured with many-to-many relationships, such as multiple gyms offering the same yoga class.
- Human-in-the-Loop Annotation: Professional annotators via Prolific were tasked with writing ambiguous questions based on the generated schemas. They also provided unambiguous natural language "interpretations" for each question.
- SQL Mapping: Structural ambiguities (scope and attachment) were mapped to SQL via templates, while instances of vagueness—where a question might refer to a general entity or a specific subtype—were mapped by experts to ensure diversity.
The resulting dataset includes 1,277 ambiguous questions and 4,242 total SQL queries.
Key Insights: The Ambiguity Gap
The research highlights several critical failures in current LLM performance:
- Performance Degradation: There is a stark contrast between model performance on clear versus ambiguous questions. Llama 3-70B, for instance, achieves 66% recall on unambiguous questions but drops to 31% on ambiguous ones.
- Inherent Model Bias: LLMs exhibit systematic biases when resolving ambiguity. In cases of scope ambiguity, models favor "distributive" readings (treating items separately) over 80% of the time. In attachment cases, they consistently prefer "high attachment," applying modifiers to the entire preceding group.
- The "AllFound" Failure: The authors introduced the AllFound metric to measure whether a model identifies all valid interpretations. Most state-of-the-art models scored near zero on this metric, with Llama 3-70B reaching only 1.9%. This suggests that models are fundamentally optimized for single-answer retrieval rather than exploratory reasoning.
- Over-detection and Paranoia: When prompted to identify ambiguity, models often become "paranoid," flagging approximately 80% of all questions as ambiguous, including those that are perfectly clear.
Benchmarking Results
The study evaluated several models, including GPT-4o, GPT-3.5 Turbo, and the Llama 3 family.
- Llama 3-70B emerged as the top performer in terms of recall on ambiguous questions (30.7%).
- GPT-4o demonstrated the highest precision (51.1%), meaning its generated queries were likely to be correct interpretations, even if it failed to capture the full range of possibilities.
- Few-Shot Learning: Providing 1–3 examples of ambiguous questions yielded significant performance gains, though models still fell short of human-level reasoning.
Limitations and Future Work
While AMBROSIA represents a significant step forward, it has limitations. The databases, while multi-table, are cleaner than real-world legacy systems. Additionally, the benchmark does not yet cover lexical ambiguity (e.g., "bank" as a financial institution vs. a riverbank).
The ultimate goal for future research is the development of systems capable of generating intelligent clarification questions—asking the user "Did you mean X or Y?"—to bridge the gap between human intent and database execution.
Summary updated