Beyond Correctness: Resolving Underspecification in Agentic Text-to-SQL
Organizations: Department of Computer Science Cornell University · Amazon Web Services
Abstract
Agentic Text-to-SQL systems can interact with users to clarify underspecified queries before generating SQL. However, a correct execution result does not necessarily imply that the agent has adequately resolved the underlying underspecification: the agent may silently make unverified assumptions that happen to match the intended answer. We show that this behavior is driven in part by premature clarification termination. Although forcing an agent to ask more questions improves execution accuracy, ambiguities are concentrated in earlier interactions, making brute-force questioning inefficient. More importantly, even when explicitly prompted to plan its clarification process, the agent frequently abandons questions that it has already identified as relevant. To address this failure mode, we introduce PlanPool, which externalizes the clarification plan as a mutable question pool. Every planned question must be explicitly asked or dropped before submission, while newly discovered ambiguities can be added during interaction. Across three benchmarks derived from BIRD-Interact and Spider, PlanPool consistently improves ambiguity coverage and reduces silent failures over unconstrained and prompt-based alternatives, while maintaining competitive execution accuracy. Our results highlight an important distinction in agentic reasoning: identifying missing information is not sufficient, and the agent must also reliably maintain and resolve it before committing to an answer.
Figures & tables
| Statistic | BIRD-Lite | BIRD-Full | Spider |
|---|---|---|---|
| # Instances | 171 | 225 | 297 |
| # Distinct Databases | 18 | 22 | 19 |
| # Tokens / User Query | 31.8 | 24.0 | 14.3 |
| # Tokens / SQL | 149.5 | 78.5 | 18.1 |
| # Ambiguities / Task | 3.56 | 2.77 | 2.08 |
| Dataset | Method | EA | Recall | GS | US | SF | #Asks |
|---|---|---|---|---|---|---|---|
| BIRD-Lite | Naive | 74.3 | 73.9 | 33.9 | 40.4 | 17.0 | 2.3 |
| Read-All | 69.6 | 70.8 | 29.8 | 39.8 | 18.7 | 2.0 | |
| Regenerate | 74.9 | 73.7 | 31.6 | 43.3 | 15.2 | 2.3 | |
| Draft | 75.4 | 71.6 | 28.7 | 46.8 | 19.9 | 2.5 | |
| Self-Reflection | 77.2 | 75.5 | 35.7 | 41.5 | 16.4 | 2.7 | |
| Plan-Prompt | 79.5 | 80.8 | 42.1 | 37.4 | 10.5 | 3.3 |
| Statistic | BIRD-Lite | BIRD-Full | Spider |
|---|---|---|---|
| Initial Pool Size | 3.9 | 3.3 | 2.3 |
| Actual Asks | 4.2 | 3.6 | 2.5 |
| Unmodified Pool | 65.5% | 61.8% | 81.5% |
| Adding question usage | 30.4% | 32.9% | 18.5% |
| Dropping question usage | 4.7% | 10.7% | 0.7% |
| Dataset | Method | Input Tok. | Output Tok. | Cost (\downarrow$ |
|---|---|---|---|---|
| BIRD-Lite | Naive | 136k | 2.4k | 0.36 |
| Read-All | 122k | 1.8k | 0.30 | |
| Regenerate | 169k | 3.1k | 0.35 | |
| Draft | 139k | 2.7k | 0.29 | |
| Plan-Prompt | 148k | 2.6k | 0.29 | |
| PlanPool | 201k | 2.5k | 0.32 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Action | Observation |
|---|---|
| execute | SQL execution result |
| get_schema | Database schema with example data |
| get_all_column_meanings | Meanings of all columns |
| get_column_meaning | Meaning of the specified column |
| get_all_external_knowledge_names | Names of available external knowledge |
| get_knowledge_definition | Definition of the specified knowledge |
| Step | Pool Action | Outcome |
|---|---|---|
| 1 | pool_next(Q0) | The user specifies that artifacts should be ranked directly by CPI rather than AVS: “Just use the Conservation Priority Index (CPI) itself—rank by CPI, no AVS needed.” |
| 2 | pool_drop(Q1) | As AVS is no longer needed, ERF becomes irrelevant. The agent explicitly removes Q1 instead of asking an unnecessary question, reasoning that CPI alone is sufficient. |
| 3 | pool_next(Q2) | The user clarifies that CPI should not be taken directly from ConservePriorityScore : “No, don’t use that column. CPI needs to be calculated from the artifact’s historical significance, research value, cultural score, and conservation status.” |
| 4 | pool_add(Q5) | The previous answer reveals a new clarification need. The agent adds the following question with highest priority: “What is the exact CPI formula? How are the ratings combined, and what is the numerical mapping for ConserveStatus?” |
| 5 | pool_next(Q5) | The user provides the specific formula to calculate CPI. |
| 6 | pool_next(Q3) | The user confirms that historical era corresponds to ArtDynasty . |
Text-to-SQL
Text-to-SQL translates natural-language questions into executable database queries, linking user intent to schemas, values, and SQL logic.
See all 173 papers