Invoice Extraction Pipeline
AI that reads invoices, and shows its working. An internal system that reads invoices, PDFs, photos, scans, and turns them into checked, structured records a finance team could rely on, with a human reviewing anything the system is not sure about.
- 01Document in
- 02Read
- 03Self-check
- 04Pass or flag
- 05Cost and history
In development, link coming soon
At a glance
- checked, not claimed
- Confidence
- human-reviewed
- Uncertain results
- per document
- Cost tracking
The challenge
What we were up against.
AI that reads documents is easy to demo and hard to trust: totals that do not add up, failures that slip through quietly, and no idea what the processing cost until the bill arrives. We built this pipeline as an internal study of what it takes to do it properly, as if it processed a real finance team's inbox, where a wrong number is worse than no number.
How we built it
The decisions that mattered.
The system is built on one idea: never take the AI's word for anything you can check. Every extracted invoice is tested against itself, do the line items add up to the subtotal, does the arithmetic hold, do the dates make sense, and its confidence score comes from those checks, not from asking the AI how sure it feels. Anything that fails a check is flagged for human review rather than quietly accepted. Simple, clean documents are processed quickly and cheaply, while difficult ones automatically get more careful treatment, and the exact cost of processing every document is recorded, so there are no surprises at the end of the month. Every step keeps its own history, so any document's journey can be traced and any step re-run.
- Reads invoices from PDFs, photos and scans
- The system checks the maths itself, it never trusts the AI's word
- Anything uncertain is flagged for a person, not silently accepted
- Simple documents are processed cheaply, difficult ones get more attention
- The cost of processing every single document is tracked
- A full history of what was read, checked and corrected
The pipeline
Never take the AI's word for what you can check.
- 01
Document in
PDFs, photos or scans.
- 02
Read
Simple documents are read cheaply; difficult ones get more careful treatment.
- 03
Self-check
Do the lines add up? Does the arithmetic hold? Do the dates make sense?
- 04
Pass or flag
Anything that fails a check goes to a person, not into the books.
- 05
Cost and history
The cost of every document is recorded, and every step can be traced and re-run.
What we learned
Never ask an AI how confident it is, measure it. Checking the maths caught the errors that mattered, and tracking cost per document changed how we designed the whole system. Both lessons now travel with us into every AI project.
Project facts
- Client
- Invoice Extraction Pipeline
- Industry
- Finance operations
- Our role
- In-house engineering, AI pipeline design
- Services
- AI IntegrationWeb Application
- Built with
- Next.jsTypeScriptZodClaudeSupabase
More work like this
