Topic 1 of 5 · 4 min read
Extracting invoice and receipt data
Goal: Check an AI extraction of five invoices against the source documents and find the misread figures and invented fields.
AI can read an invoice or receipt and fill a table for you, but every extracted figure is a guess until a check proves it. Treat the output as a draft that a person signs off, never as a record.
Check yourself · 1 of 3
An AI reads an invoice and returns net 500.00, tax 100.00 and total 650.00. What is the first sensible step?
Why it matters
Invoices arrive as PDFs, photos and scans in many layouts. Typing them in by hand is slow, so tools such as ChatGPT, Claude, Gemini and dedicated finance software read them for you. The risk is that a model reads a blurry 8 as a 6, swaps the day and month in a date, or fills a field the document never had. A wrong digit that posts to the ledger becomes a wrong payment or a wrong tax return.
How to do it
- Ask for fixed fields. Supplier name, invoice number, invoice date, due date, currency, net amount, tax amount, total. Tell the model to write "not found" for any field that is not on the page. This stops it inventing a purchase order number.
- Run the arithmetic yourself. Net plus tax must equal the total. Line items must add up to the net. Models read numbers as text and are weak at sums, so do this check with a spreadsheet formula or a calculator, not by asking the model again.
- Check the dates. Is 04/05/2026 the fourth of May or the fifth of April? Compare with the supplier's country and the due date. Ask for dates in one fixed form, such as 2026-05-04.
- Compare a sample to the source. Open the original for a few rows and every row above a set amount. Look at the digits, not at the summary.
- Look for repeats. The same supplier, number and total twice is a duplicate, even if the file names differ.
- Keep the source. Store the original file next to the extracted row so anyone can check later.
Before and after
Before: "Read these five invoices and give me the totals."
You get a tidy list, with no sign of what was uncertain, and it may include a tax rate the document never showed.
After: "For each invoice, return supplier, invoice number, date as YYYY-MM-DD, net, tax, total and currency. Write 'not found' for anything not printed. Add a column named 'unsure' listing any digit you could not read clearly."
Then check net plus tax against the total on every row.
What goes wrong
- A model reads a scan with low quality and silently rounds or swaps digits.
- A model fills a missing field, for example a tax number, with something that looks right.
- Totals that look correct hide a wrong tax rate, because only the total was compared.
Do not upload documents with bank details or personal data to a tool your company has not approved. See the skill on what not to upload.
Examples
A total that adds up but is wrong
An AI reads an invoice as net 1,200.00, tax 240.00, total 1,440.00. The sums agree. The paper invoice shows net 1,280.00. The model misread one digit and then calculated a matching total. Arithmetic checks catch many errors, but only the source document catches this one, which is why a sample is always compared to the original.
An invented field
The prompt asked for a purchase order number. The invoice has none. The AI returns PO-4471. Adding "write not found if it is not printed" to the prompt returns an empty field, and the clerk knows to ask the supplier.
Key points
- An AI extraction is a draft that a person checks, not a record.
- Net plus tax must equal the total, and the check should be done in a spreadsheet, not by the model.
- Asking for "not found" on missing fields stops the model from inventing values.
- Dates need one fixed format because day and month are easy to swap.
- Keep the source file beside every extracted row so the figure can be traced.
Common mistakes
- Asking the model to check its own sums instead of using a formula.
- Accepting a table with no column showing what was unclear.
- Checking only totals and never the tax amount or the date.
- Posting extracted rows without keeping the original file.
Check yourself · 2 of 3
You ask an AI to extract the purchase order number from an invoice that has none. What should a good prompt make the model do?
Check yourself · 3 of 3
An invoice from a UK supplier shows the date 03/04/2026. The AI returned 2026-03-04 for a UK invoice. Why check this?
Practice items, not counted towards your mastery.
Start here
- Generative AI guide (ICAEW) (opens in a new tab)DocsFree
Accountancy body guidance on using generative AI in finance work, with the checks and risks to expect.
- Statistical Forecasting: Notes on Regression and Time Series Analysis (Duke University) (opens in a new tab)CourseFree
Free course notes on simple forecasting models, the risks of forecasting and testing a model on held-back past data.
- Business Email Compromise PSA (FBI IC3) (opens in a new tab)DocsFree
Official FBI warning on the patterns and losses of payment-redirection scams.