arrow
Return

ComplexAgents: Complex Code Generation Framework Based on Multi-agents and Large Language Model

delete2026-01-01
delete0
PRE
AI
S
Shan Gao
Z
Zhiping Cai *
Y
Yu Wang
DOI:10.1007/978-3-031-93254-0_11delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
The rapidly developed large language models (LLMs) have been utilized for code generation. However, existing LLM-based code generation approaches, while effective on simple tasks, often suffer from performance issues on complex tasks that require complex reasoning and understanding such as APPS+ datasets. Inspired by the team collaboration paradigm of software development, we proposes ComplexAgents, an LLM-based multi-agent code generation framework to address the problem of unsatisfactory and inefficient complex code generation. Specifically, ComplexAgents pioneers incorporating typical human workflows (the waterfall model) into complex code generation. By assigning different roles to various agents, ComplexAgents effectively breaks down complex tasks into a series of manageable subtasks and integrates them efficiently, thereby improving the accuracy and efficiency of code generation. Experimental results show that, ComplexAgents achieve improvements of 40.1% and 1.4%, respectively, in Pass@1 over the basic LLM agent (GPT-4-Turbo) on the tasks HumanEval and MBPP. Furthermore, when applied to the complex code generation tasks such as APPS+, ComplexAgents achieved 70.4%, 49.6%, and 20.6% Pass@1 in three different difficulty categories of tasks: Introductory, Interview, and Competition, respectively, while the state-of-the-art technology (sota) only achieved 59.7%, 23.5%, and 8.6%, which demonstrates that our approach holds significant promise for real-world code generation.
Keywords:
Large Language Models
Multi-Agents
Code Generation

Journal

C
COLLABORATIVE COMPUTING: NETWORKING, APPLICATIONS AND WORKSHARING, COLLABORATECOM 2024, PT II
IF:
0
Papers:
16
Citations:
0

Organization

H
hunan university of arts & science
Scholars:
743
Papers: 665
Citations: 0
N
national university of defense technology - china
Scholars:
1.8W
Papers: 1.4W
Citations: 9