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
- 01Parse & chunk
- 02Rewrite query
- 03Hybrid retrieval
- 04Rerank + MMR
- 05Relevance gate
- 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
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