TL;DR
Large Language Models (LLMs) are notoriously "stateless," meaning they don't naturally learn from their mistakes without expensive retraining. This paper introduces a framework that distills failures into a library of "guidance" items and uses a contextual bandit approach (Thompson sampling) to select the most effective advice for new queries, boosting accuracy by up to 26% without updating a single model parameter.
What Problem Does This Paper Address?
Despite their impressive reasoning capabilities, LLMs are fundamentally static. If a model fails to solve a specific type of physics problem today, it will likely make the same mistake tomorrow unless its weights are updated.
Existing solutions like Retrieval-Augmented Generation (RAG) or long-term memory systems attempt to fix this by providing the model with past examples. However, these systems usually rely on semantic similarity—they grab past interactions that look like the current query. The authors argue this is a flawed metric: just because a past experience is similar doesn't mean the "lesson" derived from it is actually helpful. There is a missing link between retrieving information and validating its utility.
Methods
The authors propose Experience-Guided Behavior Adaptation, a framework that treats past "lessons" as hypotheses to be tested.
- Guidance Generation: When a model (the "Base LLM") fails a task, a stronger "Supervisor LLM" (Claude Opus 4.5) analyzes the error and generates a compact piece of "guidance"—actionable advice plus a minimal example of how to apply it.
- The Guidance Library: These lessons are stored in a library. Crucially, each item is modeled as an arm in a contextual bandit. The system maintains a Beta distribution (a Bayesian posterior) for each item, tracking how often it actually leads to a correct answer.
- Uncertainty-Aware Retrieval: When a new query comes in, the system doesn't just pick the most similar guidance. It uses Thompson Sampling to rerank candidates. This balances exploration (trying new or uncertain guidance) with exploitation (using guidance known to work).
- Implicit Forgetting: Guidance that consistently fails to help the model is naturally "downweighted" by the Bayesian update, effectively allowing the system to ignore bad advice over time.
Datasets
The framework was evaluated across 11 diverse datasets to test reasoning, science, law, and coding:
- MMLU-Pro: Six domains including Physics, Law, and Chemistry.
- GPQA: Graduate-level, "google-proof" science questions (Main and Diamond sets).
- AIME 2020–2024: High-school math competition problems used to test how well guidance transfers across benchmarks.
- MBPP: Python programming tasks.
Key Insights and Ideas
- Utility > Similarity: The core "aha" moment is that a lesson's history of success is just as important as its relevance to the topic. By using Thompson sampling, the model avoids "distractors"—guidance that looks relevant but leads the model down the wrong path.
- Cross-Model Experience Exchange: Perhaps the most surprising finding is that experience is model-agnostic. Guidance generated from the failures of a small, open-source model (Qwen3 4B) was highly effective at improving a much larger, proprietary model (Haiku 4.5). This suggests we can use small models to "scout" for errors and build "cheat sheets" for flagship models.
- Frozen Parameters, Fluid Behavior: This method achieves "learning" entirely in the context space. The model's weights remain frozen, making this a highly practical approach for production environments where retraining is impossible.
Key Results
- Error Correction: The method corrected up to 69.5% of prior errors for Haiku 4.5.
- Accuracy Boosts: In "Frozen Guidance Mode" (where the library is pre-built), Haiku 4.5 saw absolute accuracy gains of 26.1% in Chemistry and 22.4% in Physics.
- Superiority over RAG: The framework consistently outperformed standard 5-shot RAG. In some cases, RAG actually degraded performance (likely due to context noise), while the bandit-based guidance remained robust.
- Transferability: Using guidance from the weak Qwen3 4B model, Haiku 4.5 improved its Physics score by 23.2%, nearly matching the gains it got from its own specialized guidance.
Limitations and Future Work
- Supervisor Dependency: The system currently relies on a high-end "Supervisor" model to generate the initial guidance. While this happens offline, it still adds a layer of complexity to the pipeline.
- Library Growth: While the authors propose a Bayesian pruning strategy in the appendix to keep the library size manageable, the main experiments were conducted on fixed-size libraries. Managing a library that grows over years of interaction remains a challenge.
- Inference Overhead: Adding guidance to the prompt increases the token count, which can increase latency and cost, though the authors note this is significantly cheaper than "per-query synthesis" methods used in other frameworks.
The authors conclude that this "clean separation" between offline experience distillation and online uncertainty-aware inference is a promising path toward LLMs that actually get smarter the more we use them.
Summary updated