Metraipolis › archive › dc_ef07eee6465f

CARET: Training-Free Test-Time Scaling for Repository-Level Code Completion — arXiv:2610.04837

Source
arXiv
Original
https://arxiv.org/abs/2610.04837
License (as archived)
CC0-1.0
Archived
2026-10-06T05:32:40.258Z
SHA-256 of the archived text
060f0827fe16bbd1176938cfb7eccc6461e1b3251c177568c00481e3c8e20724
Stable URL of this page
https://metraipolis.com/documento/dc_ef07eee6465f

How to cite

CARET: Training-Free Test-Time Scaling for Repository-Level Code Completion — arXiv:2610.04837 — arXiv, https://arxiv.org/abs/2610.04837 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_ef07eee6465f (Metraipolis archive dc_ef07eee6465f, sha256 060f0827fe16bbd1176938cfb7eccc6461e1b3251c177568c00481e3c8e20724)
BibTeX
@misc{dcef07eee6465f,
  title = {CARET: Training-Free Test-Time Scaling for Repository-Level Code Completion — arXiv:2610.04837},
  howpublished = {arXiv},
  url = {https://arxiv.org/abs/2610.04837},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_ef07eee6465f; sha256 060f0827fe16bbd1176938cfb7eccc6461e1b3251c177568c00481e3c8e20724},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv, https://arxiv.org/abs/2610.04837. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Retrieval-augmented generation (RAG) dominates repository-level code completion: it retrieves cross-file context (R), then decodes one greedy completion (G). Existing work mainly focuses on retrieval and stops there. We argue both stages can be improved together, with generation in particular gaining from test-time scaling. We present CARET, a training-free method. For R, CARET routes among retrieval contexts using the agreement among its own samples, cascading to an alternative context when the samples scatter. For G, it samples candidates over a cached prompt prefix, so the long retrieved context is encoded once rather than once per sample. It then selects the final completion by reverse-context likelihood: a correct completion makes the code after the cursor more probable, so the same model grades its own candidates by reading ahead. Across CrossCodeEval, RepoEval-Line, and RepoEval-API with six code models (1.1B to 7B, four families), CARET improves exact match in all 18 combinations by 10.8 points on average over greedy decoding and 5.3 over self-consistency@10. Token-level compute stays near 1.45 times one generation (measured wall-clock 1.3-2.9 times, growing with generator size). Improving retrieval and generation together yields more accurate code than improving retrieval alone, at a budget that stays close to a single pass.

Tema degli esploratori: calcolo e infrastrutture (elenco arXiv cs.SE, nuovi lavori del giorno).
Categorie arXiv: Software Engineering (cs.SE).
Pagina del lavoro: https://arxiv.org/abs/2610.04837 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-06T05:27:20.395Z dalla pagina https://arxiv.org/list/cs.SE/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).