Skip to content
Leon Achata
All work
RAG

DocuChat

Grounded answers from your documents, with citations down to the exact sentence, and an honest “not in the documents” when that is the truth.

The problem

Teams have answers buried in long manuals, policies and reports. Keyword search misses paraphrases, and a plain chatbot answers confidently even when the documents say nothing.

How it works

Structure-aware parsing keeps pages and sections attached to every chunk. Each question is rewritten and expanded, then searched three ways (dense vectors, BM25 and SPLADE) fused with Reciprocal Rank Fusion, reranked by a cross-encoder and diversified with MMR. A relevance gate decides whether to answer, retry with a reformulated query, or abstain. Claude answers with native citations, streamed to a Next.js interface that highlights each source.

Pipeline

  1. 01Parse & chunk
  2. 02Rewrite query
  3. 03Hybrid retrieval
  4. 04Rerank + MMR
  5. 05Relevance gate
  6. 06Cited answer

Where it's used

  • Internal knowledge bases: HR policies, SOPs, product manuals
  • Legal, compliance and research teams that must verify every claim
  • Customer-support agents answering from official documentation

Highlights

  • Hybrid retrieval: dense + BM25 + SPLADE, fused with RRF
  • Cross-encoder reranking and MMR diversification
  • Corrective loop that abstains instead of hallucinating
  • Sentence-level citations with page and section

Stack

LangGraphClaudepgvectorSPLADECross-encoderNext.js

Want something like this for your company?

I build production versions of these systems on your data and your infrastructure.

Related service: Knowledge assistants

Contact me