18 May 2024 | Md. Ashraful Islam, Mohammed Eunus Ali, Md Rizwan Parvez
MapCoder is a novel framework for code generation in competitive problem-solving tasks, leveraging multi-agent prompting to replicate the human programming cycle. The framework consists of four LLM agents: retrieval, planning, coding, and debugging, each designed to emulate specific stages of program synthesis. The retrieval agent generates relevant examples, the planning agent creates step-by-step plans, the coding agent translates plans into code, and the debugging agent fixes bugs using sample I/O. MapCoder's dynamic traversal mechanism iteratively enhances the generated code by leveraging the confidence scores of the plans from the planning agent. The approach significantly outperforms existing methods on various benchmarks, achieving state-of-the-art results in both basic and competitive programming tasks. MapCoder demonstrates superior performance across different programming languages and problem difficulties, showcasing its robustness and effectiveness in complex problem-solving. The framework is open-sourced and aims to extend its scope to other domains like question answering and mathematical reasoning.MapCoder is a novel framework for code generation in competitive problem-solving tasks, leveraging multi-agent prompting to replicate the human programming cycle. The framework consists of four LLM agents: retrieval, planning, coding, and debugging, each designed to emulate specific stages of program synthesis. The retrieval agent generates relevant examples, the planning agent creates step-by-step plans, the coding agent translates plans into code, and the debugging agent fixes bugs using sample I/O. MapCoder's dynamic traversal mechanism iteratively enhances the generated code by leveraging the confidence scores of the plans from the planning agent. The approach significantly outperforms existing methods on various benchmarks, achieving state-of-the-art results in both basic and competitive programming tasks. MapCoder demonstrates superior performance across different programming languages and problem difficulties, showcasing its robustness and effectiveness in complex problem-solving. The framework is open-sourced and aims to extend its scope to other domains like question answering and mathematical reasoning.