Home / Blog / Handwritten invoices and bills: the training data gap in document AI

Handwritten invoices and bills: the training data gap in document AI

Most public document AI datasets are printed receipts and forms, so models see few handwritten bills, phone photos taken at an angle, or crossed-out lines. Training on real handwritten documents, labelled at the line-item level with decisions recorded for corrections and ambiguous entries, closes much of that gap.

A lot of commerce still runs on paper: hand-written bills from wholesalers, carbon-copy receipt books, delivery notes with a total scribbled at the bottom. Small businesses photograph them on a phone and send them on. These are exactly the documents bookkeeping and expense tools need to read, and the ones models find hardest.

Why models struggle with them

The labels that matter

For extraction tasks, labels at the line-item level are far more useful than a single total:

{ "invoice_no": "0417", "date": "2026-10-03", "vendor": "[REDACTED]", "items": [ { "desc": "Rice 25kg", "qty": 4, "unit_price": 1150, "amount": 4600 }, { "desc": "Sugar 50kg", "struck_out": true } ], "total_written": 6440, "consent_ref": "src-0192 / v2" }

Two choices make labels much more useful: record struck-out lines rather than silently dropping them, and keep both the written total and any corrected total if they differ.

De-identification for business documents

Business documents contain personal and commercial identifiers: names of sole traders, phone numbers, tax registration numbers, bank details and signatures. These should be redacted in both the image and the text labels, and redaction should be checked on a sample by a person, because a missed number in a corner of a photo is easy to overlook.

Building the dataset

  1. Agree with the businesses that hold the documents, in writing, that they can be used for AI training.
  2. Photograph or scan them the way real users would, so the images match production conditions.
  3. Transcribe and label line items, then check against the original.
  4. Redact identifiers in image and text.
  5. Document coverage in a dataset card: trades, handwriting styles, image conditions and known gaps.

See the format

Datadhara licenses real invoices and bills from the businesses that issue them, labelled at the line-item level. See the document data page or download the free synthetic invoice sample.

Questions

Why is handwritten invoice extraction hard for AI?

Public training data is mostly printed documents, and real handwritten bills add phone-photo distortion, corrections, local abbreviations and arithmetic errors that models rarely see.

What labels should an invoice dataset have?

Line-item fields (description, quantity, unit price, amount), header fields such as date and invoice number, totals as written, and explicit flags for struck-out or corrected lines.

How do you de-identify invoices?

Redact names, phone numbers, tax and bank details and signatures in both the image and the text labels, then check redaction on a sample by hand.

Tell us what your models are missing

A few lines is enough: the domain, the format, and roughly how much.

Request data →