The model reads, code decides
The LLM is told to transcribe figures exactly and never correct them. Arithmetic, date and completeness checks are deterministic TypeScript: same input, same verdict, explainable line by line to a reviewer or auditor. Model-described edit signals can only raise a warning, never reject.
How I'd evaluate it
A labelled set of real-world variants: phone photos, scans, crops, glare, and doctored figures. Field-level exact-match accuracy, plus the two numbers that matter to ops: the share of bad documents that slip through as auto-pass, and the share of good ones sent to review. Run it on every prompt or model change.
What production adds
A self-hosted model option so data stays in-country (BNM RMiT, PDPA). An immutable audit trail of input hash, model version, rule version and decision. A human review queue with reviewer feedback flowing into the eval set. Issuer templates and cross-checks against bank-statement credits.
Privacy, for real
The Worker holds the image in memory for one request only. No storage binding touches it, there is no console.log of content, and platform logs are switched off. The only state is two request counters (per IP, hourly; whole demo, daily) that hold no content and delete themselves when the window ends.