用树形记忆自动修正错误,让大模型长程搜索更准更省
Self-Correcting Long-Horizon Search Agents via Tree-Structured Memory

- 构建带修订历史的证据树,每步只保留关键摘要和来源
- 发现新证据冲突时回溯修改源头,准确率提升最高25.6个百分点
- 适合需要长期推理与可靠溯源的问答和搜索任务
基于大语言模型的搜索代理通过与外部环境的多步交互回答问题。然而,向模型提供完整的执行轨迹会导致上下文无限增长并引入噪声。现有压缩方法在减少上下文的同时损失重要细节,且常替换错误事实而不修复由此产生的下游推理。为此,我们提出ReTree——一种用于搜索代理的自校正树形记忆机制。ReTree在每一步保持有限的推理上下文,同时保留源相关证据。它将搜索建模为证据树,节点存储有限摘要、证据及修订历史。当新获取的证据与早期主张矛盾时,ReTree回溯至该主张引入的节点,替换过时证据,重新生成摘要,剪枝受影响分支,并继续搜索。源对齐的证据溯源支持可靠的冲突定位,确保最终结论可追溯至原始文本片段。在四个公开问答与搜索基准上的实验表明,ReTree持续优于完整轨迹的ReAct方法,准确率最高提升25.6个百分点;全轨迹ReAct的平均最大每步推理上下文为ReTree的1.27至1.51倍。这些结果确立了ReTree作为长周期搜索有效自校正记忆抽象的地位。
原文摘要 · Abstract (English)
Large language model (LLM)-based search agents answer questions through multi-step interactions with external environments. However, providing complete execution trajectories to the LLM causes unbounded context growth and introduces noise. Existing compression methods reduce context at the cost of important details and often replace erroneous facts without repairing downstream reasoning derived from them. To address this problem, we propose ReTree, a self-correcting tree-structured memory mechanism for search agents. ReTree constructs a bounded per-step reasoning context while preserving source-linked evidence. It models search as an evidence tree whose nodes store bounded summaries, evidence, and revision histories. When newly retrieved evidence contradicts an earlier claim, ReTree traces back to the node where the claim was introduced, replaces outdated evidence, regenerates summaries, prunes affected branches, and resumes search. Source-grounded evidence provenance supports reliable conflict localization and keeps final claims traceable to retrieved passages. Experiments on four public question-answering and search benchmarks show that ReTree consistently outperforms Full-Trajectory ReAct, improving answer accuracy by up to 25.6 percentage points (pp); the average maximum per-step reasoning context of Full-Trajectory ReAct is $1.27$--$1.51\times$ that of ReTree. These results establish ReTree as an effective self-correcting memory abstraction for long-horizon search.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。