Don’t Just Trust Your Memory: Evidence-Linked Memory Reduces Memory-Induced Degradation in LLM Agents
The TL;DR
When language agents distill past executions into standalone procedural rules, they frequently hallucinate causal recipes from noisy binary rewards, causing memory-induced degradation—failing tasks they would have solved with no memory at all. WikiTrace solves this by storing lessons in a 3-tier hierarchy linking high-level insights down to structured compilations and verbatim raw turn trajectories. By allowing the agent to dynamically descend and inspect raw source logs whenever rules conflict or fail, WikiTrace cuts degradation from 6.5% to 4.5% while surging overall performance to 90.2% across eight agentic benchmark suites.
Why Giving LLMs "Experience" Can Make Them Dumber
Large language model (LLM) agents are increasingly tasked with operating in complex environments—navigating operating systems, calling multi-app APIs, crafting in sandbox worlds, or solving multi-step household chores. To avoid blindly exploring from scratch every time, modern agentic systems construct procedural external memory: they run an offline "compiler" LLM over past episodes to distill reusable rules, reflections, and workflows.
Intuitively, more experience should yield higher task success. But empirical testing reveals an uncomfortable phenomenon: memory-induced degradation. An agent given access to external memories frequently fails on tasks it reliably solves with zero memory.
Why does this happen? The authors trace the root cause: past trajectories $\mathcal{D}_{\text{train}} = \{(x_i, r_i, s_i)\}_{i=1}^N$ only contain a coarse binary outcome $s_i \in \{0, 1\}$. There is no ground-truth credit assignment explaining which of the agent’s dozens of actions caused success or failure. An offline LLM compiler that distills a run into a concise rule must fundamentally guess what was decisive.
The agent turns on the lamp next to a vase on the table and prematurely calls done. Task Fails.
Action T7: use desklamp 1 (holding vase)
Agent naturally follows environmental logic: picks up the item, illuminates it in hand. Episode Succeeds.
When lessons are served as standalone text cards without their underlying provenance, the agent has zero recourse to scrutinize the rule. If the rule claims that "a lamp task completes whether the object lies on the surface or is in hand", the agent obeys, even though opening the source illustrates an inaccurate ExpeL lamp rule. This example does not demonstrate a WikiTrace rescue.
The Big Idea: Evidence-Linked Memory
"A lesson concisely tells the agent what to do, whereas the raw trajectory faithfully records what actually happened but is too long to reread for every decision."
WikiTrace resolves the tension by establishing bidirectional hypertext paths between three distinct abstraction layers: Insights (concise rules in the agent's context), Compilations (diagnostic rationales of successes or failures), and Raw Trajectories (verbatim JSONL records of all observations and tool calls). Instead of forcing the agent to read all raw data upfront or blindly follow distilled rules, the agent starts from top-level insights and uses terminal tools (bash, read, grep) to selectively descend to the original evidence only when a rule lacks specifics, conflicts with another, or comes from a failed run.
How WikiTrace Works: The 3-Tier Hierarchy
WikiTrace constructs memory $\mathcal{M} = (R, C, I, E)$ in a single offline pass over past trajectories $\mathcal{D}_{\text{train}}$, without requiring expensive validation rollouts:
Every single extracted insight $u \in I_i$ maintains an explicit link back to compilation $c_i$ and the unedited raw record $r_i$. Explore the three tiers below by clicking on any layer:
When Does the Agent Descend?
Rather than reading entire trajectories upfront (which would overflow the context window and overwhelm reasoning), the agent descends down the links using bash tools under four specific operational conditions:
Lacks Specific Details
The insight prescribes an action but omits argument syntax, API formats, or exact sub-recipes.
Conflicting Directives
Two memory items recommend contradictory actions for the same situation.
Originates from a Failed Run
Compilations from failures involve post-hoc diagnostic guesses that are frequently unfaithful.
Environmental Action Block
An executed environment action returns an unexpected error or state change.
In Action: Resolving the Minecraft "Auto-Craft" Trap
This case from PlanCraft (Figure 11 in the paper) illustrates how isolated memory leads to failure, while WikiTrace uses evidence links to catch an erroneous lesson and succeed.
The agent opens the task and observes two conflicting lessons extracted from earlier runs:
Where Memory Breaks: The 5 Categories of Degradation
To understand exactly how memory breaks tasks an agent solves without memory, the authors analyzed tasks that succeeded across all 3 trials without memory, but failed with memory (355 failure instances evaluated by a rigorous LLM judge).
Crucially, 52% of all failures traced directly to a memory item the agent followed.
Degradation Breakdown (355 Total Failures)
Click a bar to see paper quote & triggerResults: Separating Gain from Regression
Standard aggregate accuracy obscures whether a memory system is genuinely improving capability or merely swapping old successes for new ones. The authors evaluate systems along two orthogonal axes:
Rate at which memory turns baseline failures into successes:
Rate at which memory turns baseline successes into failures:
| Method | ALFWorld (Seen/Unseen) | ScienceWorld | PlanCraft (Seen/Unseen) | τ³-bench | AppWorld (Norm/Chal) | Average |
|---|---|---|---|---|---|---|
| No Memory | 94.4 / 94.3 | 83.7 | 72.3 / 56.3 | 86.8 | 75.4 / 72.7 | 79.5% |
| AWM | 94.7 / 97.3 | 88.9 | 76.3 / 57.3 | 85.5 | 79.3 / 73.4 | 81.6% |
| ReasoningBank | 92.1 / 92.8 | 85.0 | 84.7 / 61.3 | 86.4 | 80.8 / 70.7 | 81.7% |
| ExpeL | 94.4 / 98.0 | 91.9 | 74.0 / 51.0 | 82.5 | 80.5 / 70.0 | 80.3% |
| Insights Only | 96.7 / 97.3 | 94.9 | 88.7 / 73.0 | 85.1 | 86.8 / 73.7 | 87.0% |
| WikiTrace (Ours) | 98.7 / 98.8 | 96.1 | 93.3 / 81.3 | 88.2 | 89.5 / 75.8 | 90.2% |
Gain & Regression Comparison
Across eight suites (Figure 5), WikiTrace has the highest conditional Gain and its Regression confidence interval lies below the rerun band. A no-memory rerun is a stochastic reference, not a zero-error control. Table 6 groups results into five benchmarks.
Conditional Gain above No Memory Rerun (§4.3)
Approximate differences: WikiTrace +35 percentage points; Insights Only +27 pp; existing memory methods +7–14 pp. Gain is conditional on tasks failed without memory, not accuracy. Absolute plot values are not reconstructed.
Other methods: see Figure 5; no visually estimated Regression value is reconstructed here.