> Your agent's skill library keeps growing — but do you actually know how reliable each skill is? The IDEA Research team treats skills as Bayesian hypotheses, updating beliefs from verifier-verified outcomes, so skill evolution shifts from "I think this works" to "the posterior tells me to explore, patch, split, compress, or retire."
Key points
- Problem: Modern LLM agents are reasoning environments — prompts, tools, memory, SOPs, and skills all shape performance. Existing maintenance approaches are flawed: LLM self-reflection (Reflexion) is noisy; raw success/failure counting (ExpeL, Voyager) treats sparse, non-i.i.d. trajectories as reliable beliefs; many frameworks have no accumulation at all.
- Core idea: With the LLM frozen, the environment is decomposed as
C_t = (P_t, R_t, A_t, V_t)(prompts/skills, retrieval context, tools, verifiers). Each reusable skillh_kis a hypothesis with success probability conditioned on features extracted from the trajectory. - Evidence model: Only verifier outputs are trusted — no LLM self-assessment. Trajectories record task input, skill, context, verified result, token cost, rounds, latency, verifier-derived failure mode, and metadata. Discrete bucketing balances efficiency and information.
- Posterior: Laplace-smoothed (λ=1) categorical prior, factorized likelihood over features, normalized success posterior; Beta-Bernoulli summaries kept for compatibility, auditing, and conservative failure-dominance checks.
- Five posterior-guided operations: Explore (no/insufficient evidence), Retire (β≥4 and posterior < 0.45), Patch (same failure mode ≥ 2 times → concrete guardrails), Split (≥3 contexts, ≥4 observations), Compress (≥3 observations, posterior ≥ 0.72). The policy is intentionally conservative and auditable.
- BA-Inc (incremental repair) beats BA-Full: repairing only failed tasks consumed just 12–15% of Full's tokens and avoids ordering effects that made BA-Full drop Lifelong from 90% to 85%.
- Token efficiency: SOP BA-Inc used 153k tokens vs. 1.39M for GA Full (efficiency gain 71%, 19.63 vs 11.47).
- Backend ablation: Claude Code + flash performed best on RealFin (80% → 87.5%), showing framework–backend interaction effects.
- Paper: Wu et al., "Bayesian-Agent: Posterior-Guided Skill Evolution for LLM Agent Harnesses", arXiv:2606.08348 (2026)
- Institutions: IDEA Research, HKUST (Guangzhou), DataArcTech Ltd.
- Models: deepseek-v4-flash / deepseek-v4-pro; Benchmarks: SOP-Bench, Lifelong AgentBench, RealFin-Bench; Backends: Native BA, GenericAgent, mini-swe-agent, Claude Code
Example: patch evolution on SOP-Bench
Failure mode left_expected_output_blank triggered a patch: after writing, re-read test_set_with_outputs.csv and confirm the target row's expected_output is non-empty; if empty, write the computed raw category string before finishing. The result is a stable set of executable guardrails (e.g., one-indexed row updates, write raw category strings without XML/Markdown/quotes, verify the expected_output cell is non-empty before finishing) — precise rules, not vague advice.
Results (deepseek-v4-flash)
| Benchmark | GA baseline | BA-Full | BA-Inc | |---|---|---|---| | SOP-Bench | 80% | 95% | 95% | | Lifelong AgentBench | 90% | 85% | 100% | | RealFin-Bench | 45% | 52% | 65% |
Comparison with prior work
| Dimension | Reflexion / ExpeL / Voyager | Bayesian-Agent | |---|---|---| | Update | LLM reflection, raw counts | Verifier traces → Bayesian evidence → posterior actions | | Belief | Text memory, count tables | Feature-conditioned posterior + Beta-Bernoulli | | Uncertainty | None | Laplace smoothing, posterior probabilities, conservative thresholds | | Auditing | Black-box text drift | Checkable posterior audit trail, evolution snapshots | | Failure | One-shot fix or ignore | Repeated failure modes → structured patches | | Retirement | None | Posterior < 0.45 → retire |
Core claim: "Agent skill evolution should be evidence-calibrated, auditable, and explicit about uncertainty."
Limitations
Best suited to repetitive, verifier-backed tasks with recurring failure modes. Not suited to one-off tasks, subjective labels, highly non-stationary environments, or failures caused by missing tools/data. The default model is a factorized categorical posterior with Laplace smoothing, not full Bayesian structure learning; backend coverage is limited to four frameworks.
Takeaway
Bayesian-Agent's contribution is not making agents smarter, but making their skill accumulation honest: trust only the verifier, condition posteriors on context/cost/latency, act conservatively, and keep every decision auditable — upgrading the skill library from an experience pile to a probabilistic knowledge base.
References