Specified an air-gapped, AI-native document platform for banks and regulated enterprises

Full PRD for an on-premises, bilingual Urdu/English document intelligence platform: OCR, extraction, semantic search and RAG with no outbound network.

The problem

Banks, defence, government, healthcare and large corporates in Pakistan and the wider South Asia and GCC region are prohibited or strongly discouraged from processing regulated data outside national borders, which rules out cloud document platforms like Box or Google Workspace. The on-prem alternatives — OpenText, Documentum, M-Files — predate the LLM era and bolt AI on as an add-on. Urdu Nastaliq is poorly served by global OCR engines, so bilingual documents are a particular gap.

A venture wanted to build an AI-native document management platform that runs entirely inside the customer's data centre: OCR, extraction, semantic search and retrieval-augmented question answering with no outbound network and no per-API-call cost. The earlier draft had open questions on vector storage, unresolved open-source licensing exposure, an unrealistic single Urdu accuracy target and a licensing model that could breach the recovery-time objective on a single hardware failure.

What it cost

Without a rigorous specification, engineering would have started on components with AGPLv3 and SSPL licensing that could not ship to enterprise customers, with two competing backend frameworks, free-form LLM JSON in the extraction path, and no answer to what happens when a node-locked licence loses its motherboard.

What we built

A version 3 functional specification incorporating the commercial and technical audit. Open-source exposure was promoted to a Phase 0 blocker with permissively licensed replacements: PostgreSQL with pgvector and SeaweedFS or Ceph in place of MongoDB and MinIO. Python and FastAPI were fixed as the single backend to match the ML toolchain. Qdrant was specified as a dedicated vector store. Grammar-constrained JSON decoding via outlines or xgrammar on vLLM became a hard requirement for every extraction call.

The licensing model gained a 72-hour hardware rebind grace window with a signed offline token so a failed motherboard cannot breach the 4-hour RTO. Urdu Nastaliq got a four-stage mitigation ladder instead of a single 92% target. Security defaults deny administrators read access to document content, with break-glass dual approval and immutable audit for cross-department reads. Twelve functional modules were mapped to MVP, fast-follow and Phase 3, with FR, NFR, open-question and risk identifiers, six personas, a competitive landscape, an industry wedge strategy and a north-star metric: 80% of inbound documents auto-classified, extracted and routed without human touch by end of year two, at 95%-plus extraction accuracy on the fields that matter.

What changed

The venture has a build-ready specification with its Phase 0 blockers resolved and a stack the engineering team can start on. Deployment metrics will exist once the first customer installation is live.

Stack

  • Python
  • FastAPI
  • PostgreSQL
  • pgvector
  • Qdrant
  • vLLM