TL;DR
This paper formulates context acquisition for AI agents—deciding when to ask clarifying questions, call tools, or run prompt trials—as a problem of active inference. By treating information-gathering actions as costly experiments, the proposed bilevel optimization framework allows agents to elegantly balance the trade-off between token costs and uncertainty reduction.
What Problem Does This Paper Address?
When users interact with AI systems, they rarely specify all constraints, preferences, or variables upfront. Faced with this ambiguity, an interactive AI agent can either make a default assumption (risking an incorrect action) or spend resources—such as tokens, latency, or user attention—to acquire more context.
Currently, most LLM systems handle clarification via ad-hoc heuristics or greedy strategies. This paper addresses the lack of a unified, model-agnostic framework that treats context acquisition as a first-class decision problem under explicit resource budgets.
Methods
The authors introduce a bilevel one-step active inference formulation to separate belief updates from action selection:
- Inner Inference Step: Updates the agent's variational free energy or posterior beliefs over a latent task state (e.g., user intent) given a hypothetical observation.
- Outer Decision Step: Selects the next optimal action (a context-gathering action, a final task action, or a stop action) to minimize expected free energy under an explicit cost penalty.
In deterministic settings, the epistemic (information-seeking) term simplifies to expected information gain (EIG). To measure agent efficiency precisely, the authors instantiate this framework in Optimal Question Asking (OQA)—a controlled "Twenty Questions" game over a finite attribute table. They use Dynamic Programming (DP) to compute a globally optimal oracle baseline, providing a direct way to measure an LLM's "planning gap."
Datasets
The paper evaluates frontier language models using:
- OQA Benchmarks: Binary and multiway categorical attribute tables across three semantic domains: Places, Cars, and Animals, with candidate sizes ranging from 25 to 300 items.
- ARC-Challenge: Used in a case study for automated prompt optimization to evaluate how an agent can intelligently allocate a fixed token budget across system prompt variants.
Key Insights and Ideas
- Context Acquisition as Active Experimentation: Every token spent on clarification or tool invocation can be mathematically modeled as an experiment designed to reduce uncertainty about a hidden state.
- The Efficiency Gap: Even when uncertainty can be measured exactly, frontier LLMs leave significant efficiency on the table. While they make steady progress, they consistently ask avoidable questions compared to a globally optimal DP strategy.
- Value of Information (VoI): Information is only worth purchasing if the expected reduction in uncertainty justifies its operational cost and directly impacts the final decision.
Key Results
The authors benchmarked seven frontier models (including GPT-5, GPT-4.1, Gemini 2.5 Pro, and Claude Sonnet 4.5) via APIs.
Across the OQA datasets, frontier models successfully shrank the candidate sets over successive turns but lagged behind the DP oracle. For example, in the 100-candidate tasks, GPT-5 closely matched the oracle's steep entropy reduction curve, while other models required more steps to resolve ambiguity.

In the prompt autocompletion case study, an active information-per-cost selection strategy successfully boosted verifier compliance from 0.0417 (baseline) to 0.375 while strictly respecting token budgets.
Limitations and Future Work
- Realism vs. Precision: The OQA benchmark relies on clean, deterministic table lookups. Real-world human-agent interactions involve vague replies, shifting constraints, and open-ended multimodal environments.
- Oracle Scalability: The exact DP oracle suffers from a combinatorial explosion of states as the number of items grows, meaning future large-scale benchmarks will require approximate baselines (e.g., sampling or search-based lookahead).
- Dual-Use Risks: The exact same math that helps an assistant ask better questions can be inverted by malicious actors to optimize adversarial prompt injection attacks or extract sensitive data. The authors emphasize that future deployments must integrate explicit privacy and safety constraints directly into the active inference objective.
Summary updated