GitHub - srinath2934/RepoChat · GitHub
Skip to content

Repository files navigation

RepoChat - Repository RAG Assistant

RepoChat is a Retrieval-Augmented Generation (RAG) assistant for understanding GitHub repositories through natural-language questions. It ingests repository files, chunks source code, generates embeddings, retrieves the most relevant context through vector search, and produces grounded answers with source-aware reasoning.

This project is positioned as an applied AI engineering project: not just a notebook, but a working retrieval system with repository ingestion, embedding generation, vector search, LLM prompting, Dockerized infrastructure, and a usable interface.

Why this project exists

Large repositories are difficult to understand with keyword search alone. Developers often need to know where a feature lives, how modules interact, which files implement a workflow, or why a piece of code behaves a certain way.

RepoChat solves this by converting a repository into a searchable semantic knowledge base.

Core capabilities

  • Ingests public GitHub repositories and extracts source files for analysis.
  • Splits code into retrieval-friendly chunks for better context quality.
  • Generates transformer-based embeddings for semantic understanding.
  • Uses vector search to retrieve the most relevant code/documentation chunks.
  • Builds augmented prompts so the LLM answers from retrieved repository context.
  • Provides a Streamlit interface for interactive repository Q&A.
  • Runs vector infrastructure through Docker for a more production-oriented setup.

Architecture

GitHub Repository
        |
        v
Repository Loader
        |
        v
Document Processor / Code Chunking
        |
        v
Hugging Face / SBERT Embeddings
        |
        v
Endee Vector Search Engine
        |
        v
Top-K Context Retrieval
        |
        v
Prompt Builder + Groq Llama
        |
        v
Streamlit Chat Interface

Tech stack

  • Python
  • LangChain
  • Hugging Face embeddings / Sentence-BERT
  • Endee vector search engine
  • Groq Llama API
  • Streamlit
  • Docker and Docker Compose
  • GitHub API integration

Engineering signals

This repository demonstrates practical experience with:

  • RAG architecture and semantic search
  • repository parsing and source-grounded generation
  • embeddings and vector retrieval
  • LLM prompt construction
  • Dockerized AI infrastructure
  • debugging model/retrieval behavior through real user queries

Project structure

RepoChat/
├── app.py                    # Streamlit application entrypoint
├── services/                 # ingestion, embeddings, retrieval, LLM logic
├── infra/                    # Dockerized vector engine setup
├── docs/                     # screenshots and demo assets
├── docker-compose.yml        # local vector infrastructure
├── fix_engine.ps1            # recovery helper for local setup
└── requirements.txt          # Python dependencies

Run locally

git clone https://github.com/srinath2934/RepoChat.git
cd RepoChat
pip install -r requirements.txt

Create a .env file:

GROQ_API_KEY=your_key
HUGGINGFACEHUB_API_TOKEN=your_key
GITHUB_TOKEN=your_key

Start the vector infrastructure and app:

docker-compose up -d
streamlit run app.py

What I learned

  • RAG quality depends heavily on chunking, retrieval, and prompt structure.
  • Source-grounded answers are more useful than generic model responses.
  • Vector search infrastructure needs careful debugging around indexing, persistence, and query latency.
  • A useful AI product needs both model logic and reliable software engineering around it.

Future improvements

  • Add hybrid retrieval with keyword + vector search.
  • Add private repository support with safer authentication handling.
  • Add retrieval evaluation metrics for context relevance and groundedness.
  • Add incremental indexing for changed files.
  • Add more detailed source citations in the answer interface.

Author

Srinath S
B.Tech Artificial Intelligence & Data Science, Anna University
GitHub: https://github.com/srinath2934
LinkedIn: https://www.linkedin.com/in/srinath29

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages