arXiv:2608.05906cs.CL2026-08

让智能体记住成功修复经验,下次遇到类似错误能直接复用,无需重新尝试。

Causal Episodic Memory for Feedback-Driven Agent Repair

论文配图:Causal Episodic Memory for Feedback-Driven Agent Repair
图 1 · 摘自论文原文
  • 构建双极性记忆库,存储已验证的成功修复和失败尝试。
  • 在Spider数据集上修复准确率从66.34%提升至69.79%,BIRD达48.44%。
  • 适合需要高效迭代修复的文本转SQL任务,尤其关注低资源场景。

LLM智能体在修复失败时常常丢弃已成功的修正方案,导致后续任务需重新探索相似解法。本文研究是否可将已完成的修复结果用于提升后续Text-to-SQL任务的表现,且不进行参数更新。提出MERIT,一种无需训练的智能体,通过在线维护由权威反馈验证的成功修正与失败方向组成的双重极性记忆。在权威辅助基准反馈下,仅早期完成的修复记忆可被检索。通过确定性分类器粗粒度识别故障类型,以此条件化混合词法-密集检索器,在冻结模型生成每次修订前进行调用。使用Qwen2.5-7B-Instruct,保持相同初始预测与修复预算,MERIT在Spider上执行准确率从66.34%提升至69.79%,在BIRD上从47.35%提升至48.44%。配对分析显示蜘蛛数据集提升证据明确,而布伊德数据集较弱。MERIT在两个基准上均未显著优于无类型动态检索,而类似Reflexion的记忆方法在布伊德上达到51.24%但推理成本更高。消融实验表明负向记忆贡献有限,类型条件与词法-密集排序的价值依赖数据集,而模式局部经验带来最稳定收益。这些结果明确了因果跨查询记忆在何种情况下改善修复,以及何时更广泛记忆表示仍更优。

原文摘要 · Abstract (English)

LLM agents that repair failures often discard successful corrections, forcing later episodes to rediscover similar solutions. We study whether finalized repair outcomes can improve subsequent Text-to-SQL episodes without parameter updates. We introduce MERIT, a training-free agent that maintains an online dual-polarity memory of oracle-verified corrections and observed unsuccessful directions. Under oracle-assisted benchmark feedback, only memories from earlier finalized episodes are eligible for retrieval. A deterministic classifier assigns a coarse failure type, which conditions a hybrid lexical-dense retriever before the frozen model generates each revision. Using Qwen2.5-7B-Instruct with identical initial predictions and repair budgets, MERIT improves execution accuracy over stateless iterative repair from \(66.34\%\) to \(69.79\%\) on Spider and from \(47.35\%\) to \(48.44\%\) on BIRD. Paired analyses provide clear evidence for the Spider gain but weaker evidence on BIRD. MERIT is not reliably separated from untyped dynamic retrieval on either benchmark, while Reflexion-style memory reaches \(51.24\%\) on BIRD at substantially higher inference cost. Ablations show that negative memory contributes modestly, the value of type conditioning and lexical--dense ranking is dataset dependent, and schema-local experience provides the most consistent benefit. These results clarify when causal cross-query memory improves repair and when broader memory representations remain preferable.

智能体修复记忆机制Text-to-SQL因果记忆

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。