Abstract
Code synthesis, which requires a deep understanding of complex natural language (NL) problem descriptions, generation of code instructions for complex algorithms and data structures, and the successful execution of comprehensive unit tests, presents a significant challenge. Thus, while large language models (LLMs) demonstrate impressive proficiency in natural language processing (NLP), their performance in code generation tasks remains limited. In this paper, we introduce a new approach to code generation tasks leveraging the 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 LLMs ablations and analyses across eight challenging competitive problem-solving and program synthesis benchmarks-MapCoder showcases remarkable code generation capabilities, achieving their new state-of-the-art (pass@1) results-(HumanEval 93.9%, MBPP 83.1%, APPS 22.0%, CodeContests 28.5%, and xCodeEval 45.3%). Moreover, our method consistently delivers superior performance across various programming languages and varying problem difficulties. We open-source our framework at https://github.com/Md-Ashraful-Pramanik/MapCoder.
| Original language | English |
|---|---|
| Title of host publication | ACL 2024, The 62nd Annual Meeting of the Association for Computational Linguistics (ACL 2024), Proceedings of the Conference Volume 1: Long Papers |
| Editors | Lun-Wei Ku, Andre F. T. Martins, Vivek Srikumar |
| Place of Publication | Kerrville TX USA |
| Publisher | Association for Computational Linguistics (ACL) |
| Pages | 4912-4944 |
| Number of pages | 33 |
| ISBN (Electronic) | 9798891760943 |
| DOIs | |
| Publication status | Published - 2024 |
| Externally published | Yes |
| Event | Annual Meeting of the Association of Computational Linguistics 2024 - Bangkok, Thailand Duration: 11 Aug 2024 → 16 Aug 2024 Conference number: 62nd https://aclanthology.org/2024.acl-long.0/ (Proceedings) https://2024.aclweb.org/ (Website) https://aclanthology.org/volumes/2024.findings-acl/ (Proceedings (Findings)) https://aclanthology.org/volumes/2024.acl-long/ (Proceedings) |
Publication series
| Name | Proceedings of the Annual Meeting of the Association for Computational Linguistics |
|---|---|
| Publisher | Association for Computational Linguistics (ACL) |
| Volume | 1 |
| ISSN (Print) | 0736-587X |
Conference
| Conference | Annual Meeting of the Association of Computational Linguistics 2024 |
|---|---|
| Abbreviated title | ACL 2024 |
| Country/Territory | Thailand |
| City | Bangkok |
| Period | 11/08/24 → 16/08/24 |
| Internet address |
|
Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver