atlas

Research map / Large language models / Agents, code and math

RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems

ICLR 2024 · Large language models › Agents, code and math · approach: Software engineering agents · 12 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces RepoBench, a Python/Java benchmark with three linked tasks (retrieval, next-line completion, end-to-end pipeline) for repository-level code auto-completion, and evaluates retrievers and code LLMs on it.

Problem

Existing code completion benchmarks focus on single-file contexts and do not capture cross-file, multi-file repository-level completion needs, including retrieval of relevant context.

Approach

A benchmark decomposing repository-level completion into three interconnected tasks (RepoBench-R retrieval, RepoBench-C completion with cross-file and in-file context, RepoBench-P end-to-end pipeline), built from import-parsed cross-file dependencies and fresh GitHub repositories to limit leakage.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use UniXcoder rather than random retrievalRepoBench-R · Python Easy XF-Facc@1: 15.68 -> 25.94Helped
Use UniXcoder rather than random retrievalRepoBench-R · Java Hard XF-Facc@1: 5.59 -> 10.79Helped
Fine-tune CodeGen-350M on RepoBench training data (ablation)CodeGen-350M · RepoBench-C Python AllEM: 20.71 -> 20.85Helped
Fine-tune CodeGen-2.7B on RepoBench training data (ablation)CodeGen-2.7B · RepoBench-C Python AllEM: 27.35 -> 26.66Hurt
Add cross-file context to the in-file-only pipelineCodex RepoBench-P · Python AllEM: 33.15 -> 34.15Helped
Use UniXcoder-L2H retrieval rather than random retrievalCodex RepoBench-P · Java AllEM: 40.77 -> 41.83Helped
Add import statements to short in-file context (ablation)Codex prompt construction · Python AllEM: 26.64 -> 33.21Helped
Add cross-file context and import statements to short in-file context (ablation)Codex prompt construction · Java AllEM: 32.69 -> 46.62Helped
Use long rather than short in-file context (ablation)Codex prompt construction · Python XF-REM: 36.28 -> 43.44Helped
Increase retained retrieval context from 3 to 120 lines (ablation)UniXcoder retrieval · Python Easy XF-Facc@1: 27.02 -> 16.09Hurt
Increase retained retrieval context from 3 to 120 lines (ablation)UniXcoder retrieval · Java Easy XF-Facc@1: 20.44 -> 12.31Hurt
Increase retained retrieval context from 3 to 120 lines (ablation)Jaccard retrieval · Python Easy XF-Facc@1: 18.10 -> 15.02Hurt

Surprising findings

Limitations

Experimental setup

Datasets: github-code newly crawled GitHub repositories (Feb-Aug 2023)

Benchmarks: RepoBench-R RepoBench-C RepoBench-P

Metrics: acc@k exact match edit similarity

Baselines: Codex CodeGen StarCoder CodeBERT UniXcoder Jaccard similarity Edit similarity

Builds on: RepoCoder CoCoMIC CodeXGLUE

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy