不要只相信你的记忆:证据关联记忆可减少LLM智能体中记忆引发的退化
研究论文 · 2026/11/11
外部记忆使LLM智能体能够通过将过去任务轨迹提炼为简洁经验来提升表现,但记忆也可能导致记忆诱导的性能下降:智能体在原本能解决的任务上失败,常因遵循错误经验或误用、误读有效经验。这是因为经验仅从标注任务成功或失败的轨迹中推断,却通常不附带原始轨迹,使智能体无法核查。为此,我们提出WikiTrace,一种证据链接记忆系统,让智能体对照原始轨迹核查每条经验。具体而言,基于轨迹常仍包含捕捉错误经验所需证据的发现,WikiTrace将每条经验存储为简洁洞见,并链接到其轨迹成功或失败的原因摘要及原始轨迹本身。在新任务上,智能体从所有洞见出发,当某洞见缺乏行动所需细节、与其他洞见冲突或来自失败任务时,通过链接和终端工具下钻以补充细节或纠正洞见后再行动。我们在五个智能体基准上验证WikiTrace,表明其持续优于现有记忆方法和仅提供相同洞见的基线,同时减少记忆诱导的性能下降。代码见https://github.com/yukyeongleee/wikitrace。
该研究针对LLM智能体外部记忆的关键缺陷——记忆诱导的性能下降,提出了可核查的证据链接记忆系统,在多个基准上验证有效,对提升智能体可靠性和记忆利用效率有重要价值。
External memory enables LLM agents to improve from experience by distilling trajectories of past tasks into concise lessons for new tasks. However, memory can also lead to memory-induced degradation, where an agent fails on tasks it would solve without memory, often because it follows a lesson that is incorrect, or misapplies or misreads a valid one. This is because lessons are inferred from trajectories labeled only with task success or failure, yet are typically provided without the trajectories they came from, leaving the agent no way to check them. To address this, we introduce WikiTrace, an evidence-linked memory system designed to let agents check each lesson against its original trajectory. Specifically, motivated by the finding that a trajectory often still holds the evidence needed to catch an erroneous lesson, WikiTrace stores each lesson as a concise insight linked to a summary of why its trajectory succeeded or failed and to the raw trajectory itself. Then, on a new task, the agent starts from all insights and, whenever one lacks details needed to act, conflicts with another, or comes from a failed task, descends through its links with terminal tools to fill in missing details or correct the insight before acting. We validate WikiTrace on five agentic benchmarks, showing that it consistently outperforms existing memory approaches and a baseline given the same insights alone, while also reducing memory-induced degradation. Our code is available at https://github.com/yukyeongleee/wikitrace