RGD: Multi-LLM Based Agent Debugger via Refinement and Generation Guidance
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Large Language Models (LLMs) have shown incredible potential in code generation tasks, and recent research in prompt engineering have enhanced LLMs' understanding of textual information. However, ensuring the accuracy of generated code often requires extensive testing and validation by programmers. While LLMs can typically generate code based on task descriptions, their accuracy remains limited, especially for complex tasks that require a deeper understanding of both the problem statement and the code generation process. This limitation is primarily due to the LLMs' need to simultaneously comprehend text and generate syntactically and semantically correct code, without having the capability to automatically refine the code. In real-world software development, programmers rarely produce flawless code in a single attempt based on the task description alone, they rely on iterative feedback and debugging to refine their programs. Inspired by this process, we introduce a novel architecture of LLM-based agents for code generation and automatic debugging: Refinement and Guidance Debugging (RGD). The RGD framework is a multi-LLM-based agent debugger that leverages three distinct LLM agents-Guide Agent, Debug Agent, and Feedback Agent. RGD decomposes the code generation task into multiple steps, ensuring a clearer workflow and enabling iterative code refinement based on self-reflection and feedback. Experimental results demonstrate that RGD exhibits remarkable code generation capabilities, achieving state-of-the-art performance with a 9.8% improvement on the HumanEval dataset and a 16.2% improvement on the MBPP dataset compared to the state-of-the-art approaches and traditional direct prompting approaches. We highlight the effectiveness of the RGD framework in enhancing LLMs' ability to generate and refine code autonomously.
Key facts. Cited by 12 papers in the map (data through 13 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 35 of its 39 references that are in the map. First posted on arXiv 2 Oct 2024.
Builds on
35 of 39 references.
Closest ancestors · 2
Same direction, newest first
- 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Future5 Aug
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solving18 May
Other references · 33
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,376
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,221
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,107
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,502
- 2021Evaluating Large Language Models Trained on Codecited by 8,205
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,156
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,797
- 2021Program Synthesis with Large Language Modelscited by 3,573
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,181
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,196
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,131
- 2023Code Llama: Open Foundation Models for Codecited by 2,130
21 more
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,304
- 2023Teaching Large Language Models to Self-Debugcited by 972
- 2021Measuring Coding Challenge Competence With APPScited by 891
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 884
- 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 616
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Modelscited by 450
- 2023Harnessing the Power of LLMs in Practice: A Survey on ChatGPT and Beyondcited by 411
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 298
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 194
- 2023Self-planning Code Generation with Large Language Modelscited by 123
- 2023Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPTcited by 71
- 2021A Few Brief Notes on DeepImpact, COIL, and a Conceptual Framework for Information Retrieval Techniquescited by 69
- 2023CodeScore: Evaluating Code Generation by Learning Code Executioncited by 66
- 2023SelfEvolve: A Code Evolution Framework via Large Language Modelscited by 43
- 2023SQL-PaLM: Improved Large Language Model Adaptation for Text-to-SQL (extended)cited by 42
- 2024CYCLE: Learning to Self-Refine the Code Generationcited by 42
- 2023ToolCoder: Teach Code Generation Models to use API search toolscited by 37
- 2023CodeCoT: Tackling Code Syntax Errors in CoT Reasoning for Code Generationcited by 29
- 2023L2CEval: Evaluating Language-to-Code Generation Capabilities of Large Language Modelscited by 22
- 2023Coffee: Boost Your Code LLMs by Fixing Bugs with Feedbackcited by 15
- 2024Leveraging Print Debugging to Improve Code Generation in Large Language Modelscited by 15
Built on by
Citing papers per year: 2025: 10; 2026: 2.
12 papers.
- 2025SE-Agent: Self-Evolution Trajectory Optimization in Multi-Step Reasoning with LLM-Based Agentscited by 68
- 2025Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Improved Accuracy, Reliability, and Latencycited by 8
- 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Modelscited by 7
- 2025QHackBench: Benchmarking Large Language Models for Quantum Code Generation Using PennyLane Hackathon Challengescited by 7
- 2026AgentForge: Execution-Grounded Multi-Agent LLM Framework for Autonomous Software Engineeringcited by 5
- 2025Designing LLM-based Multi-Agent Systems for Software Engineering Tasks: Quality Attributes, Design Patterns and Rationalecited by 3
- 2025GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilitiescited by 2
- 2025SOCIA-nabla: Textual Gradient Meets Multi-Agent Orchestration for Automated Simulator Generationcited by 1
- 2025DebugTA: An LLM-Based Agent for Simplifying Debugging and Teaching in Programming Educationcited by 0
- 2025SOCIA-Nabla: Textual Gradient Meets Multi-Agent Orchestration for Automated Simulator Generationcited by 0
- 2025Argus: A Multi-Agent Sensitive Information Leakage Detection Framework Based on Hierarchical Reference Relationshipscited by 0
- 2026Assistance to Autonomy: A Systematic Literature Review of Agentic AI across the Software Development Life Cyclecited by 0
- 2026Assistance to Autonomy: A Systematic Literature Review of Agentic AI across the Software Development Life Cycle14 May 2026
- 2026AgentForge: Execution-Grounded Multi-Agent LLM Framework for Autonomous Software Engineering13 Apr 2026
- 2025Argus: A Multi-Agent Sensitive Information Leakage Detection Framework Based on Hierarchical Reference Relationships9 Dec 2025
- 2025Designing LLM-based Multi-Agent Systems for Software Engineering Tasks: Quality Attributes, Design Patterns and Rationale11 Nov 2025
- 2025SOCIA-Nabla: Textual Gradient Meets Multi-Agent Orchestration for Automated Simulator Generation21 Oct 2025
- 2025DebugTA: An LLM-Based Agent for Simplifying Debugging and Teaching in Programming Education13 Oct 2025
- 2025SE-Agent: Self-Evolution Trajectory Optimization in Multi-Step Reasoning with LLM-Based Agents4 Aug 2025
- 2025GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilities16 Jul 2025
- 2025QHackBench: Benchmarking Large Language Models for Quantum Code Generation Using PennyLane Hackathon Challenges24 Jun 2025
- 2025SOCIA-nabla: Textual Gradient Meets Multi-Agent Orchestration for Automated Simulator Generation17 May 2025
- 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Models5 May 2025
- 2025Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Improved Accuracy, Reliability, and Latency4 May 2025
Similar, not cited
Close in wording, no citation either way
- 2024COAST: Enhancing the Code Debugging Ability of LLMs through Communicative Agent Based Data Synthesis
- 2025A Survey on Code Generation with LLM-based Agents
- 2025debug-gym: A Text-Based Environment for Interactive Debugging
- 2026TDD-Agent: Test-Driven Reasoning for Code Generation
- 2025AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generation
- 2025Fully Autonomous Programming using Iterative Multi-Agent Debugging with Large Language Models
- 2025Empirical Research on Utilizing LLM-based Agents for Automated Bug Fixing via LangGraph
- 2025CodeVisionary: An Agent-based Framework for Evaluating Large Language Models in Code Generation