Autonomous Multi-Facet Repository Comprehension Using Hierarchical Retrieval and Cascading Multi-LLM Routing
Joining unfamiliar software projects forces developers to spend days deciphering complex codebases, API routes, and runtime flows. Standard Retrieval-Augmented Generation (RAG) pipelines should help, but they break down on source code in practice. New engineers rarely know what specific questions to ask, and standard chunking blindly slices code mid-function. To solve these issues without manual intervention, we present RepoInsight, an end-to-end system that automatically generates an 11-facet architectural report directly from a GitHub repository URL without requiring human queries. To preserve enclosing syntax without inflating prompt token volume, RepoInsight implements hierarchical parent-child retrieval: granular 500-character child chunks are embedded via Cohere (384 dimensions) and indexed in PostgreSQL pgvector, while complete parent source files are retrieved dynamically through single batched relational queries. To control inference latency and avoid rate limits, the system applies order-preserving file deduplication to consolidate 11 architectural facets into 7 batched prompts. Generation routes through a three-tier fallback hierarchy (Groq -> Gemini 1.5 Flash -> Cohere Command-R) paired with regular-expression JSON sanitization. Empirical evaluations across seven benchmark repositories show that RepoInsight reduces redundant prompt tokens by an average of 40.2%, accelerates nearest-neighbor vector retrieval by 16.1x via HNSW graph indexing, and achieves 100% request completion under severe upstream throttling where single-provider baselines crash on 63.6% of queries. This architecture offers a practical, high-throughput foundation for automated developer onboarding. Github : geethika1207/RepoInsight-Backend: AI-powered GitHub repository intelligence engine built with FastAPI, PostgreSQL, pgvector, and LLMs. Clone any public repository, generate semantic embeddings, and chat with your codebase using Retrieval-Augmented Generation (RAG).
Authors
- Geethika Nagasri Tammineni
Institutions
- Vasireddy Venkatadri International Technological University (IN)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-31
- DOI
- https://doi.org/10.5281/zenodo.23831116
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00