RAG Pipeline — Insurance Documents
A retrieval-augmented generation system that lets underwriters ask natural-language questions over a corpus of 100K+ policies and get grounded, cited answers.
Hybrid BM25 + vector
Retrieval
Grounded + cited
Answers
FastAPI gateway
Interface
Problem & use case
Critical policy knowledge was buried in PDFs across legacy storage — searches returned files, not answers.
Solution & engineering approach
A hybrid retrieval pipeline (BM25 + dense vectors) feeding an LLM with strict citation prompts, served behind a FastAPI gateway.
Architecture & data flow
- 01
Chunk + embed 100K+ policy documents
- 02
Hybrid retrieval: BM25 + dense vector search
- 03
Re-rank top candidates with cross-encoder
- 04
LLM synthesizes grounded answer with citations
- 05
FastAPI exposes /query endpoint to internal apps
Technology stack
Implementation status
Implemented — hybrid retrieval pipeline with citation layer and FastAPI gateway