每天早上一封邮件,把昨天的 AI 梳理好订阅邮件

METAL LAB

Active Inference as Context Acquisition for AI Agents

arXiv:2608.192022026-08-21

让AI助手学会算账再决定要不要多问一句

当用户没说清楚某个条件时,AI助手要么直接假设默认值往下走,要么花token去追问、检索或调用工具。这篇论文把这种取舍formal化为主动推理,给每个可能的下一步动作打分,权衡它能减少多少不确定性和它要花多少代价。作者用一个类似猜谜游戏的基准测试和两个提示词实验,在七个前沿大语言模型上验证了这套方法。

他们做了什么

  1. 把追问、检索调用、工具调用、提示词尝试都视为'获取上下文的动作',与直接执行任务或停止一起,由模型来选择哪个最划算
  2. 把决策拆成两层:内层假设得到某个回答后更新信念,外层从所有候选动作里选出能让期望自由能(风险、信息价值和成本的综合评分)最小的那个
  3. 在答案是确定性的情境下,这个评分会简化成期望信息增益,还可以按token成本做归一化
  4. 搭建了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七个模型
  5. 在产品描述追问实验中,调优后的最佳策略以每任务约219个token达到0.375的验证通过率,而完全不追问的基线方案通过率只有0.0417,约花费112个token
Figure 1: Binary OQA with N=25. Curves show mean entropy Ht=log2⁡|Ct| across uniformly sampled targets, with ±1 standard deviation, along with the DP oracle.
Figure 1: Binary OQA with N=25. Curves show mean entropy Ht=log2⁡|Ct| across uniformly sampled targets, with ±1 standard deviation, along with the DP oracle.
Figure 2: Binary OQA with N=100. Curves show mean entropy Ht=log2⁡|Ct| across uniformly sampled targets, with ±1 standard deviation, along with the DP oracle. In Animals, duplicate attribute vectors can force stopping with a small residual entropy.
Figure 2: Binary OQA with N=100. Curves show mean entropy Ht=log2⁡|Ct| across uniformly sampled targets, with ±1 standard deviation, along with the DP oracle. In Animals, duplicate attribute vectors can force stopping with a small residual entropy.
Figure 3: Multiway categorical OQA for |𝒳|∈{100,200,300} (top to bottom). Curves show mean posterior entropy over uniformly sampled targets. The DP oracle uses the same query menu and stopping rule. Error bars show ±1 standard deviation when available.
Figure 3: Multiway categorical OQA for |𝒳|∈{100,200,300} (top to bottom). Curves show mean posterior entropy over uniformly sampled targets. The DP oracle uses the same query menu and stopping rule. Error bars show ±1 standard deviation when available.
Table 1: Operational distinction used in this paper. The contrast is not categorical: RL can include information bonuses, and active inference can use RL solvers.
AspectGeneric RL viewActive-inference view used here
ControlOptimize actions for return under the sampled or observed data stream.Choose actions that also determine what evidence arrives next.
ExplorationUsually added through bonuses, entropy, optimism, or posterior sampling.Appears directly as epistemic value in expected free energy.
Belief and queriesBeliefs 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.
EvaluationReturn, regret, accuracy, or reward-model score.Entropy drop, oracle gap, bits per token, and final task success.
Figure 4: Prompt autocompletion on 48 synthetic product tasks with ϵ=0.02 and Kmax=3. Panels show clarification counts by policy, the ECDF of total tokens per task, and verifier pass rate versus average tokens. active_weighted improves compliance at a modest token cost relative to baseline and random, while ask_all spends the most tokens.
Figure 4: Prompt autocompletion on 48 synthetic product tasks with ϵ=0.02 and Kmax=3. Panels show clarification counts by policy, the ECDF of total tokens per task, and verifier pass rate versus average tokens. active_weighted improves compliance at a modest token cost relative to baseline and random, while ask_all spends the most tokens.
(b) Total token ECDF
(b) Total token ECDF
(c) Compliance versus average tokens
(c) Compliance versus average tokens

为什么重要

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

Figure 5: Automated prompt optimization under a token budget. Panels show final posterior mean accuracies, realized information gain per 1,000 tokens, and posterior entropy over the identity of the best prompt. Policies that reduce uncertainty early can avoid committing too soon.
Figure 5: Automated prompt optimization under a token budget. Panels show final posterior mean accuracies, realized information gain per 1,000 tokens, and posterior entropy over the identity of the best prompt. Policies that reduce uncertainty early can avoid committing too soon.
(b) Information gain per 1k tokens
(b) Information gain per 1k tokens
(c) Entropy of best-prompt identity
(c) Entropy of best-prompt identity

本文术语

  • 主动推理(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.

作者 · Sanchayan Dutta, Sai Niranjan Ramachandran, Suvrit Sra

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: Sanchayan Dutta et al., arXiv:2608.19202, arxiv-nonexclusive