Skip to content
InvoiceLens
Benchmark method

Does a fine-tuned small vision model beat a frontier API on GST invoices?

Every backend reads the same held-out invoices through the same pipeline, prompt, validators and repair loop. This page explains how that is measured. Only numbers from a recorded run appear here, each with where it came from.

No benchmark results are published yet

The comparison needs paid API calls and a GPU training run, and none has been done. Results appear here only after evals/run.py has measured them; nothing on this page is estimated or typed in by hand.
The one measured result

OCR engine pilot

Before building the OCR plus LLM backend, two OCR engines were compared on how many of the label values they read. An LLM can only extract what the OCR actually read.

OCR pilot: share of key label values found verbatim in the OCR text, by engine
EngineDocumentsKey values recoveredSeconds per page
RapidOCR5099.2%2.18
Tesseract5083.3%0.79
Key values recovered by image degradation profile
ProfileRapidOCRTesseract
Clean100.0%89.0%
Office scan98.6%90.2%
Photocopy99.1%75.4%
Phone photo98.2%72.3%
Stained100.0%92.7%
Low light100.0%70.4%

Provenance Synthetic data Local CPU

Produced by evals/ocr_pilot.py --n 50 on 50 synthetic invoices, run once on the developer's laptop CPU. Committed as evals/results/ocr_pilot.json. Metric: the share of key label values (GSTINs, invoice number, HSN codes, line taxable values, totals) that appear verbatim in the OCR text. Seconds per page depend on that machine and are not a production latency. RapidOCR was chosen for the OCR plus LLM backend.

Method

How a run is measured

Test data

Synthetic invoices rendered from 25 HTML templates that imitate real Indian invoices: Tally prints, NIC e-invoice printouts, thermal receipts, bilingual Hindi letterheads, pharma distributor bills. Twenty templates are used for training; five are held out entirely, so the unseen-template score measures generalisation, not memory.

Pages are degraded the way real ones are: office scans, photocopies, phone photos with perspective and shadows, coffee stains, low light. Labels are exact by construction, and every synthetic invoice passes the validators.

A separate set of real invoices, redacted before storage, is used only for testing, never for training. A CI check fails if any of them appears in a training manifest.

Metrics

Field F1
Per header field, after normalising formats (ISO dates, amounts to 2 decimals, GSTIN case, place of supply by state code).
Line-item F1
Predicted and true rows are paired by description similarity and amount (Hungarian matching), then scored field by field.
Whole invoice right
Both GSTINs, invoice number, date, taxable value, every tax total and the grand total all correct.
Valid first pass and after repair
Share of extractions that pass every GST validator before and after the single repair attempt.
Cost per 1,000 invoices
Token usage times the provider's list price, or GPU-hour price over measured throughput. Cold starts are reported separately.
Limits

What this cannot tell you