跳到正文
返回论文列表
cs.CL提交于 已译

自由遗忘,稍后 Grep:面向长程 LLM 智能体的无损、无索引记忆

Forget Freely, Grep Later: Lossless, Index-Free Memory for Long-Horizon LLM Agents

Ziyan Yang · Taiwei Shi · Jieyu Zhao

中文摘要

长程 LLM 智能体常超出上下文窗口,被迫丢弃后续可能需要的信息。现有上下文管理策略依赖摘要、掩码或结构化记忆,需在未知未来需求前决定保留什么或如何检索,可能引入有损压缩,丢弃未来任务所需细节。为此提出 GrepMem,一种简单、无损、无索引的记忆机制,由两部分构成:智能体完整历史的仅追加纯文本日志,以及用于按需召回的正则表达式搜索工具。与结构化记忆系统不同,GrepMem 无需嵌入、检索索引、记忆提取或额外模型。用强化学习在五种上下文管理策略下训练 Qwen3.5-9B,并在多问题研究会话、长流召回和智能体轨迹问答上评估。GrepMem 在 ContextBench 上达到 95-97% 准确率,有损基线最高仅 21%,在 BCP-Multi 上比 SUPO 的摘要方法高 8.8 个百分点。GrepMem 可有效扩展到越来越长的输入流,并在全部五项评估任务中保持准确率-令牌成本帕累托前沿。结果表明,纯文本日志加 grep 为长程智能体记忆提供了简单但有竞争力的方案,无需复杂结构化记忆基础设施。

关键要点

  1. 01现有上下文管理依赖摘要、掩码或结构化记忆,需预先决定保留与检索内容,可能引入有损压缩。
  2. 02GrepMem 由仅追加纯文本日志和正则表达式搜索工具组成,无需嵌入、索引、记忆提取或额外模型。
  3. 03在 ContextBench 上准确率达 95-97%,有损基线最高 21%;BCP-Multi 上比 SUPO 摘要高 8.8 个百分点。
  4. 04可扩展到长输入流,并在五项评估任务中保持准确率-令牌成本帕累托前沿。

解读

尚无解读。

原始英文摘要

arXiv:2611.25123v1 Announce Type: new Abstract: Long-horizon LLM agents often exceed their context windows, forcing them to discard information that may be needed later. Existing context management strategies rely on summarization, masking, or structured memory, requiring decisions about what to preserve or how to retrieve it before future needs are known. However, these methods can introduce lossy compression, potentially discarding details needed for future tasks. To address this limitation, we introduce GrepMem, a simple, lossless, and index-free memory mechanism built on two components: an append-only plain-text log of the agent's complete history and a regular-expression search tool for on-demand recall. Unlike structured memory systems, GrepMem requires no embeddings, retrieval index, memory extraction, or additional models. We train Qwen3.5-9B with reinforcement learning under five context management strategies and evaluate on multi-question research sessions, long-stream recall, and agent-trajectory question answering. GrepMem achieves 95-97% accuracy on ContextBench, versus at most 21% for lossy baselines, and outperforms SUPO's summarization by 8.8 percentage points on BCP-Multi. GrepMem scales effectively to increasingly long input streams while remaining on the accuracy-token-cost Pareto frontier across all five evaluation tasks. Our results show that a plain-text log and grep provide a simple but competitive approach to long-horizon agent memory, without requiring complex structured memory infrastructure.

同方向论文 · cs.CL

查看全部 →