SWE-Explore Benchmark
- SWE-Explore is a benchmark for repository exploration in coding agents that isolates exploration as a distinct capability and evaluates it on line-level evidence retrieval and ranking efficiency.
- It leverages a dataset of 848 issues from 203 repositories across 10 programming languages, using trajectory-grounded supervision to define core code regions.
- The benchmark’s metrics—coverage, ranking quality, and context efficiency—offer actionable insights into the trade-offs in evidence acquisition for automated code repair.
Searching arXiv for the cited SWE-Explore paper and closely related repository-exploration work. SWE-Explore is a benchmark for repository exploration in coding agents. It isolates exploration as a distinct capability rather than treating software repair as a single binary outcome. Given a repository and an issue, an explorer must return a ranked list of relevant code regions under a fixed line budget. The benchmark covers 848 issues across 10 programming languages and 203 open-source repositories, derives line-level ground truth from independent agent trajectories that successfully solved the same issue, and evaluates explorers along coverage, ranking, and context-efficiency dimensions. Its central finding is that these exploration metrics strongly track downstream repair behavior: agentic explorers form a clear tier above classical retrieval, while file-level localization is already strong for modern methods and line-level coverage and efficient ranking remain the main differentiators (Zhang et al., 5 Jun 2026).
1. Formal task definition
SWE-Explore takes as input an issue description in natural language and a repository snapshot . The required output is a ranked list of code regions,
where each region consists of a file path and a closed line range . Each region covers a set of lines . For a fixed budget , evaluation uses only the prefix whose total covered lines satisfy the line-budget constraint 0. The set of predicted lines is 1, and the ground-truth core lines are denoted 2 (Zhang et al., 5 Jun 2026).
This formulation makes repository exploration a line-level ranking problem rather than a file classification problem or an end-to-end patch-generation problem. A plausible implication is that it becomes possible to study repository understanding, context retrieval, code localization, and bug diagnosis independently of patch synthesis.
2. Dataset composition and trajectory-grounded supervision
The benchmark is built from SWE-bench Verified, SWE-bench-Pro, and SWE-bench Multilingual. After filtering, it retains 848 issues from 203 open-source repositories. The language mix is 10 languages: Python 3, Go 4, JavaScript 5, with Rust, Java, PHP, TypeScript, Ruby, C, and C++ comprising the remainder. Per-instance averages are 4.3 ground-truth files, 4.7 ground-truth regions, 1,578 ground-truth lines, and repository size of 759 files with 179.6 K non-test lines (Zhang et al., 5 Jun 2026).
Ground truth is explicitly “trajectory-grounded.” For each instance, the construction procedure is: collect at least two successful trajectories 6 from strong LLM agents such as GPT-5.4 and Gemini-3-Pro; extract all explicit read actions, including editor views and shell commands such as cat, head, sed, and grep, to obtain regions 7 for each trajectory 8; form the raw core as the line-level intersection
9
form raw optional as the union minus the intersection; then refine 0 via an LLM-based “load-bearing” classifier plus manual audit to obtain the final 1 (Zhang et al., 5 Jun 2026).
This trajectory-grounded construction differs from supervision based only on final edited files. It ties exploration targets to the specific code regions that successful solution paths actually consulted. This suggests a notion of relevance defined by evidential necessity during problem solving rather than by patch overlap alone.
3. Metric design
SWE-Explore defines three metric families. The first measures coverage and line-level accuracy. Precision is
2
line-level recall is
3
and 4 is the harmonic mean of the two. It also reports file and region hit rates: 5 measures the fraction of ground-truth files touched by the prediction, and 6 measures the fraction of core regions with any overlap (Zhang et al., 5 Jun 2026).
The second family evaluates ranking quality under the budget 7. It defines a gain 8 as the number of ground-truth lines newly covered by region 9, and uses budgeted ranking metrics including 0 and First Useful Hit (FUH), where FUH is 1 and 2 is the rank of the first region covering any 3, with 0 if none. The third family measures context efficiency and noise. Optional context lines are 4, and
5
Noise rate is the fraction of predicted regions overlapping neither core nor optional (Zhang et al., 5 Jun 2026).
These choices separate three often conflated properties: whether an explorer finds the necessary evidence, whether it ranks that evidence early under budget, and whether it avoids spending context on irrelevant spans. Downstream restricted-context validation further shows that Context-efficiency has Pearson 6 and early coverage measured by Rec@100 has Spearman 7 with actual patch success, making these not merely descriptive metrics but effective proxies for repair-relevant exploration behavior (Zhang et al., 5 Jun 2026).
4. Empirical results
The benchmark compares Oracle, Random, classical retrievers, general coding agents, and specialized localizers. At 8 and 9, Random is near zero on all metrics, while BM25, TF-IDF, and Potion cluster near Random. BM25 records HitReg 0, Recall1 2, nDCG@500 3, and CtxEff 4; TF-IDF improves to HitReg 5, Recall6 7, nDCG@500 8, and CtxEff 9; Potion gives HitReg 0, Recall1 2, nDCG@500 3, and CtxEff 4 (Zhang et al., 5 Jun 2026).
General coding agents form a tight tier. OpenHands has HitReg 5, Recall6 7, nDCG@500 8, and CtxEff 9. Mini-SWE-Agent has HitReg 0, Recall1 2, nDCG@500 3, and CtxEff 4. AweAgent records HitReg 5, nDCG@500 6, and CtxEff 7, while Claude Code has HitReg 8, Recall9 0, nDCG@500 1, and CtxEff 2. Codex reaches Recall3 4, nDCG@500 5, and CtxEff 6. Specialized localizers are more heterogeneous. AutoCodeRover achieves Recall7 8 and nDCG@500 9; LocAgent reaches HitReg 0, Recall1 2, and nDCG@500 3; OrcaLoca under-covers with HitReg 4 and Recall5 6; CoSIL achieves the highest non-oracle Recall7 8, with HitReg 9, nDCG@500 0, and CtxEff 1, by emitting large regions (Zhang et al., 5 Jun 2026).
The aggregate pattern is precise. Agentic explorers clearly outperform one-shot lexical and embedding retrieval. File-level localization is already strong, with HitFile approximately 2, but line-level recall remains a bottleneck, with Rec3 approximately 4 for many strong agents. This means that many modern systems can identify the right files while still failing to surface enough of the load-bearing lines within a constrained budget (Zhang et al., 5 Jun 2026).
5. Interpretation and methodological significance
SWE-Explore argues that repository exploration should be treated as a first-class subproblem in coding-agent evaluation. Its experiments show that file-level success can conceal a line-level recall bottleneck, and that efficient ranking matters because only a bounded prefix of the prediction is evaluated. The benchmark therefore shifts attention from coarse localization to budgeted evidence acquisition (Zhang et al., 5 Jun 2026).
A central methodological result is that downstream patchers are more sensitive to missing core evidence than to moderate excess context. The benchmark’s analysis states that the main avenue for improvement is high-recall line-level exploration, for example iterative code-graph search as in CoSIL, rather than only better reranking or precision filtering. This suggests that improvements in repository exploration may require broader search strategies before they require better final ranking models (Zhang et al., 5 Jun 2026).
The benchmark also sharpens what “good exploration” means. High 5 without sufficient line recall can still leave a patcher starved of evidence; high recall achieved by emitting large regions may improve repair prospects at the cost of tighter context efficiency. SWE-Explore makes these trade-offs explicit by jointly measuring coverage, ranking, and context efficiency rather than collapsing them into a single resolved-or-unresolved score (Zhang et al., 5 Jun 2026).
6. Relation to adjacent work on repository exploration and analysis
Several contemporaneous studies illuminate mechanisms that SWE-Explore measures. “Exploration Structure in LLM Agents for Multi-File Change Localization” compares linear sequential exploration with non-linear domain-scoped parallel exploration. On ansible-centered evaluations, domain-scoped parallel agent spawning improves the recall–precision trade-off for moderate-sized models, while also surfacing three limitations: documentation evolution is a latent dependency, naive file-system access can degrade localization through test-file over-prediction, and forced multi-agent consultation does not measurably help while substantially increasing token cost (Fattha et al., 10 Jun 2026).
Other work addresses observability and process analysis rather than benchmark design. “SeaView: Software Engineering Agent Visual Interface for Enhanced Workflow” provides a full-stack visualization and analysis framework for long SWE-agent trajectories, including experiment health, comparison, and summarization views, with windowed rendering for trajectories exceeding 128 K tokens and a user study reporting a reduction in median analysis time from 25 minutes to under 5 minutes (Bula et al., 11 Apr 2025). “Projecting the Emerging Mindset of SWE Agent by Launching a Wild Code Understanding Journey” introduces Ada, a bounded tool-mediated apparatus for repository-level code understanding, and defines five observation lenses over 408 trajectories to characterize navigation, evidence selection, synthesis, grounding, and stopping (Zhuo et al., 7 Jun 2026).
Taken together, these adjacent results situate SWE-Explore within a broader research program. The benchmark specifies what repository exploration should be evaluated on; domain-scoped exploration studies propose alternative exploration structures; and trajectory-analysis systems provide the instrumentation needed to understand why an explorer attains a particular profile on coverage, ranking, and context-efficiency axes. In that sense, SWE-Explore functions not only as an evaluation suite but also as a focal task for “explorer” modules in future coding-agent architectures (Zhang et al., 5 Jun 2026).