🤖 AI Summary
To address the low efficiency of defect localization in large-scale codebases, this paper proposes Meta-RAG, a multi-agent framework integrating code summarization, retrieval-augmented generation (RAG), and collaborative large language model (LLM) agents. Its core contributions are: (1) semantic compression of codebases via natural-language summaries, reducing raw code volume by 79.8% on average and yielding compact, structured knowledge representations; and (2) joint optimization of multi-granularity (file-level and function-level) retrieval and generation to enhance localization accuracy. Evaluated on the SWE-bench Lite benchmark, Meta-RAG achieves state-of-the-art performance with 84.67% file-level and 53.0% function-level defect identification accuracy. The framework bridges the gap between scalable code understanding and precise defect localization by synergizing summarization-driven knowledge distillation with RAG-enhanced reasoning across granularities.
📝 Abstract
Large Language Model (LLM) systems have been at the forefront of applied Artificial Intelligence (AI) research in a multitude of domains. One such domain is software development, where researchers have pushed the automation of a number of code tasks through LLM agents. Software development is a complex ecosystem, that stretches far beyond code implementation and well into the realm of code maintenance. In this paper, we propose a multi-agent system to localize bugs in large pre-existing codebases using information retrieval and LLMs. Our system introduces a novel Retrieval Augmented Generation (RAG) approach, Meta-RAG, where we utilize summaries to condense codebases by an average of 79.8%, into a compact, structured, natural language representation. We then use an LLM agent to determine which parts of the codebase are critical for bug resolution, i.e. bug localization. We demonstrate the usefulness of Meta-RAG through evaluation with the SWE-bench Lite dataset. Meta-RAG scores 84.67 % and 53.0 % for file-level and function-level correct localization rates, respectively, achieving state-of-the-art performance.