Compliance AI
Reading the regulations so the team doesn't have to read all of them.
- My role
- Architected the RAG pipeline and gap-analysis engine
- Timeline
- © 2025
- Played with
- TypeScript, Python, PostgreSQL, pgvector, NestJS, FastAPI
- Read time
- 1 min
Fig. 8 — Compliance AI, annotated
- 1High-severity gap, with its confidence score.
- 2Medium findings stay visible, not buried.
- 3Low-risk notes, tiered last.
Compliance is a reading marathon.
A compliance review means holding a policy up against a standard, clause by clause, and writing down what's missing. Multiply that by every standard a company answers to and the review is out of date before it's finished.
Find the gaps, and say how sure you are.
Architect a pipeline that takes a document, finds the clauses of a standard that apply to it and reports what's missing, with an honest measure of its confidence. The product is under NDA, so this story stays at the level of architecture.
Structure first, then search.
Parse before you embed
Documents are parsed into their real structure, sections and clauses, before anything is embedded, so retrieval works on meaningful units instead of arbitrary chunks.
Retrieve what applies
Embeddings in PostgreSQL with pgvector match each part of a document to the clauses that apply to it.
Findings you can act on
Every finding gets a confidence tier and a severity weight. High-severity gaps lead, medium ones stay visible instead of buried, and low-risk notes come last.
Two runtimes, one system
NestJS runs the product side and FastAPI the Python retrieval work.