Inspiration

Clinical researchers and healthcare institutions spend months manually extracting PICO metrics (Population, Intervention, Comparator, Outcome) from hundreds of dense clinical trial PDFs for systematic reviews and meta-analyses.

Current cloud-based LLMs fail here for two critical reasons:

  1. Data Sovereignty Violations: Embargoed clinical trial data, pre-print studies, and proprietary hospital documents cannot legally leave internal servers to hit external commercial APIs due to strict GDPR, HIPAA, and data protection laws.
  2. The "Vegas Veto" (Hallucinations): If a generalist LLM hallucinates an N-value sample size (e.g., reporting 40 instead of 400) or misquotes an odds ratio, the entire meta-analysis is poisoned.

We built the Sovereign Systematic Review & Meta-Analysis Engine to prove that Switzerland's sovereign open LLM, Apertus 1.5, combined with deterministic physical coordinate verification, can fully automate literature extraction while remaining 100% auditable and air-gapped.

What it does

  • Air-Gapped Ingestion: Ingests complex multi-page clinical trial PDFs locally without external network calls or data egress.
  • Extreme-Context PICO Structuring: Leverages Apertus 1.5's massive 262k context window and native <|inner_prefix|> Thinking Mode to extract structured PRISMA metrics, study design, patient sample sizes, and Cochrane Risk-of-Bias 2 assessments.
  • Deterministic Bounding-Box Coordinate Lock: Solves the hallucination bottleneck. Every metric extracted by Apertus must return an exact verbatim quote from the text. A native Python layer (PyMuPDF) locates the exact page number and physical [x0, y0, x1, y1] bounding box coordinates in the PDF, highlighting the source text in bright yellow.
  • Automated Deliverables: Generates both a verified, PRISMA-compliant CSV matrix for immediate statistical analysis and visual Audit PDFs for human-in-the-loop verification.

How we built it

  • Sovereign LLM Engine: Powered by Apertus 1.5 (utilizing both hosted API endpoints and local 4-bit NF4 quantized weights via andreasmartin/apertus-v1.5-8b-text for air-gapped GPU deployment).
  • PDF Vectorisation & Verification: Built with PyMuPDF (pymupdf) to parse multi-page layouts and execute deterministic bounding-box annotation passes without file corruption.
  • Structured Schema Enforcement: Implemented strict Pydantic and JSON schema validation with thinking-trace separation.
  • Deployment & UX: Packaged as an on-premises Docker container launched via a simple make run command, featuring an interactive Gradio web dashboard.

Challenges we ran into

  • Incremental PDF Writing Collisions: PyMuPDF throws ValueError: save to original must be incremental when attempting to apply multiple highlight annotations to an open document. We engineered a single-pass multi-quote verification engine that buffers document mutations cleanly.
  • Apertus Thinking-Mode Extraction: Parsing structured JSON when the model generates <|inner_prefix|> reasoning traces required building custom regex sanitisers to cleanly decouple internal reasoning tokens from the final JSON payload.
  • Zero-Egress Containerization: Designing a lightweight Docker container that satisfies the Hack Apertus Track 2B mandatory target architecture (on-premises / air-gapped/sovereign cloud) while handling complex C-bindings for PDF rendering.

Accomplishments that we're proud of

  • Defeating the "Vegas Veto": Building a system where every single number in the final meta-analysis matrix is physically tethered to an auditable coordinate on the source PDF page.
  • Strict Architecture Compliance: Adhering strictly to the Hack Apertus Track 2B mandate: fully functional on-premise deployment via make run in Docker with a sub-100MB footprint.
  • Real-World Impact: Delivering a high-utility research tool that directly solves the literature review bottleneck for medical researchers, universities, and pharmaceutical teams.

What we learned

  • Sovereign, open-weight models like Apertus 1.5 with large context windows can match proprietary models on domain-specific document structuring when combined with rigorous schema enforcement.
  • Trust in medical AI cannot rely on probabilistic model confidence; it demands deterministic physical anchors back to source data.

What's next for Sovereign Systematic Review & Meta-Analysis Engine

  • Cross-Lingual Extraction: Expanding the pipeline to utilise Apertus's 1,811-language training to extract and synthesise non-English clinical trials (French, German, Spanish, Chinese) to eliminate language bias in global meta-analyses.
  • Interactive Coordinate Viewer: Building a dual-pane web UI where clicking any cell in the PRISMA table instantly scrolls the PDF viewer directly to the highlighted bounding box.
  • Automated Statistical Synthesis: Integrating an R/Python meta-regression module to generate forest plots and funnel plots directly from the extracted CSV matrix.

Built With

Share this project:

Updates

Submission history