Active Inference as Context Acquisition for AI Agents
让AI助手学会算账再决定要不要多问一句
当用户没说清楚某个条件时,AI助手要么直接假设默认值往下走,要么花token去追问、检索或调用工具。这篇论文把这种取舍formal化为主动推理,给每个可能的下一步动作打分,权衡它能减少多少不确定性和它要花多少代价。作者用一个类似猜谜游戏的基准测试和两个提示词实验,在七个前沿大语言模型上验证了这套方法。
METAL MEDIA 解读图
让AI助手学会算账再决定要不要多问一句
- 01把追问、检索调用、工具调用、提示词尝试都视为'获取上下文的动作',与直接执行任务或停止一起,由模型来选择哪个最划算
- 02把决策拆成两层:内层假设得到某个回答后更新信念,外层从所有候选动作里选出能让期望自由能(风险、信息价值和成本的综合评分)最小的那个
- 03在答案是确定性的情境下,这个评分会简化成期望信息增益,还可以按token成本做归一化
- 04搭建了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七个模型
- 05在产品描述追问实验中,调优后的最佳策略以每任务约219个token达到0.375的验证通过率,而完全不追问的基线方案通过率只有0.0417,约花费112个token
他们做了什么
- 把追问、检索调用、工具调用、提示词尝试都视为'获取上下文的动作',与直接执行任务或停止一起,由模型来选择哪个最划算
- 把决策拆成两层:内层假设得到某个回答后更新信念,外层从所有候选动作里选出能让期望自由能(风险、信息价值和成本的综合评分)最小的那个
- 在答案是确定性的情境下,这个评分会简化成期望信息增益,还可以按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 阅读最新论文
- SWE-bench Science: Can Coding Agents Resolve Engineering Tasks in Science?让AI编程助手去修复真实科学软件,连最强的那个也有一半以上任务没做对
- FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM Serving把稀疏注意力从论文原型变成能真正上线服务的加速方案
- PolicyGuide: From Guarding One Action to Guiding the Whole Workflow for Policy-Compliant LLM Agents让客服AI坐席不只是拦住一个危险动作,而是把整个流程走对
- EXIMO: VLM Guided Exploration of VLA Policies不用人工遥控演示,让会说话的AI来教机械臂做新家务
- EnvHarness: Awakening Static Worlds for Agent Learning不重新搭建训练环境,而是给现有环境套一层可插拔组件,针对每个智能体的具体弱点重新塑形
- Bounded Sovereignty and the Control Tax: Pricing AI Oversight When the Deployer Does Not Own the Model租用AI而非拥有AI的机构,安全监管能力只剩一半
- Beyond Imitation: Filtering On-Policy Distillation by Reasoning ProgressAI模仿老师模型学习时,会误伤本来推理正确的步骤,新方法专门过滤掉这种误伤
- PersonalBench: Measuring the Authorship Gap in LLM Personalization让AI模仿某人的文风,结果发现它始终摆脱不了自己的腔调
METAL MEDIA 最新报道
图片来源: Sanchayan Dutta et al., arXiv:2608.19202, arxiv-nonexclusive