arXiv:2502.12110 · 中英对照阅读
A-Mem:面向大语言模型(LLM)智能体的智能体记忆
A-Mem: Agentic Memory for LLM Agents
中文速览
长期对话中的智能体常常记不住过去的经历,而现有记忆系统又太依赖预设分类和固定流程,难以适应新任务。为此,作者提出 A-Mem:它把每段经历整理成包含关键词、标签和背景描述的笔记,再让模型自动寻找相关旧记忆、建立连接,并在新经历出现时更新旧笔记。实验显示,在六种基础模型上的测试中,A-Mem 相比现有先进方法带来了明显提升。它的重要之处在于,记忆不再只是存起来再搜,而能随着经历不断整理和演变,让智能体更好地利用长期经验。
摘要
尽管大语言模型(LLM)智能体能够有效利用外部工具处理复杂的现实世界任务,但它们需要记忆系统来利用历史经验。当前的记忆系统支持基本的存储和检索,但缺乏复杂的记忆组织,尽管近期已有将图数据库纳入其中的尝试。此外,这些系统固定的操作方式和结构限制了其在不同任务中的适应性。为解决这一局限,本文提出了一种面向大语言模型(LLM)智能体的新型智能体记忆系统,能够以智能体式的方式动态组织记忆。遵循卡片盒笔记法的基本原则,我们设计了该记忆系统,通过动态索引和链接构建相互关联的知识网络。添加新记忆时,系统会生成一条包含多种结构化属性的综合笔记,其中包括上下文描述、关键词和标签。随后,系统会分析历史记忆,以识别相关联系,并在存在有意义的相似性时建立链接。此外,这一过程还能促进记忆演化——随着新记忆的整合,它们可以触发现有历史记忆的上下文表征和属性更新,使记忆网络能够持续完善其理解。我们的方法将卡片盒笔记法的结构化组织原则与智能体驱动决策的灵活性相结合,从而实现更具适应性和上下文感知能力的记忆管理。在六种基础模型上的实证实验表明,与现有最先进基线方法相比,该方法取得了更优的改进效果。
While large language model (LLM) agents can effectively use external tools for complex real-world tasks, they require memory systems to leverage historical experiences. Current memory systems enable basic storage and retrieval but lack sophisticated memory organization, despite recent attempts to incorporate graph databases. Moreover, these systems’ fixed operations and structures limit their adaptability across diverse tasks. To address this limitation, this paper proposes a novel agentic memory system for LLM agents that can dynamically organize memories in an agentic way. Following the basic principles of the Zettelkasten method, we designed our memory system to create interconnected knowledge networks through dynamic indexing and linking. When a new memory is added, we generate a comprehensive note containing multiple structured attributes, including contextual descriptions, keywords, and tags. The system then analyzes historical memories to identify relevant connections, establishing links where meaningful similarities exist. Additionally, this process enables memory evolution – as new memories are integrated, they can trigger updates to the contextual representations and attributes of existing historical memories, allowing the memory network to continuously refine its understanding. Our approach combines the structured organization principles of Zettelkasten with the flexibility of agent-driven decision making, allowing for more adaptive and context-aware memory management. Empirical experiments on six foundation models show superior improvement against existing SOTA baselines.
术语表
- large language model (LLM) agent
- 大语言模型(LLM)智能体
- agentic memory system
- 智能体记忆系统
- A-Mem
- A-Mem
- Zettelkasten method
- 卡片盒笔记法
- memory organization
- 记忆组织
- dynamic indexing
- 动态索引
- memory linking
- 记忆链接
- contextual description
- 上下文描述
- structured attributes
- 结构化属性
- memory evolution
- 记忆演化
- agent-driven decision making
- 智能体驱动的决策
- foundation model
- 基础模型
- graph database
- 图数据库
- retrieval-augmented generation (RAG)
- 检索增强生成(RAG)
- semantic similarity
- 语义相似度
- embedding vector
- 嵌入向量
- long-term interaction
- 长期交互
- memory repository
- 记忆库
- memory update mechanism
- 记忆更新机制
- link generation
- 链接生成
- higher-order pattern
- 高阶模式
- dense retrieval model
- 稠密检索模型
- read-write memory structure
- 读写式记忆结构
- MemGPT
- MemGPT
- SCM (Self-Controlled Memory)
- 自控制记忆(SCM)
- T-SNE
- T-SNE
- agentic RAG
- 智能体式检索增强生成