Active Inference as Context Acquisition for AI Agents
让AI助手学会算账再决定要不要多问一句
当用户没说清楚某个条件时,AI助手要么直接假设默认值往下走,要么花token去追问、检索或调用工具。这篇论文把这种取舍formal化为主动推理,给每个可能的下一步动作打分,权衡它能减少多少不确定性和它要花多少代价。作者用一个类似猜谜游戏的基准测试和两个提示词实验,在七个前沿大语言模型上验证了这套方法。
他们做了什么
- 把追问、检索调用、工具调用、提示词尝试都视为'获取上下文的动作',与直接执行任务或停止一起,由模型来选择哪个最划算
- 把决策拆成两层:内层假设得到某个回答后更新信念,外层从所有候选动作里选出能让期望自由能(风险、信息价值和成本的综合评分)最小的那个
- 在答案是确定性的情境下,这个评分会简化成期望信息增益,还可以按token成本做归一化
- 搭建了Optimal Question Asking(OQA)基准,候选目标数从25到300个,类似猜谜游戏,并用动态规划算出理论最优提问策略作为对照,测试了GPT-5、GPT-4.1、Gemini 2.5 Pro、Gemini 2.0 Flash、Claude Sonnet 4.5、Claude Haiku 4.5和Grok 4七个模型
- 在产品描述追问实验中,调优后的最佳策略以每任务约219个token达到0.375的验证通过率,而完全不追问的基线方案通过率只有0.0417,约花费112个token



| 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. |



为什么重要
这为聊天机器人和智能体提供了一种有依据的方式,来判断什么时候多问一句真的值回token成本,而不是靠猜。对于token消耗直接对应实际费用的产品来说,这种把成本和信息价值放在一起算账的设计思路,可能会影响未来智能体在效率和准确率之间的取舍方式。



本文术语
- 主动推理(active inference) · 一种同时给信息获取动作和任务执行动作打分、选出最优下一步的框架
- 期望自由能(expected free energy) · 综合风险、信息价值和成本对候选动作进行排序的评分
- 期望信息增益(expected information gain) · 衡量某个动作预计能减少多少不确定性的指标
- OQA(Optimal Question Asking) · 本文提出的基准,模型通过不断提问来猜出隐藏目标,类似猜谜游戏
- 动态规划oracle(DP oracle) · 在相同规则下用动态规划算出的理论最少提问次数最优策略,作为对照基准
论文原文摘要(英文)
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.
在 arXiv 阅读最新论文
- LoRA-GA$^2$: Low Rank Adaptation with Multi-step Gradient Adaptive Alignment在正式微调前先偷看几步训练的梯度,让LoRA的初始化更聪明
- Remember, Verify, or Ask? Cross-Family Evaluation of Memory Commitment in LLM AgentsAI助手在该向你提问的时候,却更愿意自己去核实事实
- Robust Incomplete Multimodal Sentiment Analysis via Iterative Proxy Correction文本信息缺失或损坏时,这个AI不靠一次性猜测,而是反复修正猜测结果,从而更准确地判断情绪
- Generating Diverse Personas for User Simulators to Test Interview Dialogue Systems要测试访谈式对话系统需要大量不同性格的虚拟用户,这项研究用大语言模型自动生成这些虚拟用户人设
- Rethinking Patch Based Multivariate Time Series Forecasting with Semantic Structured Partitioning别再机械切分时间序列,按语义把它切成有意义的块
- Reliable Financial Named Entity Recognition under Domain ShiftAI在正式文件里学到的自信,一到推特上就变得不可信
- Bringing analytic rigor to agentic AI for science: The Brain Researcher platform for neuroimaging data analysis让AI分析脑影像数据时,把“为什么这个结论可信”也一并记录下来
- GenMatch: An End-to-End Generative Matching Framework for Micro-View Order-Dispatching in Ride-Hailing滴滴把打车派单从预测-计算-匹配三段式流程改成一次生成完成,线上效果提升明显
METAL LAB 最新报道
图片来源: Sanchayan Dutta et al., arXiv:2608.19202, arxiv-nonexclusive