arXiv:2505.23946cs.AIcs.LG2025-05

让多个代码大模型通过互相学习经验来提升整体编码能力。

Lessons Learned: A Multi-Agent Framework for Code LLMs to Learn and Improve

  • 用经验分享机制让多个小模型协作,动态互补优势。
  • 团队表现超越单个大型模型和传统多模型方法。
  • 适合想提升代码生成与优化效率的研究者和开发者。

近期研究表明,大语言模型在不同任务中表现出差异化的能力,尤其在代码优化任务中,各模型擅长的优化类别不同,无一模型全面领先。这引发一个问题:如何在不预先知道各模型互补优势的情况下,利用多个模型协同解决编程问题?本文提出基于经验学习的协作框架,设计了经验收集、存储与选择机制,使模型能从彼此的成功与失败中学习。实验表明,一群经过经验共享的小型代码模型,其整体性能可超越单一大型模型及现有其他多模型协作方法。

原文摘要 · Abstract (English)

Recent studies show that LLMs possess different skills and specialize in different tasks. In fact, we observe that their varied performance occur in several levels of granularity. For example, in the code optimization task, code LLMs excel at different optimization categories and no one dominates others. This observation prompts the question of how one leverages multiple LLM agents to solve a coding problem without knowing their complementary strengths a priori. We argue that a team of agents can learn from each other's successes and failures so as to improve their own performance. Thus, a lesson is the knowledge produced by an agent and passed on to other agents in the collective solution process. We propose a lesson-based collaboration framework, design the lesson solicitation--banking--selection mechanism, and demonstrate that a team of small LLMs with lessons learned can outperform a much larger LLM and other multi-LLM collaboration methods.

代码生成多智能体经验学习

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