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

Bud ContextCompact 2.0:面向智能体成功性与准确性的上下文压缩技术,适用于小语言模型及受限上下文窗口

Bud ContextCompact 2.0: Context Compaction for Agent Success and Accuracy with Small Language Models and Constrained Context Windows

Bud Ecosystem(Bud生态系统)

Jithin VG, Ditto PS

AI总结:

本文提出Bud ContextCompact 2.0上下文压缩技术,在小语言模型及受限上下文窗口场景下,可提升智能体会话的召回准确率与长会话解决率,减少token使用量,且效果受触发时机、会话时长等因素影响。

摘要:

多轮运行的智能体往往会超出为其服务的模型的上下文窗口,而在小语言模型(SLM)和受限推理系统中,该窗口较小。上下文压缩会用摘要替换较早的轮次,从而使会话得以继续,但这种方法存在信息损失,需要调用模型,且效果取决于运行时机。本文介绍了内置在Bud智能体运行时中的压缩技术Bud ContextCompact 2.0,并在两种场景下对其进行评估。在对记录的智能体会话的召回问题上,压缩至16K预算时,12亿参数模型的准确率从截断处理的0.247和保留全部32K历史的0.176提升至0.335(p<0.001),90亿参数模型的准确率从截断处理的0.515提升至0.577(p=0.04)。在由270亿参数推理模型在49K token窗口上运行的100个SWE-bench Verified任务(556个已评分会话)中,压缩将长会话的解决率从41%提升至53%(+12.3个百分点,95%置信区间+1.6至+23.0,McNemar检验p=0.043),短会话结果未受影响,且每个已解决任务的token使用量减少13%,总成本相同。未使用压缩的主要问题并非历史溢出,而是推理轮次耗尽了历史剩余空间。该增益存在限制:在45分钟会话预算下增益消失,因为每个摘要的中位数耗时161秒;阈值研究显示,仅当压缩触发足够早以留出空间时增益才会显现。80亿参数模型在约10轮、5-8K token时提交,从未需要压缩。本文认为,在等效模型和窗口下,准确率结果可跨硬件(包括CPU推理)迁移,而时间成本随硬件扩展,必须纳入预算。

英文摘要:

Agents that work for many turns outgrow the context window of the model that serves them, and on small language models (SLMs) and constrained inference systems that window is small. Context compaction replaces older turns with a summary so a session can continue, but it is lossy, costs a model call, and can help or hurt depending on when it runs. We describe Bud ContextCompact 2.0, the compaction built into the Bud agent runtime, and evaluate it in two settings. On recall questions over recorded agent sessions, compaction to a 16K budget raised a 1.2B-parameter model's accuracy to 0.335, from 0.247 with truncation and 0.176 with its full 32K history (p < 0.001), and raised a 9B model from 0.515 (truncation) to 0.577 (p = 0.04). On 100 SWE-bench Verified tasks run end to end by a 27B reasoning model on a 49K-token window (556 graded sessions), compaction raised the resolve rate on long sessions from 41% to 53% (+12.3 points, 95% CI +1.6 to +23.0, McNemar p = 0.043), left short sessions unchanged, and used 13% fewer tokens per solved task at equal total cost. The main failure without compaction was not the history overflowing but a reasoning turn exhausting the room the history left. The gain has limits: it vanished under a 45-minute session budget, because each summary took a median of 161 s, and in a threshold study it appeared only when compaction triggered early enough to leave room. An 8B model submitted after about ten turns at 5-8K tokens and never needed compaction. We argue that the accuracy results transfer across hardware, including CPU inference, for an equivalent model and window, while the time cost scales with the hardware and must be budgeted for.

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

↑