Own Weights

Invoice data extraction for accounting firms

Which invoice fields to extract, how to score each one to the cent, what breaks in client files, and how to pilot on 200-500 of your own past invoices.

Updated

Part of: AI for accounting and bookkeeping firms

Invoice data extraction for accounting firms means turning each client invoice into a set of checked fields: supplier, invoice number, dates, currency, totals and tax lines, and later line items. A trained model can do this at volume, but it is only good enough when it scores well on your own past invoices, field by field, with amounts matched to the cent. A person still reviews the fields the model is unsure of before anything reaches the ledger.

This guide covers the field list, how to score it, what usually breaks, how review should work and how to run a pilot. For the wider picture of AI in a bookkeeping practice, start with the pillar guide, AI for bookkeeping firms.

Which fields matter, and how strict should each score be?

Not every field needs the same rule. A supplier name with a different abbreviation is a small problem. A total that is one cent off fails reconciliation. Set the rule for each field before you test anything.

Field What to extract Counts as correct when
Supplier name The legal or trading name of the issuer It matches your supplier list after normalising case and punctuation
Supplier tax number VAT, GST or TRN number of the issuer Every character matches
Invoice number The issuer’s own reference Every character matches, including prefixes and leading zeros
Issue date Date the invoice was issued Same day, month and year, whatever the printed format
Due date Payment due date, if printed Same date, or correctly marked not present
Currency The currency the invoice is priced in Same ISO code
Net, tax and gross totals The three headline amounts Match to the cent
Tax lines Rate and amount for each tax band Rate and amount both match, one row per band
Line items Description, quantity, unit price, line amount Quantity and amounts match; description is close enough to code the line

Header fields are where most of the value is, and they are the fastest to check. Line items are slower to label and harder to score, so add them in a second round.

How should you count errors?

For each field on each invoice, put the result in one of four buckets:

  1. Correct. The value matches the checked answer under the rule in the table.
  2. Wrong value. The model returned a value, and it is wrong.
  3. Not found. The field is on the invoice, and the model returned nothing.
  4. False find. The field is not on the invoice, and the model invented one, such as a due date on an invoice that has none.

Wrong values and false finds are the dangerous ones. They look like real data, so they can pass through review and post to the books. A missing field stops at review. Two models with the same overall accuracy can carry very different risk, so report all four buckets, per field. The scoring method is covered in more depth in LLM extraction accuracy.

A worked example (hypothetical numbers)

Say a firm tests 400 past invoices, and gross total is on all 400. The model gets 388 right, returns a wrong total on 4, and returns nothing on 8.

  • Accuracy on gross total: 388 of 400, or 97%.
  • Wrong values: 4 of 400, or 1%. These are the ones to chase.
  • Not found: 8 of 400, or 2%. These go to a person automatically.

If the firm’s rule is “no more than 1 wrong gross total in 500”, this model fails, even at 97% accuracy. Writing that rule down before the test is what makes the result honest. These figures are an illustration, not a result from any real test.

What usually breaks in real client files?

Clean single-page PDFs from large suppliers are rarely the problem. Errors cluster in a few places, so build your test set to include them on purpose.

  • Multi-page invoices. Line items run over two or three pages, and the totals sit on the last page under a “carried forward” line. Models often stop early or pick up a subtotal as the total. See long document extraction for how to handle length.
  • More than one currency. An invoice priced in US dollars can also print a local-currency tax amount. In Saudi Arabia, ZATCA’s invoicing guideline says invoice values “may be expressed in any currency” but “the amount of tax charged must be stated in Saudi Riyals”, converted at the Saudi Central Bank rate (ZATCA guideline, version 3, May 2026). A model that does not expect two amounts may return the wrong one.
  • Bilingual invoices. The same ZATCA guideline says invoices must be issued in Arabic “in addition to any other language”, that numerals may be written as “123456789” or “١٢٣٤٥٦٧٨٩”, and that numeric dates must be written day/month/year (ZATCA guideline). Date order, digit style and two versions of the supplier name all cause errors. Do not assume any model handles these well: put your own bilingual invoices in the test set and score them as a separate group. This is general information, not tax advice; check invoice rules with your tax adviser or counsel.
  • Scans and phone photos. Skewed, low-contrast or cropped images lose characters in tax numbers and invoice numbers first.
  • Credit notes and negative amounts. A credit note read as an invoice reverses the sign of the entry.
  • Several invoices in one file. A client uploads one PDF holding six invoices, and the model returns one.

How should the review step work?

The model does not post anything. It proposes values, and a person approves them. A workable flow looks like this:

  1. The model extracts every field and gives each one a confidence signal.
  2. Simple rules run next: net plus tax must equal gross, the tax number must have the right length, the date must not be in the future, and the invoice number must not already be on file for that supplier.
  3. Any field that fails a rule or falls below the confidence threshold goes to a reviewer, with the invoice image open beside it.
  4. Invoices with no flags go through, but a person checks a fixed sample of them every month, so you learn whether the threshold is set right.
  5. Every correction is saved with the invoice. Those corrections become the next round of training and test data.

Confidence scores are only useful if they are checked against real errors. LLM confidence scores explains how to set the threshold from your own results.

How do you pilot on 200-500 of your own invoices?

  1. Pick one client group. One industry or one set of suppliers with similar layouts. Do not start with your messiest client.
  2. Pull 200-500 past invoices that have already been posted. The ledger gives you a starting answer key, but a person should still check each field, since old entries carry old errors.
  3. Split by supplier. No supplier appears in both the training data and the test set. This is the only way the score tells you how the model handles a new layout.
  4. Write the rules down first. The field list, the match rule per field and the hard limits on wrong values, as in the example above.
  5. Score your current process. Whatever you use today, whether manual entry, an OCR tool or a general AI model, gets scored on the same test set. That is the bar to beat.
  6. Train and score the candidate. Run a handful of invoices end to end first, then the full test set.
  7. Decide from the four buckets, per field. If the candidate does not beat your current process on the fields that matter, it does not ship.

For how to build the test set itself, see how to build a test set. Before any client file leaves your systems, confirm where it is stored and who can read it; client data and AI for CPA firms lists the questions to ask.

What we do, and what we can show today

We post-train a private model on your own documents for one high-volume job, such as invoice extraction. It runs in your cloud, on your servers, or hosted privately by us, and you own the weights. Every project starts with a free AI cost audit and a test on your own invoices, using the method above. Nothing ships unless it beats the model or process you use today.

We do not yet have a public invoice result, and we will not quote one. We are building a public invoice test. Our published results are on other tasks: on the public Banking77 banking-intent test (1,000 messages, 77 intents), our trained model scored 93.3% accuracy against 87.6% for Claude Opus 5.5, 83.8% for Sonnet 5.5 and 81.2% for Haiku 5.5. Details are on the benchmark page. Those numbers show the approach can beat frontier models on a narrow task, but the only test that matters for your firm is the one run on your own invoices.

Questions

Which fields should an accounting firm extract from invoices?

Start with the header: supplier name, supplier tax number, invoice number, issue date, due date, currency, net total, tax total and gross total. Add tax lines and line items only once the header is scoring well, because they are harder and slower to check.

How should invoice extraction accuracy be measured?

Score each field separately against invoices a person has checked. Amounts count as correct only when they match to the cent. Keep a wrong value apart from a missing one, because a wrong value can post to the books unnoticed while a missing one stops at review.

How many invoices do we need for a pilot?

200 to 500 of your own past invoices with checked answers is enough to see whether a model is good enough for one client group. Hold them out by supplier, so the test never contains a layout the model trained on.

Does a person still need to review extracted invoice data?

Yes. The model fills the fields and flags the ones it is unsure of, and a person checks those flagged fields before anything posts. A sample of unflagged invoices should also be checked every month.