Active Inference as Context Acquisition for AI Agents
Teaching AI agents to decide when asking a question is worth the tokens it costs
When a user leaves out a detail, an AI agent must choose between guessing, asking a clarifying question, or making a retrieval or tool call, each of which costs tokens. This paper frames that choice as active inference, scoring each possible next action by how much it is expected to cut uncertainty against how much it costs. The authors tested the idea on seven frontier language models using a Twenty-Questions-style benchmark and two prompting experiments under token budgets.
What they did
- Frames clarifying questions, retrieval calls, tool calls, and prompt trials as 'context actions' that an agent picks between, alongside acting now or stopping, to reduce uncertainty about a hidden task variable
- Splits the decision into an inner step that updates beliefs assuming a hypothetical answer, and an outer step that picks whichever action minimizes expected free energy, a score combining risk, information value, and cost
- In deterministic settings this score simplifies to expected information gain, which can be normalized by token cost
- Built Optimal Question Asking (OQA), a Twenty-Questions-style benchmark with 25 to 300 candidates, computed an exact dynamic-programming oracle for optimal question count, and benchmarked GPT-5, GPT-4.1, Gemini 2.5 Pro, Gemini 2.0 Flash, Claude Sonnet 4.5, Claude Haiku 4.5, and Grok 4 against it
- In a product-description clarification task, the best tuned policy reached 0.375 verifier compliance at about 219 tokens per task, versus a no-question baseline at 0.0417 compliance and about 112 tokens



| Aspect | Generic RL view | Active-inference view used here |
|---|---|---|
| Control | Optimize actions for return under the sampled or observed data stream. | Choose actions that also determine what evidence arrives next. |
| Exploration | Usually added through bonuses, entropy, optimism, or posterior sampling. | Appears directly as epistemic value in expected free energy. |
| Belief and queries | Beliefs may be implicit in a value function, recurrent state, or model posterior. | An explicit posterior over intent, target, or best prompt makes queries first-class actions. |
| Evaluation | Return, regret, accuracy, or reward-model score. | Entropy drop, oracle gap, bits per token, and final task success. |



Why it matters
This gives chatbots and agents a principled way to decide, rather than guess, when spending tokens on a clarifying question or tool call actually pays off in accuracy. For any product where token usage translates directly to cost, this kind of cost-aware information accounting could shape how agents are designed to balance efficiency and correctness.



Terms in this paper
- active inference · a framework that jointly scores information-seeking actions and goal-directed actions to pick the best next move
- expected free energy · a score combining risk, information value, and cost used to rank candidate actions
- expected information gain · how much an action is predicted to reduce uncertainty about the hidden variable
- Optimal Question Asking (OQA) · this paper's benchmark where a model narrows down a hidden target by asking questions, like Twenty Questions
- DP oracle · a dynamic-programming solution that computes the theoretically optimal minimum number of questions needed under the same rules
Original abstract (English)
Interactive AI agents must acquire the right context as efficiently as possible. When a user omits a constraint, preference, file, or task variable, an agent can proceed with a default assumption or spend tokens on a clarifying question, retrieval call, tool call, or prompt trial. We formulate this tradeoff as active inference for context acquisition. An inner inference step updates beliefs over a latent task state, and an outer decision selects the next context action, task action, or stop action to minimize expected free energy under cost. In deterministic settings, the epistemic term reduces to expected information gain, optionally normalized by token cost. We instantiate the framework in Optimal Question Asking (OQA), with exact posteriors and a dynamic programming oracle, and benchmark frontier language models on binary and multiway categorical tasks from 25 to 300 candidates. We also study clarification before generation and automated prompt optimization under token budgets. The formulation is model-agnostic and views active inference as a design principle for the context-acquisition layer of AI agents.
Read on arXivLatest papers
- LoRA-GA$^2$: Low Rank Adaptation with Multi-step Gradient Adaptive AlignmentPeeking at a few early training gradients before fine-tuning starts to set up LoRA smarter
- Remember, Verify, or Ask? Cross-Family Evaluation of Memory Commitment in LLM AgentsAI assistants would rather double-check facts than ask you a question, even when asking is the right call
- Robust Incomplete Multimodal Sentiment Analysis via Iterative Proxy CorrectionWhen text input is missing or broken, this AI doesn't guess once and move on—it revises its guess step by step to read emotions more reliably
- Generating Diverse Personas for User Simulators to Test Interview Dialogue SystemsTo test interview-style chatbots you need many different fake users, so this work has an LLM automatically generate those fake user personalities
- Rethinking Patch Based Multivariate Time Series Forecasting with Semantic Structured PartitioningA new way to slice time series into meaningful chunks instead of arbitrary equal-length pieces
- Reliable Financial Named Entity Recognition under Domain ShiftAn AI's confidence trained on formal filings turns unreliable once it reads tweets
- Bringing analytic rigor to agentic AI for science: The Brain Researcher platform for neuroimaging data analysisA system that makes AI show its work when analyzing brain-imaging data, not just deliver an answer
- GenMatch: An End-to-End Generative Matching Framework for Micro-View Order-Dispatching in Ride-HailingDiDi replaced its multi-step ride-hailing dispatch pipeline with one generative model and saw real-world gains
Latest from METAL LAB
- Google Discover adds chatbot that adjusts your feed based on spoken preferences
- OpenAI Closes In on Anthropic Again in Enterprise Spending Share
- Meta Unveils First 10 Tasks in WildArtifactBench, a Benchmark for AI Agents
- Musk: "Optimus + Grok will one day handle healthcare for all humanity"
- 35% of Web Pages Published Since ChatGPT Show Signs of AI Authorship
Figures: Sanchayan Dutta et al., arXiv:2608.19202, arxiv-nonexclusive