Improving the Efficiency of LLM Agent Systems through Trajectory Reduction
作者: Yuan-An Xiao, Pengfei Gao, Chao Peng, Yingfei Xiong
分类: cs.SE, cs.AI
发布日期: 2025-09-28
备注: 20 pages, 4 figures
💡 一句话要点
AgentDiet:通过轨迹缩减提升LLM Agent系统效率,降低计算成本
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: LLM Agent 轨迹缩减 计算效率 推理优化 软件工程 大型语言模型 Agent系统
📋 核心要点
- 现有LLM Agent系统在软件工程任务中表现出色,但不断增长的轨迹导致输入token计算成本高昂,效率问题被忽视。
- 论文提出AgentDiet,一种推理时轨迹缩减方法,通过自动移除无用、冗余和过期信息来降低Agent系统的计算成本。
- 实验表明,AgentDiet在保持Agent性能不变的情况下,显著减少了输入token数量和计算成本,验证了轨迹缩减的有效性。
📝 摘要(中文)
本文针对基于大型语言模型(LLM)的多轮Agent系统在软件工程任务中日益普及但计算成本高昂的问题,提出了一种推理时轨迹缩减方法AgentDiet,旨在降低Agent系统的计算成本。通过分析现有Agent轨迹,发现其中存在大量无用、冗余和过期信息,这些信息可以在不损害Agent性能的前提下被识别和缩减。AgentDiet能够自动移除这些无用信息。在两个LLM和两个基准测试上的评估结果表明,AgentDiet可以将输入token减少39.9% ~ 59.7%,或最终计算成本降低21.1% ~ 35.9%,同时保持相同的Agent性能。这表明轨迹缩减是Agent系统一个有前景的研究方向。
🔬 方法详解
问题定义:现有基于LLM的Agent系统在执行多轮任务时,会积累大量的对话历史(轨迹),导致输入token数量急剧增加,计算成本高昂。现有研究和产品往往忽略了这一效率问题,没有有效的方法来降低Agent系统的计算负担。
核心思路:论文的核心思路是通过分析Agent的轨迹,识别并移除其中无用、冗余和过期信息。作者认为,这些信息对Agent完成任务没有帮助,反而增加了计算负担。通过有效缩减轨迹长度,可以在不影响Agent性能的前提下,显著降低计算成本。
技术框架:AgentDiet的技术框架主要包含轨迹分析和轨迹缩减两个阶段。首先,通过分析Agent的轨迹,识别出无用、冗余和过期信息。然后,根据一定的策略,自动移除这些信息,从而缩减轨迹长度。缩减后的轨迹将作为Agent的输入,进行后续的推理和决策。
关键创新:AgentDiet的关键创新在于提出了一种简单而有效的轨迹缩减方法,能够自动识别和移除Agent轨迹中的无用信息。与现有方法相比,AgentDiet不需要人工干预,能够自动适应不同的任务和Agent。此外,AgentDiet在保证Agent性能的同时,显著降低了计算成本,提高了Agent系统的效率。
关键设计:AgentDiet的关键设计包括:1) 定义了无用、冗余和过期信息的具体标准;2) 设计了自动识别这些信息的算法;3) 制定了移除这些信息的策略。具体的参数设置和算法细节在论文中进行了详细描述。例如,可以使用启发式规则或机器学习模型来判断信息是否无用或冗余。移除策略可以基于信息的重要性、时间戳等因素进行设计。
🖼️ 关键图片
📊 实验亮点
实验结果表明,AgentDiet在两个LLM(具体型号未知)和两个基准测试(具体名称未知)上,可以将输入token减少39.9% ~ 59.7%,或最终计算成本降低21.1% ~ 35.9%,同时保持与原始Agent相同的性能。这些数据表明,AgentDiet能够显著提高Agent系统的效率,降低计算成本。
🎯 应用场景
该研究成果可广泛应用于各种基于LLM的Agent系统,尤其是在资源受限的环境下,例如移动设备或边缘计算平台。通过降低计算成本,AgentDiet可以使这些Agent系统更易于部署和使用。此外,该方法还可以应用于对话系统、智能助手等领域,提高系统的效率和响应速度。
📄 摘要(原文)
Multi-turn agent systems based on Large Language Models (LLMs) have been increasingly popular for software engineering tasks. While LLM agents show decent effectiveness, the high computational cost of input tokens due to the ever-growing trajectory remains an efficiency concern for their applications. Efficiency is largely neglected in existing studies and agent products, and this paper fills the gap by introducing an inference-time trajectory reduction approach to reduce the cost of agents. Through analyzing existing agent trajectories, we demonstrate that useless, redundant, and expired information is widespread in all trajectories, which can be identified and reduced without harming the agent's performance. We then design a simple yet effective trajectory reduction approach, AgentDiet, which automatically removes such waste information. We implement AgentDiet on a top-performing coding agent, and the evaluation on two LLMs and two benchmarks shows that AgentDiet can reduce input tokens by 39.9% ~ 59.7%, or the final computational cost by 21.1% ~ 35.9%, while maintaining the same agent performance. This indicates that trajectory reduction is a promising direction for agent systems.