ContextWeaver: Selective and Dependency-Structured Memory Construction for LLM AgentsContextWeaver: Selective and Dependency-Structured Memory Construction for LLM Agents
问题:编码智能体的上下文越滚越长,滑窗与提示压缩会丢掉后续步骤依赖的早期信息;普通检索只看相似度,看不到推理步骤之间的因果依赖。
证据位置:摘要提出 ContextWeaver,把交互轨迹组织成推理步骤依赖图,链接每步依赖的前序步骤,生成紧凑依赖摘要,并用执行反馈做轻量校验;在五个软件工程/终端基准上全胜滑窗基线,步数少 13–18%;SWE-Bench Pro 解率从 66.5% 升到 72.6%,三个模型骨干都成立。
作者自陈局限:评测是五个 SWE/终端基准、固定任务预算;依赖图构建依赖步骤切分与工具反馈;没有覆盖开放式研究、多人协作与生产环境;不是端到端训练。
它没主张的:不是所有上下文都该图化;不是 72.6% 代表所有仓库任务;不是步数减少一定代表成本同比下降。Problem: coding agents accumulate long context, and sliding windows or prompt compression drop earlier information that later steps depend on; ordinary retrieval sees similarity but not causal dependencies between reasoning steps.
Where the evidence sits: ContextWeaver turns an interaction trace into a dependency graph of reasoning steps, links each step to earlier steps it relies on, builds compact dependency summaries and adds a lightweight validation layer using execution feedback; it beats a sliding-window baseline on all five software-engineering and terminal benchmarks, uses 13–18% fewer agent steps and raises SWE-Bench Pro resolve rate from 66.5% to 72.6% across three model backbones.
What the authors say about limits: evaluation covers five SWE/terminal benchmarks under a fixed task budget; graph construction depends on step segmentation and tool feedback; open-ended research, multi-user collaboration and production environments are not covered; it is not end-to-end trained.
What it does not claim: not that every context should be graph-structured; not that 72.6% represents every repository task; not that fewer steps necessarily means proportionally lower cost.
关键参数Key specs
- 证据位置 / evidence
- 摘要
- 方法 / method
- 推理步骤依赖图 + 依赖摘要 + 执行反馈校验
- SWE-Bench Pro
- 66.5% → 72.6%
- 步数 / steps
- 少 13–18%
- 复现状态 / reproduction
- 未复现(只读摘要)
官方原文怎么说What the source says
dependency-based construction and traversal that link each step to the earlier steps it relies on
On SWE-Bench Pro, ContextWeaver raises the resolve rate from 66.5% to 72.6%
using 13-18% fewer agent steps
资料与许可Source and licence
- 资料时间Source checked
- 2026-11-20
- 许可 / 类型Licence / kind
- arxiv-preprint
- 许可说明Licence evidence
- https://arxiv.org/abs/2604.23069
- 类目Category
- Agent 与工具Agents & tools
论文里的数字怎么读How to read the numbers
先分清测什么、怎么算、和谁比、有没有数据污染。拿不准就回原文看实验设置。Before citing a score, separate what it measures, how it is scored, what it compares against and whether contamination is controlled. If unsure, go back to the experiment setup in the paper. 看评测基准See benchmark cards · 看数据集卡See dataset cards