On this plate ProblemApproachResult
Follow one transaction
A shop it knows
- Has this person corrected one like it? Nothing
- Does its shape give it away? (a Bizum, a payroll, a cash withdrawal) Nothing
- A rule learned from everyone’s corrections? Nothing
- Is it a shop we know? Mercadona → Supermarket · 98% sure
- Does the card network’s shop code say? Skipped
- Is it a known subscription? Skipped
- Do its words say? (the tax office, a fee, interest) Skipped
- Like a transaction seen before? Skipped
- Ask an AI model, once (it may say it doesn’t know) Skipped
- A person reviews it Skipped
Result Supermarket Settled by a rule. No AI needed.
A tax payment
- Has this person corrected one like it? Nothing
- Does its shape give it away? (a Bizum, a payroll, a cash withdrawal) Nothing
- A rule learned from everyone’s corrections? Nothing
- Is it a shop we know? Nothing
- Does the card network’s shop code say? Nothing
- Is it a known subscription? Nothing
- Do its words say? (the tax office, a fee, interest) Names the tax office: Tax · 83%, under the 85% a rule needs
- Like a transaction seen before? Nothing
- Ask an AI model, once (it may say it doesn’t know) Tax · 92% sure, over the 90% the model needs
- A person reviews it Skipped
Result Tax The rules had a hunch; the model confirmed it.
A shop no one knows
- Has this person corrected one like it? Nothing
- Does its shape give it away? (a Bizum, a payroll, a cash withdrawal) Nothing
- A rule learned from everyone’s corrections? Nothing
- Is it a shop we know? Nothing
- Does the card network’s shop code say? Nothing
- Is it a known subscription? Nothing
- Do its words say? (the tax office, a fee, interest) Nothing
- Like a transaction seen before? Nothing
- Ask an AI model, once (it may say it doesn’t know) “I don’t recognise this shop.”
- A person reviews it Sent for review instead of guessed
Result Needs review Honest about what it doesn’t know.
Problem
SPRK makes a personal-finance app for Spain. It reads people’s bank transactions through Open Banking, and almost everything it offers (where the money goes, which subscriptions renew, what fixed costs are coming) depends on one quiet job: putting each transaction in the right category.
- MERCadOnA s.a. #2b1cC30 /BcN −198,04 € Supermarket by a shop it knows
- sQ *ENDeSA sa /e65ce9Z −109,27 € Home by a shop it knows
- ubER *B63a1d3 −170,22 € Transport by a shop it knows
- NomINA EMPrEsa s.L. +2.189,88 € Salary by its words
- retIRadA CAjeRo llc IdE9bEa −132,53 € Cash by its words
- BIZUM de Ana Fernandez +1.066,57 € Bizum by its shape
- REfund - aMAZON +185,60 € Refund by its shape
Banks don’t make it easy. Each line is a short, mangled piece of text, and the codes that should say “card payment” or “transfer” turned out to be almost the same for every transaction from a given bank. So the service trusts only what it can check, such as whether money came in or went out, and treats “unknown” as an answer, never an error.
Most spending goes to shops everyone knows. But about half of all transactions name small local businesses that no general AI model has ever heard of: the long tail.
Money in 5
- Salary
- Extra income
- Refund
- Gift
- Loan
Money out 21
- Supermarket
- Restaurant
- Subscriptions
- Transport
- Vehicle
- Shops
- Health
- Pharmacy
- Sports
- Leisure
- Clothing
- Accommodation
- Travel
- Personal care
- Home
- Insurance
- Education
- Debt
- Fees
- Tax
- Pets
Either way 5
- Bizum
- Transfer
- Investments
- Cash
- Other
The goal was explicit: settle as many transactions automatically as possible, while spending as little as possible on AI. I joined as the only engineer on the AI service. The prototype I inherited chained twelve decision layers in a single 830-line file; none of it survived unrewritten.
Approach
-
Rules
Instant, free, explainable. An answer must be at least 85% sure.
- Has this person corrected one like it?
- Does its shape give it away?
- A rule learned from everyone’s corrections?
- Is it a shop we know?
- Does the card network’s shop code say?
- Is it a known subscription?
- Do its words say?
-
Memory
Is it like a transaction seen before?
-
One AI question
With what is already known about the shop. It must be 90% sure, and may answer “I don’t know”.
-
A person
Nothing was sure enough: it goes to review, with a suggestion.
Rules first. They are instant, free and explainable, and they live as data anyone on the team can read: 458 known shops, 40 shop profiles, 36 kinds of bank wording and 97 card-network codes. They are checked every time the service starts, so a broken entry stops a release instead of mislabelling someone’s payment.
One AI question, allowed to say “I don’t know”. When no rule is sure enough, the service asks a model once, telling it what is already known about the shop. If the model is unsure or unreachable, the transaction goes to a person instead of waiting or guessing. Every call is cached, its cost recorded, and switched off automatically when a provider fails.
Two decisions I reversed
Before
Three AI models vote, and an arbiter picks the winner.
After
One model, given what is known, allowed to say “I don’t know”.
Voting only helps when the voters make different mistakes. On small local shops they all share the same blind spot, so agreement proved nothing.
Before
A learning model in the live path, needing ~100,000 labelled examples. There were ~7,500.
After
Trained offline, to switch on when there is enough data.
The arithmetic said it could not work yet, so it waits instead of guessing live.
How it learns from corrections
- You fix a categoryThe correction is saved on the transaction itself
- Twice the same fixIt becomes a rule for you, asked before anything else
- For everyoneRules learned from corrections are proposed for all users, and a person approves them
- Spot checks2 in every 100 automatic answers are re-checked
Built as a product, not a prototype. The service and the platform under it, a full AWS deployment defined in code, are mine end to end (on 29 October 2026, 1,860 of the repository’s 1,902 commits and all 52 of its written design proposals). Privacy shaped the design: personal data is encrypted, logs never contain names, each person’s data is walled off from everyone else’s, and a request to delete stops all processing at once.
Result
- 97%
- right on 500 deliberately hard test transactions
- 30 Oct 2026
- $0.10
- spent on AI per 1,000 transactions, every model call included
- Jun–Sep 2026, 10,480 transactions
- 0.3 s
- for the AI’s answer at the median, 0.9 s for the slowest 5%
- Aug 2026 benchmark
- 3 in 5
- transactions settled by clear rules, before any AI is asked
- 20 Aug 2026, 7,584 judged
- 0
- failures in 1,624 live AI calls over 62 minutes
- 20 Aug 2026
Where 7,584 judged transactions were settled · 20 Aug 2026
Asked about shops it had never heard of · 20 Aug 2026 recording
The result I value most is the measurement, because it produced the most useful and least flattering number of the project. In July, on a small, hand-picked set, the service looked 93% right. On 20 August, on all 7,584 judged transactions, it was 52%. Not a regression: the long tail. On the small set, 3.6% of transactions went to a person; on the full set, 37.8%.
That number pointed the work in the right direction. Three quarters of the manual reviews came from missing knowledge about shops, not from the model or from how sure it was. The model of the time agreed: allowed to say “I don’t know”, it did, 99 times in 100, and giving it more detail about each transaction changed nothing. The bottleneck is knowledge, not the model.
Every change is now tested against reality, for free. 1,624 model answers recorded on 20 August (62 minutes of live calls, without a single failure) replay exactly from the recording, at no cost. The first replay failed loudly, with 73 answers missing, and was reconciled before anyone trusted it. One change to how a winner is picked was shown to move just 9 of 7,584 answers, and shipped behind a switch that can be turned back without a release.
In August, where the model ran mattered as much as which model it was. The same open model scored 48% on one host that ignored the required answer format and 60% on one that enforced it; moving made a whole class of failures (16% of answers cut off mid-way) impossible.
On 30 October 2026, on 500 deliberately hard test transactions, the service got 97% right with its current model, Qwen3-32B on Amazon Bedrock, whose own answer takes 0.3 s at the median and 0.9 s for the slowest 5% (benchmark, August 2026).