Skip to content

Document AI that extracts the data, so nobody has to retype it

A document processing system that pulls tables, key terms and metadata out of scanned PDFs, and calls in a human reviewer only when a value is in doubt.

Inbox · today41 held
Every vendor document that arrived on 09/17/2026, as of 11:42 AM · read, checked, then posted or held with a reason
Open review queue Thu, 09/17/2026MO
In today1,204Email, scan, fax and portal
Posted1,151Every field above its floor
Held back41Waiting for a person
Reading now12OCR and vision passes
Scans & faxes402About a third of arrivals
Vendors today137Each on its own layout

Arrivals

Newest first · 11 of 1,204
ArrivedDocumentTypeSourceOutcome
11:42 AMKestrel Office InteriorsD-88214 · 1 pgInvoiceEmail PDFReadingVision pass
11:41 AMBellwether Freight Co.D-88213 · 2 pgInvoiceFaxHeldDue date · passes disagree
11:41 AMNorcrest Facilities ServicesD-88212 · 1 pgInvoiceEmail PDFPostedJE-240917-0388
11:40 AMCorliss Paper & SupplyD-88211 · 1 pgStatementScanHeldRow 6 date · failed validator
11:40 AMTidewell Legal SearchD-88210 · 3 pgInvoicePortalPostedJE-240917-0387
11:39 AMAmbrose Data RoomsD-88209 · 14 pgContractEmail PDFPostedKey terms · 9 fields
11:39 AMPellham CouriersD-88208 · 1 pgInvoiceScanHeldBank details changed · a person
11:38 AMGreyfield IT ServicesD-88207 · 2 pgInvoiceEmail PDFPostedJE-240917-0386
11:38 AMMarlow CateringD-88206 · 1 pgInvoiceFaxHeldTax · below floor (0.83)
11:37 AMStanhope Archive StorageD-88205 · 2 pgStatementPortalPostedJE-240917-0385
11:37 AMQuarry Lane PrintD-88204 · 1 pgInvoiceScanPostedJE-240917-0384
Posted documents carry their journal entry. Held ones say which field, and why.

Held back

41 of 1,204
41documents, four reasons3.4% of today
Passes disagree13OCR and vision read different values
Failed its validator12A date that won't parse, a total that won't add
Below the field's floor9Readable, not certain enough to post
Always a person7Bank details changed · hand-filled forms
Oldest waiting
Bellwether Freight Co.Due date · passes disagreeD-88213
Corliss Paper & SupplyRow 6 date · failed validatorD-88211
Pellham CouriersBank details changed · a personD-88208
Work the queue J

The shape of the work

Industry
Professional Services
Duration
12 weeks
Cooperation model
Fixed price, phased
Services
Document AI engineReviewer UIWorkflow integration
Integrations
HubSpotDocuSignXeroGoogle Workspace
Technologies
PythonFastAPITesseract OCROpenAI GPT-4oPostgreSQLReact
Team
1 Project lead1 Product designer1 ML engineer1 Backend engineer1 Data engineer1 QA engineer

Client name withheld under NDA. Engagement details are shown to the extent our agreement permits.

Introduction

What we were brought in to do

Staff spent hundreds of hours typing data from vendor invoices and contracts. We built a Document AI engine that extracts key data automatically.

A professional services firm processing around a hundred thousand vendor documents a month (invoices, contracts, statements) through a team whose entire job was reading them and typing the figures into a system. Roughly a third arrived as scans, some of them faxes. The engagement was commissioned when that team's headcount became the constraint on taking more clients.

AI & Automation

Where the old way broke

Scanned PDFs and inconsistent document formats forced staff to retype figures by hand, slowing operations and letting errors into the data.

The documents had no common format: two hundred vendors, each with their own layout, some changing it without notice. Plain OCR had been tried and failed on the scans, and the failure was silent. It returned confident text that was wrong, which is worse than returning nothing, because the errors reached the database and turned up in reconciliation weeks later.

We built a multi-stage Document AI pipeline combining OCR with LLM extraction, adding a visual exception review queue for low-confidence fields.

01

Layout-Aware OCR & Vision Pipeline

Extracts key-value fields and table data from scanned PDFs, images, and digital documents.

Pages go through Tesseract with layout analysis first, so tables come back as tables and a key-value pair keeps the geometric relationship that makes it one. The vision model reads the page image alongside the text, and that second read is what recovers fields from a bad fax that OCR alone loses. Every extracted value keeps the bounding box it came from.

What shipped
  • Layout-aware OCR: tables stay tables
  • Vision model run alongside the text, as a second read
  • Every value keeps the bounding box it was read from
D-88213 · Bellwether Freight Co. · BF-20931Held · due date
Faxed, 2 pages · read by layout-aware OCR and a vision pass on the same page image · every value kept with its box
Show word boxes Thu, 09/17/2026MO
What Clerkstone knows about this vendorBellwether layout v2 · learned from 318 documents · terms on file Net 30 · fax cover page skippedStill can’t read reliablyDue date on faxed copies · the stamp overprints it

Page 1 of 2

OCR boxTable region
SEP 01 2026 07:12AM BELLWETHER FRT 312 555 0148 P.01/02
BELLWETHER FREIGHT CO.2240 S. Canal Street · Chicago, IL 60616INVOICEInvoice no.BF-20931Invoice date08/31/2026TermsNET 30Due date09/30/2026RECEIVEDBILL TOHarlan & Voss AdvisoryAccounts Payable · 400 E. Broad St, Columbus, OHPO: 4410-2287DESCRIPTIONQTYRATEAMOUNTLinehaul, Chicago IL → Columbus OH31,840.005,520.00Fuel surcharge (18.5% of linehaul)11,021.201,021.20Liftgate delivery395.00285.00Detention, hours2.585.00212.50Subtotal7,038.70Tax0.00TOTAL USD7,038.70REMIT TOFirst Lakeshore Bank · ABA ••••0412 · Acct ••••7719Questions about this invoice: billing desk, 8am–5pm CT.
passes disagreetable · 4 rows

Read twice, kept in place

OCR and vision on the same image · one box per value
OCR pass · character confidence Vision pass · page image
FieldOCR passVision passBox · p, x, y
VendorBELLWETHER FREIGHT CO.0.94Bellwether Freight Co.p1 · 48, 52
Invoice numberBF-209310.91BF-20931p1 · 430, 64
Invoice date08/31/20260.8808/31/2026p1 · 430, 84
Payment termsNET 300.90Net 30p1 · 430, 104
Due date09/30/20260.6109/20/2026p1 · 430, 124
Subtotal7,038.700.937,038.70p1 · 470, 520
Tax0.000.950.00p1 · 470, 540
Total7,038.700.907,038.70p1 · 470, 562
Line items · came back as a tablep1 · 44, 226 · 4 rows × 4 colsLinehaul, Chicago IL → Columbus OH31,840.005,520.00Fuel surcharge (18.5% of linehaul)11,021.201,021.20Liftgate delivery395.00285.00Detention, hours2.585.00212.50
On screen

A faxed invoice read twice: layout-aware OCR and a vision pass on the same page image, each value kept with its box, the line items returned as a table, and the one field where the passes disagree boxed in place.

Vendor invoice schema12 fields · v7
What each field must satisfy, the floor it must clear to post itself, and where it goes when it doesn't
Version history Thu, 09/17/2026MO
How a field is scoredscore =0.4 × OCR character confidence+0.6 × passes agreeCapped at 0.20 when the field’s own validator fails, however sure either pass is.The model's own token probability isn't the score: a date that won't parse scores low.Floors set per field typeText 0.85Identifier 0.92Date 0.90Amount 0.95

Fields

Above the floor syncs automatically · the rest queue
FieldTypeValidatorFloorFallback
VendorTextMatches vendor master0.85Match on remit-to address
Invoice numberIdentifierUnique for this vendor0.92Review queue
Invoice dateDateParses · not in the future0.90Review queue
Due dateDateInvoice date + terms0.90Derive from date + terms, then review
PO numberIdentifierOpen PO for this vendor0.92Match on vendor + amount
Payment termsTextKnown terms code0.85Vendor's terms on file
CurrencyCodeISO 4217 code0.85Vendor's currency on file
Line itemsTableQty × rate = amount, per row0.93Row-level review
SubtotalAmountSum of line amounts0.95Recompute from lines
TaxAmountRate on file × taxable lines0.95Review queue
TotalAmountSubtotal + tax0.95Recompute, then review
Remit-to bank detailsBank detailsCompared with details on file NeverAP lead confirms · never written from a document
Auto-approved field accuracy 99.1% · field-level, hand-labeled sample drawn after launch, review queue excluded

One field, three inputs

Same schema, two documents
Invoice dateNF-4471 · email PDFOCR character confidence0.98Vision pass agrees09/01/2026Validator: parses, not futurepass0.99floor 0.90Above the date floor · synced
Row 6 dateD-88211 · scanOCR character confidence08/2_/2026 · 0.31Vision pass agrees08/23/2026Validator: parses, not futurefails0.12floor 0.90Capped by its validator · queued
On screen

The vendor invoice schema: twelve fields, each with a validator, a floor set by field type and a named fallback, bank details that never post themselves, and two dates scored from OCR confidence, agreement and their validator.

02

Confidence Scoring Engine

Assigns probability scores to extracted fields, auto-approving high-confidence data.

Confidence isn't the model's own token probability, which is a poor proxy. It combines OCR character confidence, agreement between the text and vision passes, and whether the value satisfies the field's own validator: a date that doesn't parse scores low however sure the model is. Fields above threshold sync automatically; the rest queue. The threshold is set per field type, never globally.

What shipped
  • Composite score: OCR, cross-pass agreement, field validation
  • A value that fails its own validator scores low regardless
  • Thresholds set per field type, never globally
Review · D-88211 · Corliss Paper & Supply1 field held
Supplier statement, scanned · the page and its extraction side by side, the doubted field highlighted where it sits
Accept & post Thu, 09/17/2026MO
3 of 41 in queueJK next / previous documentTab next held field⏎ accept valueE editR route to AP leadNext: Pellham Couriers · bank details changed

Original · page 1 of 1

Scan · 300 dpi
Corliss Paper & Supply118 Mill Race Road · Dayton, OH 45402STATEMENTAccount HV-00412Period 08/01/2026 – 08/31/2026STATEMENT FORHarlan & Voss AdvisoryAccounts Payable · Columbus, OHOpening balance1,240.00DATEREFDESCRIPTIONCHARGESPAYMENTSBALANCE08/03/2026INV 55102Copy paper, 40 cases1,396.002,636.0008/07/2026PMT 7781Payment received, thank you1,240.001,396.0008/11/2026INV 55188Toner, 12 cartridges1,068.002,464.0008/14/2026INV 55203File folders, archive boxes412.502,876.5008/19/2026CR 1044Credit, damaged cases104.702,771.8008/23/2026INV 55261Copy paper, 20 cases698.003,469.8008/27/2026PMT 7802Payment received, thank you1,396.002,073.8008/29/2026INV 55290Envelopes, labels236.402,310.20Column totals3,810.902,740.70CLOSING BALANCE2,310.20Please quote account HV-00412 with every remittance.row 6 · datetotals recomputed

Extraction

Statement schema · 8 rows · 1 held
VendorCorliss Paper & SupplyAccountHV-00412Opening$1,240.00Period08/01/2026 – 08/31/2026Rows8 transactionsClosing$2,310.20
Column totals recomputed cleanlyCharges 3,810.90 · payments & credits 2,740.701,240.00 + 3,810.90 − 2,740.70 = 2,310.20 = printed closing
#DateRefChargePayment
108/03/2026INV 551021,396.00—
208/07/2026PMT 7781—1,240.00
308/11/2026INV 551881,068.00—
408/14/2026INV 55203412.50—
508/19/2026CR 1044—104.70
608/2_/2026INV 55261698.00—
708/27/2026PMT 7802—1,396.00
808/29/2026INV 55290236.40—
Row 6 · date · a staple covers the dayscore 0.12 · floor 0.90OCR 08/2_/2026 · 0.31 · won’t parseVision 08/23/202608/23/2026between rows 5 and 7Accept Your correction is saved against this vendor's layout as training signal.
03

Exception Review Workspace

On screen

A supplier statement in review: the page beside its extraction, column totals recomputed cleanly, and the one date a staple obscured highlighted where it sits, with the reviewer's keyboard shortcuts along the top.

Visual audit tool for human review of low-confidence entries before system sync.

The reviewer sees the page and the extraction side by side, with the disputed field highlighted in place on the original. The whole job is comparing two things, and a form that made you hunt for the source was why the previous queue was ignored. Corrections write back as training signal, and keyboard-only operation was a requirement for a queue worked all day, not a nicety.

What shipped
  • Page and extraction side by side, field highlighted in place
  • Corrections captured as training signal
  • Fully keyboard-operable, because it's worked all day

What we built together

04
  1. 01

    Benchmarked extraction accuracy across historical document types

    The benchmark set the target and, more usefully, identified which document types were hopeless and should route to a person by default.

  2. 02

    Built a hybrid OCR and vision LLM extraction pipeline

    Pages go through layout-aware OCR and a vision model on the same image, which is what recovers fields from a bad fax that text extraction alone loses.

  3. 03

    Designed a reviewer UI for approving flagged exceptions

    Confidence combines OCR character confidence, agreement between the two passes, and whether the value satisfies its own field validator. A date that won't parse scores low.

  4. 04

    Connected structured output straight into internal databases

    Structured output writes straight into the internal database with the source bounding box retained, so a disputed figure can be traced back to the pixel.

Outcome

Operational results after launch

−85%

Data entry time cut

99.1%

Extraction accuracy

100k+

Monthly docs processed

Data entry time is the firm's own labor figure for the processing team, comparing the quarter after launch with the quarter before. Extraction accuracy is field-level, measured against a hand-labeled sample drawn after launch (not the benchmark set), and counts auto-approved fields only. The review queue is excluded because a human checked those.

Client name withheld under NDA. Figures are approximate, drawn from the engagement’s own reporting.

Process

Phase by phase

  1. Phase 1: Unstructured Document Audit

    PDF Layout & Scan Quality Analysis

    Audited complex PDF invoices, contracts, and scanned forms across various layouts and scan qualities.

    • PDF Layout Benchmark
    • OCR Quality Metric
    • Data Schema
  2. Phase 2: Hybrid OCR & Vision Parser

    Layout-Aware Extraction Engine

    Engineered a multi-stage parser combining layout-aware Tesseract OCR with GPT-4o vision extraction.

    • Vision Extraction API
    • Confidence Scoring Pipeline
    • Table Parser
  3. Phase 3: Verification & Exception Queue UI

    Human Reviewer Interface

    Designed a reviewer interface highlighting extracted key-value pairs and flagging low-confidence values for quick manual review.

    • Exception Reviewer UI
    • Audit Trail Log
    • Annotation Tool
  4. Phase 4: Production Rollout & Throughput

    High-Volume Processing Pipeline

    Processed 100,000+ monthly documents with 99.1% extraction accuracy and zero database sync errors.

    • Production Pipeline
    • SLA Monitoring Dashboard
    • System Clearances
D-88212 · Norcrest Facilities Services · NF-4471Posted
Arrival to posted journal, every step stored with the record so the posting can be traced and reversed
Reverse posting Thu, 09/17/2026MO
Arrival → journal16.0 s11:41:01 AM → 11:41:17 AM
Fields12 of 1211 above floor · bank matched on file
Totals recomputed$3,059.923,042.40 + 17.52 tax
JournalJE-240917-0388Posted to AP ledger · reversible

Every step, stored

Seconds from arrival
0s4s8s12s16s
+0.0ReceivedAP inbox · 1-page PDF with text layer · from a known senderoriginal.pdf · sha256 9f2c…e41a
+0.3ClassifiedVendor invoice · Norcrest Facilities Services · layout v3classification.json
+0.7Page renderedPage image at 300 dpi for both passesp1.png
+4.2OCR passLayout analysis · 212 words · 1 table of 3 rows kept as a tableocr.json · boxes per word
+9.8Vision passSame page image · 12 fields read alongside the textvision.json · boxes per field
+10.4Passes compared12 of 12 fields agree after normalizing case and spacingagreement.json
+10.9Validators runTotals recomputed: 3,042.40 + 17.52 = 3,059.92 · due = 09/01 + Net 15validators.json
+11.3Scored11 fields above their floors · bank details matched on file, not writtenscores.json
+14.6SyncedAP ledger rows written with source box per value · 0 sync errorsap_invoice 71204
+16.0Journal postedJE-240917-0388 · reversible from this recordjournal_entry · reversal key

Journal entry

JE-240917-0388 · 09/17/2026
AccountDebitCredit
6420Facilities · janitorial2,450.00
6425Facilities · window cleaning380.00
6430Office consumables229.92
2000Accounts payable · Norcrest3,059.92
Balanced3,059.923,059.92
Each line keeps the page box its amount was read from

Reverse this posting

From the stored record
Writes a reversing entry, returns the invoice to the review queue and keeps every artifact below.original.pdfocr.json · vision.jsonagreement.json · validators.jsonscores.jsonap_invoice 71204 · journal_entry Reverse JE-240917-0388
On screen

Sixteen seconds from arrival to a posted journal: each step from the OCR and vision passes to validators and sync stored with the record, the balanced entry, and the reversal that record makes possible.

About our collaboration

  • A cross-functional team of 6 worked on a fixed price, phased basis over 12 weeks, covering Document AI engine, Reviewer UI, Workflow integration. We held a standing mid-week checkpoint and wrote decisions down in place of status meetings. Nothing shipped without a live demo first.

    Accuracy was benchmarked against a hand-labeled sample of historical documents before anything was built. That set the target and, more usefully, showed which document types were hopeless and should go to a person by default. The phases were drawn so the reviewer queue shipped before full automation: nothing was ever extracted without somewhere for the doubtful cases to go.

What we'd carry into the next one

03
  1. 01

    Automated document parsing cut manual data entry processing time by 85%.

    The saving was the typing, not the reading: staff still see the exceptions, and the exceptions are where judgment was always needed.

  2. 02

    Hybrid vision OCR achieved 99.1% extraction accuracy across noisy scanned PDFs.

    The two passes disagree in exactly the cases that matter, which is why disagreement feeds the confidence score instead of being settled by picking a winner.

  3. 03

    Visual exception reviewer allowed staff to audit low-confidence fields in seconds.

    The reviewer is fast because the page and the extraction sit side by side with the field highlighted in place. The previous queue was ignored because it made you hunt.

One invoice, three checks

Held or posted is a sum you can read. The model doesn't get the final say.

Take a faxed freight invoice and an emailed one through what decides their fate: what both passes read, whether the totals recompute, and each field's score against its floor. Switch documents and tabs, or use the arrow keys once a tab is focused.

Document
D-88213 · Bellwether Freight Co. · 2 pages

7 of 8 fields agree · due date does not

Field OCR passCharacter confidence Vision passAgree
VendorBELLWETHER FREIGHT CO.0.94Bellwether Freight Co.
Invoice numberBF-209310.91BF-20931
Invoice date08/31/20260.8808/31/2026
Payment termsNET 300.90Net 30
Due date09/30/20260.6109/20/2026
Subtotal7,038.700.937,038.70
Tax0.000.950.00
Total7,038.700.907,038.70

Both passes read the same page image, and every value keeps the box it came from. Where they differ is exactly where a faxed copy is hardest to read, so the difference is carried forward as evidence instead of settled by picking a side.

Illustrative mechanism: score = 0.4 × OCR character confidence + 0.6 × agreement, capped at 0.20 when a validator fails; floors of 0.85 for text, 0.92 for identifiers, 0.90 for dates and 0.95 for amounts. The weights and floors are chosen for the example; the documents and amounts are invented.

Architecture

From a faxed page to a figure you can trace back to it

Python and FastAPI run the passes and the scoring, PostgreSQL holds the output, and reviewers work in a React interface. Nothing syncs without either a score above its threshold or a person who has looked.

  1. 01 · Arrive
    Invoices, contracts, statementsScanned PDFs, faxes, images and digital documents from about two hundred vendor layouts enter one pipeline.
  2. 02 · Read
    Layout-aware OCR + vision passTesseract with layout analysis keeps tables as tables; a vision pass reads the same page image alongside it. Every value keeps its bounding box.
  3. 03 · Score
    Composite confidenceOCR character confidence, cross-pass agreement and the field's validator, against a threshold set per field type.
  4. 04 · Review
    Exception queueBelow-threshold fields queue with the page beside them, fully keyboard-operable; corrections are captured as training signal.
  5. 05 · Sync
    Internal databaseStructured output written with the source box retained. Zero database sync errors at 100,000+ documents a month.

No confident wrong numbers

Doubt queues, figures trace back, hard cases go to people

Confidence the model can't fake

A score combines OCR character confidence, agreement between the text and vision passes, and the field's own validator. A date that won't parse scores low however sure the model is, and anything under its threshold queues instead of syncing.

Every figure traces to the pixel

Structured output is written to the internal database with the bounding box each value was read from, so a figure disputed in reconciliation goes straight back to the place on the page it came from.

Some documents always get a person

A benchmark on hand-labeled historical documents showed which types were hopeless, and those route to a reviewer by default. The review queue shipped before full automation, so doubtful cases always had somewhere to go.

Still typing figures from scanned invoices and statements into a system by hand? Scope your build in three minutes.

Scope your build
Have a project?

Let's talk

Running a large platform, shaping a first MVP, or getting a product ready for a funding round? Tell us where you are. We'll shape the process around it, and stay with you after launch.