A research team has built an AI agent that finds the right buggy file in a codebase with 86% accuracy — and claims it does so at a fraction of what current methods cost.
BLAgent is a retrieval-augmented generation framework designed specifically for file-level bug localization, the step that tells an automated repair tool where in a repository a bug actually lives. The system combines three techniques: an encoding method that parses code structure via abstract syntax trees, a query layer that reads bug reports from both structural and behavioral angles, and a two-phase reranking step that cross-checks candidates with symbolic analysis before committing. On SWE-bench-Lite — the standard benchmark for software engineering agents — it achieved 78% Top-1 accuracy using open-source models and 86% with a closed-source model.
The cost claim is what sets this apart. Existing agentic approaches tend to let LLMs wander through a repository, running up inference bills with open-ended traversal. BLAgent deliberately caps inspection to a pre-filtered shortlist of candidate files, keeping the expensive reasoning steps bounded. The authors say this makes it over 18 times cheaper than the strongest baseline tested on the same model — a meaningful gap if you are running these checks at scale in a CI pipeline. When paired with an automated patch generation system, end-to-end repair success improved by up to 25%.
File-level localization is the unglamorous first domino in automated debugging: get it wrong and every downstream step — function pinpointing, patch generation, test validation — inherits that error. Most prior work either leans on static retrieval with no reasoning or graph-based multi-hop agents that burn tokens freely. BLAgent sits in the middle, which sounds like a reasonable place to be, assuming the benchmark numbers hold up outside of a paper.