All work

AEIA

AI assistant that answers questions about a codebase, with citations

Role
Solo project
When
2026

Overview

An assistant that answers plain-English questions about a large codebase and cites the exact code each answer came from. Built against Campus Connect.

The constraint

An answer about code is worthless if it's invented. Every claim has to point at a real file.

What I built

  1. 01

    Hybrid retrieval: dense embeddings plus BM25, fused with weighted reciprocal rank fusion, over syntax-aware chunks (Tree-sitter for TypeScript, block parsers for Prisma, SQL and Compose).

  2. 02

    A LangGraph state machine routes each question to code search or to git tools: commit history, diffs and reverse dependency lookup.

  3. 03

    A signed GitHub webhook triggers background re-indexing of changed files, so the index stays current without vector DB downtime.

  4. 04

    Rate limits and quotas protect the API. The same tools are exposed as an MCP server, and it falls back to returning grounded code context when the LLM quota runs out.

Request path

  1. Next.js console
  2. FastAPI
  3. LangGraph router
  4. BM25 + dense search
  5. Qdrant
  6. Gemini

From the code

src/api/webhook.pysource
def verify_github_signature(    payload_body: bytes,    signature_header: str,    secret: str,) -> bool:    if not signature_header or not signature_header.startswith("sha256="):        return False     expected = hmac.new(        secret.encode("utf-8"),        payload_body,        hashlib.sha256,    ).hexdigest()     received = signature_header.removeprefix("sha256=")    return hmac.compare_digest(expected, received)

Outcome

Found the right code for 100% of a 20-query test set (MRR 0.79), with answers checked for grounding by an automated LLM-as-judge evaluation. Replies start streaming in under 400 ms.

  • Python
  • FastAPI
  • LangGraph
  • Qdrant
  • Gemini
  • Next.js
  • Docker

Next project

NIT Arunachal Pradesh website

Official website and admin CMS for NIT Arunachal Pradesh