ChatPaper.aiChatPaper

ContextBench: コーディングエージェントにおけるコンテキスト検索のベンチマーク

ContextBench: A Benchmark for Context Retrieval in Coding Agents

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

要旨

LLMベースのコーディングエージェントは、自動化された課題解決ベンチマークで高い性能を示しているが、既存の評価は最終的なタスク成功率に焦点が当てられており、問題解決過程におけるコードコンテキストの取得・活用方法に関する知見は限られている。本研究では、コーディングエージェントのコンテキスト取得をプロセス指向で評価するContextBenchを提案する。ContextBenchは、8つのプログラミング言語にわたる66のリポジトリから1,136件の課題解決タスクで構成され、各タスクは人手で注釈付けされたゴールドコンテキストで拡張されている。さらに、エージェントの動作軌跡を追跡し、課題解決過程全体を通じてコンテキストの再現率、適合率、効率性を測定する自動評価フレームワークを実装した。ContextBenchを用いて、4つの先進的LLMと5つのコーディングエージェントを評価した結果、(1) 高度なエージェント scaffolding はコンテキスト取得において僅かな改善しかもたらさない(コーディングエージェントにおける「苦い教訓」)、(2) LLMは一貫して適合率よりも再現率を重視する、(3) 探索されたコンテキストと実際に活用されたコンテキストの間には大きな隔たりが存在する、ことが明らかになった。ContextBenchは、既存のエンドツーエンドベンチマークを、課題解決プロセスを可視化する中間ゴールドコンテキスト指標で補完する。これらのコンテキストは、ソフトウェアタスクにおけるLLMの推論を導く貴重な中間信号を提供する。
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.
PDF21February 12, 2026