Document Check

Payslip & bank statement check

A vision model reads the document. Deterministic rules check the numbers. A person makes the call on anything that doesn't add up.

Try it

One click, no upload needed

Nothing is stored. The image is processed in memory for one request (inference on Cloudflare Workers AI) and discarded. No content is logged. Names and account numbers are masked before results leave the server. Samples are synthetic. If you upload, use a redacted document.

How it's built

  1. BrowserResize to ≤1600 px, send image
  2. Cloudflare WorkerSize, type & rate limits
  3. Vision modelMistral Small 3.1 on Workers AI reads fields
  4. Schema validationZod. Retry once, else human review
  5. Rule checksPlain code, auditable verdict

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.