让大模型像人一样自主翻找记忆,长对话问答更准确
TA-Mem: Tool-Augmented Autonomous Memory Retrieval for LLM in Long-Term Conversational QA
- 用智能代理按语义拆分输入,生成结构化记忆条目
- 多索引数据库支持关键词与相似度双重检索,提升召回率
- 自动选择工具迭代检索,适配不同问题类型,效果优于传统方法
大语言模型在文本推理任务中表现强劲,但受限于上下文窗口长度,难以处理长程推理任务,亟需记忆存储系统。现有存储方案多采用情景笔记或图谱形式,但检索仍依赖预设流程或静态的嵌入相似度 top-k 检索。为解决此灵活性不足问题,本文提出一种新型工具增强型自主记忆检索框架 TA-Mem:(1) 记忆提取代理通过提示学习,根据语义相关性自适应地将输入切分为子上下文并提取信息至结构化笔记;(2) 设计多索引记忆数据库,支持基于键值的查找与基于相似度的检索;(3) 工具增强型记忆检索代理可根据用户输入自主选择数据库提供的工具,通过推理所获取的记忆决定是否继续迭代或最终输出响应。TA-Mem 在 LoCoMo 数据集上显著优于现有基线方法,且对不同问题类型的工具使用分析展示了其良好的适应性。
原文摘要 · Abstract (English)
Large Language Model (LLM) has exhibited strong reasoning ability in text-based contexts across various domains, yet the limitation of context window poses challenges for the model on long-range inference tasks and necessitates a memory storage system. While many current storage approaches have been proposed with episodic notes and graph representations of memory, retrieval methods still primarily rely on predefined workflows or static similarity top-k over embeddings. To address this inflexibility, we introduced a novel tool-augmented autonomous memory retrieval framework (TA-Mem), which contains: (1) a memory extraction LLM agent which is prompted to adaptively chuck an input into sub-context based on semantic correlation, and extract information into structured notes, (2) a multi-indexed memory database designed for different types of query methods including both key-based lookup and similarity-based retrieval, (3) a tool-augmented memory retrieval agent which explores the memory autonomously by selecting appropriate tools provided by the database based on the user input, and decides whether to proceed to the next iteration or finalizing the response after reasoning on the fetched memories. The TA-Mem is evaluated on the LoCoMo dataset, achieving significant performance improvements over existing baseline approaches. In addition, an analysis of tool use across different question types also demonstrates the adaptivity of the proposed method.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。