[Paper Review] SOEN-101: Code Generation by Emulating Software Process Models Using Large Language Model Agents
LCG uses multi-agent LLMs to emulate Waterfall, TDD, and Scrum processes for code generation; Scrum-based LCG achieves the best Pass@1 gains and more stable results across model variations.
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 self-refinement 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 FlowGenScrum excels 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 over RawGPT). Compared with other state-of-the-art techniques, FlowGenScrum achieves a higher Pass@1 in MBPP compared to CodeT, with both outperforming Reflexion. Notably, integrating CodeT into FlowGenScrum resulted 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.
Motivation & Objective
- Motivate modeling software development as a multi-agent process to improve code quality and reliability.
- Propose LCG, an agent-based framework that emulates Waterfall, TDD, and Scrum for code generation.
- Investigate how development activities and process models impact code accuracy and code smell.
- Assess stability across LLM model versions and temperature settings.
Proposed method
- Define development roles (Requirement Engineer, Architect, Developer, Tester; Scrum Master for Scrum) as LLM agents.
- Implement three interaction patterns corresponding to Waterfall (ordered), TDD (ordered with test-before-implementation), and Scrum (disordered with sprint-like meetings).
- Apply chain-of-thought reasoning, prompt composition, and self-refinement to iteratively improve artifacts.
- Evaluate using zero-shot prompts on four benchmarks (HumanEval, HumanEval-ET, MBPP, MBPP-ET) with Pass@1 as primary metric.
- Compare against GPT-3.5 baseline (GPT) under identical conditions and analyze code smells and exception handling.

Experimental results
Research questions
- RQ1How does emulating different software process models (Waterfall, TDD, Scrum) affect code generation accuracy (Pass@1) compared to a GPT baseline?
- RQ2Which development activities influence code quality attributes such as reliability and code smells?
- RQ3How stable are LCG results across different GPT-3.5 model versions and temperature settings?
Key findings
- LCG_Scrum achieves the highest Pass@1 across all benchmarks: 75.2 (HumanEval), 65.5 (HumanEval-ET), 82.5 (MBPP), 56.7 (MBPP-ET).
- LCG variants generally improve over the GPT baseline, with Pass@1 gains of 5.2% to 31.5%.
- LCG_Scrum shows the most stable results with an average standard deviation of 1.3% across benchmarks.
- Removing testing drastically reduces Pass@1 (down 17.0% to 56.1%) and increases code smells.
- Design and code reviews reduce refactor and warning smells and improve exception handling.
- GPT model version differences significantly affect quality, while LCG provides stability across versions and temperatures.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.