arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.04814cs.CL
收藏

超越上下文窗口:基于事实的记忆与长上下文LLM在持久代理中的成本性能分析

Beyond the Context Window: A Cost-Performance Analysis of Fact-Based Memory vs. Long-Context LLMs for Persistent Agents

Bricks Technology

Natchanon Pollertlam, Witchayut Kornsuwannawit

AI总结:

本文比较了基于事实的记忆系统与长上下文LLM在持久代理中的性能,发现记忆系统在成本上更具优势,尤其在长上下文下更经济。

摘要:

持久的对话式AI系统面临一个选择:将完整的对话历史传递给长上下文大型语言模型(LLM),还是维护一个专门的记忆系统,该系统提取和检索结构化事实。我们比较了一个基于Mem0框架构建的事实记忆系统与长上下文LLM推理在三个以记忆为中心的基准测试——LongMemEval、LoCoMo和PersonaMemv2上的表现,并在准确性和累积API成本上评估了两种架构。长上下文GPT-5-mini在LongMemEval和LoCoMo上实现了更高的事实回忆率,而记忆系统在PersonaMemv2上表现相当,其中人格一致性依赖于稳定的、事实性属性,适合扁平类型提取。我们构建了一个包含提示缓存的成本模型,表明两种架构具有不同的成本特征:长上下文推理在缓存下仍会因上下文长度增加而产生每轮费用,而记忆系统的每轮读取成本在一次写入阶段后大致保持不变。在100000个token的上下文长度下,记忆系统在大约十轮交互后变得更经济,随着上下文长度的增加,平衡点会降低。这些结果描述了两种方法之间的准确性和成本的权衡,并为生产部署中选择这两种方法提供了具体的标准。

英文摘要:

Persistent conversational AI systems face a choice between passing full conversation histories to a long-context large language model (LLM) and maintaining a dedicated memory system that extracts and retrieves structured facts. We compare a fact-based memory system built on the Mem0 framework against long-context LLM inference on three memory-centric benchmarks - LongMemEval, LoCoMo, and PersonaMemv2 - and evaluate both architectures on accuracy and cumulative API cost. Long-context GPT-5-mini achieves higher factual recall on LongMemEval and LoCoMo, while the memory system is competitive on PersonaMemv2, where persona consistency depends on stable, factual attributes suited to flat-typed extraction. We construct a cost model that incorporates prompt caching and show that the two architectures have structurally different cost profiles: long-context inference incurs a per-turn charge that grows with context length even under caching, while the memory system's per-turn read cost remains roughly fixed after a one-time write phase. At a context length of 100k tokens, the memory system becomes cheaper after approximately ten interaction turns, with the break-even point decreasing as context length grows. These results characterize the accuracy-cost trade-off between the two approaches and provide a concrete criterion for selecting between them in production deployments.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑