Metraipolis › archive › dc_eb23ea107ef2
RCL: A Retrieval-Confidence Layer for Detecting Insufficient Context in Enterprise Retrieval-Augmented Code Generation — arXiv:2609.11023
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2609.11023
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-16T05:57:33.385Z
- SHA-256 of the archived text
d67c348c79762d8dc13175fbafd7fcbbda0e620ba48dd30549c6cc6ff8e8d240- Stable URL of this page
https://metraipolis.com/documento/dc_eb23ea107ef2
How to cite
RCL: A Retrieval-Confidence Layer for Detecting Insufficient Context in Enterprise Retrieval-Augmented Code Generation — arXiv:2609.11023 — arXiv (en), https://arxiv.org/abs/2609.11023 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_eb23ea107ef2 (Metraipolis archive dc_eb23ea107ef2, sha256 d67c348c79762d8dc13175fbafd7fcbbda0e620ba48dd30549c6cc6ff8e8d240)
BibTeX
@misc{dceb23ea107ef2,
title = {RCL: A Retrieval-Confidence Layer for Detecting Insufficient Context in Enterprise Retrieval-Augmented Code Generation — arXiv:2609.11023},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2609.11023},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_eb23ea107ef2; sha256 d67c348c79762d8dc13175fbafd7fcbbda0e620ba48dd30549c6cc6ff8e8d240},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.11023. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Retrieval-Augmented Generation (RAG) for code generation has been studied extensively on public repositories, where a model's parametric knowledge often compensates for imperfect retrieval. This breaks down in enterprise codebases, where private APIs, internal frameworks, and undocumented team conventions fall entirely outside any model's pretraining distribution. Recent work on private-library code generation shows that even oracle (perfect) retrieval does not eliminate errors, but locates failures downstream in API usage; separately, confidence-gated retrieval has been studied for open-domain question answering using model-internal confidence. Neither addresses whether retrieval itself was structurally sufficient for a private-code query before generation begins. We introduce RCL (Retrieval-Confidence Layer), a lightweight module inserted between retrieval and generation that combines a call-graph-derived structural coverage score with a novelty score estimating a query's dependence on knowledge outside the model's prior, to detect insufficient retrieval before generation occurs. When confidence falls below a calibrated threshold, RCL triggers a targeted follow-up retrieval or labels the output for human review, rather than generating silently against incomplete context. We describe RCL's architecture, formalize its scoring functions, and propose an evaluation methodology using a private-code benchmark built by injecting synthetic internal APIs into open-source Java repositories, simulating the enterprise condition without proprietary code. We report results (Section 7) comparing RCL against similarity-only retrieval on generation correctness. Our position is that retrieval sufficiency, assessed structurally rather than from model-internal confidence, is a distinct and currently underaddressed signal for building safer code-generation systems in private, enterprise settings. Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-09-11 in cs.SE). Categorie arXiv: Software Engineering (cs.SE). Pagina del lavoro: https://arxiv.org/abs/2609.11023 — 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-16T05:45:13.289Z dalla pagina https://arxiv.org/catchup/cs.SE/2026-09-11?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).