← Latest papers
💬 NLP

Agent Retrieval Bench: Evaluating Repository Context Retrieval for Coding Agents

This paper introduces Agent Retrieval Bench, a comprehensive file-level benchmark for evaluating context retrieval in coding agents using real workflow signals, which reveals that no single retrieval method dominates across diverse tasks and highlights significant gaps in current agents' ability to identify necessary repository files.

Original authors: Bowen Qin, Yi Xie

Published 2026-07-29
📖 4 min read☕ Coffee break read

Original authors: Bowen Qin, Yi Xie

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a detective trying to solve a mystery in a massive, chaotic library. You have a clue—a torn page, a whisper, or a strange noise—but to solve the case, you first need to find the right book on the shelf. In the world of computer science, this "library" is a software project's code, and the "detectives" are AI agents designed to write and fix code. For a long time, we've mostly judged these AI detectives by whether they eventually wrote the perfect solution. But this paper argues that before an AI can even think about writing a fix, it has to successfully play a game of "Where's Waldo?" within the code. If it grabs the wrong book, it will never solve the mystery, no matter how smart its reasoning is. This new study, called Agent Retrieval Bench, is a giant test designed specifically to see how good these AI detectives are at finding the right files in a repository before they start typing.

The researchers built a rigorous testing ground using 427 real-world coding scenarios pulled from 25 different software projects. They created five different types of "clues" to see how the AI reacts. Sometimes the clue is a description of a new feature (asking the AI to find the related tests); sometimes it's a reviewer's comment on a specific file (asking the AI to find other files needed to understand the comment); sometimes it's a crash report (asking the AI to find the root-cause code); and sometimes it's a small change (asking the AI to find all the other files that might break because of it). There was even a tricky group of clues where the answer wasn't in the library at all, testing if the AI knew when to say, "I can't find this here."

The results were a bit of a shock to the idea that "bigger is always better" or that one type of search tool wins every time. The study found that no single method is the undisputed champion. It's like trying to find a needle in a haystack: sometimes a magnet (semantic search, which looks for meaning) works best; other times, a map of the library's layout (structural search, which looks at how files connect) is the only way to find the needle. In fact, the "best" tool changed depending on the specific type of clue and how much "reading space" (context budget) the AI had.

One of the most interesting discoveries was that even when AI detectives are allowed to ask for more help and look around interactively, they still miss the correct files in about 27% to 35% of cases. It turns out that just because an AI can search doesn't mean it knows where to look. The paper also showed that if you give the AI a "hint" (a pre-selected list of files) based on a smart search, it solves problems faster and with less wasted effort than if you just throw random files at it. However, the study also ruled out a hopeful idea: simple confidence scores aren't good enough to tell the AI when to stop searching and admit, "This isn't in this library."

Ultimately, the paper suggests that building a truly helpful coding AI isn't about finding one magic search engine. Instead, it's about mixing different strategies—like using both a semantic map and a structural map together—to ensure the AI finds the right context before it tries to fix the code. The authors are careful to note that while this helps the AI find the right files, it doesn't guarantee the AI will write the perfect fix, but without finding the right files, a fix is impossible.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →