Snap a bill to a chat bot; it reads it, files it, and notifies the right tenant. The reading step was too important to guess, so four OCR routes went head to head and the best one won.
A property-management company handles a constant stream of utility bills and invoices for many tenants. Reading each one and typing its numbers into a spreadsheet is slow, repetitive, and error-prone, and a wrong number in a balance sheet is expensive.
The job is a perfect fit for automation, but only if the reading step is genuinely reliable. So reliability was treated as an evaluation problem, not a guess.
I designed and built the full pipeline for the client: the Telegram intake, the file-type routing, the multi-route OCR with evaluation-driven selection, the structured extraction into a typed schema, the tenant matching and ledger update, the notification step, and a natural-language query agent over the accumulated data.
It is the production plumbing (routing, async polling, idempotent file handling, refusal handling) that separates a demo from a system someone relies on.
The OCR read step is the make-or-break risk, so the OCR route is the one that won a head-to-head benchmark, not a default.
Four OCR and extraction routes ran against real bills, and the winner was chosen on measured results. Define what good output means, compare candidates against it, choose on evidence rather than reputation: the same discipline frontier-model evaluation requires.
Hosted OCR for both images and PDFs.
Document parsing for PDFs: async upload, poll, fetch.
Local OCR (Italian language), no API dependency.
Vision-model OCR, with a guard for model refusals.
A LangChain Information Extractor turns raw text into a consistent record: client and invoice number, amount, dates, category.
Processed files are moved and removed, so nothing is handled twice.
Long-running parses upload, wait, check status, and fetch without blocking.
Detects and routes around model refusals instead of failing silently.
Mistral, OpenAI, and local Tesseract behind one routing layer.
Answers natural-language questions over the ledger and writes summaries into Google Docs.
The client's bill handling moved from manual reading and typing to an automated, auditable pipeline: send a bill, and the data entry, tenant notification, and record-keeping happen on their own. The project shows applied document AI, real evaluation discipline in choosing the OCR approach, and the production engineering that makes such a system dependable.
I build document-AI pipelines with the evaluation rigor to make them trustworthy.