‹ All projects
DesignLLM flows

Document extraction flow

Scanned bills to structured JSON, with schema checks and a review queue for anything uncertain.

The problem

Hospital bills are scanned, rotated and formatted differently by every hospital. Fixed templates break on each new layout.

How it works

  1. 01OCR
  2. 02Extract
  3. 03Validate
  4. 04Confidence check
  5. 05Review queue

What was hard

  • A confident wrong number is worse than a blank, so low-confidence fields go to a person.
  • The JSON is validated by code after the model answers — never trusted as-is.
  • Reviewer fixes are kept as labelled data, not lost.

The goal

People only review the fields that need it, not every document.

This is a design I worked out on paper — the problem, the approach and the trade-offs. It is not a shipped product.

Built with

OCRStructured outputJSON Schema