arrow
Return

AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generation

delete2025-12-12
delete0
PRE
AI
Y
Yueheng Zhu
C
Chao Liu
X
Xuan He
X
Xiaoxue Ren
Z
Zhongxin Liu
R
Ruwei Pan
H
Hongyu Zhang
DOI:10.1109/TSE.2025.3642621delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
Recently, researchers have proposed many multi-agent frameworks for function-level code generation, which aim to improve software development productivity by automatically generating function-level source code based on task descriptions. A typical multi-agent framework consists of Large Language Model (LLM)-based agents that are responsible for task planning, code generation, testing, debugging, etc. Studies have shown that existing multi-agent code generation frameworks perform well on ChatGPT. However, their generalizability across other foundation LLMs remains unexplored systematically. In this paper, we report an empirical study on the generalizability of four state-of-the-art multi-agent code generation frameworks across 12 open-source LLMs with varying code generation and instruction-following capabilities. Our study reveals the unstable generalizability of existing frameworks on diverse foundation LLMs. Based on the findings obtained from the empirical study, we propose AdaCoder, a novel adaptive planning, multi-agent framework for function-level code generation. AdaCoder has two phases. Phase-1 is an initial code generation step without planning, which uses an LLM-based coding agent and a script-based testing agent to unleash LLM’s native power, identify cases beyond LLM’s power, and determine the errors hindering execution. Phase-2 adds a rule-based debugging agent and an LLM-based planning agent for iterative code generation with planning. Our evaluation shows that AdaCoder achieves higher generalizability on diverse LLMs. Compared to the best baseline MapCoder, AdaCoder is on average 27.69% higher in Pass@1, 16 times faster in inference, and 12 times lower in token consumption.
Keywords:
Large language model
function-level code generation
multi-agent framework
errShare
errSave
The Impact of Prompt Programming on Function-Level Code Generation
err
err0
errOAAI
errRanim Khojah; Francisco Gomes de Oliveira Neto; Mazen Mohamad; Philipp Leitner
errShare
errSave
errShare
errSave
Self-Planning Code Generation with Large Language Models
err2024-09-27
err0
errOAAI
errJiang, Xue; Dong, Yihong; Wang, Lecheng; Fang, Zheng; Shang, Qiwei; Li, Ge; Jin, Zhi; Jiao, Wenpin
errShare
errSave
Teaching Code LLMs to Use Autocompletion Tools in Repository-Level Code Generation
err2025-08-14
err0
errOAAI
errChong Wang; Jian Zhang; Yebo Feng; Tianlin Li; Weisong Sun; Yang Liu; Xin Peng
errShare
errSave
errShare
errSave

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
3.0K
Citations:
1.3W

Organization

zhe jiang university cover
zhe jiang university
Scholars:
1.5K
Papers: 463
Citations: 9.6W
chongqing university cover
chongqing university
Scholars:
7.1K
Papers: 2.2K
Citations: 3.7W
Cited Papers

Cited Papers

Automatic Programming: Large Language Models and Beyond
err2025-06-30
err0
PREAI
errLyu,Michael R.; Ray,Baishakhi; Roychoudhury,Abhik; Tan,Shin Hwei; Thongtanunam,Patanamon
errShare
errSave
Pearson Correlation Coefficient
err2009-03-05
err0
PREAI
errJacob Benesty; Jingdong Chen; Yiteng Huang; Israel Cohen
errShare
errSave
errShare
errSave
Competition-level code generation with AlphaCode
errScience
IF45.8
err2022-01-01
err0
errOAAI
errYujia Li; David Choi; Junyoung Chung; Nate Kushman; Julian Schrittwieser; Rémi Leblond; Tom Eccles; James Keeling; Felix Gimeno; Agustin Dal Lago; Thomas Hübert; Peter Choy; Cyprien de Masson d’Autume; I. Babuschkin; Xinyun Chen; Po-Sen Huang; Johannes Welbl; Sven Gowal; Alexey Cherepanov; James Molloy; Daniel J. Mankowitz; Esme Sutherland Robson; Pushmeet Kohli; Nando de Freitas; Koray Kavukcuoglu; Oriol Vinyals
errShare
errSave
GPT-3: Its Nature, Scope, Limits, and Consequences
err2020-11-01
err0
errOAAI
errLuciano Floridi; Massimo Chiriatti
errShare
errSave
Feedback-Directed Random Test Generation
err2007-05-01
err0
PREAI
errCarlos Pacheco; Shuvendu K. Lahiri; Michael D. Ernst; Thomas Ball
errShare
errSave
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
researcher View more