A card statement sorter for the accounts team
Company finance
Prospicience built a card statement sorter for a company accounts team. It reads bank statement PDFs and splits every line into company, personal and reimbursable, using saved rules first, past decisions second, and AI only for merchants never seen before. Refunds are netted so nothing is counted twice, and the finished Excel file is ready for accounts.

SpeedFirst version in two days
- sorting steps
- 3, cheapest first
- target time per statement
- under 2 minutes
- double-counted credits
- none allowed
- where the data lives
- on your own computer
- 01
Built a reader for statement PDFs from two banks
- 02
Designed a three step sorter
- 03
Paired each refund with its original charge and netted it out
- 04
Added a quick review screen for the few unknowns and a clean...
AI runs last, not first. Rules and past decisions handle most lines and cannot invent anything, and AI suggestions apply on their own only at high confidence, with everything else queued for a person. The result is cheap to run and easy to check.
The challenge
Every month, card statements from two banks had to be split by hand into company, personal and reimbursable lines, with refunds matched so nothing was counted twice.
Why it mattered
Manual splitting took accounts time every month and invited errors: a refund counted twice, or a personal charge booked to the company, goes straight into the books. Sending every line to an AI would have been costly and hard to audit.
What we built
- Built a reader for statement PDFs from two banks.
- Designed a three step sorter: saved rules first, then past decisions, then AI only for merchants it has never seen.
- Paired each refund with its original charge and netted it out.
- Added a quick review screen for the few unknowns and a clean Excel export for accounts.
The result
- Most lines sorted by rules and history, with no AI call at all.
- Refunds paired automatically, so no credit is counted twice.
- A finished Excel file for accounts, with a target of under two minutes per statement.
- Statements and data stay on the team's own computer.
Built for trust
AI runs last, not first. Rules and past decisions handle most lines and cannot invent anything, and AI suggestions apply on their own only at high confidence, with everything else queued for a person. The result is cheap to run and easy to check.
AI at work
AI sorts the card lines nobody has seen before, suggesting company, personal or reimbursable for each new merchant once saved rules and past decisions have handled the rest. The accounts team reviews the few unknowns and signs off the file.
What it produces
- statement lines sorted into company, personal and reimbursable
- suggestions for new merchants
- refunds paired with their original charge
- a finished Excel file for accounts
How it works, day to day
The team drops in statement PDFs from two banks. Rules and history sort what they already know, AI suggests the rest, and a person confirms the unknowns on one review screen before the Excel file goes to accounts. Everything stays on the team's own computer.
Where it saves time, and gets better with use
- Most lines are sorted by saved rules and past decisions, with no AI call at all.
- Once a merchant has been decided three times, that history becomes the default, so AI sees fewer lines as the months go by.
- Only confident suggestions apply on their own and the rest queue for one quick review, with a target of under two minutes per statement.
The technology
- Reads statement PDFs from two banks
- Sorts by saved rules first, then by what you decided before
- Only asks the AI about merchants it has never seen
- A quick review screen for the few unknowns, then a clean Excel file
- Runs on your own computer
- Claude Haiku (Anthropic)
Technical notes
- Three tier cascade: merchant plus amount band rules, then classification history at three or more prior decisions, then the model
- Model suggestions auto apply only at 0.8 confidence or higher, everything below queues for a person
- Refund credits paired to matching debits within one percent and netted out so nothing is double counted
- Local SQLite store, and the tool runs end to end with no API key configured
- A small fast model chosen deliberately, since it only ever sees the unknown remainder
Questions we get asked
- Should AI classify every transaction?
- No. Rules and your own history handle the large majority. The model sees only merchants nobody has classified before, which keeps the cost near zero and makes most of the output repeatable and checkable.
- Does our financial data leave the machine?
- Only unknown merchant lines are sent for classification, and the tool runs fully without an AI key if you prefer. The statements, the database and the Excel output stay on your computer.
- What stops a refund being counted twice?
- Each credit is matched to its original charge within a one percent tolerance and netted out. Double counted credits cannot pass the reconciliation step.
Related systems

Sales reports and a question-answering chat for a truck fleet
Mobile retail fleet selling uniforms at hospitals
Five reports and a chat that shows its working, on a 1 GB server.
$5.17Msales checked and balanced
Deploy-ready in one day

A factory's complete business system, with more than fifteen AI helpers built in
Transformer and brass parts manufacturer
One system runs the factory every day, with more than fifteen AI helpers.
177+database updates shipped
Shipping weekly releases

A filing assistant for a shared drive
Small business consultancy
New files read, named and filed by client, with nothing ever deleted.
Built in a day
