AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generation
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.
Wed 8 JulDisplayed time zone: Eastern Time (US & Canada) change
10:30 - 12:30 | Code Generation 1Research Papers / Journal-First Paper at MB 3.270 Chair(s): Nimmi Weeraddana University of Calgary, Canada | ||
10:30 20mTalk | AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generation Journal-First Paper Yueheng Zhu Chongqing University, Chao Liu Chongqing University, Xuan He Chongqing University, Xiaoxue Ren Zhejiang University, Zhongxin Liu Zhejiang University, Ruwei Pan , Hongyu Zhang Chongqing University | ||
10:50 20mTalk | AdaDec: A Uncertainty-Guided Lookahead Decoding Framework for LLM-based Code Generation Research Papers He Kaifeng SUN YAT-SEN UNIVERSITY, Mingwei Liu Sun Yat-Sen University, Chong Wang Nanyang Technological University, Zike Li Sun Yat-Sen University, Yanlin Wang Sun Yat-sen University, Xin Peng Fudan University, Zibin Zheng Sun Yat-sen University DOI Pre-print | ||
11:10 20mTalk | Aligning with Human Coding Preferences for Improving Code Generation Research Papers | ||
11:30 20mTalk | An Exploratory Study on Fine-tuning Large Language Models for Secure Code Generation Journal-First Paper Junjie Li Concordia University, Fazle Rabbi Concordia University, Cheng Cheng Concordia University, Aseem Sangalay Delhi Technological University, Yuan Tian Queen's University, Kingston, Ontario, Jinqiu Yang Concordia University | ||