arXiv:2604.04853cs.AI2026-04被引 12

MemMachine让AI记住完整对话,提升长期记忆准确率

MemMachine: A Ground-Truth-Preserving Memory System for Personalized AI Agents

  • 保留完整对话记录,避免信息丢失的提取错误
  • 在多轮对话中达到93%以上准确率,优化检索策略提升4.2%
  • 适合需要长期记忆的个性化AI助手开发者使用

大型语言模型代理需要持久记忆以保持个性化、事实连贯性和长程推理能力,但标准上下文窗口和检索增强生成(RAG)流程在多会话交互中会退化。我们提出MemMachine,一个开源记忆系统,将短期、长期情景和用户档案记忆整合于一个保持真实性的架构中,存储完整对话片段并减少依赖LLM的损失性提取。MemMachine采用上下文感知检索,通过扩展核心匹配项的上下文来提高跨多轮对话的相关证据召回率。在多个基准测试中,其表现出优异的准确性-效率权衡:在LoCoMo上使用gpt4.1-mini达到0.9169;在LongMemEvalS(ICLR 2025)的六维消融实验中达到93.0%准确率。检索阶段优化(检索深度调优+4.2%,上下文格式化+2.0%,搜索提示设计+1.8%,查询偏差校正+1.4%)优于摄入阶段改进(如句子分块+0.8%)。搭配优化提示时,GPT-5-mini比GPT-5高出2.6%,成为最经济高效方案。相比Mem0,MemMachine在相同条件下输入令牌数减少约80%。配套检索代理可自适应路由查询至直接检索、并行分解或迭代链式查询策略,在随机噪声条件下分别在HotpotQA-hard和WikiMultiHop上取得93.2%与92.6%准确率。结果表明,保留情景真实性并叠加自适应检索,能实现鲁棒高效的长期记忆。

原文摘要 · Abstract (English)

Large Language Model (LLM) agents require persistent memory to maintain personalization, factual continuity, and long-horizon reasoning, yet standard context-window and retrieval-augmented generation (RAG) pipelines degrade over multi-session interactions. We present MemMachine, an open-source memory system that integrates short-term, long-term episodic, and profile memory within a ground-truth-preserving architecture that stores entire conversational episodes and reduces lossy LLM-based extraction. MemMachine uses contextualized retrieval that expands nucleus matches with surrounding context, improving recall when relevant evidence spans multiple dialogue turns. Across benchmarks, MemMachine achieves strong accuracy-efficiency tradeoffs: on LoCoMo it reaches 0.9169 using gpt4.1-mini; on LongMemEvalS (ICLR 2025), a six-dimension ablation yields 93.0 percent accuracy, with retrieval-stage optimizations -- retrieval depth tuning (+4.2 percent), context formatting (+2.0 percent), search prompt design (+1.8 percent), and query bias correction (+1.4 percent) -- outperforming ingestion-stage gains such as sentence chunking (+0.8 percent). GPT-5-mini exceeds GPT-5 by 2.6 percent when paired with optimized prompts, making it the most cost-efficient setup. Compared to Mem0, MemMachine uses roughly 80 percent fewer input tokens under matched conditions. A companion Retrieval Agent adaptively routes queries among direct retrieval, parallel decomposition, or iterative chain-of-query strategies, achieving 93.2 percent on HotpotQA-hard and 92.6 percent on WikiMultiHop under randomized-noise conditions. These results show that preserving episodic ground truth while layering adaptive retrieval yields robust, efficient long-term memory for personalized LLM agents.

长期记忆AI代理检索增强对话系统

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