mlsanityData to 14 Oct 2026

Retrieval-Augmented Generation for Scientific Code Understanding

arXiv 2609.12190 ↗First posted 10 Sep 2026cs.SE cs.AIcited by 0

On the map: Retrieval-augmented generation → RAG for code

Abstract (arXiv)

Large language models have become central to modern coding assistants, but state-of-the-art systems such as Claude Code or Codex rely on very large, cloud-hosted models with significant computational cost and data-privacy implications. This work investigates whether a useful, fully local coding agent can be built around small open-source models by shifting the computational burden away from inference. We develop a Retrieval-Augmented Generation (RAG) system for scientific code understanding that strictly separates an expensive offline ingestion stage parsing, structural graph construction, LLM-generated entity explanations, and embedding from a lightweight online answering stage. The system is evaluated on a 100-question benchmark spanning eleven categories over the IPPL scientific codebase written in C++, with answers scored by an independent frontier model as the judge. Across seven answering models, we find that model family and retrieval quality matter more than parameter count, i.e. a 9B model achieves the highest average score (0.795), outperforming both larger models within our pipeline and the same models embedded in the Claude Code retrieval architecture. The results indicate that front-loading code understanding into a reusable, codebase-specialised vector store enables small local models to deliver grounded and repository-specific answers, making the agent well suited as a privacy-preserving development tool for in-house scientific codebases.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 9 of its 28 references that are in the map. First posted on arXiv 10 Sep 2026.

Builds on

9 of 28 references.

References · 9

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  3. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
  4. 2024Qwen2.5 Technical Reportcited by 4,942
  5. 2017Billion-scale similarity search with GPUscited by 2,497
  6. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
  7. 2024Nomic Embed: Training a Reproducible Long Context Text Embeddercited by 265
  8. 2026Gemma 4 Technical Reportcited by 259
  9. 2022Scaling and performance portability of the particle-in-cell scheme for plasma physics applications through mini-apps targeting exascale architecturescited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2024Context-Augmented Code Generation Using Programming Knowledge Graphs
  2. 2026Context-Augmented Code Generation Using Programming Knowledge Graphs
  3. 2024Building A Coding Assistant via the Retrieval-Augmented Language Model
  4. 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyond
  5. 2026RCL: A Retrieval-Confidence Layer for Detecting Insufficient Context in Enterprise Retrieval-Augmented Code Generation
  6. 2024Evaluating the Effectiveness and Efficiency of Demonstration Retrievers in RAG for Coding Tasks
  7. 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities
  8. 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?