All projects

2026 · RAG over Git

Commit History Q&A

Ask questions about any Git repository, such as why a function changed or when a bug was introduced, and get answers that cite the exact commit hashes.

PythonPyDrillerTree-sitterONNX Runtimerank-bm25GroqStreamlitJenkins
View code (opens in a new tab) Live demo coming soon
Diagram of the Commit History Q&A pipeline
How the pipeline works, step by step.

The problem

Understanding why code looks the way it does usually means digging through git log by hand. Commit messages are often unclear, and one commit can touch many unrelated functions.

This system turns a repository's history into something you can question in plain language, with every answer traceable to real commits.

How it works

  1. Extract the history

    Mines the repository's commits and diffs with PyDriller.

  2. Split into function-level units

    Parses the code with Tree-sitter and splits each commit into the individual functions it changed, so search works at the right level of detail.

  3. Label unclear commits

    Uses gpt-oss-120b on Groq to describe commits whose messages are vague or missing.

  4. Hybrid search

    Combines keyword search (BM25) with semantic search using all-MiniLM-L6-v2 embeddings running on ONNX Runtime, then fuses the two rankings.

  5. Answer with citations

    An LLM writes the answer and cites the commit hashes it relied on, so you can check every claim.

  6. Ship it

    Served as a Streamlit app and delivered through a Jenkins CI/CD pipeline.

What I learned

How to combine keyword and semantic retrieval on code (BM25 for exact identifiers, embeddings for meaning), how to choose the right chunk size for commits, and how to run embedding models on CPU with ONNX Runtime.