Try Hanzo

Benchmarks / RepoBench-R

measured

RepoBench-R

The retrieval half of RepoBench: a completion point needs one snippet from another file, and the imports, definitions and identifiers say which. Regular expressions over the source, no model reading anything.

dataset
RepoBench-R
licence
CC BY-NC-ND 4.0
introduced by
RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems — Liu, Xu, McAuley, ICLR 2024
harness
hanzoai/benchmarks · brain
node results.mjs

regenerates every table on this page from the raw runs

What is measured

A completion point needs one snippet from another file, and the file’s imports, definitions and identifiers say which. RepoBench-R gives about twelve candidates per item with one of them correct, in two settings: cross-file-first, the first cross-file line of a file, and cross-file-random, any of them. Python. Retrieval is scored on its own, apart from generation, which is the reason this benchmark is here — it isolates the part a memory is responsible for.

Typed links are regular expressions over import, def, class and identifiers. No model reads anything and nothing reads the answer. On cross-file-first they alone reach 31.4 R@1 against dense retrieval’s 18.8, which is the whole finding: on code, the structure is in the source text and an embedding is the roundabout way to it.

Results

cross-file-first · dev split, 200 items

dense generator all-MiniLM-L6-v2 · no configuration frozen on dev · one gold snippet among about twelve candidates per item

configurationR@1R@3R@5MRRnDCG@5easy R@1hard R@1
dense only24.056.575.044.950.528.020.0
typed links only (no model)34.563.077.552.256.941.028.0
dense + typed links35.566.080.053.458.644.027.0

cross-file-first · test split, 500 items

dense generator all-MiniLM-L6-v2 · no configuration frozen on dev · one gold snippet among about twelve candidates per item

configurationR@1R@3R@5MRRnDCG@5easy R@1hard R@1
dense only18.851.472.840.846.124.812.8
typed links only (no model)31.461.075.450.554.537.225.6
dense + typed links30.263.078.850.555.638.422.0

cross-file-random · dev split, 200 items

dense generator all-MiniLM-L6-v2 · no configuration frozen on dev · one gold snippet among about twelve candidates per item

configurationR@1R@3R@5MRRnDCG@5easy R@1hard R@1
dense only22.549.069.541.846.127.018.0
typed links only (no model)34.058.076.551.255.338.030.0
dense + typed links26.559.079.547.153.333.020.0

cross-file-random · test split, 500 items

dense generator all-MiniLM-L6-v2 · no configuration frozen on dev · one gold snippet among about twelve candidates per item

configurationR@1R@3R@5MRRnDCG@5easy R@1hard R@1
dense only24.655.674.645.050.229.619.6
typed links only (no model)29.663.279.049.955.335.224.0
dense + typed links31.264.677.851.055.835.626.8

raw runs and scoring: hanzoai/benchmarks · brain · regenerated by node results.mjs

Build what’s next.