Code Comprehensor: Hierarchical Documentation and Cross-Modal Retrieval for Large Repositories
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 21 of its 34 references that are in the map. Submitted 21 Oct 2026.
Builds on
21 of 34 references.
References · 21
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 41,272
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,559
- 2023PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallelcited by 737
- 2023Ragas: Automated Evaluation of Retrieval Augmented Generationcited by 458
- 2022Text and Code Embeddings by Contrastive Pre-Trainingcited by 378
- 2025Context Length Alone Hurts LLM Performance Despite Perfect Retrievalcited by 154
- 2022Experiences from Using Code Explanations Generated by Large Language Models in a Web Software Development E-Bookcited by 86
- 2024RepoAgent: An LLM-Powered Open-Source Framework for Repository-level Code Documentation Generationcited by 76
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 23
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 22
- 2024Evaluation of RAG Metrics for Question Answering in the Telecom Domaincited by 21
- 2022Code Search: A Survey of Techniques for Finding Codecited by 19
9 more
- 2022Code Search based on Context-aware Code Translationcited by 15
- 2023Rethinking Negative Pairs in Code Searchcited by 15
- 2024Lost-in-Distance: Impact of Contextual Proximity on LLM Performance in Graph Taskscited by 9
- 2022Cross-Domain Deep Code Search with Meta Learningcited by 8
- 2023A Survey of Source Code Search: A 3-Dimensional Perspectivecited by 7
- 2025CodeWiki: Evaluating AI's Ability to Generate Holistic Documentation for Large-Scale Codebasescited by 6
- 2021Cross-Language Code Search using Static and Dynamic Analysescited by 5
- 2025Code-Craft: Hierarchical Graph-Based Code Summarization for Enhanced Context Retrievalcited by 5
- 2023Self-Supervised Query Reformulation for Code Searchcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024CodexGraph: Bridging Large Language Models and Code Repositories via Code Graph Databases
- 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrieval
- 2026Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrieval
- 2026CodeMMR: Bridging Natural Language, Code, and Image for Unified Retrieval
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
- 2024On The Importance of Reasoning for Context Retrieval in Repository-Level Code Editing