Inspiration

Modern codebases can contain thousands of files across multiple languages, making them difficult to understand. Existing AI coding assistants often lack repository-wide understanding and don't provide trustworthy references. We built GitRAG, an AI-powered code intelligence platform that lets developers chat with any GitHub repository and receive accurate, source-backed answers with citations, code graphs, and automatically generated documentation.

What it does

GitRAG imports any GitHub repository and transforms it into an intelligent knowledge base. Developers can chat with the repository, receive citable answers, search symbols and files, explore call/dependency graphs, generate documentation, and visualize the entire RAG pipeline in real time.

How we built it

Backend: FastAPI - PostgreSQL - Qdrant - Tree-sitter- LangSmith - OpenRouter/Groq - NeMo Guardrails

Frontend: React - TypeScript - Tailwind CSS - React Flow - Monaco Editor

Core AI Pipeline: GitHub Import → Tree-sitter Parsing → Symbol-aware Chunking → Hybrid Search (Dense + BM25) → Cross-Encoder Reranking → LLM Generation with Source Citations.

Challenges we ran into

  • Designing symbol-aware chunking for code instead of fixed-size chunks.
  • Achieving high retrieval accuracy across large repositories.
  • Combining dense and sparse retrieval efficiently.
  • Building reliable file and line-number citations.
  • Preventing hallucinations and prompt injection with guardrails.

Accomplishments that we're proud of

  • Built an end-to-end AI code intelligence platform.
  • Implemented hybrid retrieval with reranking for better search quality.
  • Generated trustworthy answers with exact source citations.
  • Added interactive call/dependency graphs and automatic documentation.
  • Integrated LangSmith evaluation for retrieval and generation quality.

What we learned

I learned that building production-ready RAG systems requires much more than connecting an LLM to a vector database. Retrieval quality, code-aware chunking, evaluation, and guardrails are essential for building reliable AI applications.

What's next for GitRAG

Expand GitRAG with IDE integrations (VS Code & JetBrains), AI-powered code reviews, incremental repository indexing, multi-repository search, enterprise collaboration features, and advanced architectural analysis with intelligent refactoring suggestions.

Built With

Share this project:

Updates

Submission history