arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2511.22729cs.AIcs.MA
收藏

解决AI代理中的上下文窗口溢出

Solving Context Window Overflow in AI Agents

IBM Research(IBM研究院)

Anton Bulle Labate, Valesca Moura de Sousa, Sandro Rama Fiorini, Leonardo Guerreiro Azevedo, Raphael Melo Thiago, Viviane Torres da Silva

AI总结:

本文提出了一种方法,使LLMs能够处理任意长度的工具响应,避免上下文窗口溢出问题,减少令牌使用并提升执行效率。

摘要:

大型语言模型(LLMs)在与外部工具交互方面的能力不断增强,使它们能够访问超出训练数据范围的专业知识,这对于动态且知识密集的领域如化学和材料科学至关重要。然而,大型工具输出可能会溢出LLMs的上下文窗口,阻碍任务完成。现有的解决方案如截断或摘要未能保留完整的输出,因此不适合需要完整数据的工作流。本文提出了一种方法,使LLMs能够处理和利用任意长度的工具响应,而不会丢失信息。通过将模型的交互从原始数据转向内存指针,该方法保留了工具功能,允许无缝集成到代理工作流中,并减少令牌使用和执行时间。所提出的方法在一项现实的材料科学应用中得到验证,该应用无法通过传统工作流执行,并通过比较分析展示了其有效性。在该实验中,所提出的方法消耗的令牌数量比传统工作流少了约七倍。

英文摘要:

Large Language Models (LLMs) have become increasingly capable of interacting with external tools, granting access to specialized knowledge beyond their training data - critical in dynamic, knowledge-intensive domains such as Chemistry and Materials Science. However, large tool outputs can overflow the LLMs' context window, preventing task completion. Existing solutions such as truncation or summarization fail to preserve complete outputs, making them unsuitable for workflows requiring the full data. This work introduces a method that enables LLMs to process and utilize tool responses of arbitrary length without loss of information. By shifting the model's interaction from raw data to memory pointers, the method preserves tool functionality, allows seamless integration into agentic workflows, and reduces token usage and execution time. The proposed method is validated on a real-world Materials Science application that cannot be executed with conventional workflows, and its effectiveness is demonstrated via a comparative analysis where both methods succeed. In this experiment, the proposed approach consumed approximately seven times fewer tokens than the traditional workflow.

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

↑