Get in touch about this project
Hero image slot — reserved at 640 × 351, not yet published.

UltraSafe AI needed answers pulled out of regulated healthcare documents — clinical PDFs where a dropped table row changes a dosage. The system runs every document through six extraction engines in parallel and reconciles their disagreements by vote, then retrieves over the result in four stages: recall, reranking, knowledge-graph expansion, redundancy filtering.

  • 99%+Extraction accuracyStated as extraction accuracy past 99% on complex clinical documents. Method, denominator and measurement window unspecified. · as of 1 Oct 2025
  • <200Retrieval latencyStated as the latency of the multi-vector retrieval stage. Method, denominator and measurement window unspecified. · as of 1 Oct 2025
  • <2End-to-end latencyStated as query-to-answer latency over a corpus of more than 200 documents. Method, denominator and measurement window unspecified. · as of 1 Oct 2025
  • 6Extraction engines reconciled by voteEngines run in parallel over every document, their output reconciled by vote inside a seven-layer pipeline. · as of 1 Oct 2025

The problem

Clinical PDFs do not parse cleanly. Scanned pages, multi-column layouts, tables that carry dosages, and abbreviations that mean different things in different specialities all defeat a single extractor in different ways — and it fails quietly. Downstream, nothing can distinguish a sentence that was missed from one that was never written.

Semantic search alone is the wrong instrument for this material. Dense embeddings blur the exact tokens clinicians search on — a drug name, a contraindication, a numeric threshold — while keyword search misses the paraphrase. In a regulated setting the near-miss passage is worse than no passage, because it still reads like an answer.

The system

Seven extraction layers, three vector representations per chunk, four retrieval stages.

What it is made of

  • A seven-layer PDF extraction pipeline running six engines in parallel and reconciling them by vote, with OCR enhancement, coherence scoring and hierarchical chunking applied to the reconciled output.
  • A multi-vector embedding framework: dense medical embeddings for meaning, SPLADE sparse representations for exact clinical terms, and ColBERT token-level interaction for fine matching, fused by weighted ensemble scoring and searched with HNSW approximate nearest neighbours.
  • A four-stage retrieval pipeline: BM25 and semantic recall, then cross-encoder reranking, then expansion across a medical knowledge graph scored by PageRank with Bayesian networks for probabilistic reasoning, then redundancy filtering.
  • A production deployment of Kubernetes services with Redis caching, a managed vector store and OpenTelemetry across the request path, with contraindication validation, dosage checks and abbreviation expansion running against the pipeline.

My role

Three months, remote, as the applied AI engineer on the system. I built the extraction pipeline and its reconciliation layer, the multi-vector embedding framework, the four-stage retrieval path and the knowledge-graph integration behind it, and took the result into production with the caching, vector store and tracing around it. The medical validation passes were written into the pipeline rather than bolted onto the answer, because in this class of system the point of failure is always upstream of the answer.

The decisions

Six extractors and a vote, not one good parser. The alternative was choosing the single strongest PDF parser and tuning it hard — cheaper per page, one code path, and the usual answer. Extraction now costs six times the compute on every page, and reconciliation became the most intricate part of the codebase. What it buys is disagreement as a signal: where the engines diverge the pipeline knows the page is hard, instead of quietly emitting one engine's guess.

Three representations per chunk instead of one embedding. Index every chunk dense, sparse and late-interaction, and fuse the scores behind approximate search. A single dense index is where most of this system's storage and tuning cost would disappear if it were sufficient. Indexing and storage multiply per document, and the fusion weights become one more thing to keep calibrated. In exchange an exact drug name is recovered by the sparse arm when the dense arm has blurred it.

The outcome

The system went to production as Kubernetes services over a corpus of more than two hundred documents, with contraindication validation, dosage checks and abbreviation expansion running alongside retrieval rather than after it.

What is unresolved

Every number on this page is self-reported. The evaluation method was never published, and I cannot point to an external benchmark or a clinician-adjudicated review of the retrieval failures — which is exactly the evidence a regulated deployment should be held to. The voting design has a blind spot it cannot close by construction: it catches disagreement between engines, and has nothing to say when all six agree and all six are wrong, which is what a badly scanned table produces.