Hajik Renaa
← All work

Case 03LLM & RAGPilot

Maritime Compliance Copilot

A copilot that reads vessel paperwork and flags what's about to expire

Reads registration certificates, inspection reports and MARPOL / SOLAS circulars. It extracts the fields that matter, raises risk flags, and answers fleet-wide questions with the file and page each answer came from.

Client
DataReveal AI
Role
Sole engineer
Year
2026
Stack
FastAPI, PyMuPDF, spaCy, ChromaDB
Maritime Compliance Copilot: product screenshot

01The numbers

6rule-based risk flag types
~2.6klines across 12 modules and routers
1 callto seed a full demo fleet

02The problem

Registry and fleet compliance teams work from stacks of PDFs. Knowing which certificate lapses next month, or which vessel keeps showing up in incident reports, means reading all of them, every time.

03What I built

Each PDF is read page by page and split into overlapping chunks. Named-entity recognition plus targeted patterns pull out the vessel name, registration number, dates, document type and incident details into a structured table.

A rules engine runs over that table and raises six kinds of flag, which feed an executive dashboard. For open questions, chunks are embedded locally and retrieved for a model that is told to answer only from the documents and to cite file and page.

It was built to demo with the client's team. One call seeds realistic synthetic vessel files, and an end-to-end test exercises every endpoint, from clearing the data to seeding it again.

04Architecture

system sketch
VESSEL PDFScerts · reportsPYMUPDFpage · chunkSPACY + RULESstructured fieldsMINILMlocal embeddingsRULES ENGINE6 flag typesCHROMADBvector storeDASHBOARDrisk · expiryGPT-4O-MINIcites file + pageVESSEL PDFScerts · reportsPYMUPDFpage · chunkSPACY + RULESstructured fieldsMINILMlocal embeddingsRULES ENGINE6 flag typesCHROMADBvector storeDASHBOARDrisk · expiryGPT-4O-MINIcites file + page

05Engineering notes

  • Local embeddings (MiniLM) and a local vector store. Only the final question goes to the LLM.
  • Structured extraction and retrieval are separate paths, so the dashboards don't depend on the model.
  • About 2,600 lines across six core modules and six API routers.
  • CORS is set up for a separate React front end built by the client's team.

06Stack

FastAPIPyMuPDFspaCyChromaDBsentence-transformersGPT-4o-miniSQLiteReportLab

Need something like this? Let’s talk about your version.

Book a free call ↗