Abstract
Large Language Models (LLMs) often struggle with underspecified prompts, defaulting to "average" human preferences that may not match a specific user's intent. This paper introduces a formal framework for "Active Task Disambiguation," where LLMs utilize Bayesian Experimental Design (BED) to ask the most informative clarifying questions. By explicitly sampling potential solutions and selecting questions that best partition the solution space, LLM agents can significantly reduce errors in ambiguous tasks like code generation.
The Challenge of Underspecified Prompts
LLMs are frequently trained to be "people pleasers," optimized for average human preferences via Reinforcement Learning from Human Feedback (RLHF). While this makes them helpful in general contexts, it becomes a liability when a user provides an ambiguous prompt. For example, a request to "write a search function" lacks critical details: should it return a boolean, an index, or handle duplicates?
If an LLM simply guesses the most likely intent, the resulting output may be incorrect or even dangerous in high-stakes domains. Current models often lack the "meta-cognitive" reasoning required to identify their own uncertainty and determine which specific questions would most effectively resolve it.
Methodology: Bayesian Experimental Design
The authors propose framing task disambiguation as an optimization problem using Bayesian Experimental Design (BED). The objective is to maximize Expected Information Gain (EIG) through an explicit sampling and evaluation process:
- Solution Sampling: The agent generates a diverse set of $N$ candidate solutions that satisfy the initial ambiguous prompt.
- Question Sampling: The agent generates $M$ potential clarifying questions.
- Answer Simulation: For each candidate solution, the agent simulates how a user would respond to each question if that solution were the ground truth.
- EIG Calculation: The agent selects the question that best partitions the solution space. A high-EIG question is one where different answers eliminate large, distinct portions of the candidate pool.
- Iterative Refinement: The process repeats with the user's actual answer until the ambiguity is resolved.
This approach shifts the model's role from guessing intent to mathematically evaluating which query provides the strongest signal to narrow down possibilities.
Experimental Evaluation
The framework was tested on two benchmarks:
- 20 Questions Game: Evaluating the speed and accuracy of narrowing down a target animal from a large reference set.
- Code Generation: Using non-trivial tasks from HumanEval and APPS where zero-shot models typically fail due to underspecification.
Key Results
The "EIG-uniform" strategy consistently outperformed baselines like standard prompting and Chain-of-Thought (CoT).
- Efficiency: In the 20 Questions game, EIG-based strategies identified the correct target significantly faster than other methods.
- Accuracy Gains: On HumanEval, using GPT-3.5 with the EIG strategy and "open" questions increased accuracy from 44% to 85% after four rounds of clarification.
- Scalability: While advanced models like GPT-4o-mini have better native reasoning, they still benefit substantially from this explicit framework.
Discussion and Insights
The research highlights a "Meta-Cognitive Gap": LLMs are better at generating solutions than at reasoning about their own uncertainty. By forcing the model to evaluate a "gallery" of possible solutions, the framework leverages the model's generation strengths to overcome its reasoning weaknesses.
However, the method is "inference-heavy," requiring multiple rounds of sampling and evaluation. While the computational cost is higher, it is often justified in high-stakes scenarios where correctness is paramount. Future work may address the "stopping criteria"—deciding when remaining ambiguity is low enough to proceed—and handling "noisy" human feedback where users may provide incorrect or unclear answers.
Conclusion
Active Task Disambiguation provides a robust path toward more reliable AI agents. By moving beyond simple "guessing" and toward a principled information-theoretic approach to clarification, LLMs can become more effective partners in complex, real-world problem-solving.
Summary updated