Asking What Matters: Disagreement-Guided Ambiguity Detection for Interactive Text-to-SQL
Summary
The paper proposes DisGuAD, a disagreement-guided ambiguity detection framework for interactive text-to-SQL that uses disagreement among plausible SQL interpretations to select high-impact clarification questions, improving normalized Reward by 4.40–8.97 points and critical-ambiguity coverage from ~46–49% to ~83–85% on BIRD-Interact benchmarks.
View Cached Full Text
Cached at: 11/19/26, 03:02 AM
# Asking What Matters: Disagreement-Guided Ambiguity Detection for Interactive Text-to-SQL
Source: [https://arxiv.org/html/2611.21645](https://arxiv.org/html/2611.21645)
Su Dong1, Jiayan Lin2, Yujia Liu2, Zijin Hong1, Qinggang Zhang3, Feiran Huang4,Xiao Huang11Hong Kong Polytechnic University2Jinan University3Jilin University4Beihang University\{su\.dong,zijin\.hong\}@connect\.polyu\.hk;
###### Abstract
Interactive text\-to\-SQL requires an LLM agent not only to generate executable SQL, but also to decide which uncertainty to clarify within a limited interaction budget\. However, current clarification policies have three limitations: \(i\) they target surface ambiguity without testing its SQL impact; \(ii\) they miss ambiguities implicit in schema routes or domain knowledge; and \(iii\) they spend limited turns on unfocused or redundant questions\. These limitations expose a critical challenge: identifying SQL\-impacting ambiguity before the intended SQL is known\. In this paper, we proposeDisGuAD, aDisagreement\-GuidedAmbiguityDetection framework that specializes clarification selection while leaving the downstream SQL generator unchanged\.DisGuADtreats disagreement among plausible SQL interpretations as direct evidence of which uncertainty matters to the final query\. Specifically, it constructs a query\-term inventory, elicits contrastive SQL interpretations through complementary probe families, compares their canonical SQL components, and attributes recurring differences to user\-facing clarification targets\. A lightweight prioritization and dialogue\-state mechanism then selects one high\-impact unresolved target for clarification\. Experiments onBIRD\-InteractLite and Full with two LLM backbones demonstrate consistent improvements in task success and clarification quality\. Compared with the original interaction policy,DisGuADimproves normalized Reward by 4\.40–8\.97 points and raises overall critical\-ambiguity coverage from 48\.62% to 82\.75% and from 45\.76% to 85\.14%\. Its clarification signals further improve two independently designed static text\-to\-SQL frameworks by up to 13\.97 Reward points while keeping their SQL generators fixed\. These results demonstrate that disagreement among plausible SQL queries provides actionable evidence for selecting clarification targets that matter to downstream generation\.
## 1Introduction
Generating executable SQL requires committing to decisions that users do not always state explicitly\([Saparina and Lapata, 2024](https://arxiv.org/html/2611.21645#bib.bib4);[Ding et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib3);[Liu et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib5)\)\. A request may leave undefined how a metric should be computed, which schema entity a phrase refers to, or what filtering, aggregation, or ranking criterion should be applied\([Yu et al\., 2019a](https://arxiv.org/html/2611.21645#bib.bib9);[Yu et al\., 2019b](https://arxiv.org/html/2611.21645#bib.bib11)\)\. Although LLM\-based text\-to\-SQL systems can generate increasingly complex queries\([Hong et al\., 2025](https://arxiv.org/html/2611.21645#bib.bib1);[Liu et al\., 2025b](https://arxiv.org/html/2611.21645#bib.bib6)\), they are commonly formulated under the assumption that the input question fully specifies the intended semantics\([Yu et al\., 2018](https://arxiv.org/html/2611.21645#bib.bib8);[Li et al\., 2023b](https://arxiv.org/html/2611.21645#bib.bib7)\)\. This assumption breaks down when multiple reasonable interpretations lead to different SQL queries\. Interactive text\-to\-SQL addresses such ambiguity by allowing an LLM agent to ask clarification questions before generating the final query\([Huo et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib2)\)\. This setting is no longer only about producing SQL from a given request\. The agent must also determine*what to ask*: among many linguistically plausible uncertainties, it must identify the one whose resolution is most useful for the resulting SQL query\([Liu et al\., 2025a](https://arxiv.org/html/2611.21645#bib.bib19)\)\.
Existing interactive pipelines commonly rely on the LLM itself to identify ambiguity and immediately verbalize a clarification question\([Gao et al\., 2024](https://arxiv.org/html/2611.21645#bib.bib10);[Huo et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib2)\)\. Although flexible, this strategy does not explicitly test whether the selected uncertainty changes the SQL semantics\. It consequently exhibits three limitations\. \(i\)Surface\-level targeting:a question may focus on an expression that appears linguistically underspecified but has little effect on projection, filtering, joins, aggregation, or other SQL decisions\([Saparina and Lapata, 2024](https://arxiv.org/html/2611.21645#bib.bib4)\)\. \(ii\)Incomplete ambiguity coverage:consequential uncertainty is often implicit in a schema route, domain\-specific metric,
Figure 1:Ambiguity selection in interactive text\-to\-SQL\. A query\-only policy asks aboutheaterstatus, leaving the SQL unchanged and the key ambiguity unresolved\.DisGuADinstead uses SQL disagreement to identify and resolve the high\-impact result\-scope ambiguity\.threshold, or external definition, and may therefore be missed by clarification based only on the surface form of the request\([Huo et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib2)\)\. \(iii\)Unfocused interaction:the agent may combine multiple targets in one question or revisit an ambiguity that has already been queried, consuming interaction turns without resolving additional SQL decisions\([Yao et al\., 2019](https://arxiv.org/html/2611.21645#bib.bib12)\)\. These failures are visible in our clarification\-target analysis: under two LLM backbones, the original interaction policy covers fewer than half of the benchmark\-annotated critical ambiguities, with overall coverage of only 48\.62% and 45\.76%\. The limitation is therefore not simply whether the agent can ask a fluent question, but whether it can locate the uncertainty that matters to the final query\.
Effective clarification poses a critical challenge: identifying*SQL\-impacting ambiguity*before the intended SQL is known\. The key question is not whether a phrase admits several linguistic interpretations, but whether plausible interpretations of that phrase induce different SQL decisions\. This observation suggests a direct source of evidence\([Wang et al\., 2024](https://arxiv.org/html/2611.21645#bib.bib36);[Li et al\., 2024](https://arxiv.org/html/2611.21645#bib.bib35);[Pourreza et al\., 2025](https://arxiv.org/html/2611.21645#bib.bib14);[Li et al\., 2026b](https://arxiv.org/html/2611.21645#bib.bib15);[Li et al\., 2026a](https://arxiv.org/html/2611.21645#bib.bib34)\)\. If independently elicited interpretations disagree on a projection, predicate, join path, aggregation level, ranking rule, or database operation, then the assumption responsible for that disagreement is a useful clarification target\. Conversely, uncertainty that does not alter the induced SQL provides weaker evidence for interaction\([Farquhar et al\., 2024](https://arxiv.org/html/2611.21645#bib.bib16)\)\. We therefore treat disagreement between plausible SQL queries as an ambiguity sensor: contrastive SQL generation exposes alternative decisions, component\-level comparison identifies where they diverge, and attribution maps those differences back to concepts that a user can resolve\([Manakul et al\., 2023](https://arxiv.org/html/2611.21645#bib.bib17);[Kuhn et al\., 2023](https://arxiv.org/html/2611.21645#bib.bib18)\)\.
In this paper, we proposeDisGuAD, aDisagreement\-GuidedAmbiguityDetection framework for interactive text\-to\-SQL\.DisGuADis a plug\-in clarification policy that leaves the downstream SQL generator unchanged\. Given an ambiguous request, it first constructs a query\-term inventory containing potential natural\-language anchors\. It then elicits contrastive SQL interpretations through four complementary probe families that vary major query subgoals, relational routes, implicit definitions, and individual ambiguity axes\.DisGuADcanonicalizes the generated queries, identifies recurring component\-level disagreements, and maps the resulting evidence back to user\-facing ambiguity candidates\. A lightweight prioritization and dialogue\-state mechanism selects the highest\-value unresolved target and converts it into a deterministic clarification question\. Experiments under the official conversational setting ofBIRD\-Interact\([Huo et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib2)\)show consistent improvements on both the Lite and Full benchmarks with two LLM backbones\. Compared with the original interaction policy,DisGuADimproves normalized Reward by 4\.40–8\.97 points and raises overall critical\-ambiguity coverage from 48\.62% to 82\.75% and from 45\.76% to 85\.14% for the two backbones\. Moreover, replacing the original clarification dialogue withDisGuADinteraction improves two independently designed static text\-to\-SQL frameworks\([Gao et al\., 2024](https://arxiv.org/html/2611.21645#bib.bib10);[Pourreza and Rafiei, 2023](https://arxiv.org/html/2611.21645#bib.bib13)\), yielding gains of up to 13\.97 Reward points while keeping their SQL generators fixed\. These results show that SQL\-query disagreement provides actionable evidence for selecting clarification targets and produces interaction signals that transfer across downstream generation pipelines\.
Our contributions are summarized as follows:
- •We identify SQL\-impacting ambiguity selection as a central challenge in interactive text\-to\-SQL and formulate disagreement between plausible SQL queries as direct evidence of which uncertainty should be clarified\.
- •We proposeDisGuAD, a plug\-in framework that combines query\-term extraction, contrastive SQL interpretation probes, component\-level disagreement analysis, and user\-facing ambiguity attribution without modifying the final SQL generator\.
- •Extensive experiments onBIRD\-Interactdemonstrate consistent improvements across two benchmark variants and LLM backbones\. Further analysis shows substantially higher critical\-ambiguity coverage and confirms thatDisGuADinteraction generalization\.
## 2Related Work
Traditional text\-to\-SQL methods formulate the task as single\-turn semantic parsing\([Wang et al\., 2020](https://arxiv.org/html/2611.21645#bib.bib21);[Li et al\., 2023a](https://arxiv.org/html/2611.21645#bib.bib22)\)\. Recent LLM\-based systems further employ task decomposition, in\-context example selection, candidate generation, and self\-correction\([Pourreza and Rafiei, 2023](https://arxiv.org/html/2611.21645#bib.bib13);[Qu et al\., 2024](https://arxiv.org/html/2611.21645#bib.bib27);[Xie et al\., 2025](https://arxiv.org/html/2611.21645#bib.bib26);[Li et al\., 2025](https://arxiv.org/html/2611.21645#bib.bib24);[Lei et al\., 2025](https://arxiv.org/html/2611.21645#bib.bib25);[Hong et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib23)\)\. Interactive semantic parsing introduced model\-based agents that decide when and where to request user feedback\([Yao et al\., 2019](https://arxiv.org/html/2611.21645#bib.bib12)\)\. Recent work studies ambiguity more directly: AmbiQT\([Bhaskar et al\., 2023](https://arxiv.org/html/2611.21645#bib.bib20)\)and AMBROSIA\([Saparina and Lapata, 2024](https://arxiv.org/html/2611.21645#bib.bib4)\)associate ambiguous utterances with multiple plausible SQL interpretations, AmbiSQL\([Ding et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib3)\)detects ambiguity using a fine\-grained taxonomy and elicits multiple\-choice clarification, and BIRD\-Interact evaluates multi\-turn agents that interact with users and database environments\([Huo et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib2)\)\. In parallel, consistency\-based LLM methods compare sampled generations to estimate semantic uncertainty or detect unreliable content\([Kuhn et al\., 2023](https://arxiv.org/html/2611.21645#bib.bib18);[Manakul et al\., 2023](https://arxiv.org/html/2611.21645#bib.bib17)\)\.DisGuADinstead uses component\-level SQL disagreement to select user\-facing clarification targets; extended comparisons appear in the Appendix[A](https://arxiv.org/html/2611.21645#A1)\.
## 3Methods
### 3\.1Preliminaries and Overview
#### Task Formulation\.
Given a natural language user questionqqand a database𝒟\\mathcal\{D\}with schema𝒮\\mathcal\{S\}, the conventional text\-to\-SQL task learns a mappingffconverting the question into SQL query:
f:\(q,𝒮\)→y,f:\(q,\\,\\mathcal\{S\}\)\\rightarrow y,\(1\)whereyyis the SQL query that expresses the intent ofqq\. This formulation assumes that the user question fully specifies the intended query\. Interactive text\-to\-SQL relaxes this assumption by presenting the agentℳα\\mathcal\{M\}\_\{\\alpha\}with an ambiguous questionq~\\tilde\{q\}\. The agent interacts with a user𝒰\\mathcal\{U\}to acquire the missing information before generating the final SQL query\. We define the environment asℰ=\(𝒟,𝒮,𝒦\)\\mathcal\{E\}=\(\\mathcal\{D\},\\mathcal\{S\},\\mathcal\{K\}\), where𝒦\\mathcal\{K\}denotes the available external knowledge, and letHtH\_\{t\}denote the dialogue history through turntt\. At each non\-final turn, the agent asks a questionqt\(Ask\)q^\{\(\\textsc\{Ask\}\)\}\_\{t\}, receives a response \(observation\)oto\_\{t\}, and updates the history for subsequent interaction:
qt\(Ask\)=ℳα\(Ask\)\(q~,ℰ,Ht−1\),ot=𝒰\(qt\(Ask\),Ht−1\),Ht=Ht−1⊕\(qt\(Ask\),ot\)\.q^\{\(\\textsc\{Ask\}\)\}\_\{t\}=\\mathcal\{M\}^\{\(\\textsc\{Ask\}\)\}\_\{\\alpha\}\\bigl\(\\tilde\{q\},\\,\\mathcal\{E\},\\,H\_\{t\-1\}\\bigr\),\\,o\_\{t\}=\\mathcal\{U\}\\bigl\(q^\{\(\\textsc\{Ask\}\)\}\_\{t\},\\,H\_\{t\-1\}\\bigr\),\\,H\_\{t\}=H\_\{t\-1\}\\oplus\(q^\{\(\\textsc\{Ask\}\)\}\_\{t\},\\,o\_\{t\}\)\.\(2\)where⊕\\oplusappends the new question–response pair andH0=∅H\_\{0\}=\\varnothing\. At the terminal turnTT, the agent produces the final PostgreSQL queryy^=ℳα\(SQL\)\(q~,ℰ,HT−1\)\\widehat\{y\}=\\mathcal\{M\}^\{\(\\textsc\{SQL\}\)\}\_\{\\alpha\}\(\\tilde\{q\},\\,\\mathcal\{E\},\\,H\_\{T\-1\}\)at turnTT\. The superscripts distinguish the question\-generation and SQL\-generation modes of the same agent with parametersα\\alpha\.
#### DisGuADOverview\.
Our proposed frameworkDisGuADis a plug\-in clarification policy for the interactive setting above\.DisGuADspecializes clarification selection while leaving the underlying agentℳα\\mathcal\{M\}\_\{\\alpha\}and its final SQL generator unchanged\. Its central idea is to represent ambiguity through*SQL query disagreement*: if two plausible interpretations of the ambiguous questionq~\\tilde\{q\}induce different SQL decisions, the uncertainty responsible for that difference is a useful clarification target\.DisGuADexposes such differences with contrastive SQL probes and maps them back to concepts that the user can clarify\. The complete workflow can be formalized as:
qt\(Ask\)=DisGuAD\(q~,𝒮,𝒦,Ht−1\)\.q\_\{t\}^\{\(\\textsc\{Ask\}\)\}=\\operatorname\{\\textsc\{DisGuAD\}\}\\bigl\(\\tilde\{q\},\\,\\mathcal\{S\},\\,\\mathcal\{K\},\\,H\_\{t\-1\}\\bigr\)\.\(3\)DisGuADfirst elicits contrastive SQL interpretations ofq~\\tilde\{q\}, identifies the semantic decisions on which these interpretations disagree, and maps the supported disagreements back to concepts that can be clarified by the user\. Finally, it selects the highest\-priority unresolved ambiguity and verbalizes it using a deterministic question template\. The following sections instantiate each component\.
### 3\.2Query\-term Inventory
The query\-term inventory defines the natural\-language anchors available for clarification\. We use an LLM\-based extractor to identify short spans inq~\\tilde\{q\}and assign each span a coarse ambiguity type:
𝒳=Ext\(q~,𝒮,𝒦,𝒳~\)=\{\(xk,ck\)\}k=1M,ck∈𝒞\(NL\),\\mathcal\{X\}=\\textsc\{Ext\}\(\\tilde\{q\},\\,\\mathcal\{S\},\\,\\mathcal\{K\};\\widetilde\{\\mathcal\{X\}\}\)=\\\{\(x\_\{k\},c\_\{k\}\)\\\}\_\{k=1\}^\{M\},\\,c\_\{k\}\\in\\mathcal\{C\}^\{\(\\textsc\{NL\}\)\},\(4\)wherexkx\_\{k\}is a short text span inq~\\tilde\{q\}that may serve as a clarification anchor, andckc\_\{k\}denotes its coarse ambiguity type\. The auxiliary set𝒳~\\widetilde\{\\mathcal\{X\}\}contains heuristically identified candidates supplied as weak extraction evidence, while𝒞\(NL\)\\mathcal\{C\}^\{\(\\textsc\{NL\}\)\}comprises lexical, syntactic, semantic, schema\-linking, query\-intent, and knowledge\-linking ambiguity types\. These heuristic candidates improve extraction coverage but do not determine which term should ultimately be queried\. Thus,𝒳\\mathcal\{X\}identifies potential clarification anchors, whose SQL relevance is determined by the subsequent disagreement analysis\.
Figure 2:Overview ofDisGuAD\. It extracts clarification anchors, elicits contrastive SQL interpretations, and aggregates disagreement\. The evidence is mapped to user\-facing terms, prioritized against the dialogue state, and converted into a clarification question before SQL generation\.
### 3\.3Contrastive SQL Interpretation Probes
To expose alternative SQL decisions,DisGuADelicitsNNplausible PostgreSQL interpretations through four controlled probe families𝒫=\{SUB,REL,DEF,CF\}\\mathcal\{P\}=\\\{\\texttt\{SUB\},\\,\\texttt\{REL\},\\,\\texttt\{DEF\},\\,\\texttt\{CF\}\\\}\. This controlled elicitation is designed to reduce incidental variation caused by repeatedly sampling from one single prompt\. For theii\-th probe, letpi∈𝒫p\_\{i\}\\in\\mathcal\{P\}denote its probe family\. We generate a plausible SQL query together with metadata describing the assumptions under which it was produced:
\(yi\(Prb\),mi\)=Prbpi\(q~,𝒮,𝒦,𝒳\),\(y^\{\(\\textsc\{Prb\}\)\}\_\{i\},m\_\{i\}\)=\\textsc\{Prb\}\_\{p\_\{i\}\}\(\\tilde\{q\},\\,\\mathcal\{S\},\\,\\mathcal\{K\},\\,\\mathcal\{X\}\),\\,\(5\)whereyi\(Prb\)y^\{\(\\textsc\{Prb\}\)\}\_\{i\}is a plausible PostgreSQL interpretation andmim\_\{i\}is the metadata describing its underlying assumptions, including the probe family, ambiguity axis, anchored span, expected changed clauses, referenced schema elements, and relevant knowledge identifiers\.
The four probe families expose complementary sources of query\-level variation:subgoal contrast\(SUB\) varies major query decisions, including projections, tables, predicates, aggregations, ordering, limits, and database operations;relational route\(REL\) explores alternative table paths, joins, grouping levels, filter scopes, and final projections;definition sensitivity\(DEF\) tests alternative definitions of scores, rates, ratios, and other domain\-specific metrics; andsingle\-axis counterfactuals\(CF\) vary one ambiguity axis while holding the remaining SQL decisions fixed\.
Across these families,mim\_\{i\}traces each query variation back to the assumption that produced it\. The probe\-generated SQL queries serve only as diagnostic evidence for the subsequent disagreement analysis; none is selected or reranked as the final answer\.
### 3\.4SQL Disagreement Analysis
#### Component\-level Disagreement\.
Each probe\-generated SQL query is parsed into the decisions that define its execution semantics\. These decisions include the database operation \(e\.g\.,SELECT,UPDATE, orDELETE\), projected attributes, referenced tables and join paths, filtering predicates, derived formulas, grouping keys,HAVINGconditions, ordering criteria, and row limits\. We canonicalize each component before comparison so that formatting, aliases, and other surface\-level variations do not create spurious disagreements\. For each pair of probe outputs, we then define:
Δij=SQLDiff\(yi\(Prb\),yj\(Prb\)\),1≤i<j≤N\.\\Delta\_\{ij\}=\\operatorname\{\\textsc\{SQLDiff\}\}\\left\(y\_\{i\}^\{\(\\textsc\{Prb\}\)\},\\,y\_\{j\}^\{\(\\textsc\{Prb\}\)\}\\right\),\\,1\\leq i<j\\leq N\.\(6\)The operator returns the canonical SQL components on which the two interpretations disagree\. Thus,Δij\\Delta\_\{ij\}captures structural disagreement between the SQL queries rather than textual variation\.
#### Disagreement Voting\.
We group component\-level differences into a predefined set of SQL ambiguity types𝒞\(SQL\)\\mathcal\{C\}^\{\(\\textsc\{SQL\}\)\}, including projection, schema or join, filter or threshold, definition or granularity, ranking, and database\-operation ambiguity\. The operatorType\(Δij\)\\operatorname\{\\textsc\{Type\}\}\(\\Delta\_\{ij\}\)returns the subset of these ambiguity types indicated by the changed components inΔij\\Delta\_\{ij\}\. Because a difference observed in only one probe pair may be incidental, we define the disagreement vote for each typec∈𝒞\(SQL\)c\\in\\mathcal\{C\}^\{\(\\textsc\{SQL\}\)\}as
v\(c\)=∑1≤i<j≤N𝟙\[c∈Type\(Δij\)\]\.v\(c\)=\\sum\_\{1\\leq i<j\\leq N\}\\mathds\{1\}\\left\[c\\in\\operatorname\{\\textsc\{Type\}\}\(\\Delta\_\{ij\}\)\\right\]\.\(7\)Here,𝟙\[⋅\]\\mathds\{1\}\[\\cdot\]is the indicator function, andv\(c\)v\(c\)counts the number of probe pairs that disagree on ambiguity typecc\. A largerv\(c\)v\(c\)provides stronger disagreement evidence that the corresponding ambiguity affects the resulting SQL query; smaller value suggests that the ambiguity may be incidental\.
### 3\.5Mapping SQL Disagreement to User\-Facing Ambiguity
Component\-level disagreements identify unstable SQL decisions, but clause names and schema elements cannot be presented directly as clarification questions\.DisGuADtherefore uses an LLM\-based mapper to attribute the disagreement evidence to the clarification anchors in𝒳\\mathcal\{X\}:
𝒜=Map\(𝒳,\{\(yi\(Prb\),mi\)\}i=1N,\{Δij\}i<j,\{v\(c\)\}c∈𝒞\(SQL\),𝒮,𝒦\)=\{aℓ\}ℓ=1L\.\\mathcal\{A\}=\\textsc\{Map\}\\Bigl\(\\mathcal\{X\},\\,\\bigl\\\{\(y\_\{i\}^\{\(\\textsc\{Prb\}\)\},m\_\{i\}\)\\bigr\\\}\_\{i=1\}^\{N\},\\,\\bigl\\\{\\Delta\_\{ij\}\\bigr\\\}\_\{i<j\},\\,\\bigl\\\{v\(c\)\\bigr\\\}\_\{c\\in\\mathcal\{C\}^\{\(\\textsc\{SQL\}\)\}\},\\,\\mathcal\{S\},\\mathcal\{K\}\\Bigr\)=\\\{a\_\{\\ell\}\\\}\_\{\\ell=1\}^\{L\}\.\(8\)Here,𝒜\\mathcal\{A\}is the resulting pool of user\-facing ambiguity candidates\. Eachaℓ∈𝒜a\_\{\\ell\}\\in\\mathcal\{A\}represents a clarification target grounded in the original request and records its ambiguity type, affected SQL decisions, supporting probe interpretations, disagreement vote, definition requirements, and base priority\.
The mapper attributes observed changes in projections, predicates, joins, grouping, ordering, limits, and database operations to the interpretation of an anchor in𝒳\\mathcal\{X\}\. This attribution is particularly important for knowledge\-intensive expressions such as “stability score”, “release decision rule”, or “risk indicator”, whose SQL realizations may depend on a formula, threshold, JSON path, or external definition rather than a single schema attribute\. Terms grounded in𝒦\\mathcal\{K\}may also be considered whenq~\\tilde\{q\}refers to the corresponding concept\. SQL artifacts such as clause names, table aliases, and generated column aliases are excluded, while generic spans such as “ID”, “data” or “result” are retained only when the disagreement evidence reveals a concrete schema or projection conflict\.
### 3\.6Clarification Prioritization and Dialogue State
#### Ambiguity Prioritization\.
DisGuADassigns each mapped ambiguitya∈𝒜a\\in\\mathcal\{A\}a priority score:
S\(a\)=S\(Base\)\(a\)\+𝝀⊤ϕ\(a\),\\operatorname\{S\}\(a\)=\\operatorname\{S\}^\{\(\\textsc\{Base\}\)\}\(a\)\+\\bm\{\\lambda\}^\{\\top\}\\bm\{\\phi\}\(a\),\(9\)whereS\(a\)\\operatorname\{S\}\(a\)is the target score andS\(Base\)\(a\)\\operatorname\{S\}^\{\(\\textsc\{Base\}\)\}\(a\)is the mapper\-assigned base priority;ϕ\(a\)∈\{0,1\}4\\bm\{\\phi\}\(a\)\\in\\\{0,1\\\}^\{4\}encodes whetheraais critical, definition\-dependent, high\-impact, or associated with an identifiable answer source, and𝝀∈ℝ≥04\\bm\{\\lambda\}\\in\\mathbb\{R\}\_\{\\geq 0\}^\{4\}contains the weights to control the contribution of these properties\.
#### Dialogue State\.
To avoid repeated questions,ℛt\\mathcal\{R\}\_\{t\}records the normalized clarification targets queried through turntt, withℛ0=∅\\mathcal\{R\}\_\{0\}=\\varnothing\. LetTarget\(a\)\\operatorname\{\\textsc\{Target\}\}\(a\)denote the normalized clarification target associated withaa\. The eligible ambiguity set at turnttis:
𝒜t=\{a∈𝒜\|Askable\(a\)∧Target\(a\)∉ℛt−1\},\\mathcal\{A\}\_\{t\}=\\left\\\{a\\in\\mathcal\{A\}\\;\\middle\|\\;\\operatorname\{\\textsc\{Askable\}\}\(a\)\\ \\land\\ \\operatorname\{\\textsc\{Target\}\}\(a\)\\notin\\mathcal\{R\}\_\{t\-1\}\\right\\\},\(10\)whereAskable\(a\)\\operatorname\{\\textsc\{Askable\}\}\(a\)indicates whetheraacan be verbalized as a user\-answerable question, andTarget\\operatorname\{\\textsc\{Target\}\}returns its normalized clarification target\. When𝒜t\\mathcal\{A\}\_\{t\}is nonempty,DisGuADselects the highest\-priority candidate and converts it into a clarification question:
at⋆=argmaxa∈𝒜tS\(a\),qt\(Ask\)=Temp\(at⋆\)\.a\_\{t\}^\{\\star\}=\\operatorname\*\{arg\\,max\}\_\{a\\in\\mathcal\{A\}\_\{t\}\}\\operatorname\{S\}\(a\),\\,q\_\{t\}^\{\(\\textsc\{Ask\}\)\}=\\operatorname\{\\textsc\{Temp\}\}\(a\_\{t\}^\{\\star\}\)\.\(11\)The templateTemp\(⋅\)\\operatorname\{\\textsc\{Temp\}\}\(\\cdot\)requests a definition or formula for definition ambiguities, an ordering criterion or row limit for ranking ambiguities, an intended entity or attribute for schema ambiguities, and the intended action for operation ambiguities\. If no mapped ambiguity is eligible,DisGuADfirst selects an unqueried anchor from𝒳\\mathcal\{X\}, which is ranked below all disagreement\-supported candidates\. If neither source provides an eligible target, question generation falls back to the underlying agentℳα\(Ask\)\\mathcal\{M\}\_\{\\alpha\}^\{\(\\textsc\{Ask\}\)\}\. After a mapped or inventory\-based question is issued, its normalized target is added toℛt\\mathcal\{R\}\_\{t\}\. Under the benchmark protocol, the resulting question is emitted as<s\>\[QUESTION\]</s\>\.
## 4Experiments
### 4\.1Experimental Setups
#### Dataset\.
We useBIRD\-Interact\([Huo et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib2)\), a dynamic interactive text\-to\-SQL benchmark that evaluates SQL generation through multi\-turn interaction\. Each task consists of an ambiguous priority question followed by a context\-dependent follow\-up question in a PostgreSQL environment with database metadata and hierarchical external knowledge\. We evaluate our method on bothBIRD\-Interact\-FullandBIRD\-Interact\-Liteunder the officialcc\-Interactsetting, where the system follows a predefined clarification protocol before submitting the final SQL query\.
#### Evaluation Metrics\.
FollowingBIRD\-Interact, we reportPriority Question Success Rate \(PQ\-SR\),Follow\-up Question Success Rate \(FQ\-SR\), andNormalized Reward \(Reward\)\. PQ\-SR measures the success rate on the initial priority question, while FQ\-SR measures the success rate on the context\-dependent follow\-up question\. A SQL query is counted as successful only if it passes all executable test cases\. Reward is the official normalized task\-level score on a 0–100 scale, jointly measuring performance across the priority and follow\-up questions\.
#### Compared Methods\.
We compare two groups of methods\. For interactive text\-to\-SQL,Vanilladirectly generates SQL without clarification,BIRD\-Interactuses the benchmark’s standard interaction pipeline, andDisGuADreplaces the default ambiguity\-selection policy with disagreement\-guided clarification\. To evaluate transferability, we inject clarification signals into two representative static text\-to\-SQL frameworks,DAIL\-SQL\([Gao et al\., 2024](https://arxiv.org/html/2611.21645#bib.bib10)\)andDIN\-SQL\([Pourreza and Rafiei, 2023](https://arxiv.org/html/2611.21645#bib.bib13)\)\. For each framework, we compareVanilla,w/ Original, andw/DisGuAD, where the latter two add the clarification dialogue from the original policy orDisGuAD\. Because the downstream SQL generator is fixed, this comparison isolates the value of the clarification signal\.
#### Implementation Details\.
In all main experiments,DisGuADgeneratesK=8K=8SQL candidates for each ambiguous user query\. The candidate budget is evenly distributed across four complementary reasoning paths\. We instantiateDisGuADwith two LLM backbones: DeepSeek\-V4\-Flash and GPT\-5\.6\-Luna\. For each experiment, we use the same backbone for the system model, user simulator, and ambiguity module to avoid confounding effects from cross\-model mismatch\. All LLM calls are made through the official model APIs\. Experiments are conducted in the conversational setting using the officialBIRD\-InteractDocker evaluator for evaluation, together with the PostgreSQL database containers provided by the benchmark\. Local orchestration, database management, and evaluation scripts are run on a machine equipped with six NVIDIA RTX 3090 GPUs\.
Table 1:Main results onBIRD\-Interact\-LiteandBIRD\-Interact\-Full\. We report Priority Question Success Rate \(PQ\-SR\), Follow\-up Question Success Rate \(FQ\-SR\), and normalized Reward\. The upper block evaluatesDisGuADas an interactive text\-to\-SQL method, while the lower block evaluates whetherDisGuAD\-selected signals transfer to static text\-to\-SQL frameworks\. Best results within each comparable group are in bold, and second\-best results are underlined\. Parenthesized gains are measured against the corresponding Original setting\.FrameworkSettingLiteFullPQ\-SR↑\\uparrowFQ\-SR↑\\uparrowReward↑\\uparrowPQ\-SR↑\\uparrowFQ\-SR↑\\uparrowReward↑\\uparrowDeepSeek\-V4\-FlashVanillaNo interaction16\.009\.0013\.9015\.839\.5013\.93BIRD\-InteractOriginal43\.0028\.0038\.5029\.0016\.5025\.25DisGuADDisGuAD50\.67\(\+7\.67\)31\.33\(\+3\.33\)44\.87\(\+6\.37\)33\.83\(\+4\.83\)21\.00\(\+4\.50\)29\.98\(\+4\.73\)DAIL\-SQLVanilla10\.005\.338\.6010\.676\.179\.32DAIL\-SQLw/ Original48\.6731\.3343\.4742\.6726\.8337\.92DAIL\-SQLw/DisGuAD52\.33\(\+3\.66\)32\.33\(\+1\.00\)46\.33\(\+2\.86\)44\.50\(\+1\.83\)27\.83\(\+1\.00\)39\.50\(\+1\.58\)DIN\-SQLVanilla10\.005\.008\.5011\.837\.1710\.43DIN\-SQLw/ Original50\.6732\.0045\.0741\.8325\.6736\.98DIN\-SQLw/DisGuAD55\.00\(\+4\.33\)34\.00\(\+2\.00\)48\.70\(\+3\.63\)45\.00\(\+3\.17\)28\.50\(\+2\.83\)40\.05\(\+3\.07\)GPT\-5\.6\-LunaVanillaNo interaction17\.009\.0014\.6018\.1710\.1715\.77BIRD\-InteractOriginal30\.0018\.3326\.5021\.6712\.1718\.82DisGuADDisGuAD40\.67\(\+10\.67\)23\.33\(\+5\.00\)35\.47\(\+8\.97\)26\.67\(\+5\.00\)15\.17\(\+3\.00\)23\.22\(\+4\.40\)DAIL\-SQLVanilla10\.334\.008\.4313\.178\.3311\.72DAIL\-SQLw/ Original31\.6718\.6727\.7721\.5014\.6719\.45DAIL\-SQLw/DisGuAD47\.33\(\+15\.66\)27\.67\(\+9\.00\)41\.43\(\+13\.66\)33\.17\(\+11\.67\)19\.67\(\+5\.00\)29\.12\(\+9\.67\)DIN\-SQLVanilla10\.335\.338\.8314\.338\.5012\.58DIN\-SQLw/ Original31\.0017\.6727\.0020\.6713\.1718\.42DIN\-SQLw/DisGuAD46\.67\(\+15\.67\)27\.67\(\+10\.00\)40\.97\(\+13\.97\)33\.33\(\+12\.66\)20\.67\(\+7\.50\)29\.53\(\+11\.11\)
### 4\.2Main Results
Table[1](https://arxiv.org/html/2611.21645#S4.T1)reports the main results onBIRD\-Interact\-LiteandBIRD\-Interact\-Full\. The upper block comparesDisGuADwith Vanilla and the standardBIRD\-Interactpolicy\. Across both datasets and both LLM backbones,DisGuADachieves the best PQ\-SR, FQ\-SR, and Reward\. Compared with Original,DisGuADimproves Reward by 6\.37/4\.73 points with DeepSeek\-V4\-Flash and by 8\.97/4\.40 points with GPT\-5\.6\-Luna onLite/Full\. It also largely outperforms Vanilla, whose Reward remains much lower under both backbones\. These results show that ambiguous text\-to\-SQL cannot be reliably solved from the original query alone, and that selecting SQL\-impactful clarification targets is crucial for final SQL quality\.
The lower block evaluates whetherDisGuAD’s clarification signals can benefit static text\-to\-SQL frameworks\. We use DAIL\-SQL and DIN\-SQL as representative static frameworks and compare Vanilla, w/ Original, and w/DisGuAD\. Adding clarification context improves over Vanilla in all settings, and replacing Original withDisGuADfurther improves Reward in every case\. The gains range from \+1\.58 to \+3\.63 points with DeepSeek\-V4\-Flash and from \+9\.67 to \+13\.97 points with GPT\-5\.6\-Luna\. Since the downstream SQL generator is fixed within each comparison, these gains isolate the benefit ofDisGuAD’s ambiguity\-selection strategy rather than a stronger SQL decoder\.
Overall,DisGuADimproves the interactive policy itself and provides reusable clarification signals for external SQL generators, supporting its role as a plug\-in ambiguity\-selection layer for interaction\-augmented text\-to\-SQL\.
### 4\.3Clarification Target Analysis
We analyze whetherDisGuADidentifies better clarification targets using the golden ambiguity annotations of benchmark\. Clarification questions are automatically matched to golden ambiguity terms by normalized string matching and token overlap\. We report five metrics: Cov@3 and Cov@All measure coverage of SQL\-impacting critical ambiguity terms within the first three questions and all questions, respectively; Know\. Cov@3 measures early coverage of knowledge\-related ambiguity; Single\-target measures the fraction of questions that match exactly one golden ambiguity term; and Repeat measures redundant clarification\.
Table 2:Clarification\-target quality ofDisGuADand the original policy against gold annotations onBIRD\-Interact\-Full\. Best results per backbone are bold\.BackboneMethodCov@3Cov@AllKnow\. Cov@3Single\-targetRepeat↓\\downarrowDeepSeek\-V4\-FlashOriginal48\.4348\.6247\.4438\.317\.38DeepSeek\-V4\-FlashDisGuAD66\.0682\.7554\.6844\.056\.14GPT\-5\.6\-LunaOriginal45\.3845\.7649\.6137\.9411\.17GPT\-5\.6\-LunaDisGuAD67\.6085\.1454\.1345\.605\.85
Table[2](https://arxiv.org/html/2611.21645#S4.T2)shows thatDisGuADimproves all clarification\-target metrics across both backbones\. Most notably, Cov@All increases from 48\.62% to 82\.75% with DeepSeek\-V4\-Flash and from 45\.76% to 85\.14% with GPT\-5\.6\-Luna, showing thatDisGuADcovers substantially more SQL\-impacting ambiguity targets\. The gains in Know\. Cov@3 and Single\-target further indicate thatDisGuADbetter identifies knowledge\-related ambiguities and produces more focused clarification questions, while the lower Repeat rate shows less redundant clarification\.
Figure 3:Golden ambiguity coverage onBIRD\-Interact\-Full\.DisGuADimproves SQL\-impacting target coverage across both backbones; “Know\.” denotes knowledge\-linking ambiguity\.Figure[3](https://arxiv.org/html/2611.21645#S4.F3)further shows that the improvement is consistent across major ambiguity types, including knowledge\-linking, intent, schema\-linking, and semantic ambiguity\. This supports the central motivation ofDisGuAD: SQL disagreement among plausible interpretations helps identify user\-facing ambiguity targets that are more likely to affect concrete SQL decisions\.
### 4\.4Sensitivity to Candidate Budget
Figure 4:SQL\-candidate budget sensitivity onBIRD\-Interact\-Full\. LargerKKgenerally improves all metrics; the dashed line marks the main settingK=8K=8\.Figure[4](https://arxiv.org/html/2611.21645#S4.F4)studies the effect of the SQL\-candidate budgetKKonBIRD\-Interact\-Full\. IncreasingKKfrom 4 to 20 improves Initial success from 23\.00% to 26\.00%, Debug success from 25\.17% to 28\.50%, Follow\-up success from 14\.83% to 16\.83%, and Reward from 22\.07 to 25\.00, indicating that a larger candidate budget exposes more diverse SQL\-level disagreement signals and helpsDisGuADselect more useful clarification targets\. The gains are not strictly monotonic, asK=12K=12slightly underperformsK=8K=8on several metrics, suggesting that candidate quality and diversity also matter\. This supports the use of SQL candidates as ambiguity sensors rather than final\-answer candidates\. We useK=8K=8in the main experiments as a practical trade\-off, since larger budgets can further improve performance but require additional LLM calls for candidate generation\.
### 4\.5Ablation Study
We conduct ablation studies to understand the contribution of the main components inDisGuAD\. All ablations are conducted onBIRD\-Interact\-Fullwith GPT\-5\.6\-Luna as the backbone\. We consider two groups of ablations\. The first group removes LLM\-assisted ambiguity modules, including the query\-term inventory extractor and the disagreement\-to\-ambiguity mapper\. The second group removes one contrastive SQL interpretation probe family at a time\. Following the main results, we report PQ\-SR, FQ\-SR, and normalized Reward\.
Table 3:Ablation study with GPT\-5\.6\-Luna\.VariantPQ\-SRFQ\-SRRewardFullDisGuAD26\.6715\.1723\.22w/o Query\-term Inventory23\.3313\.3320\.33w/o Disagreement Mapping24\.5014\.5021\.50w/o Subgoal\-contrast26\.1714\.8322\.77w/o Relational\-route25\.8315\.0022\.58w/o Definition\-sensitive25\.6714\.6722\.37w/o Single\-axis CF26\.0015\.0022\.70Table[3](https://arxiv.org/html/2611.21645#S4.T3)shows that both LLM\-assisted ambiguity modules are important\. Removing the query\-term inventory decreases PQ\-SR from 26\.67% to 23\.33% and Reward from 23\.22 to 20\.33\. This indicates that extracting user\-facing ambiguity anchors is necessary for connecting clarification to terms that users can understand and answer\. Removing the disagreement mapping module also causes a clear drop, reducing PQ\-SR to 24\.50% and Reward to 21\.50\. This confirms that SQL\-level disagreement alone is insufficient;DisGuADneeds the mapping step to attribute program differences back to askable ambiguity targets\.
The probe\-family ablations show that the contrastive SQL interpretation probes provide complementary evidence\. Removing subgoal\-contrast probes or relational\-route probes lowers Reward from 23\.22 to 22\.77 and 22\.58, respectively\. This suggests that decomposing the query into SQL subgoals and exploring alternative relational routes both help expose ambiguity that affects the final SQL program\. The ablations on definition\-sensitive and single\-axis counterfactual probes show a similar pattern, reducing Reward to 22\.37 and 22\.70, respectively\. These results indicate that formula\-oriented interpretations and controlled counterfactual variations provide useful additional disagreement signals\. Overall, the fullDisGuADmodel achieves the best Reward, supporting the effectiveness of combining user\-facing term extraction, SQL\-disagreement attribution, and diverse contrastive SQL probes\.
## 5Conclusion
In this paper, we proposeDisGuAD, a plug\-in clarification policy that identifies SQL\-impacting ambiguity through disagreement among plausible SQL interpretations\.DisGuADelicits contrastive queries, compares their canonical components, and attributes recurring differences to user\-facing clarification targets while leaving the downstream SQL generator unchanged\. Experiments onBIRD\-Interactdemonstrate consistent improvements in PQ\-SR, FQ\-SR, and Reward across two LLM backbones\. Clarifications selected byDisGuADalso improve two widely used text\-to\-SQL frameworks, demonstrating that its interaction signals transfer across downstream SQL generators\. Ablation studies further confirm the contributions of query\-term extraction, disagreement mapping, and controlled SQL probes\. These results establish SQL disagreement as actionable evidence for deciding what an interactive text\-to\-SQL agent should ask\.
## AI Use Statement
In this work, we used generative AI tools to assist with manuscript writing and code development\. Specifically, generative AI was used for language editing, improving readability, and drafting or revising parts of the manuscript, as well as for assisting with code writing and debugging\. We did not use generative AI tools for research methodology design, hypothesis formulation, or experimental design\. All AI\-assisted text and code were reviewed and verified by the authors\. We take full responsibility for the final content of this work, including all text, code, claims, and results\.
## References
- A\. Bhaskar, T\. Tomar, A\. Sathe, and S\. SarawagiBenchmarking and improving text\-to\-SQL generation under ambiguity\.InEmpirical Methods in Natural Language Processing \(EMNLP\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px3.p1.1),[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Chen and Mueller \(2024\)J\. Chen and J\. MuellerQuantifying uncertainty in answers from any language model and enhancing their trustworthiness\.InAssociation for Computational Linguistics \(ACL\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px4.p1.1)\.
- Dinget al\.\(2026\)Z\. Ding, Y\. Lin, T\. Zeng, R\. Zhu, B\. Ding, and J\. ZhouAmbiSQL: interactive ambiguity detection and resolution for text\-to\-sql\.InConference on Management of Data \(SIGMOD\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px3.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p1.1),[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Elgoharyet al\.\(2020\)A\. Elgohary, S\. Hosseini, and A\. Hassan AwadallahSpeak to your parser: interactive text\-to\-SQL with natural language feedback\.InAssociation for Computational Linguistics \(ACL\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px2.p1.1)\.
- Farquharet al\.\(2024\)S\. Farquhar, J\. Kossen, L\. Kuhn, and Y\. GalDetecting hallucinations in large language models using semantic entropy\.Nature\.Cited by:[§1](https://arxiv.org/html/2611.21645#S1.p4.1)\.
- Gaoet al\.\(2024\)D\. Gao, H\. Wang, Y\. Li, X\. Sun, Y\. Qian, B\. Ding, and J\. ZhouText\-to\-sql empowered by large language models: a benchmark evaluation\.InInternational Conference on Very Large Data Bases \(VLDB\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px1.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p2.1),[§1](https://arxiv.org/html/2611.21645#S1.p5.1),[§4\.1](https://arxiv.org/html/2611.21645#S4.SS1.SSS0.Px3.p1.1)\.
- Honget al\.\(2026\)Z\. Hong, H\. Chen, Z\. Yuan, Q\. Zhang, L\. Zhuang, Q\. Liao, F\. Huang, Y\. Song, and X\. HuangErrorLLM: modeling sql errors for text\-to\-sql refinement\.InConference on Knowledge Discovery and Data Mining \(KDD\),Cited by:[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Honget al\.\(2025\)Z\. Hong, Z\. Yuan, Q\. Zhang, H\. Chen, J\. Dong, F\. Huang, and X\. HuangNext\-generation database interfaces: a survey of llm\-based text\-to\-sql\.IEEE Transactions on Knowledge and Data Engineering \(TKDE\)\.Cited by:[§1](https://arxiv.org/html/2611.21645#S1.p1.1)\.
- Huoet al\.\(2026\)N\. Huo, X\. Xu, J\. Li, P\. Jacobsson, S\. Lin, B\. Qin, B\. Hui, X\. Li, G\. Qu, S\. Si, L\. Han, E\. Alexander, X\. Zhu, R\. Qin, R\. Yu, Y\. Jin, F\. Zhou, W\. Zhong, Y\. Chen, H\. Liu, C\. Ma, F\. Ozcan, Y\. Papakonstantinou, and R\. ChengBIRD\-INTERACT: re\-imagining text\-to\-SQL evaluation via lens of dynamic interactions\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px2.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p2.1),[§1](https://arxiv.org/html/2611.21645#S1.p3.1),[§1](https://arxiv.org/html/2611.21645#S1.p5.1),[§2](https://arxiv.org/html/2611.21645#S2.p1.1),[§4\.1](https://arxiv.org/html/2611.21645#S4.SS1.SSS0.Px1.p1.1)\.
- Kuhnet al\.\(2023\)L\. Kuhn, Y\. Gal, and S\. FarquharSemantic Uncertainty: Linguistic Invariances for Uncertainty Estimation in Natural Language Generation\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px4.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p4.1),[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Leiet al\.\(2025\)F\. Lei, J\. Chen, Y\. Ye, R\. Cao, D\. Shin, H\. SU, Z\. Su, H\. Gao, W\. Hu, P\. Yin, V\. Zhong, C\. Xiong, R\. Sun, Q\. Liu, S\. Wang, and T\. YuSpider 2\.0: evaluating language models on real\-world enterprise text\-to\-SQL workflows\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Liet al\.\(2026a\)B\. Li, C\. Chen, Z\. Xue, Y\. Mei, and Y\. LuoDeepEye\-sql: a software\-engineering\-inspired text\-to\-sql framework\.InConference on Management of Data \(SIGMOD\),Cited by:[§1](https://arxiv.org/html/2611.21645#S1.p4.1)\.
- Liet al\.\(2026b\)B\. Li, O\. O\. K\. Hei, Y\. Yu, and Y\. LuoDPC: training\-free text\-to\-SQL candidate selection via dual\-paradigm consistency\.InAssociation for Computational Linguistics \(ACL\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px1.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p4.1)\.
- Liet al\.\(2025\)H\. Li, S\. Wu, X\. Zhang, X\. Huang, J\. Zhang, F\. Jiang, S\. Wang, T\. Zhang, J\. Chen, R\. Shi, H\. Chen, and C\. LiOmniSQL: synthesizing high\-quality text\-to\-sql data at scale\.InInternational Conference on Very Large Data Bases \(VLDB\),Cited by:[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Liet al\.\(2023a\)H\. Li, J\. Zhang, C\. Li, and H\. ChenResdsql: decoupling schema linking and skeleton parsing for text\-to\-sql\.InConference on Artificial Intelligence \(AAAI\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Liet al\.\(2024\)H\. Li, J\. Zhang, H\. Liu, J\. Fan, X\. Zhang, J\. Zhu, R\. Wei, H\. Pan, C\. Li, and H\. ChenCodeS: towards building open\-source language models for text\-to\-sql\.InConference on Management of Data \(SIGMOD\),Cited by:[§1](https://arxiv.org/html/2611.21645#S1.p4.1)\.
- Liet al\.\(2023b\)J\. Li, B\. Hui, G\. QU, J\. Yang, B\. Li, B\. Li, B\. Wang, B\. Qin, R\. Geng, N\. Huo, X\. Zhou, C\. Ma, G\. Li, K\. Chang, F\. Huang, R\. Cheng, and Y\. LiCan LLM already serve as a database interface? a BIg bench for large\-scale database grounded text\-to\-SQLs\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[§1](https://arxiv.org/html/2611.21645#S1.p1.1)\.
- Liet al\.\(2020\)Y\. Li, B\. Chen, Q\. Liu, Y\. Gao, J\. Lou, Y\. Zhang, and D\. Zhang“What do you mean by that?” a parser\-independent interactive approach for enhancing text\-to\-SQL\.InEmpirical Methods in Natural Language Processing \(EMNLP\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px2.p1.1)\.
- Liuet al\.\(2025a\)J\. Liu, J\. Peng, X\. Wu, X\. Li, T\. Ge, B\. Zheng, and Y\. LiuDo not abstain\! identify and solve the uncertainty\.InAssociation for Computational Linguistics \(ACL\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px4.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p1.1)\.
- Liuet al\.\(2025b\)X\. Liu, S\. Shen, B\. Li, P\. Ma, R\. Jiang, Y\. Zhang, J\. Fan, G\. Li, N\. Tang, and Y\. LuoA survey of text\-to\-sql in the era of llms: where are we, and where are we going?\.IEEE Transactions on Knowledge and Data Engineering \(TKDE\)\.Cited by:[§1](https://arxiv.org/html/2611.21645#S1.p1.1)\.
- Liuet al\.\(2026\)Y\. Liu, J\. Lin, Z\. Hong, Z\. Yuan, S\. Chen, H\. Chen, Q\. Zhang, X\. Huang, and F\. HuangEvaluating llms on conversational text\-to\-sql under chain ambiguity and intent drift\.InEmpirical Methods in Natural Language Processing \(EMNLP\),Cited by:[§1](https://arxiv.org/html/2611.21645#S1.p1.1)\.
- Manakulet al\.\(2023\)P\. Manakul, A\. Liusie, and M\. GalesSelfCheckGPT: zero\-resource black\-box hallucination detection for generative large language models\.InEmpirical Methods in Natural Language Processing \(EMNLP\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px4.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p4.1),[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Nanet al\.\(2025\)Y\. Nan, P\. He, R\. Tandon, and H\. XuCan multiple responses from an LLM reveal the sources of its uncertainty?\.InFindings of Empirical Methods in Natural Language Processing \(EMNLP\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px4.p1.1)\.
- Pourrezaet al\.\(2025\)M\. Pourreza, H\. Li, R\. Sun, Y\. Chung, S\. Talaei, G\. T\. Kakkar, Y\. Gan, A\. Saberi, F\. Ozcan, and S\. O\. ArikChase\-sql: multi\-path reasoning and preference optimized candidate selection in text\-to\-sql\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px1.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p4.1)\.
- Pourreza and Rafiei \(2023\)M\. Pourreza and D\. RafieiDIN\-SQL: decomposed in\-context learning of text\-to\-SQL with self\-correction\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[§1](https://arxiv.org/html/2611.21645#S1.p5.1),[§2](https://arxiv.org/html/2611.21645#S2.p1.1),[§4\.1](https://arxiv.org/html/2611.21645#S4.SS1.SSS0.Px3.p1.1)\.
- Quet al\.\(2024\)G\. Qu, J\. Li, B\. Li, B\. Qin, N\. Huo, C\. Ma, and R\. ChengBefore generation, align it\! a novel and effective strategy for mitigating hallucinations in text\-to\-sql generation\.InFindings of Association for Computational Linguistics \(ACL\),Cited by:[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Saparina and Lapata \(2024\)I\. Saparina and M\. LapataAMBROSIA: a benchmark for parsing ambiguous questions into database queries\.InAdvances in Neural Information Processing Systems \(NeurIPS\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px3.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p2.1),[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Scholaket al\.\(2021\)T\. Scholak, N\. Schucher, and D\. BahdanauPICARD: parsing incrementally for constrained auto\-regressive decoding from language models\.InEmpirical Methods in Natural Language Processing \(EMNLP\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px1.p1.1)\.
- Wanget al\.\(2020\)B\. Wang, R\. Shin, X\. Liu, O\. Polozov, and M\. RichardsonRAT\-SQL: relation\-aware schema encoding and linking for text\-to\-SQL parsers\.InAssociation for Computational Linguistics \(ACL\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Wanget al\.\(2024\)B\. Wang, C\. Ren, J\. Yang, X\. Liang, J\. Bai, L\. Chai, Z\. Yan, Q\. Zhang, D\. Yin, X\. Sun, and Z\. LiMAC\-sql: a multi\-agent collaborative framework for text\-to\-sql\.InInternational Conference on Computational Linguistics \(COLING\),Cited by:[§1](https://arxiv.org/html/2611.21645#S1.p4.1)\.
- Xieet al\.\(2025\)X\. Xie, G\. Xu, L\. Zhao, and R\. GuoOpenSearch\-sql: enhancing text\-to\-sql with dynamic few\-shot and consistency alignment\.InConference on Management of Data \(SIGMOD\),Cited by:[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Yaoet al\.\(2019\)Z\. Yao, Y\. Su, H\. Sun, and W\. YihModel\-based interactive semantic parsing: a unified framework and a text\-to\-SQL case study\.InEmpirical Methods in Natural Language Processing and International Joint Conference on Natural Language Processing \(EMNLP\-IJCNLP\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px2.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p3.1),[§2](https://arxiv.org/html/2611.21645#S2.p1.1)\.
- Yuet al\.\(2019a\)T\. Yu, R\. Zhang, H\. Er, S\. Li, E\. Xue, B\. Pang, X\. V\. Lin, Y\. C\. Tan, T\. Shi, Z\. Li, Y\. Jiang, M\. Yasunaga, S\. Shim, T\. Chen, A\. Fabbri, Z\. Li, L\. Chen, Y\. Zhang, S\. Dixit, V\. Zhang, C\. Xiong, R\. Socher, W\. Lasecki, and D\. RadevCoSQL: a conversational text\-to\-SQL challenge towards cross\-domain natural language interfaces to databases\.InEmpirical Methods in Natural Language Processing and International Joint Conference on Natural Language Processing \(EMNLP\-IJCNLP\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px2.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p1.1)\.
- Yuet al\.\(2018\)T\. Yu, R\. Zhang, K\. Yang, M\. Yasunaga, D\. Wang, Z\. Li, J\. Ma, I\. Li, Q\. Yao, S\. Roman, Z\. Zhang, and D\. RadevSpider: a large\-scale human\-labeled dataset for complex and cross\-domain semantic parsing and text\-to\-SQL task\.InEmpirical Methods in Natural Language Processing \(EMNLP\),Cited by:[§1](https://arxiv.org/html/2611.21645#S1.p1.1)\.
- Yuet al\.\(2019b\)T\. Yu, R\. Zhang, M\. Yasunaga, Y\. C\. Tan, X\. V\. Lin, S\. Li, H\. Er, I\. Li, B\. Pang, T\. Chen, E\. Ji, S\. Dixit, D\. Proctor, S\. Shim, J\. Kraft, V\. Zhang, C\. Xiong, R\. Socher, and D\. RadevSParC: cross\-domain semantic parsing in context\.InAssociation for Computational Linguistics \(ACL\),Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px2.p1.1),[§1](https://arxiv.org/html/2611.21645#S1.p1.1)\.
- Zhonget al\.\(2017\)V\. Zhong, C\. Xiong, and R\. SocherSeq2sql: generating structured queries from natural language using reinforcement learning\.arXiv preprint arXiv:1709\.00103\.Cited by:[Appendix A](https://arxiv.org/html/2611.21645#A1.SS0.SSS0.Px1.p1.1)\.
## Appendix AExtended Related Work
#### Text\-to\-SQL Generation\.
Text\-to\-SQL systems have progressed from specialized semantic parsers to LLM\-based generation through improved schema linking, structured decoding, task decomposition, and self\-correction\([Zhong et al\., 2017](https://arxiv.org/html/2611.21645#bib.bib28);[Wang et al\., 2020](https://arxiv.org/html/2611.21645#bib.bib21);[Scholak et al\., 2021](https://arxiv.org/html/2611.21645#bib.bib29);[Li et al\., 2023a](https://arxiv.org/html/2611.21645#bib.bib22);[Gao et al\., 2024](https://arxiv.org/html/2611.21645#bib.bib10)\)\. Recent methods also generate and compare multiple SQL candidates\([Pourreza et al\., 2025](https://arxiv.org/html/2611.21645#bib.bib14);[Li et al\., 2026b](https://arxiv.org/html/2611.21645#bib.bib15)\)\. Unlike candidate\-selection approaches,DisGuADuses alternative queries to identify what should be clarified rather than to choose the final SQL\.
#### Conversational and Interactive Text\-to\-SQL\.
Conversational benchmarks evaluate context\-dependent SQL generation over pre\-collected dialogue sequences\([Yu et al\., 2019b](https://arxiv.org/html/2611.21645#bib.bib11);[Yu et al\., 2019a](https://arxiv.org/html/2611.21645#bib.bib9)\), whereas interactive parsers actively request structured or free\-form user feedback\([Yao et al\., 2019](https://arxiv.org/html/2611.21645#bib.bib12);[Li et al\., 2020](https://arxiv.org/html/2611.21645#bib.bib30);[Elgohary et al\., 2020](https://arxiv.org/html/2611.21645#bib.bib31)\)\. BIRD\-Interact further evaluates dynamic interaction with users and database environments\([Huo et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib2)\)\.DisGuADcomplements these settings by selecting one unresolved, SQL\-impacting ambiguity at each interaction turn\.
#### Ambiguity in Text\-to\-SQL\.
AmbiQT\([Bhaskar et al\., 2023](https://arxiv.org/html/2611.21645#bib.bib20)\)and AMBROSIA\([Saparina and Lapata, 2024](https://arxiv.org/html/2611.21645#bib.bib4)\)associate ambiguous requests with multiple plausible interpretations and SQL queries, while AmbiSQL resolves detected ambiguity through multiple\-choice clarification\([Ding et al\., 2026](https://arxiv.org/html/2611.21645#bib.bib3)\)\. Rather than relying only on surface ambiguity or a predefined taxonomy,DisGuADidentifies clarification targets from recurring differences among plausible SQL queries\.
#### Disagreement and Uncertainty in LLM Generation\.
Consistency\-based methods compare sampled LLM generations to estimate semantic uncertainty, detect unsupported content, or diagnose uncertainty sources\([Kuhn et al\., 2023](https://arxiv.org/html/2611.21645#bib.bib18);[Manakul et al\., 2023](https://arxiv.org/html/2611.21645#bib.bib17);[Chen and Mueller, 2024](https://arxiv.org/html/2611.21645#bib.bib32);[Nan et al\., 2025](https://arxiv.org/html/2611.21645#bib.bib33);[Liu et al\., 2025a](https://arxiv.org/html/2611.21645#bib.bib19)\)\. These methods operate over free\-form responses\.DisGuADinstead compares structured SQL components and attributes their disagreement to user\-facing clarification targets\.
## Appendix BCase Study
We present a representative case from thepolar\_2database to illustrate howDisGuADidentifies SQL\-impacting ambiguity targets\. The user asks:
> Could you identify all equipment that are fit for harsh weather in our polar database? Show me the equipment, heater status, insulation status, emergency light status, the structure margin, and their readiness label\.
This request contains several SQL\-impacting ambiguities, including the definition of “fit for harsh weather”, the formula for “structure margin”, the intended output identifier for “equipment”, and whether “readiness label” means filtering only ready equipment or assigning a label to all relevant equipment\.
Table 4:Case study on thepolar\_2database\. The original interaction asks clarification questions but fails to target the SQL\-impacting ambiguities, whileDisGuADasks about ambiguity targets that change filtering, joins, computed expressions, and output labeling\.AmbiguityOriginal behaviorDisGuADbehaviorfit for harsh weatherDoes not clarify the full readiness rule and applies implicit filters\.Clarifies the Extreme Weather Ready rule: SSF\>0\.7\>0\.7, heater not Off, insulation not Poor, and emergency light On or Testing\.structure marginUses a threshold without clarifying the formula\.Clarifies it as Structural Safety Factor rounded to two decimals\.all equipmentInterprets the request as returning only equipment satisfying readiness conditions\.Includes each structurally evaluable equipment record and assigns a readiness label\.readiness labelTreats readiness as a filtering criterion\.Treats readiness as a classification output:Extreme Weather ReadyorNot Ready\.Join semanticsUses inner joins, excluding equipment with missing cabin, lighting, or insulation records\.Uses left joins, so missing auxiliary records do not remove equipment from the output population\.
The original interaction policy asks clarification questions, but they do not resolve the ambiguity targets that determine the final SQL semantics\. As shown in Table[4](https://arxiv.org/html/2611.21645#A2.T4), the resulting SQL still makes two incorrect implicit assumptions\. First, it treats readiness as a filtering condition, returning only equipment that satisfies the harsh\-weather criteria\. Second, it uses inner joins to cabin, thermal, and lighting tables, which removes equipment records when auxiliary status information is missing\. As a result, the query loses the intended semantics of “all equipment” and “readiness label”: the expected behavior is to retain each structurally evaluable equipment record and classify it as eitherExtreme Weather ReadyorNot Ready\.
DisGuADinstead decomposes the uncertainty into user\-facing clarification targets\. It asks about the definition of “fit for harsh weather”, the formula for “structure margin”, the meaning of “readiness label”, whether “all equipment” should include non\-ready equipment, and which equipment identifier should be returned\. After receiving these clarifications,DisGuADgenerates SQL that uses left joins to preserve the output population and aCASEexpression to assign the readiness label\. This separates inclusion criteria from classification criteria, producing the correct final SQL\.
This case highlights thatDisGuADimproves clarification by identifying ambiguity terms whose resolution changes concrete SQL decisions, including filtering, join type, computed expressions, and output labeling\. The comparison also shows why asking a clarification question is not sufficient by itself: the question must target the ambiguity that actually affects the SQL program\.
## Appendix CPrompt Templates forDisGuAD
This appendix reports the prompt templates used byDisGuADto decide clarification questions\. The templates correspond to the main components in Section[3](https://arxiv.org/html/2611.21645#S3): query\-term inventory construction, contrastive SQL interpretation probes, mapping SQL disagreement to user\-facing ambiguity, and template\-based clarification question realization\.DisGuADdoes not modify the downstream final SQL generation prompt in the main interactive experiments\. Instead, it changes the clarification policy by selecting which ambiguity should be asked before final SQL synthesis\.
We use braces to denote runtime placeholders, such as\{user\_query\},\{database\_schema\}, and\{external\_knowledge\}\. The prompts are formatted for readability while preserving the logic used in our implementation\.
### C\.1Query\-term Inventory Prompt
This prompt instantiates the query\-term inventory construction described in Section[3\.2](https://arxiv.org/html/2611.21645#S3.SS2)\. The goal is to extract user\-facing spans that may later serve as clarification anchors\. The extractor does not decide the final question by itself; it only provides a natural\-language search space for subsequent SQL\-disagreement attribution\.
Youextractuser\-facingambiguitytermsforinteractivetext\-to\-SQL\.
ReturnonlyJSON\.Donotusehiddenbenchmarklabels\.
Keeprationalesconcise\.
Database:
\{database\_name\}
Originalambiguoususerrequest:
\{user\_query\}
Databaseschema:
\{database\_schema\}
Visibleexternalknowledge:
\{external\_knowledge\}
Heuristictermcandidatesforreferenceonly:
\{heuristic\_terms\}
Extractuser\-facingtermsorphrasesthatmayneedclarification
beforegeneratingSQL\.
Usethesecoarseambiguitycategories:
\-LexicalAmbiguity:atokenhasmultiplemeaningsincontext\.
\-SyntacticAmbiguity:aphrasecanattachtodifferentparts
oftherequest\.
\-SemanticAmbiguity:wordingisvagueorunderspecified\.
\-SchemaLinkingAmbiguity:aquerytermcouldmaptomultiple
schemaelements\.
\-QueryIntentAmbiguity:operation,ranking,filtering,
aggregation,limit,orDDL/DMLintentisunclear\.
\-KnowledgeLinkingAmbiguity:aconceptmaylinktoanexternal
definitionorformula,butthelinkisimplicitorunclear\.
Important:
\-Preferspansthatappearverbatimintheuserquery\.
\-Includemetricorformulatermssuchasscore,index,rate,
ratio,percentage,coefficient,orfactor\.
\-Includescopetermssuchaslatest,recent,top,first,orbatch\.
\-Includeactiontermssuchascreate,update,ormanagewhen
DDL/DMLsemanticsmaymatter\.
\-Includeschema\-liketermssuchasID,status,type,name,
facility,ortelescopewhenmappingmaybeambiguous\.
\-Donotincludegenericstopwordspans\.
\-Donotrevealorusebenchmarkgoldenambiguitylabels\.
\-Donotcopytheheuristiclistmechanically;useitonlyas
weakevidence\.
ReturnvalidJSONwiththefollowingstructure:
\{
”terms”:\[
\{
”term\_id”:”t1”,
”span”:”…”,
”normalized\_term”:”…”,
”coarse\_category\_candidates”:\[”SemanticAmbiguity”\],
”why\_potentially\_ambiguous”:”…”,
”possible\_sql\_effects”:\[
”selectexpression”,
”wherepredicate”
\],
”priority\_hint”:”critical\|useful\|low”
\}
\]
\}
### C\.2Contrastive SQL Interpretation Probes
This prompt instantiates the contrastive probing stage described in Section[3\.3](https://arxiv.org/html/2611.21645#S3.SS3)\. Given the ambiguous request, schema, external knowledge, and query\-term inventory,DisGuADelicits multiple plausible SQL interpretations\. These interpretations are not used for reranking or final SQL selection\. Instead, they serve as diagnostic probes for exposing SQL\-level disagreement\. In the main experiments, we set the candidate budget toK=8K=8\.
1\.Subgoal\-contrastprobes\(SUB\)
DecomposetheuserrequestintomajorSQLsubgoals,including
outputcolumns,tablesandjoins,filters,metricorformula,
aggregationgrain,orderingorlimit,anddatabaseoperation\.
GenerateplausibleSQLinterpretationsthatdifferbecause
onesubgoalhasadifferentinterpretation\.
2\.Relational\-routeprobes\(REL\)
Explorealternativerelationalrealizationsofthesamerequest,
includingtablepaths,joinpaths,groupinglevels,filterscopes,
andfinalprojectionswhenmultipleschemaroutesareplausible\.
3\.Definition\-sensitiveprobes\(DEF\)
Focusonmetric,score,index,rate,ratio,percentage,
coefficient,andfactorphrases\.Generateinterpretationsthat
exploredifferentformulas,knowledgelinks,thresholds,or
numerator/denominatorchoices\.
4\.Single\-axiscounterfactualprobes\(CF\)
ChangeoneambiguityaxiswhilekeepingotherSQLdecisionsas
stableaspossible\.Possibleaxesincludemetricformula,
schemaentity,joinpath,aggregationgrain,filterscope,
rankingorlimit,outputprojection,databaseoperation,
andnullhandling\.
YougenerateplausiblePostgreSQLinterpretationsforambiguous
text\-to\-SQLtasks\.ReturnonlyJSON\.DonotexecuteSQL\.
Generateinterpretationsthatareintentionallydiversealong
user\-facingambiguityaxes\.
Database:
\{database\_name\}
Originalambiguoususerrequest:
\{user\_query\}
Databaseschema:
\{database\_schema\}
Visibleexternalknowledge:
\{external\_knowledge\}
Query\-terminventory:
\{query\_terms\}
Clarificationmemory:
\{clarification\_memory\}
Generateexactly\{num\_candidates\}plausiblePostgreSQLinterpretations
usingthefollowingcontrastiveprobeplan:
\{probe\_plan\}
Importantrules:
\-EverySQLinterpretationmustbeplausiblefortheoriginal
userrequest\.
\-Eachprobefamilyshouldexploreadifferentambiguitysource\.
\-Single\-axiscounterfactualprobesshouldprimarilychangeexactly
oneambiguityaxiswhilekeepingotherSQLdecisionsstable\.
\-Preferschema\-validSQLusingvisibletablesandcolumns\.
\-Donotinventhiddenbenchmarklabelsorunavailableexternal
knowledge\.
\-Anchorthemainassumptionofeachinterpretationtoauser\-facing
queryspanorvisibleknowledgeterm\.
\-KeepSQLconcisebutcompleteenoughforclause\-levelcomparison\.
ReturnvalidJSONwiththefollowingstructure:
\{
”candidates”:\[
\{
”candidate\_id”:”sub\_1”,
”probe\_family”:”SUB”,
”primary\_axis”:”metric\_formula”,
”anchored\_query\_span”:”…”,
”coarse\_category”:”SemanticAmbiguity”,
”sql\_effect\_type\_hint”:”projection\_or\_metric\_ambiguity”,
”assumption”:”…”,
”sql”:”SELECT…”,
”expected\_changed\_clauses”:\[”select”\],
”used\_tables”:\[”…”\],
”used\_columns”:\[”…”\],
”used\_knowledge\_ids”:\[\],
”unresolved\_terms”:\[”…”\],
”confidence”:0\.7
\}
\]
\}
### C\.3Mapping SQL Disagreement to User\-Facing Ambiguity
This prompt corresponds to the disagreement mapping stage in Section[3\.5](https://arxiv.org/html/2611.21645#S3.SS5)\. The input consists of the query\-term inventory, probe\-generated SQL interpretations, candidate metadata, SQL\-difference evidence, and ambiguity\-type vote counts\. The goal is to attribute SQL\-level disagreement to user\-facing terms that can be asked about in natural language\.
This step treats SQL differences as evidence, not as direct clarification targets\. For example,DisGuADshould not ask the user whether aGROUP BYclause should change\. Instead, it should ask about the natural\-language term that explains why plausible SQL interpretations differ in grouping, filtering, projection, join path, ordering, or formula computation\.
Youmapambiguityevidencetouser\-facingquerytermsfor
interactivetext\-to\-SQL\.ReturnonlyJSON\.
Usequerytermsasanchors\.Donotrevealhiddenbenchmarklabels\.
Originalambiguoususerrequest:
\{user\_query\}
Query\-terminventory:
\{query\_terms\}
User\-queryambiguitycategoriesalreadydetected:
\{query\_term\_categories\}
Visibleexternalknowledge:
\{external\_knowledge\}
Clarificationmemoryandinteractionhistory:
\{clarification\_memory\}
SQLinterpretationmetadataandSQL:
\{sql\_candidates\}
SQLdifferenceevidence:
\{sql\_diff\}
SQL\-levelambiguitysummaryderivedfromcandidatedifferences:
\{sql\_ambiguity\_summary\}
SQL\-differenceambiguitytypevotes:
\{prioritized\_sql\_ambiguities\}
Query\-firstheuristicmappings:
\{heuristic\_mappings\}
Task:
ReasonfromobservedSQLdisagreementbacktolikelyuser\-facing
causes\.ForeachimportantSQL\-levelambiguity,decidewhich
original\-queryterm,previous\-answerterm,orvisibleknowledgeterm
mostlikelycausedthatSQLdisagreement\.
Usethequery\-terminventoryastheprimaryanchor\.SQLdifference
evidenceisevidenceforambiguity,notasourceofaskableterms\.
Coarsecategories:
\-LexicalAmbiguity
\-SyntacticAmbiguity
\-SemanticAmbiguity
\-SchemaLinkingAmbiguity
\-QueryIntentAmbiguity
\-KnowledgeLinkingAmbiguity
Rules:
\-Prefertermsorspansfromtheoriginalquery\.
\-Youmayincludeaknowledgetermfromtheuser’spreviousanswers
ifitappearsinmemoryandneedsfollow\-up\.
\-Youmayincludeavisibleexternal\-knowledgemetricnameonlywhen
theoriginalqueryappearstorefertothatconceptindirectly\.
\-Donotaskabouttermsalreadyaskedinmemoryunlesstheuser
answerintroducedanewknowledgeterm\.
\-Donotusewholesentencesasterms\.
\-NeveruseSQLsyntaxorimplementationartifactsasterms:
SELECT,FROM,WHERE,JOIN,CASE,WHEN,THEN,ELSE,TRUE,FALSE,
NULL,NULLIF,COALESCE,CAST,JSON\_AGG,CTE,aliasnames,table
aliases,parentheses,operators,orliteralSQLkeywords\.
\-Downranklow\-valuetermssuchas”ID”,”score”,”result”,or
”data”unlesscandidateevidenceshowsarealschemaorprojection
conflictandthetermappearsintheuserquery\.
\-IfSQLdifferencesarerealbutcannotbeanchoredtoaqueryterm,
answerterm,orvisibleknowledgeterm,markthemas
unanchored\_sql\_noiseanddonotmakethemaskable\.
\-Prefertermsthatexplainhigh\-voteSQLambiguitytypesandwould
materiallychangeSELECT,WHERE,GROUPBY,JOIN,ORDERBY,LIMIT,
orDDL/DMLbehavior\.
\-Agoodmappingshouldexplainwhythisusertermcausedthis
observedSQLambiguity,notmerelyrepeatacandidateassumption\.
\-Thebestambiguityshouldbetheonemostlikelytochange
thefinalSQL\.
ReturnvalidJSONwiththefollowingstructure:
\{
”ambiguities”:\[
\{
”term”:”…”,
”source”:”original\_query\|user\_answer\|visible\_knowledge\|unanchored\_sql\_noise”,
”coarse\_category”:”KnowledgeLinkingAmbiguity”,
”ambiguity\_type”:”knowledge\_linking\_ambiguity”,
”sql\_effect\_type”:”projection\_or\_metric\_ambiguity”,
”caused\_sql\_ambiguity\_types”:\[
”aggregation\_or\_metric\_ambiguity”
\],
”matched\_sql\_votes”:5,
”query\_span”:”…”,
”question\_need”:”…”,
”candidate\_ids”:\[”c1”,”c2”\],
”changed\_sql\_parts”:\[”select”,”columns”\],
”candidate\_interpretations”:\[”…”,”…”\],
”evidence\_examples”:\[”…”\],
”reason”:”…”,
”importance”:”critical\|useful\|low”,
”askable”:true,
”requires\_user”:true,
”requires\_formula”:true,
”confidence”:0\.75,
”priority\_score”:0\.8
\}
\]
\}
### C\.4Template\-Based Clarification Question Realization
After selecting an ambiguity target,DisGuADrealizes the final clarification question using deterministic templates\. We use templates rather than an additional LLM question rewriter in the main experiments\. This separates the decision of*which ambiguity to ask about*from the surface form of the question\.
Lettermdenote the selected ambiguity target andsql\_effectdenote its predicted SQL effect type\.
Iftheambiguityrequiresaformula:
Couldyouclarifytheexactdefinitionorformulafor\{term\}?
IftheSQLeffectisrelatedtosortingorranking:
Couldyouclarifytheintendedordering,ranking,orlimitfor\{term\}?
IftheSQLeffectisrelatedtoschemalinking:
Couldyouclarifywhichentityorattributeyoumeanby\{term\}?
IftheSQLeffectisrelatedtoDDL/DMLbehavior:
Couldyouclarifytheintendedcreate,insert,update,orupsert
behaviorfor\{term\}?
Ifaspecificquestion\_needisavailable:
Couldyouclarify\{term\}?\{question\_need\}
Otherwise:
Couldyouclarifywhatyoumeanby\{term\}?
metric\_formula:
Arethereanyremainingmetric,score,orformuladefinitions
thatshouldchangetheSQL?
filter\_threshold:
Arethereanyremainingfilters,thresholds,orinclusionrules
thatshouldchangetheSQL?
output\_shape:
Arethereanyremainingoutputcolumns,aliases,orJSONkeys
thatshouldchangetheSQL?
grouping\_grain:
Shouldtheresultsuseanygroupinggrainbeyondwhatyou
alreadyspecified?
ranking\_limit:
Arethereanyremainingordering,ranking,orrow\-limit
requirementsforthefinalresult?
default:
AreallSQL\-relevantrequirementsnowcomplete,oristhere
oneremainingdetailIshoulduse?
<s\>\{clarification\_question\}</s\>
## Appendix DPrompt Scope and Reproducibility Notes
We report only the prompt templates used byDisGuADto decide clarification questions\. The appendix excludes prompts that are not part ofDisGuAD’s ambiguity\-selection policy, including the originalBIRD\-Interactsystem prompt, the user simulator prompt, downstream final SQL generation prompts, DAIL\-SQL and DIN\-SQL prompts, answer\-observation prompts, canonical\-plan prompts, SQL validation prompts, and SQL repair prompts\.
All prompt templates are fixed across the reported experiments\. Within each experiment, the same LLM backbone is used for the system model, user simulator, andDisGuADambiguity module\. Across backbone comparisons, only the LLM backbone changes\.Similar Articles
Diversity is Not Ambiguity: Toward Accurate and Efficient Ambiguity Detection for Open-Domain QA
This paper proposes Archive, a framework for ambiguity detection in open-domain QA that distinguishes ambiguity from answer diversity using logical conflict, and introduces QuireQA, a 4,703-query benchmark. Experiments show Archive improves F1 by up to 21.6% while being 16x faster than competitors.
Conversational Task Disambiguation over Tabular Data: Leakage-Aware Formulation, Benchmark Suite, and Training
The paper introduces a leakage-aware framework for conversational task disambiguation over tabular data, decomposing agents into asking and solution policies, and presents AmbiTab, a benchmark suite unifying six ambiguous text-to-SQL datasets. It also trains an asking policy with reinforcement learning, improving disambiguation metrics on all six datasets and task success on five.
ARCS: Towards Precise Text-to-SQL via Structured Disambiguation
论文提出 ARCS(Ambiguity Resolution Corpus for SQL),首个包含真实数据库上自然歧义的 text-to-SQL 基准,并提出“结构化消歧”范式取代自由对话澄清。实验表明歧义下 text-to-SQL 仍具挑战:GPT-6 SOTA 仅 51% 端到端执行准确率,开源模型均不超过 27%。
A knowledge-guided agentic framework for mitigating patient-context ambiguity in health queries
The paper introduces a knowledge-guided agentic framework that identifies missing patient context in health queries and asks targeted follow-up questions to improve the accuracy and consistency of downstream language model responses.
Asking but Missing: Decision Coverage in Natural-Language Data Querying
This paper introduces Underspecified Decision Completion (UDC) and a Grounded Code Generation (GCG) diagnostic protocol to study whether LLMs recognize unresolved decisions before generating code from natural-language data questions, evaluating twelve models on BIRD-Pandas and finding that the main bottleneck is recognizing which clarification questions to ask rather than answering them.