Document extraction

Extraction is where most agent money is made and lost. Made, because the manual version costs a person a day a week. Lost, because a wrong number entered confidently is worse than an empty field, and only one of those is easy to spot.

The job on one screen

Runs whenA document arrives by email, upload, or scan.
ReadsThe document, the target schema, and the vendor-specific quirks you have learned.
DecidesWhat each field is, how confident it is, and whether a human must check it.
ProducesA structured record with per-field confidence, plus the page region each value came from.
Stops whenAll required fields found above the confidence bar, or it escalates the document.
Tools it needsOCR, layout parser, schema validator, storage.
Autonomy to start atApprove. It does the work and stops before the irreversible step.

Optional: load a real model

Run it

The fields it pulls

Required fields are never guessed. If one is missing the run stops and a person gets the document, which is the difference between an extraction agent and a wrong database row.

FieldRequiredHow it is found
Invoice numberyes(?:invoice\s*(?:number|no|#)?[:\s]*)([A-Z0-9-]{4,})
Invoice dateyes(\d{4}-\d{2}-\d{2})
Totalyestotal[:\s]*([A-Z]{3}\s?[\d,]+\.?\d{0,2})
Taxoptional(?:vat|tax)[:\s]*([\d,]+\.?\d{0,2})
Purchase orderoptional\b(PO-?\d{3,})\b
Payment termsoptional\b(net-?\d+)\b

Where this one goes wrong

Confident misreads

A 3 read as an 8 in a total is invisible downstream. Cross-check totals against line items and reject on mismatch.

Template drift

A supplier redesigns their invoice and your extraction quietly degrades. Monitor per-supplier confidence over time.

Right value, wrong field

The tax amount landing in the total field passes every format check. Validate relationships, not just formats.

How you would know it is working

MeasureWhy that one
Straight through rateDocuments processed with no human touch. The saving lives here.
Field level accuracy on a sampleAudit fifty documents a month by hand, forever.
Escalation rate by supplierOne supplier eating your review queue is a template problem with a name.

Earning more rope

AssistExtract into a review screen where a person confirms each field.
ApproveAuto-accept fields above a confidence bar, review the rest. Where most systems live.
AutoStraight through for known templates with automatic reconciliation, escalating anything unusual.
Refusing to guess is the feature. Empty and flagged costs a minute of review. Confident and wrong costs a payment run and a hard conversation.

Related: Invoice matching · Spreadsheet cleanup · Contract review · all agent jobs · Agent Lab home

Free from AI School - no signup, everything runs in your browser.