Law enforcement · Air-gapped AI
Case Intelligence Assistant (CiA)
Fully offline investigative AI for law enforcement. Every answer cites its exact source: page, video frame, or transcript timestamp.
- Role
- Founding Engineer · sole engineer on the platform, from first commit to V1.0
- Organization
- Case Intelligence Assistant Inc.
- Timeframe
- March 2026 – Present
- FastAPI (Python 3.12)
- LangGraph
- vLLM
- Gemma 4 31B
- BGE-M3
- Qdrant
- Parakeet / Whisper ASR
- NeMo
- GLiNER
- Docling / Tesseract OCR
- YubiHSM 2
- NVIDIA DGX Spark
Context
Investigators work from case files that mix documents, audio, and video. Large-case cross-document inconsistency analysis is the kind of review that costs an investigator a full day. The platform had to run fully offline: no cloud APIs or hosted models, everything on a single NVIDIA DGX Spark (128 GB unified memory). Every answer had to point to its exact source so a reviewer can verify it. It also had to hold up in court: controlled access, tamper-evident records, disclosure-ready exports, and a clear line between evidence and AI-generated text. Mahmood Ul Islam joined Case Intelligence Assistant Inc. as Founding Engineer in March 2026 and was the sole engineer on the platform from first commit to V1.0.
The build
Citation-grounded RAG, end to end.
BGE-M3 embeddings, Qdrant ACORN retrieval, a cross-encoder re-rank, then Gemma 4 31B on vLLM, streamed to the UI over SSE. Every answer cites its exact source: page, video frame, or transcript timestamp.
Why · in an investigation, an uncited answer is unusable. The reviewer has to be able to open the source and confirm it.
Retrieved evidence treated as untrusted input.
Content pulled from the case file is treated as untrusted input, which is the defence against prompt injection.
Why · the model reads whatever is in the file, and the file can contain text written to steer it. The pipeline cannot assume the evidence is friendly.
Self-hosted inference tuned for one machine.
Gemma 4 31B served by vLLM on the DGX Spark, with speculative decoding and KV/prefix caching, CUDA throughout.
Why · air-gapped means no external model API and no scaling out. Response time has to come from the serving stack itself.
Entity-graph pruning for cross-document analysis.
Large-case inconsistency analysis runs over a pruned entity graph. Together with the inference tuning above, this cut the analysis from ~6 hours to ~1 hour.
Why · shrinking what the model has to compare is cheaper than making the model faster.
Multimodal ingestion: 13 document formats plus audio and video.
Docling and Tesseract for document parsing and OCR; Parakeet ASR with Whisper as fallback; NeMo speaker diarization and voice re-identification; GLiNER for zero-shot named-entity recognition.
Why · case files are not clean PDFs. Everything has to become searchable, cited evidence before retrieval can work, and zero-shot NER means new entity types do not need labelled training data.
Crash-resumable LangGraph pipelines.
Ingestion runs as LangGraph graphs that resume after a failure instead of restarting.
Why · long jobs on large case files on a single box. A failure late in a run should not send the whole job back to the start.
Court-defensible by design: security and provenance.
RBAC with TOTP MFA for access; YubiHSM 2 key custody; a hash-chained, tamper-evident audit log; a Crown (prosecution) disclosure export (R v. Stinchcombe); visible AI-generated labels; an EN/FR bilingual UI.
Why · the output may be examined in court. Every access and every AI-generated statement has to be attributable, and AI text must never be mistaken for evidence.
Outcome
~6 h → ~1 h
Large-case cross-document inconsistency analysis
< 3 months
First commit to CEO-signed V1.0, one engineer
13 + A/V
Document formats ingested, plus audio and video
Air-gapped
Fully offline on a single NVIDIA DGX Spark
- Large-case, cross-document inconsistency analysis cut from ~6 hours to ~1 hour.
- First commit to CEO-signed V1.0 in under 3 months, with one engineer covering backend, frontend, vector search, security, and deployment.
- Every answer carries a citation to its exact source (page, video frame, or transcript timestamp), and AI-generated text is labelled as such in the UI.
- The platform runs fully offline on a single NVIDIA DGX Spark and ingests 13 document formats plus audio and video.
Engineering notes
Trade-offs
Running Gemma 4 31B on a single DGX Spark makes latency the main constraint, and there is no option to add capacity or call out to a hosted model. The levers were serving-side: vLLM speculative decoding, KV/prefix caching, and SSE streaming so the first tokens reach the investigator while the rest generate. Retrieval is two-stage on purpose: BGE-M3 embeddings with Qdrant ACORN retrieval, then a cross-encoder re-rank. A re-ranker is cheap next to the cost of feeding weak context to a 31B model, and better context is what makes the citations hold up.
Security
The threat model treats the case file itself as hostile. Key custody sits in a YubiHSM 2, not in files on the host, and the audit log is hash-chained, so altering any entry breaks the chain and shows.
Operations
One engineer, one machine, no outside network. The backend is FastAPI with SQLAlchemy over SQLite, which fits an air-gapped single-box deployment: no separate database server to run and patch. The frontend is a single-page app, bilingual in English and French.
Architecture
- Case file (13 formats + audio/video)
- Docling / Tesseract · Parakeet / Whisper · NeMo · GLiNER
- BGE-M3 embeddings
- Qdrant ACORN retrieval
- Cross-encoder re-rank
- Gemma 4 31B on vLLM
- SSE stream, cited answer
Around every stage
RBAC + TOTP MFA · YubiHSM 2 key custody · Hash-chained audit log · Crown-disclosure export · AI-generated labels
Case Intelligence Assistant (CiA), stage by stage
Founding Engineer · sole engineer on the platform, from first commit to V1.0
Relevant if
Production RAG where answers must cite their sources and survive adversarial inputs: legal, compliance, regulated industries. Typical approach: BGE-M3 or comparable embeddings, Qdrant, re-ranking, untrusted-evidence prompting. We also bring LLM-as-judge evaluation to measure answer quality.
Self-hosted or private LLM inference where data cannot leave your environment: vLLM serving, speculative decoding, KV/prefix caching, on NVIDIA hardware on-prem or inside your own AWS VPC.
Multimodal ingestion and security designed for audit: OCR (Docling, Tesseract), ASR and diarization (Parakeet, Whisper, NeMo), zero-shot NER (GLiNER), resumable LangGraph orchestration, RBAC, TOTP MFA, HSM key custody, and tamper-evident audit logging.