Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks
arXiv:2503.12029
Abstract
Large Language Models (LLMs) have advanced autonomous agents' planning and decision-making, yet they struggle with complex tasks requiring diverse expertise and multi-step reasoning. Multi-Agent Debate (MAD) systems, introduced in NLP research, address this gap by enabling structured debates among LLM-based agents to refine solutions iteratively. MAD promotes divergent thinking through role-specific agents, dynamic interactions, and structured decision-making. Recognizing parallels between Software Engineering (SE) and collaborative human problem-solving, this study investigates MAD's effectiveness on four coding tasks in SE. We adapt a MAD framework from NLP, analyze agent interactions to assess consensus-building and iterative refinement, and propose two MAD variants that enhance agent debate for coding tasks by addressing the observed weaknesses. Our findings show that structured debate and collaboration improve problem-solving and yield strong performance in some cases, highlighting the collaborative debate synergy between LLM agents for coding tasks in SE while identifying areas for future exploration.
accepted to ACM Transactions on Software Engineering and Methodology (TOSEM)