Problem
M.Video-Eldorado wanted electricity, water and heat consumption for each of its 1,200+ stores, with seasonality. Landlords send utility documents in mixed formats: formal UPDs, informal invoices and scans of acts, often at an angle or of poor quality. A formal universal transfer document (UPD) can say only "variable part of rent for February 2023". A specialized OCR vendor returned any result in only 30% of cases, and personal data in many documents cannot go to foreign services.
Example from the article: a poor scan of an electricity invoice was converted by GPT into JSON with quantity, price and amount, with some digits wrong (marked red).
Solution in brief
The team built a test set of 210 verified documents and compared GPT-4o-mini with local Llama 3.2 vision models on the same prompt that returns JSON. GPT-4o-mini read most fields well but lost table rows in about 75% of documents, and Llama was far worse. The author concludes that specialized OCR is still more predictable.
Questions this case answers
- How to extract structured tables from heterogeneous scanned documents when a template-based OCR vendor covers only a minority of formats
- How to choose between a cloud multimodal model and a local open model for document extraction when personal data must not leave the company
- How to turn scanned utility bills and acts in many formats into structured per-resource consumption data?
- How to compare vision-language models against a specialized OCR vendor on our own documents?
Tools and methods
- GPT-4o-mini — multimodal model that converts scans into JSON (best result in the comparison)
- Llama 3.2 vision (11b, 90b) — local models tested for data-privacy reasons
- Single-shot, few-shot, cascade (Llama extracts, GPT processes) — experiment ladder; fine-tuning was not completed
- Test set with confusion matrices and per-field accuracy — evaluation of every field
Google or a one-time email code. No password.
