ChatPaper.aiChatPaper

ContextBench: Een benchmark voor contextretrieval bij codeeragenten

ContextBench: A Benchmark for Context Retrieval in Coding Agents

February 5, 2026
Auteurs: Han Li, Letian Zhu, Bohan Zhang, Rili Feng, Jiaming Wang, Yue Pan, Earl T. Barr, Sarro Federica, Zhaoyang Chu, He Ye
cs.AI

Samenvatting

Op LLM gebaseerde codeeragentschappen tonen sterke prestaties op benchmarks voor geautomatiseerde issue-oplossing, maar bestaande evaluaties richten zich grotendeels op de uiteindelijke taaksucces, wat beperkt inzicht biedt in hoe agentschappen codecontext ophalen en gebruiken tijdens het probleemoplossend proces. Wij introduceren ContextBench, een procesgerichte evaluatie van contextretrieval in codeeragentschappen. ContextBench bestaat uit 1.136 issue-oplossingstaken uit 66 repositories in acht programmeertalen, elk aangevuld met door mensen geannoteerde gouden contexten. Verder implementeren we een geautomatiseerd evaluatieraamwerk dat agenttrajecten volgt en contextrecall, -precisie en -efficiëntie meet gedurende het issue-oplossingsproces. Met ContextBench evalueren we vier frontier-LLM's en vijf codeeragentschappen. Onze resultaten tonen aan dat geavanceerde agent-scaffolding slechts marginale verbeteringen oplevert in contextretrieval ("De Bittere Les" van codeeragentschappen), dat LLM's consistent recall verkiezen boven precisie, en dat er aanzienlijke kloof bestaat tussen verkende en gebruikte context. ContextBench breidt bestaande end-to-end benchmarks uit met intermediaire gouden-contextmetrieken die het issue-oplossingsproces openen. Deze contexten bieden waardevolle intermediaire signalen voor het sturen van LLM-redenering in softwaretaken.
English
LLM-based coding agents have shown strong performance on automated issue resolution benchmarks, yet existing evaluations largely focus on final task success, providing limited insight into how agents retrieve and use code context during problem solving. We introduce ContextBench, a process-oriented evaluation of context retrieval in coding agents. ContextBench consists of 1,136 issue-resolution tasks from 66 repositories across eight programming languages, each augmented with human-annotated gold contexts. We further implement an automated evaluation framework that tracks agent trajectories and measures context recall, precision, and efficiency throughout issue resolution. Using ContextBench, we evaluate four frontier LLMs and five coding agents. Our results show that sophisticated agent scaffolding yields only marginal gains in context retrieval ("The Bitter Lesson" of coding agents), LLMs consistently favor recall over precision, and substantial gaps exist between explored and utilized context. ContextBench augments existing end-to-end benchmarks with intermediate gold-context metrics that unbox the issue-resolution process. These contexts offer valuable intermediate signals for guiding LLM reasoning in software tasks.
PDF32March 19, 2026