Repo Aware Code RAG

•

Enhances code understanding by providing an AST-aware hybrid RAG system with precise `file:line` citations for codebase queries.

Repo-Aware Code RAG Assistant is a specialized retrieval-augmented generation (RAG) system designed to help developers navigate and understand large codebases. Unlike generic RAG solutions, it employs AST-aware chunking to maintain the integrity of code units like functions and classes, ensuring accurate and human-readable `file:line` citations. It combines BM25 and dense retrieval with advanced techniques like query expansion and reciprocal rank fusion to deliver highly relevant results. The system is exposed as a FastAPI service for direct queries and as an MCP server, allowing integration with AI agents and IDEs for iterative, context-aware code exploration.

Key Features

01Identifier field-boosting in BM25 for improved code search.
02AST-aware chunking for exact `file:line` citations.
03Fully local quickstart with zero-cloud dependencies.
04Hybrid retrieval (BM25 + dense) with reciprocal rank fusion (RRF).
050 GitHub stars
06Integration with Model Context Protocol (MCP) as a live tool.

Use Cases

01Integrate context-aware code search into AI agents and IDEs via MCP.
02Rapidly locate and understand code elements within a repository.
03Evaluate and benchmark RAG system performance on codebases.