arXiv:2603.17781cs.AI2026-03被引 3

用可持久存储的常识对象替代提示词中的记忆,提升大模型长期记忆准确率。

Facts as First Class Objects: Knowledge Objects for Persistent LLM Memory

  • 将事实作为哈希定位的独立对象存储,实现常数时间快速检索。
  • 在252倍更低成本下,保持100%准确率,多跳推理准确率达78.9%。
  • 适合需要长期稳定记忆的AI系统开发,如智能助手、自动规划等场景。

大型语言模型越来越多地充当持续工作的知识工作者,其默认策略是使用上下文记忆——将事实存储在提示中。我们对比了上下文记忆与知识对象(KOs)的表现,后者是以哈希地址索引的离散元组,支持O(1)检索。在上下文窗口内,Claude Sonnet 4.5在10至7,000个事实范围内实现了100%的精确匹配准确率(占其20万字窗口的97.5%)。然而,在实际部署中发现三种失效模式:容量限制(超过8,000条事实时提示溢出)、压缩损失(摘要导致60%的事实丢失)、目标漂移(级联压缩使54%的项目约束被侵蚀,但模型仍自信执行)。而知识对象在所有条件下均保持100%准确率,且成本降低252倍。在多跳推理任务中,知识对象达到78.9%,远超上下文记忆的31.6%。跨四种前沿模型验证表明,压缩损失是架构性问题,非模型特有。此外,嵌入检索在对抗性事实上表现差(1阶精度仅20%),而神经记忆(Titans)虽能存储事实,却无法按需检索。本文引入密度自适应检索作为切换机制,并发布了基准测试套件。

原文摘要 · Abstract (English)

Large language models increasingly serve as persistent knowledge workers, with in-context memory - facts stored in the prompt - as the default strategy. We benchmark in-context memory against Knowledge Objects (KOs), discrete hash-addressed tuples with O(1) retrieval. Within the context window, Claude Sonnet 4.5 achieves 100% exact-match accuracy from 10 to 7,000 facts (97.5% of its 200K window). However, production deployment reveals three failure modes: capacity limits (prompts overflow at 8,000 facts), compaction loss (summarization destroys 60% of facts), and goal drift (cascading compaction erodes 54% of project constraints while the model continues with full confidence). KOs achieve 100% accuracy across all conditions at 252x lower cost. On multi-hop reasoning, KOs reach 78.9% versus 31.6% for in-context. Cross-model replication across four frontier models confirms compaction loss is architectural, not model-specific. We additionally show that embedding retrieval fails on adversarial facts (20% precision at 1) and that neural memory (Titans) stores facts but fails to retrieve them on demand. We introduce density-adaptive retrieval as a switching mechanism and release the benchmark suite.

大模型记忆知识管理持久存储推理优化

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