Skip to content
Neeraj Kumar
All work

Case study 04 · HostBooks · 2022 – 2026

Invoice processing: 30 minutes to 20 seconds

Rebuilt invoice processing from template-based OCR into a format-agnostic GenAI pipeline that reads any invoice layout without configuration and automates the AP/AR cycle from capture to payment.

Per invoice, down from 30 min
20s
Per invoice, down from 30 min
Accuracy
95%+
Accuracy
Templates to configure
0
Templates to configure

PaddleOCR · NER · LLM · FastAPI · PostgreSQL · React

The problem

Accounts payable teams entered invoices manually, at around thirty minutes per invoice. The first automated version, built in 2022, used PaddleOCR with template coordinate mapping: each vendor format was mapped to a template of field positions and validation rules.

It processed thousands of invoices a month, but each new vendor layout required a new template, which limited how far it could scale. Once LLMs were viable in production, the pipeline was rebuilt.

Scale & constraints

  • 01Thousands of invoices a month across enterprise clients
  • 02Any layout: handwritten, scanned, digital PDF or photographed
  • 03Multi-currency, multi-entity reconciliation
  • 04Extracted data must flow directly into accounting, compliance and reporting

Architecture

Version two removes templates. OCR extracts the text, NER identifies the fields, and an LLM validates the data, matches it against purchase orders and goods receipts, and flags anomalies. Business rules then route each invoice for approval and payment.

Input

Extraction

Understanding

Reasoning

Action

Configurable business rules

Step 1 of 5 · Input

Input

Invoices in any format, with no template required.

Select any component to explore it.

Key decisions

  1. 01

    Template-free extraction

    Instead of mapping fixed zones, version two extracts all the text and uses NER and an LLM to identify each field, so new layouts work without configuration.

  2. 02

    Separate extraction, recognition and reasoning stages

    PaddleOCR extracts text, NER structures it and the LLM validates it. Separate stages make each one easier to measure and replace.

  3. 03

    Confidence-based human review

    Confidence-scored validation flags discrepancies for human review; other invoices are processed automatically.

  4. 04

    Configurable approval rules

    Approval routing is driven by configurable business rules, so finance teams control who approves what.

My role

Built version one in 2022 as Chief Manager of Tech & Products, then led the move to the GenAI pipeline, shipped in January 2024.

Outcomes

  • Invoice cycle time reduced from 30 minutes to 15–20 seconds
  • 95%+ accuracy across formats
  • The full AP/AR cycle automated: capture, matching, approval routing and payment
  • Fraud detection for vendor-pattern anomalies, duplicates and unusual amounts

Next case study · HostBooks ERP Suite

Building the HostBooks ERP platform