贝叶斯智能体:后验引导的技能进化用于LLM智能体驾驭
Bayesian-Agent: Posterior-Guided Skill Evolution for LLM Agent Harnesses
June 6, 2026
作者: Xiaojun Wu, Cehao Yang, Honghao Liu, Xueyuan Lin, Wenjie Zhang, Zhichao Shi, Xuhui Jiang, Chengjin Xu, Jia Li, Jian Guo
cs.AI
摘要
大语言模型代理越来越依赖于外部推理条件:提示(prompts)、工具(tools)、记忆(memory)、标准操作流程(SOPs)、技能(skills)以及平台反馈(harness feedback)。这些资产在不改变模型权重的情况下能够提升任务执行效果,但当前往往通过启发式反思或简单复用已观察到的成功与失败案例(仿佛仅凭计数就能构成可靠信念)来进行修订。我们提出Bayesian-Agent——一个原生且跨平台的框架,将可复用技能和标准操作流程视为关于冻结模型在特定提示、上下文和平台环境下能否成功的假设。Bayesian-Agent记录经验证的轨迹证据,维护每个技能基于特征条件化的类别后验概率,并将后验状态映射为可检查的操作,如修补(patch)、拆分(split)、压缩(compress)、退役(retire)和探索(explore)。面向模型的提示获得可执行的护栏和故障模式修补,而后验摘要信息则可供审计。基于deepseek-v4-flash,增量式修复将SOP-Bench从80%提升至95%,Lifelong AgentBench从90%提升至100%,RealFin-Bench从45%提升至65%。我们进一步评估了Bayesian-Agent的原生后端以及可选的GenericAgent、mini-swe-agent和Claude Code后端。结果涵盖正向、负向、饱和及案例研究场景,表明代理技能进化应被视为后验引导的平台优化,而非未经校准的提示累积。源代码可在https://github.com/DataArcTech/Bayesian-Agent获取。
English
LLM agents increasingly rely on external inference conditions: prompts, tools, memory, SOPs, skills, and harness feedback. These assets can improve task execution without changing model weights, but they are often revised by heuristic reflection or by reusing observed successes and failures as if counts alone were reliable belief. We introduce Bayesian-Agent, a native and cross-harness framework that treats reusable skills and SOPs as hypotheses about whether a frozen model will succeed under a particular prompt, context, and harness environment. Bayesian-Agent records verified trajectory evidence, maintains a feature-conditioned categorical posterior over each skill, and maps posterior state into inspectable actions such as patch, split, compress, retire, and explore. Model-facing prompts receive executable guardrails and failure-mode patches, while posterior summaries remain available for audit. With deepseek-v4-flash, incremental repair improves SOP-Bench from 80\% to 95\%, Lifelong AgentBench from 90\% to 100\%, and RealFin-Bench from 45\% to 65\%. We further evaluate Bayesian-Agent's native backend and optional GenericAgent, mini-swe-agent, and Claude Code backends. The results include positive, negative, saturated, and case-study settings, suggesting that agent skill evolution is best viewed as posterior-guided harness optimization rather than uncalibrated prompt accumulation. The source code is available at https://github.com/DataArcTech/Bayesian-Agent.