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.
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
Extract the history
Mines the repository's commits and diffs with PyDriller.
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.
Label unclear commits
Uses gpt-oss-120b on Groq to describe commits whose messages are vague or missing.
Hybrid search
Combines keyword search (BM25) with semantic search using all-MiniLM-L6-v2 embeddings running on ONNX Runtime, then fuses the two rankings.
Answer with citations
An LLM writes the answer and cites the commit hashes it relied on, so you can check every claim.
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.