Invoice Processing System: vision-model extraction with a human in the loop
Syed Ali Mehdi
Published
0
Reads invoices (PDF or image) with a vision model, pulls out the fields and line items, then checks the arithmetic: do the line items add up to the subtotal, does tax plus subtotal match the total.
The part that matters: an invoice that fails any validation check can never be auto-accepted. It goes to a human review queue with the reason attached. In my tests that rule held: zero bad invoices were auto-accepted. Extraction will always make mistakes; the system’s job is to make sure those mistakes get looked at.
Results land in SQLite. Bring your own model: Claude, OpenAI, Gemini or a local one.
Code: https://www.twine.net/signin