Grounded RAG assistant for a government agency
40,000 policy documents now answer themselves, with a source on every answer.
What the client needed. The agency needed citation-grade answers over 40,000 policy and operational documents, hosted inside a PROTECTED-level boundary with zero data egress, replacing a mailbox-driven enquiry process.
How we delivered it. We engineered an on-tenancy retrieval platform in Python and TypeScript: PostgreSQL with pgvector for hybrid BM25-plus-embedding search, OIDC-scoped retrieval so answers inherit document permissions, and a citation layer binding every claim to its source paragraph. Open-weight embedding models kept inference inside the boundary; a golden-set evaluation harness ran groundedness and refusal checks in CI, blocking releases below threshold. P95 answer latency 2.1 s, groundedness 0.94 at launch, security review closed with zero data-egress findings.