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 SystemsLiu, Xu, McAuley, ICLR 2024
harness
hanzoai/cloud · bench/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@1candidatesp50 ms
dense only24.056.575.044.950.528.020.013.80.13
BM25 only25.550.071.543.548.128.023.013.80.80
typed links only (no model)34.563.077.552.256.941.028.013.81.71
dense + BM2522.555.071.543.848.325.020.013.81.35
dense + typed links35.566.080.053.458.644.027.013.80.45
BM25 + typed links (no model)34.563.077.552.256.941.028.013.81.08
full: dense + BM25 + typed links37.067.079.055.059.443.031.013.80.85

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@1candidatesp50 ms
dense only18.851.472.840.846.124.812.811.50.14
BM25 only19.450.867.640.444.223.615.211.50.78
typed links only (no model)31.461.075.450.554.537.225.611.51.09
dense + BM2521.251.673.842.347.625.217.211.50.92
dense + typed links30.263.078.850.555.638.422.011.50.30
BM25 + typed links (no model)31.461.075.450.554.537.225.611.50.75
full: dense + BM25 + typed links33.263.479.452.357.240.026.411.50.69

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@1candidatesp50 ms
dense only22.549.069.541.846.127.018.012.00.12
BM25 only26.551.068.544.647.831.022.012.00.58
typed links only (no model)34.058.076.551.255.338.030.012.00.81
dense + BM2524.055.069.544.147.831.017.012.00.77
dense + typed links26.559.079.547.153.333.020.012.00.34
BM25 + typed links (no model)34.057.575.551.154.938.030.012.01.02
full: dense + BM25 + typed links32.558.074.550.454.038.027.012.01.07

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@1candidatesp50 ms
dense only24.655.674.645.050.229.619.612.00.17
BM25 only26.254.874.045.650.230.022.412.00.95
typed links only (no model)29.663.279.049.955.335.224.012.00.92
dense + BM2526.856.477.246.952.430.822.812.00.70
dense + typed links31.264.677.851.055.835.626.812.00.26
BM25 + typed links (no model)29.663.479.649.955.534.824.412.00.80
full: dense + BM25 + typed links30.262.479.850.255.736.024.412.00.84

Read these as a comparison, not a result

No configuration was frozen on dev before these test runs. Every other benchmark on this site picks its configuration on a declared development split and freezes it at a commit before the test split runs once; these tables did not. So they compare generators against each other and they do not deliver a held-out result, and both splits are printed for exactly that reason. On cross-file-random the two rows that tie for best on dev — typed links alone and BM25 plus typed links, both 34.0 R@1 — are not the row that leads on test, which is dense plus typed links at 31.2. A frozen comparison would have had to commit to one of them before seeing the test items, and would have picked the wrong one.

The full combination is not the best row. On cross-file-random, dense plus BM25 plus typed links scores 30.2 R@1 while dense plus typed links alone scores 31.2. The third generator costs a point in that setting. It is in the table above rather than dropped, because a benchmark page that only shows the configuration that wins is a page that has chosen its rows after seeing them.

The other benchmarks

LoCoMo · MemoryAgentBench · LongMemEval · LoCoMo · subject scope · LoCoMo-Conv · Fleet residency · Live agent footprint · Sandbox cold start · Inference vs llama.cpp · GPQA-Diamond · all of them, and the head-to-head

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