Case Study · Private AI & Archival · Regulated Enterprises, Legal & Institutional Archives
Air-gapped document search and ISO archival for regulated teams
Engineered a local-first OCR preservation and hybrid search pipeline that turns scanned document vaults into searchable, citation-backed knowledge bases without uploading files to external clouds.
Target Sector
Regulated Enterprises, Legal & Institutional Archives
- Python
- TypeScript
- Hybrid BM25 + Vector
- Ollama
- OCR & PDF/A
- Docker
Verifiable Operational Outcomes
External Cloud Egress
Runs 100% on local hardware
Archival Compliance
Long-term preservation packages
Page-Level Answers
Exact keyword + semantic recall
Organizations holding sensitive legal records and historical scans needed fast semantic search and long-term digital preservation, but compliance rules prohibited sending documents to third-party SaaS APIs.
- Legacy scanned PDFs lacked embedded text layers, making exact legal clause or catalogue lookups impossible.
- Pure vector search missed exact statute numbers, contract IDs, and proper nouns critical to legal and archival teams.
- Data sovereignty mandates required 100% offline execution on workstation or campus hardware.
Combined an offline OCR and metadata cataloguing workflow (outputting ISO-standard PDF/A preservation packages) with a local-first hybrid BM25 + vector retrieval engine supporting on-premise LLM inference and strict paragraph-level citations.
03 · Production Verification
Verified zero network egress under firewall packet inspection while benchmarking exact-match legal identifier recall and page-citation accuracy across multi-hundred-page PDF vaults.
Implementation Architecture
How the system was engineered step by step
Digitise scans into ISO PDF/A archival packages
Built a local workstation pipeline that extracts text from scans, provides side-by-side human review and metadata cataloguing, and exports self-contained ISO PDF/A files.
Combine BM25 keyword precision with dense vector recall
Indexed document chunks using reciprocal rank fusion over BM25 and local embeddings so both exact reference codes and conceptual queries surface accurately.
Synthesize answers with mandatory page and paragraph links
Connected the retrieval index to local Ollama models (with optional private cloud fallback) that cite the exact document and page for every statement.
Inspect the Live Reference Implementation
Experience this architecture in our live platform builds
Reference Hybrid BM25 + Vector Cited Search Platform
Reference Offline OCR & ISO PDF/A Preservation Suite

