ChatPaper.aiChatPaper

에이전트 검색 벤치마크: 코딩 에이전트를 위한 리포지토리 컨텍스트 검색 평가

Agent Retrieval Bench: Evaluating Repository Context Retrieval for Coding Agents

July 27, 2026
저자: Bowen Qin, Yi Xie
cs.AI

초록

현대 코딩 에이전트는 일반적으로 최종적으로 올바른 패치를 생성하는지 여부로 평가되지만, 패치 생성은 이전의 맥락 획득 단계, 즉 작업에 필요한 저장소 파일을 찾는 과정에 의존한다. 본 논문에서는 이러한 상위 검색 문제를 위한 파일 수준 벤치마크인 Agent Retrieval Bench를 소개한다. 샘플은 실제 코딩 작업 흐름 신호로부터 구축되며, 동결된 기준 커밋 저장소에 대해 평가된다. 관련성은 질의-파일 간의 직접적인 의미적 유사성이 아니라 에이전트가 다음 단계에서 필요로 하는 것에 의해 정의된다. 이 벤치마크는 code2test, comment2context, trace2code, edit2ripple의 네 가지 긍정 검색 작업을 포함하며, 다섯 번째 하위 집합은 증거 기반의 무정답 사례와 반사실적 잘못된 저장소 통제군을 사용한 선택적 검색을 평가한다. Agent Retrieval Bench는 25개 저장소에 걸쳐 총 427개의 샘플(긍정 예시 345개, 자연적 무정답 예시 50개, 반사실 통제군 32개)로 구성된다. 코퍼스는 308개의 기준 커밋 스냅샷, 392,000개의 파일, 790만 개의 청크를 포함한다. 우리는 어휘 검색, RepoMap, 오픈소스 임베딩, 선택적 회피, 그리고 기록된 에이전트 맥락 선택을 평가한다. 단일 검색 계열이 전반적으로 우세하지는 않다: Qwen3-Embedding-4B는 긍정 샘플에서 표본 가중 MRR이 가장 높았고, Qwen3-Embedding-8B는 Recall@20에서, RepoMap은 8K 토큰에서 예산 기반 맥락 수득률이 가장 높았으며, 작업별 최적 방법은 상당히 달랐다. 반사실 통제군을 활용해 보정된 선택 임계값은 자연적 무정답 사례에 대한 선택적 성공률을 개선하지 못하여 보정 격차를 드러냈다. 기록된 궤적은 27~35%의 샘플에서 모든 정답 파일을 놓쳤다. 통제된 시드 개입 파일럿 실험에서는 검색 기반 초기 맥락이 무작위 비정답 맥락보다 더 높은 파일 F1 점수와 적은 사후 시드 탐색을 보였으며, 오라클 정답 맥락은 여전히 상당한 추가 개선 여지를 보여주었다.
English
Modern coding agents are usually evaluated by whether they eventually produce a correct patch, but patch generation depends on an earlier context-acquisition stage: finding the repository files needed for the task. We introduce Agent Retrieval Bench, a file-level benchmark for this upstream retrieval problem. Samples are built from real coding-workflow signals and evaluated against frozen base-commit repositories, with relevance defined by what an agent needs next rather than direct query-file semantic similarity. The benchmark covers four positive-retrieval tasks: code2test, comment2context, trace2code, and edit2ripple; a fifth subset evaluates selective retrieval using natural evidence-backed no-gold cases and counterfactual wrong-repository controls. Agent Retrieval Bench contains 427 samples across 25 repositories: 345 positive examples, 50 natural no-gold examples, and 32 counterfactual controls. The corpus includes 308 base-commit snapshots, 392,000 files, and 7.9 million chunks. We evaluate lexical retrieval, RepoMap, open-source embeddings, selective abstention, and logged agent context selection. No single retrieval family dominates: Qwen3-Embedding-4B has the best sample-weighted MRR on positive samples, Qwen3-Embedding-8B the best Recall@20, and RepoMap the best budgeted context yield at 8K tokens, with task-level winners differing substantially. Selective thresholds calibrated with counterfactual controls do not improve selective success on natural no-gold cases, revealing a calibration gap. Logged trajectories also miss every gold file on 27-35 percent of samples. A controlled seed-intervention pilot finds that retrieval-derived initial context yields higher file F1 with less post-seed exploration than random non-gold context, while oracle gold context shows substantial remaining headroom.