arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.31710cs.SEcs.AI
收藏

Compact-Bench:衡量上下文压缩对长时序编码智能体的代价

Compact-Bench: Measuring What Context Compaction Costs Long-Horizon Coding Agents

University of Science and Technology of China(中国科学技术大学)

Ruopei Sun, Jianfeng Cai, Kangwen Zhao, Wengang Zhou, Houqiang Li

AI总结:

该研究提出 Compact-Bench 基准,通过配对全历史与仅摘要的延续,评估编码智能体上下文压缩的代价,发现不同摘要器对任务延续和重复细节的保留效果差异显著,可靠压缩需保留任务进度。

摘要:

上下文压缩可让长时序编码智能体突破上下文窗口限制继续运行,但可能会擦除完成任务所需的状态。现有评估仅衡量效率、保留信息或端到端成功率,难以分离特定历史替换的影响。Compact-Bench 从共享仓库状态配对全历史和仅摘要的延续,评估重复细节和连续生产压缩。它涵盖 35 个 SWE-bench 修复、146 个智能体会话和 106 个生产链。在 14 种摘要器主干中,稳定损伤范围为 22 次全历史成功的 5%-64%:Claude Opus 4.8 保留最多修复,而 DeepSeek-Flash 损伤最多。以 Kimi-K3 为摘要器时,Kimi Code 提示保留最多任务延续(19/22),而 Claude Code 保留最多重复细节(15.0%)。LLM 摘要最多保留 16.0% 的重复细节,相比之下机械提取保留 79.1%;生产摘要在第一个边界保留 15.7%。不同方法的故障会重复:1 次修复被 13/14 个主干损伤,另 1 次被所有 5 个提示损伤。这些结果表明,可靠的压缩需要保留完成任务所需的进度,仅保留相关信息不能确保成功延续。代码和数据可在对应网址获取。

英文摘要:

Context compaction lets long-horizon coding agents continue beyond their context windows, but can erase the state needed to finish a task. Prior evaluations measure efficiency, retained information, or end-to-end success, leaving the effect of a specific history replacement difficult to isolate. Compact-Bench pairs full-history and summary-only continuations from a shared repository state, and evaluates recurring details and successive production compactions. It covers 35 SWE-bench repairs, 146 agentic sessions, and 106 production chains. Across 14 summarizer backbones, stable damage ranges from 5-64% of 22 full-history successes: Claude Opus 4.8 preserves the most repairs, while DeepSeek-Flash damages the most. With Kimi-K3 as summarizer, the Kimi Code prompt preserves the most task continuations (19/22), whereas Claude Code retains the most recurring details (15.0%). LLM summaries retain at most 16.0% of recurring details, compared with 79.1% for mechanical extraction; production summaries retain 15.7% at the first boundary. Failures recur across methods: one repair is damaged by 13/14 backbones, and another by all 5 prompts. These results show that reliable compaction requires preserving the progress needed to complete a task, and that retaining relevant information alone does not ensure successful continuation. Code is available at https://github.com/cai-jianfeng/compact-bench and data is available at https://huggingface.co/datasets/caijanfeng/compact-bench.

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

↑