Invoice extraction pipeline for Cargolane
LLM-based extraction of line items from invoices in any layout, with validation and human review. A case study by Rahul Mehta, Machine Learning Engineer (LLMs & RAG).
Challenge
Cargolane, a warehouse operator, typed thousands of supplier invoices into their accounting system every month. Template-based OCR broke whenever a supplier changed layout.
Solution
I built a pipeline combining OCR, a vision-capable language model with a strict JSON schema, arithmetic and supplier validation, and a review queue for low-confidence fields.