MapCoder: Multi-Agent Code Generation for Competitive Problem Solving
Md. Ashraful Islam, Mohammed Eunus Ali, Md Rizwan Parvez

TL;DR
MapCoder introduces a multi-agent prompting framework that emulates human program synthesis stages, significantly improving code generation performance on multiple benchmarks and achieving state-of-the-art results.
Contribution
The paper presents a novel multi-agent prompting approach for code generation, replicating human-like synthesis stages to enhance LLM performance.
Findings
Achieves state-of-the-art pass@1 on HumanEval (93.9%)
Outperforms previous methods on MBPP, APPS, CodeContests, and xCodeEval
Demonstrates robustness across programming languages and problem difficulties.
Abstract
Code synthesis, which requires a deep understanding of complex natural language problem descriptions, generation of code instructions for complex algorithms and data structures, and the successful execution of comprehensive unit tests, presents a significant challenge. While large language models (LLMs) demonstrate impressive proficiency in natural language processing, their performance in code generation tasks remains limited. In this paper, we introduce a new approach to code generation tasks leveraging multi-agent prompting that uniquely replicates the full cycle of program synthesis as observed in human developers. Our framework, MapCoder, consists of four LLM agents specifically designed to emulate the stages of this cycle: recalling relevant examples, planning, code generation, and debugging. After conducting thorough experiments, with multiple LLM ablations and analyses across…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSemantic Web and Ontologies · Service-Oriented Architecture and Web Services · Advanced Database Systems and Queries
