arXiv:2504.19413 · 中英对照阅读
Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory
中文速览
长期对话里,语言模型常会忘掉用户之前说过的偏好和事实,光靠不断加长上下文也难兼顾记忆准确、速度和成本。作者提出 Mem0:从新对话中挑出重要信息,再和已有记忆比对,决定新增、补充、删除或不处理;图谱版 Mem0 则把人物、地点和事实之间的关系也存起来,方便回答需要串联多条信息的问题。在 LOCOMO 测试中,两种方法在单步、时间、多步和开放领域问题上都胜过多类现有记忆方案,图谱版整体表现又比基础版高约 2%,而基础版相较读取全部历史的做法,延迟降低 91%、Token 成本减少超过 90%。这说明让模型有选择地保存、更新并调用长期记忆,既能让跨会话交流更连贯,也更适合实际部署。
摘要
Large Language Models (LLMs) have demonstrated remarkable prowess in generating contextually coherent responses, yet their fixed context windows pose fundamental challenges for maintaining consistency over prolonged multi-session dialogues. We introduce Mem0, a scalable memory-centric architecture that addresses this issue by dynamically extracting, consolidating, and retrieving salient information from ongoing conversations. Building on this foundation, we further propose an enhanced variant that leverages graph-based memory representations to capture complex relational structures among conversational elements. Through comprehensive evaluations on the LOCOMO benchmark, we systematically compare our approaches against six baseline categories: (i) established memory-augmented systems, (ii) retrieval-augmented generation (RAG) with varying chunk sizes and $k$ -values, (iii) a full-context approach that processes the entire conversation history, (iv) an open-source memory solution, (v) a proprietary model system, and (vi) a dedicated memory management platform. Empirical results demonstrate that our methods consistently outperform all existing memory systems across four question categories: single-hop, temporal, multi-hop, and open-domain. Notably, Mem0 achieves 26% relative improvements in the LLM-as-a-Judge metric over OpenAI, while Mem0 with graph memory achieves around 2% higher overall score than the base Mem0 configuration. Beyond accuracy gains, we also markedly reduce computational overhead compared to the full-context approach. In particular, Mem0 attains a 91% lower p95 latency and saves more than 90% token cost, thereby offering a compelling balance between advanced reasoning capabilities and practical deployment constraints. Our findings highlight the critical role of structured, persistent memory mechanisms for long-term conversational coherence, paving the way for more reliable and efficient LLM-driven AI agents.
术语表
- Large Language Models (LLMs)
- 大型语言模型
- Mem0
- Mem0
- Mem0 with graph memory
- Mem0 图记忆版本
- graph-based memory representations
- 基于图的记忆表示
- persistent memory
- 持久记忆
- memory-centric architecture
- 以记忆为中心的架构
- memory-augmented systems
- 记忆增强系统
- memory-augmented agents
- 记忆增强智能体
- retrieval-augmented generation (RAG)
- 检索增强生成
- full-context approach
- 全上下文方法
- context window
- 上下文窗口
- LOCOMO benchmark
- LOCOMO 基准
- LLM-as-a-Judge metric
- LLM-as-a-Judge 评测指标
- single-hop
- 单跳
- temporal
- 时序
- multi-hop
- 多跳
- open-domain
- 开放域
- p95 latency
- p95 延迟
- token cost
- 令牌成本
- hierarchical memory architectures
- 分层记忆架构
- agentic memory systems
- 智能体式记忆系统
- attention mechanisms
- 注意力机制
- salient information
- 显著信息
- memory consolidation
- 记忆整合
- memory retrieval
- 记忆检索
- long-term reasoning
- 长期推理
- AI agents
- 人工智能智能体