How to Use AI to Categorize Business Expenses
A model reading bank lines gets four in five right on the first pass. Here is how to measure that, raise it, and find the ones it got confidently wrong.
You can use AI to categorize business expenses accurately enough for management reporting, and not accurately enough for a tax return you sign without checking. That distinction is the whole job. A model reading bank descriptions will place roughly four in five transactions correctly on the first pass, get most of the rest nearly right, and be confidently wrong about a small stubborn set that costs more to find than the whole exercise saved. This is how to get the useful version and measure it.
Start with your chart of accounts, not the model's
The first mistake is asking a model to invent categories. You get "Software & Subscriptions" one month and "SaaS Tools" the next, and now nothing compares year on year.
Give it your actual list, with definitions and edge cases:
Categorise each transaction into exactly one of these accounts.
Use the account code, not the name.
6100 Software and subscriptions: recurring tools, per-seat licences,
cloud hosting. NOT one-off hardware.
6200 Professional fees: accountants, solicitors, consultants.
NOT contractors doing delivery work, that is 6250.
6250 Subcontractors: people doing billable client work.
6300 Travel: transport and accommodation for work.
Client entertainment is 6350, not travel.
...
If a transaction could plausibly belong to two accounts, return
the account you chose AND a field "ambiguous": true with a one-line
reason. Never guess silently.That last instruction is worth more than any model upgrade. Without it you get a clean-looking file with errors hidden inside. With it you get a shorter list to review by hand, which is the actual deliverable. It is the same principle as making AI say it does not know rather than filling the gap.
Give it more than the description line
A bank export line reading SQ *THE COFFEE 4412 is not enough context for anyone, human or model. Include, per row: date, amount, direction, merchant string, the account it hit, and if you have it, the previous category assigned to that same merchant.
That last field does most of the work. Once "AMZNMKTPLACE" has been categorised as office supplies three times, sending that history along turns a guess into a lookup. Build it as a merchant-to-account memory table and pass the matching rows in the prompt.
Run the accuracy audit before you trust anything
This is the step nearly everyone skips, and it takes twenty minutes once.
Take a completed, reconciled month you already trust.
Strip the categories out and run the file through your prompt.
Compare row by row. Record agreement as a percentage, and write down every disagreement.
Read the disagreements. Roughly half will be the model being wrong. The other half will be your own past inconsistency, which is a separate and more useful finding.
Anything above 90% agreement is a workable assistant. Below 80% means your category definitions are ambiguous, not that the model is bad. Fix the definitions and rerun before changing anything else.
Re-run this audit whenever you change the prompt, because prompt edits that read like improvements frequently are not. There is a proper method for checking whether a prompt change actually improved the output rather than trusting the first impression.
The five categories AI reliably gets wrong
From the disagreement lists, the same offenders show up:
Category | Why it goes wrong | The fix |
|---|---|---|
Meals: staff vs client | Same merchant, different tax treatment | Require an attendee count field, route anything ambiguous to review |
Capital vs expense | A £900 laptop looks like any other purchase | Add an amount threshold rule to the prompt, not to the model's judgement |
Owner drawings vs business spend | Indistinguishable from the bank line alone | Never let AI decide this one, hard-route the personal card |
Subcontractor vs professional fee | Both are people invoicing you | Definition must reference billability, not job title |
Refunds and chargebacks | Sign flips, the model categorises the merchant | Handle direction separately before categorisation |
Notice that four of five are solved by rules rather than by better prompting. Deciding what the model is not allowed to decide is most of the design.
Where this fits in the month
Run it after the bank feed imports and before reconciliation, not instead of it. The output is a first pass that turns a two-hour job into a twenty-minute review of flagged rows. It is a close cousin of the workflow in chasing late invoices with AI: the model drafts, a person approves, and the approval step is not optional.
Keep the flagged rows. After three months you have a labelled dataset of exactly the transactions your business finds ambiguous, which is far more valuable than the categorised file itself, and it makes forecasting demand or cash considerably less speculative.
One boundary worth stating plainly. Categorisation is bookkeeping, not tax advice. Whether a given expense is deductible depends on jurisdiction and circumstance, and it is not safe to take tax advice from AI without a professional check. The UK's HMRC guidance on expenses if you are self-employed is a reasonable starting reference for what is even in scope, and your accountant is the one who signs off.
For the wider picture of where this sits among other automations, AI for small business covers what to do first.
FAQ
How accurate is AI expense categorisation in practice?
On a reconciled month with clear category definitions and merchant history supplied, agreement in the high 80s to mid 90s is typical. Without merchant history it drops noticeably.
Should I send my bank data to an AI provider?
Check the vendor terms before you do, and strip account numbers and names you do not need. Amount, date and merchant string are usually enough to categorise.
Can it replace my bookkeeper?
No. It replaces the sorting part of their work and leaves the judgement, reconciliation and filing, which is where the risk sits.
What about receipts and attachments?
Vision models read receipts well enough to extract vendor, date, total and tax, and that extraction is more reliable than categorisation. Treat them as two separate steps with separate checks.
How did this land?
About the author

Developer Advocate
Steve builds something with Swarmz every week and writes up what worked, what broke, and what he'd do differently. Tutorials and hands-on guides are his lane.

