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

工具无需以文本形式呈现:面向智能体的隐式上下文压缩

Tools Need Not Speak in Text: Latent Context Compression for Agents

Tsinghua University(清华大学)

Yuetong Liu, Zhehao Zhou, Yitong Zhang, Haorui Chen, Jia Li

AI总结:

本研究提出Coca-Cola模型,将工具观测压缩为隐式令牌嵌入智能体输入空间,经动作保留训练后,可降低令牌消耗与运行时间并提升任务性能。

摘要:

大型语言模型(LLM)智能体通常会将原始工具输出附加到其上下文中。在多步交互过程中,冗长且嘈杂的观测会产生大量的上下文开销,并分散智能体对任务相关信息的注意力。现有的令牌修剪和摘要方法仍受限于离散的文本表示,限制了可实现的压缩率。在本研究中,我们挑战了智能体必须将工具观测作为显式文本令牌进行处理的主流假设。为此,我们提出了Coca-Cola,一种面向LLM智能体的连续隐式上下文压缩模型。Coca-Cola将工具观测压缩为隐式令牌,并将其嵌入到智能体的输入嵌入空间中。我们进一步引入了动作保留训练,该训练使智能体在完整观测和压缩观测下的下一个动作分布保持一致。这训练压缩模型以学习保留决策关键信息的动作充足的隐式令牌。在四个问答基准和两个模型家族上进行的网络搜索智能体实验表明,Coca-Cola可将智能体的令牌消耗降低70.01%-89.24%,端到端运行时间缩短24.45%-55.97%,同时持续提升任务性能。这些结果表明,Coca-Cola为智能体的上下文压缩提供了一种有前景的方法。我们的代码可在该https URL获取。

英文摘要:

Large language model (LLM) agents typically append raw tool outputs to their context. Over multi-step interactions, long and noisy observations incur substantial context overhead and dilute the agent's attention to task-relevant information. Existing token pruning and summarization methods remain constrained by discrete text representations, limiting the achievable compression ratios. In this work, we challenge the prevailing assumption that agents must consume tool observations as explicit text tokens. To this end, we propose Coca-Cola, a continuous latent context compression model for LLM agents. Coca-Cola compresses tool observations into latent tokens and embeds them into the input embedding space of the agent. We further introduce Action-Preserving Training, which aligns the agent's next-action distributions under full and compressed observations. This trains the compression model to learn action-sufficient latent tokens that retain decision-critical information. Experiments with web-search agents on four QA benchmarks and two model families show that Coca-Cola reduces the agent's token consumption by 70.01%-89.24% and end-to-end runtime by 24.45%-55.97%, while consistently improving task performance. These results suggest that Coca-Cola offers a promising approach for context compression in agents. Our code is available at https://github.com/THU-Agent/Coca-cola.

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

↑