让代码生成流程自动进化,提升大模型解决复杂问题能力。
SEW: Self-Evolving Agentic Workflows for Automated Code Generation
- 通过自演化机制自动设计多智能体工作流,无需人工干预。
- 在LiveCodeBench上相比基线模型提升最高12%的代码生成准确率。
- 适合需要自动化、可扩展代码生成系统的研发人员参考。
大型语言模型在代码生成任务中已展现高效性。为应对更复杂的编码挑战,现有研究聚焦于构建具有代理工作流的多智能体系统,将复杂任务拆解为子任务并分配给专业化智能体。然而,当前方法严重依赖手工设计的工作流,包括智能体拓扑结构和提示词均需人工制定,难以自动适应不同类型的编程问题。为克服这一局限并实现工作流的自动化设计,我们提出自演化工作流(SEW),一种可自动生成与优化多智能体工作流的新框架。在三个代码基准数据集上的大量实验,包括具有挑战性的LiveCodeBench,表明SEW能自动设计工作流并通过自演化进行优化,在LiveCodeBench上相比仅使用基线大模型提升高达12%。此外,通过对不同工作流表示方案的探究,我们揭示了以文本形式编码工作流信息的最优方式。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have demonstrated effectiveness in code generation tasks. To enable LLMs to address more complex coding challenges, existing research has focused on crafting multi-agent systems with agentic workflows, where complex coding tasks are decomposed into sub-tasks, assigned to specialized agents. Despite their effectiveness, current approaches heavily rely on hand-crafted agentic workflows, with both agent topologies and prompts manually designed, which limits their ability to automatically adapt to different types of coding problems. To address these limitations and enable automated workflow design, we propose \textbf{S}elf-\textbf{E}volving \textbf{W}orkflow (\textbf{SEW}), a novel self-evolving framework that automatically generates and optimises multi-agent workflows. Extensive experiments on three coding benchmark datasets, including the challenging LiveCodeBench, demonstrate that our SEW can automatically design agentic workflows and optimise them through self-evolution, bringing up to 12\% improvement on LiveCodeBench compared to using the backbone LLM only. Furthermore, by investigating different representation schemes of workflow, we provide insights into the optimal way to encode workflow information with text.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。