arXiv:2610.09396cs.CLOct 2026

Manuscript Offprint

arXiv:2610.09396

ARCS: Towards Precise Text-to-SQL via Structured Disambiguation

Yihao Hu, Yanlin Feng, Naoki Otani, Nikita Bhutani

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

As text-to-SQL systems move beyond demonstrations toward real-world deployment, ambiguity in user questions becomes a primary source of errors. Such ambiguities are often subtle, domain- or data-specific, and can silently cause system outputs to deviate from the user's true intent. Ambiguity is traditionally addressed through conversational clarification, which is often inefficient, cognitively demanding, and poorly aligned with real-world user workflows. We propose structured disambiguation, a new paradigm in which ambiguity is resolved through explicit, constrained interactions rather than free-form dialogue. We construct ARCS (Ambiguity Resolution Corpus for SQL), the first text-to-SQL benchmark featuring naturally occurring, unconstrained ambiguities over real-world databases, with complete annotations of all valid ambiguity points, interpretations, and SQL queries. Experimental results show that text-to-SQL remains challenging in the presence of ambiguity: gpt-6-sol achieves only 51% end-to-end execution accuracy, and no open-source model exceeds 27%.

1 Introduction

As state-of-the-art performance on Spider 2.0 [14] surpasses 80%, this milestone marks a notable advancement in recent text-to-SQL systems [22, 21, 1, 26, 29, 6, 9, 15, 35], which serve as a bridge between enterprise databases and generative AI. However, most widely used benchmarks [37, 32, 16, 14, 4, 12] consist of unambiguous, lengthy, often over-specified questions, which diverge from how user ask questions in practice. This reveals a less discussed issue behind strong benchmark performance: the ambiguity inherent in natural language that can cause system outputs to deviate from the true user intent [28, 2, 23].

For example, consider the question “How many GitHub issues are opened in 2025?”: should this count only newly created issues, or should it also include issues reopened during 2025? Similarly, the question “What was the total sales revenue?” is ambiguous as “sales revenue” can be calculated differently based on refunded, canceled, or partially returned orders. Such ambiguities are often subtle and highly specific to domains and data. When data produced by text-to-SQL systems is used to support critical business decisions (e.g., setting annual budgets based on retrieved revenue data), these ambiguities can have a substantial business impact.

Traditional conversational disambiguation [7, 10] relies on the user to read, recall, and articulate specific constraints in natural language. In contrast, we propose structured disambiguation, where users simply recognize the correct intent through multiple-choice selections (when interpretations

∗^{*}The authors contributed equally to this work. This work was done during Yihao’s internship at Megagon Labs. Correspondence to yanlin@megagon.ai.

Report the total revenue for each nation in 1995.

Figure

Conversational Disambiguation

Should the revenue be reported by the customer's nation or by the supplier's nation?

The revenue should be reported by the supplier's nation.

To define 1995, should we include line items shipped in 1995 (filter on l_shipdate) or orders placed in 1995 (filter on o_orderdate)?

The intended interpretation is to filter on the receipt date in 1995, not the shipment date or the order date.

WITH revenue AS (

SELECT n.n_nationkey, n.n_name,

LEFT JOIN revenue r ON r.n_nationkey -

Figure

nationtotal_revenue
ALGERIA1.379075+09
----

Structured Disambiguation

Figure

"for each nation"

Group by customer's nation

Group by supplier's nation

"In 1995"

Filter orders by o_orderdate in 1995

Filter lineitems by l_shipdate in 1995

Filter lineitems by l_commitdate in 1995

Filter lineitems by l_receiptdate in 1995

SQL & Results (updates dynamically based on user's selection):

WITH revenue AS (

SELECT n.n_nationkey, n.n_name,

LEFT JOIN revenue r ON r.n_nationkey -

nationtotal_revenue
ALGERIA1.379075+09
----

Note: These are actual outputs from o4-mini using gpt-4.1 as the user simulator. Refer to Figure 3 for the ground-truth.

Figure 1: Comparison of conversational disambiguation and structured disambiguation. Structured disambiguation allows users to compare and select interpretations for multiple ambiguity points based on the SQL queries and execution results.

are finite) and value adjustment (for numeric thresholds). This approach leverages the HCI principle of “recognition rather than recall” [19], thereby achieving more efficient disambiguation with reduced cognitive load. Furthermore, structured disambiguation improves the workflow in several ways: (1) the SQL query and its resulting table are generated immediately upon selection, and (2) users can easily compare the results of different resolutions and re-select among them. An illustrative comparison of conversational disambiguation and structured disambiguation is shown in Figure 1. Structured disambiguation substantially reduces user effort and enables more interactive disambiguation.

To enable rigorous evaluation of text-to-SQL systems under realistic ambiguous user questions, we introduce ARCS: Ambiguity Resolution Corpus for SQL. When constructing ARCS, we adopt a fundamentally different methodology from prior work [28, 2, 23]. Rather than predefining a small set of ambiguity types and artificially injecting them into questions and databases, we identify intrinsic ambiguities within realistic questions based on unmodified, real-world databases. This process yields questions naturally containing multiple, interacting ambiguity phrases. In addition, ARCS supports end-to-end evaluation through a user simulator, without imposing constraints on the system architecture or the disambiguation strategy. The benchmark offers complete annotations of all valid ambiguity points, interpretations, and SQL queries, enabling disentangling disambiguation performance from SQL generation performance.

Our experimental results on ARCS reveal several interesting findings. When questions are ambiguous, Text-to-SQL remains a significant challenge for modern large language models (LLMs): gpt-6-sol achieves only 51% end-to-end execution accuracy, and no open-source LLM exceeds 27%. Furthermore, frontier LLMs from different providers, while having similar text-to-SQL capabilities, exhibit very different disambiguation performance, suggesting that disambiguation may be an underrepresented objective during LLM training.

In summary, our work makes the following main contributions:

• Structured disambiguation, a new disambiguation interface for text-to-SQL.

• ARCS, a reliable and versatile benchmark with 311 realistic disambiguation tasks.

• A taxonomy for systematically categorizing ambiguities in text-to-SQL.

• Extensive experiments and analysis of current state-of-the-art LLMs.

References (36)