Skip to main content
Back to Projects
GenAI · RAGImplemented

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

Chunk &embedHybridretrievalRe-rankCitedanswer
  1. 01

    Chunk + embed 100K+ policy documents

  2. 02

    Hybrid retrieval: BM25 + dense vector search

  3. 03

    Re-rank top candidates with cross-encoder

  4. 04

    LLM synthesizes grounded answer with citations

  5. 05

    FastAPI exposes /query endpoint to internal apps

Technology stack

FastAPIHugging FaceVector DBRAGLLMs

Implementation status

Implemented — hybrid retrieval pipeline with citation layer and FastAPI gateway