一句话:提出 FlowGen,用多个 LLM 智能体模拟瀑布、TDD 与 Scrum 过程模型协同生成代码,Scrum 变体在四个基准上较 RawGPT 平均提升约 15%。
软件过程模型有助于团队协作完成复杂开发任务。本文提出 FlowGen——用多个 LLM 智能体模拟 Waterfall、TDD 与 Scrum 软件过程模型的代码生成框架:智能体扮演需求、架构、开发、测试与 Scrum Master 等角色并按开发活动通信,协同生成代码。作者以 GPT-3.5 为底座,在 HumanEval、MBPP 及 ET 变体上与 RawGPT、CodeT、Reflexion 对比。FlowGen_Scrum 最优,Pass@1 为 75.2、65.5、82.5、56.7,较 RawGPT 平均提升约 15%,MBPP 上优于 CodeT,与 CodeT 结合可再提升;设计与评审可增异常处理、减代码坏味。
Software process models are essential to facilitate collaboration and communication among software teams to solve complex development tasks. Inspired by these software engineering practices, we present FlowGen - a code generation framework that emulates software process models based on multiple Large Language Model (LLM) agents. We emulate three process models, FlowGenWaterfall, FlowGenTDD, and FlowGenScrum, by assigning LLM agents to embody roles (i.e., requirement engineer, architect, developer, tester, and scrum master) that correspond to everyday development activities and organize their communication patterns. The agents work collaboratively using chain-of-thought and prompt composition with continuous selfrefinement to improve the code quality. We use GPT3.5 as our underlying LLM and several baselines (RawGPT, CodeT, Reflexion) to evaluate code generation on four benchmarks: HumanEval, HumanEval-ET, MBPP, and MBPP-ET. Our findings show that FlowGenScrumexcels compared to other process models, achieving a Pass@1 of 75.2, 65.5, 82.5, and 56.7 in HumanEval, HumanEval-ET, MBPP, and MBPP-ET, respectively (an average of 15% improvement overRawGPT). Compared with other state-of-the-art techniques, FlowGenScrumachieves a higher Pass@1 in MBPP compared to CodeT, with both outperforming Reflexion. Notably, integrating CodeT into FlowGenScrumresulted in statistically significant improvements, achieving the highest Pass@1 scores. Our analysis also reveals that the development activities impacted code smell and exception handling differently, with design and code review adding more exception handling and reducing code smells. Finally, FlowGen models maintain stable Pass@1 scores across GPT3.5 versions and temperature values, highlighting the effectiveness of software process models in enhancing the quality and stability of LLM-generated code.
DOI 原文 ·
@inproceedings{paperbot8771,
title = {SOEN-101: Code Generation by Emulating Software Process Models Using Large Language Model Agents},
author = {Feng Lin and Dong Jae Kim and Tse-Hsun Chen},
booktitle = {ICSE},
year = {2025},
doi = {10.1109/icse55347.2025.00140}
}