BLAgent: Agentic RAG for File-Level Bug Localization
Md Afif Al Mamun, Gias Uddin

TL;DR
BLAgent is a novel agentic RAG framework that significantly improves file-level bug localization accuracy and efficiency by integrating code structure-aware encoding, dual-perspective queries, and two-phase reranking.
Contribution
It introduces a new agentic RAG approach for bug localization that balances accuracy and cost, outperforming prior methods on SWE-bench Lite.
Findings
Achieves over 78% Top-1 accuracy with open-source models.
Attains over 86% accuracy with a closed-source model.
Reduces cost by over 18x compared to the strongest baseline.
Abstract
Bug localization remains a key bottleneck in downstream software maintenance tasks, including root cause analysis, triage, and automated program repair (APR), despite recent advances in large language model (LLM)-based repair systems. File-level bug localization is especially critical in hierarchical pipelines, where errors can propagate to downstream stages such as statement-level localization or patch generation. While Retrieval-Augmented Generation (RAG) offers a promising direction for grounding LLMs in repository context, existing RAG pipelines rely on static retrieval and lack the reasoning needed to identify faulty code accurately. In this work, we present BLAgent, a novel agentic RAG framework for file-level bug localization that integrates three key ideas: (i) code structure-aware repository encoding with path-augmented AST-based chunking, (ii) dual-perspective query…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
