arXiv cs.AI· Sujoy Roychowdhury, Joseph H. R. Isaac, Jiangning Gao, Martin Klitte, Diarmuid Corcoran·· 13 小时前AI 评分31
Code Comprehensor:面向大型代码库的分层文档与跨模态检索框架
Code Comprehensor: Hierarchical Documentation and Cross-Modal Retrieval for Large Repositories
AI 导读
Code Comprehensor 提出混合检索-推理框架,由 CodeGraph 调用图、CodeScribe 分层文档生成和 CLIP 风格双编码器 CodeContrast 组成,实现文本到代码的语义检索。在 OpenCV 和一个 500 万行专有代码库上,CodeScribe 生成的监督信号显著提升跨模态检索准确率,RAGAS 评测忠实度超过 90%。
正文 · 原文
Abstract:Understanding large, complex, and rapidly evolving code bases remains a core challenge for software engineering at scale, hindering onboarding, maintenance, refactoring, and impact analysis. Providing this information to a Large-Language Model (LLM) is another hurdle, as the LLM must understand not only the required code method but also its associated methods in the grand scheme of the repository. We propose Code Comprehensor, a hybrid retrieval-reasoning framework combining (i) CodeGraph, a code dependency callgraph, (ii) CodeScribe, which uses code-aware LLMs to generate hierarchical documentation across repository call graphs, and (iii) CodeContrast, a CLIP-style dual-encoder model trained on CodeScribe output to learn aligned text-code embeddings. CodeContrast enables fast, semantically precise retrieval of relevant code-context neighborhoods, which serve as grounded evidence for an MCP-based LLM orchestrator answering domain-specific queries. Evaluation on OpenCV and a proprietary 5M-LOC repository shows that CodeScribe-derived supervision significantly improves cross-modal retrieval in text-to-code accuracy over baseline approaches. Richer textual supervision (hierarchical documentation, parent/sibling context, and LLM-generated synthetic questions) consistently enhances performance across both repositories. LLM-as-a-judge evaluation using the popular RAGAS of the Code Comprehensor output yields above 90% faithfulness scores.
| Comments: | Accepted at 42nd International Conference on Software Maintenance and Evolution |
| Subjects: | Software Engineering (cs.SE); Artificial Intelligence (cs.AI); Machine Learning (cs.LG) |
| Cite as: | arXiv:2610.30016 [cs.SE] |
| (or arXiv:2610.30016v2 [cs.SE] for this version) | |
| https://doi.org/10.48550/arXiv.2610.30016 arXiv-issued DOI via DataCite |
Submission history
From: Sujoy Roychowdhury [view email]
[v1]
Wed, 21 Oct 2026 16:45:43 UTC (750 KB)
[v2]
Thu, 22 Oct 2026 03:09:23 UTC (750 KB)
来源:arXiv cs.AI · arxiv.org