Invoices in, structured data out
Challenge
Accounts payable keyed header fields and line items from PDF invoices by hand, across dozens of inconsistent vendor layouts. It was slow, it was error-prone, and it did not scale with volume.
Approach
We built a document-intelligence pipeline that reads each invoice with layout-aware extraction, pulls header and line-item fields, and validates them against the matching purchase order before anything posts. Anything below a confidence threshold drops into a human review queue — and reviewers' corrections are captured as labeled data, so the system's weak spots become its next round of training.
Architecture
PDF → OCR / layout parse → field & line-item extraction → purchase-order validation → review queue (low-confidence) → ERP
Python · layout-aware document models · FastAPI · PostgreSQL — confidence thresholds, human-in-the-loop review
Results
- Around 90% of line items extracted straight-through, the remainder reviewed*
- Every extraction validated against its purchase order before posting
- Reviewer corrections captured as labeled training data
* Illustrative figure from a representative engagement, shown to convey typical scope. Replaced with client-verified numbers before publication.