Asking but Missing: Decision Coverage in Natural-Language Data Querying

Hangle Hu, Chenyu Hou, Bin Cao, Jing Fan, Wei LuoarXiv 2026

TL;DR

Large Language Models (LLMs) often fail at data querying because they silently make assumptions about ambiguous questions—a behavior the authors call Underspecified Decision Completion (UDC). By introducing a diagnostic protocol called Grounded Code Generation (GCG), researchers discovered that the primary bottleneck isn't a model's inability to use clarification, but its failure to recognize that a question needs to be asked in the first place.

What Problem Does This Paper Address?

When you ask a system, "Which districts had the most withdrawals?", the question is inherently ambiguous. Does "most" mean the highest count of withdrawal events or the highest total amount?

Current LLMs used for natural-language-to-code tasks (like generating Pandas or SQL) often "hallucinate" a specific interpretation without checking with the user. If the resulting code is wrong, it’s hard to tell why: Did the model miss the ambiguity? Did it lack the data to resolve it? Or did it just write buggy code?

This paper identifies this silent assumption-making as Underspecified Decision Completion (UDC). The authors aim to decompose the code generation process to find exactly where these "decision gaps" occur.

Figure 1: Three examples of UDC, in which a model asks several clarification questions and receives answers, yet does not ask which quantity to rank by, who counts as an account holder, or whether a summary row is a valid entity, so its program returns a result that differs from the reference.

Methods

The researchers propose Grounded Code Generation (GCG), a three-phase diagnostic protocol designed to isolate failures:

  1. Phase 1: Assumption Elicitation: Before writing any code, the model must list the "execution decisions" it considers unresolved. It generates clarification questions based on five "coverage dimensions": Data Reference, Business Rules, Execution Methods, Result Contracts, and Boundary Guards.
  2. Phase 2: Evidence Grounding: An "oracle" (simulating a user or a database check) provides plain-language answers to the model’s questions.
  3. Phase 3: Grounded Synthesis: The model generates the final code using the original prompt, its own questions, and the provided answers.

By separating these steps, the authors can attribute errors to specific phases. For example, if a model still fails after Phase 3, but never asked the right question in Phase 1, the error is a "Phase 1 Missed Gap."

Figure 2: Overview of the Grounded Code Generation (GCG) framework.

Datasets

The study evaluates twelve different LLMs on BIRD-Pandas, a benchmark for translating natural language questions into Python/Pandas code across 11 different databases. The models tested include members of the Qwen and Llama families, as well as frontier models like Gemini-3.1-Pro and GPT-5.4-mini.

Key Insights and Ideas

  • The "Recognition" Bottleneck: The most significant finding is that models are generally good at incorporating answers once they have them. The real struggle is recall—recognizing which parts of a prompt are underspecified.
  • Precision vs. Recall: Models have high precision (the questions they do ask are usually relevant) but low recall (they miss many critical ambiguities).
  • Complexity Breeds Omission: As the required program becomes more complex (more operations), the rate of missed decisions increases. A longer reference program provides more opportunities for a model to "miss" a necessary clarification.
  • Structured Guidance is Key: Simply asking a model to "be careful" isn't enough. Prompting models to explicitly check the five "coverage dimensions" (like tie-handling or null-value rules) significantly improved their ability to surface ambiguities compared to free-form prompting.

Key Results

The GCG protocol improved execution accuracy across all twelve models tested.

  • Accuracy Gains: For the top-performing model, Gemini-3.1-Pro, overall accuracy jumped from 72.36% (direct generation) to 81.68% using GCG.
  • Error Attribution: In a deep dive of four representative models, Phase 1 Missed Gaps accounted for the largest share of remaining failures (between 38.6% and 72.2%).
  • The "Asking but Missing" Pattern: Even when models asked multiple questions, they often bypassed the specific decision that ultimately caused the program to deviate from the reference (as seen in Figure 1).
Table 2: Execution accuracy (%) of twelve models on BIRD-Pandas under direct generation and under the GCG diagnostic protocol.

Limitations and Future Work

  • Oracle Dependency: Phase 2 currently uses an "idealized" oracle that always provides correct, reference-consistent information. Real-world users are often inconsistent or provide "noisy" answers.
  • Benchmark Scope: The study is limited to the BIRD-Pandas benchmark. While the GCG protocol is generalizable, its effectiveness on other tasks (like Text-to-SQL or general software engineering) remains to be seen.
  • Cost and Latency: For "thinking" models, GCG roughly doubles the latency of direct generation because it requires an extra reasoning pass in Phase 1.
  • Future Direction: The authors suggest that future work should focus on improving the "recognition" capabilities of models—training them specifically to identify when a prompt leaves execution decisions open.

Summary updated

Abstract

Large language models are increasingly used to translate natural language questions about structured data into executable programs. A fundamental challenge is recognizing when a question admits multiple computational interpretations and identifying the decisions needed to resolve them. We investigate whether language models recognize these unresolved decisions before generating code, or silently adopt assumptions that may lead to incorrect results. We refer to the latter behavior as Underspecified Decision Completion (UDC). To distinguish different causes of UDC, we introduce Grounded Code Generation (GCG), a diagnostic protocol that separates the identification of unresolved decisions, their resolution using evidence, and their translation into executable code. By examining each stage separately, we can determine where the decisions responsible for incorrect results were first missed or mishandled. We evaluate this framework on BIRD-Pandas with twelve models. The results show that answering clarification questions consistently improves execution accuracy, yet substantial errors remain. Our findings suggest that the main difficulty lies not in answering clarification questions, but in recognizing which questions need to be asked in the first place.
BibTeX
@misc{hu2026asking,
  author = {Hangle Hu and Chenyu Hou and Bin Cao and Jing Fan and Wei Luo},
  title = {{Asking but Missing: Decision Coverage in Natural-Language Data Querying}},
  year = {2026},
  eprint = {2611.23864},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.23864},
}
Figure