arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.09794cs.SE
收藏

评估多智能体类级代码生成的软件过程模型

Evaluating Software Process Models for Multi-Agent Class-Level Code Generation

SPEAR Lab, Concordia University(蒙特利尔康科迪亚大学 SPEAR 实验室);York University(约克大学)

Wasique Islam Shafin, Md Nakhla Rafi, Zhenhao Li, Tse-Hsun Chen

AI总结:

本研究针对类级代码生成,探讨过程结构与角色专业化对多智能体LLM工作流的影响,通过模拟瀑布式开发周期在ClassEval基准上测试,揭示多智能体工作流对性能的重组作用及代码质量与功能正确性的权衡。

摘要:

现代软件系统需要的代码不仅要功能完备,还要可维护且结构良好。尽管大型语言模型(LLMs)越来越多地用于自动化软件开发,但大多数研究集中在孤立的单智能体函数级生成。本研究探讨了过程结构和角色专业化如何塑造多智能体LLM工作流以用于类级代码生成。我们使用三个LLM(GPT-4o-mini、DeepSeek-Chat和Claude-3.5-Haiku)在ClassEval基准的100个Python任务上模拟了涵盖需求、设计、实现和测试的瀑布式开发周期。研究结果表明,多智能体工作流会重新组织而非持续提升模型性能。瀑布式协作生成的代码更简洁、更可维护,但通常会降低功能正确性(GPT-4o-mini降低37.8%,DeepSeek-Chat降低39.8%),Claude-3.5-Haiku是显著例外(提升9.5%)。重要的是,过程约束会改变失败特征:结构问题如代码缺失减少,而语义和验证错误更频繁。在所有阶段中,测试通过提高验证覆盖率产生最强影响,但也引入新的推理失败,而需求和设计的影响相对较小。总体而言,本研究提供了经验证据,表明软件过程结构从根本上改变了LLM的推理、协作和失败方式,揭示了多智能体代码生成中严格工作流规范与灵活问题解决之间的固有权衡。

英文摘要:

Modern software systems require code that is not only functional but also maintainable and well-structured. Although Large Language Models (LLMs) are increasingly used to automate software development, most studies focus on isolated, single-agent function-level generation. This work examines how process structure and role specialization shape multi-agent LLM workflows for class-level code generation. We simulate a Waterfall-style development cycle covering Requirement, Design, Implementation, and Testing using three LLMs (GPT-4o-mini, DeepSeek-Chat, and Claude-3.5-Haiku) on 100 Python tasks from the ClassEval benchmark. Our findings show that multi-agent workflows reorganize, rather than consistently enhance, model performance. Waterfall-style collaboration produces cleaner and more maintainable code but often reduces functional correctness (-37.8\% for GPT-4o-mini and -39.8\% for DeepSeek-Chat), with Claude-3.5-Haiku as a notable exception (+9.5\%). Importantly, process constraints shift failure characteristics: structural issues such as missing code decrease, while semantic and validation errors become more frequent. Among all stages, Testing exerts the strongest influence by improving verification coverage but also introducing new reasoning failures, whereas Requirement and Design have comparatively modest effects. Overall, this study provides empirical evidence that software process structure fundamentally alters how LLMs reason, collaborate, and fail, revealing inherent trade-offs between rigid workflow discipline and flexible problem-solving in multi-agent code generation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑