Preprint · 2023

RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems

Tianyang Liu, Canwen Xu, Julian McAuley

VenuearXiv
DOI10.48550/arXiv.2306.03091
URLhttp://arxiv.org/abs/2306.03091
TopicsReplicHAI / Agent Evals / 02 Software engineering & coding
TagsComputer Science - Artificial Intelligence, Computer Science - Computation and Language, Computer Science - Software Engineering
archiveIDarXiv:2306.03091
extraarXiv:2306.03091 [cs.CL]
libraryCatalogarXiv.org
shortTitleRepoBench

Abstract

Large Language Models (LLMs) have greatly advanced code auto-completion systems, with a potential for substantial productivity enhancements for developers. However, current benchmarks mainly focus on single-file tasks, leaving an assessment gap for more complex, real-world, multi-file programming scenarios. To fill this gap, we introduce RepoBench, a new benchmark specifically designed for evaluating repository-level code auto-completion systems. RepoBench supports both Python and Java and consists of three interconnected evaluation tasks: RepoBench-R (Retrieval), RepoBench-C (Code Completion), and RepoBench-P (Pipeline). Each task respectively measures the system's ability to retrieve the most relevant code snippets from other files as cross-file context, predict the next line of code with cross-file and in-file context, and handle complex tasks that require a combination of both retrieval and next-line prediction. RepoBench aims to facilitate a more complete comparison of performance and encouraging continuous improvement in auto-completion systems. RepoBench is publicly available at https://github.com/Leolty/repobench.

BibTeX

@misc{liu_repobench_2023,
	title = {{RepoBench}: {Benchmarking} {Repository}-{Level} {Code} {Auto}-{Completion} {Systems}},
	shorttitle = {{RepoBench}},
	url = {http://arxiv.org/abs/2306.03091},
	doi = {10.48550/arXiv.2306.03091},
	abstract = {Large Language Models (LLMs) have greatly advanced code auto-completion systems, with a potential for substantial productivity enhancements for developers. However, current benchmarks mainly focus on single-file tasks, leaving an assessment gap for more complex, real-world, multi-file programming scenarios. To fill this gap, we introduce RepoBench, a new benchmark specifically designed for evaluating repository-level code auto-completion systems. RepoBench supports both Python and Java and consists of three interconnected evaluation tasks: RepoBench-R (Retrieval), RepoBench-C (Code Completion), and RepoBench-P (Pipeline). Each task respectively measures the system's ability to retrieve the most relevant code snippets from other files as cross-file context, predict the next line of code with cross-file and in-file context, and handle complex tasks that require a combination of both retrieval and next-line prediction. RepoBench aims to facilitate a more complete comparison of performance and encouraging continuous improvement in auto-completion systems. RepoBench is publicly available at https://github.com/Leolty/repobench.},
	urldate = {2026-11-06},
	publisher = {arXiv},
	author = {Liu, Tianyang and Xu, Canwen and McAuley, Julian},
	month = oct,
	year = {2023},
	note = {arXiv:2306.03091 [cs.CL]},
	keywords = {Computer Science - Artificial Intelligence, Computer Science - Computation and Language, Computer Science - Software Engineering},
}