arXiv:2505.21898cs.CLcs.AI2025-05被引 4

多智能体协作编程中,通过经验捷径减少50%耗 token,提升代码质量。

Co-Saving: Resource Aware Multi-Agent Collaboration for Software Development

  • 引入历史成功路径生成的'捷径'指令,跳过冗余推理。
  • 在软件开发任务中减少50.85%的token消耗,代码质量提升10.06%。
  • 适合资源受限场景下的高效协同编程,如低算力部署。

大型语言模型与自主智能体在多个领域展现出强大能力。然而,独立智能体在处理复杂任务时,常因交互频繁和计算资源需求高而受限。尽管多智能体系统通过任务分解、迭代通信和角色分工缓解部分问题,但通常缺乏资源意识,导致高token消耗和执行时间过长。为此,我们提出资源感知的多智能体系统Co-Saving——通过经验知识提升效率与解的质量。核心创新是引入'捷径':从历史成功轨迹中学得的指令转移,可绕过冗余推理环节,加速集体求解过程。在软件开发任务上的实验表明,相比当前最优的ChatDev方法,本方法平均减少50.85%的token使用,并提升整体代码质量10.06%。

原文摘要 · Abstract (English)

Recent advancements in Large Language Models (LLMs) and autonomous agents have demonstrated remarkable capabilities across various domains. However, standalone agents frequently encounter limitations when handling complex tasks that demand extensive interactions and substantial computational resources. Although Multi-Agent Systems (MAS) alleviate some of these limitations through collaborative mechanisms like task decomposition, iterative communication, and role specialization, they typically remain resource-unaware, incurring significant inefficiencies due to high token consumption and excessive execution time. To address these limitations, we propose a resource-aware multi-agent system -- Co-Saving (meaning that multiple agents collaboratively engage in resource-saving activities), which leverages experiential knowledge to enhance operational efficiency and solution quality. Our key innovation is the introduction of "shortcuts" -- instructional transitions learned from historically successful trajectories -- which allows to bypass redundant reasoning agents and expedite the collective problem-solving process. Experiments for software development tasks demonstrate significant advantages over existing methods. Specifically, compared to the state-of-the-art MAS ChatDev, our method achieves an average reduction of 50.85% in token usage, and improves the overall code quality by 10.06%.

多智能体资源优化代码生成LLM应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。