Hire developers Community Blog Find a dev job Log in
Close menu
Tech insights: ​​How to Categorise Your Bank Transactions Using AI
Less noise, more data. Get the biggest data report on software developer careers in South Africa.

​​How to Categorise Your Bank Transactions Using AI

11 October 2022, by Shannagh Hare

Vutlhari Rikhotso has come up with a nifty way to categorise your transaction data using a trained AI model, all from within a spreadsheet. Check out the demo here.


Tackling the issue of uncategorised transactions

Spreadsheets are marvellously useful things. Their simple but effective visual representations of data make them great for tracking sales, calculating hours worked, stock-keeping, drawing up budgets, creating mailing lists and a host of other everyday activities.

Vutlhari Rikhotso (VT), co-host of ZATechRadio and Programmable Banking community member, certainly likes spreadsheets. However, he felt the average spreadsheet could use a little help when it came to making sense of your financial transactions. “Being able to see your transactions from right within Excel is very powerful,” says VT. “But it’s still hard to get real insights when those transactions aren’t labelled. That’s just not using the full power of Excel!”

VT used a rule-based engine running locally on Excel to label his transactions, and it was doing a fair job. The problem occurred to him when he created a pie chart from his banking spreadsheet.

“I could see my expenses related to rent and utilities, transportation, entertainment, loan payments, food and drink, and so forth, but I was bothered by the biggest slice of the pie: uncategorised expenses.”

The simple engine struggled with more esoteric transactions. VT realised that even if he were to keep adding merchants, the number of these he encountered would grow exponentially.

A smarter way of categorising transactions

VT decided there must be a better way to leverage the capabilities of spreadsheet banking better. “So I did what anyone else would do: I started looking at AI.”

Using OpenAI’s GPT-3 API, he began feeding it examples with their categories and then letting it categorise others. He saw some progress.

“The problem with this was that it was expensive,” says VT. “I maxed out two OpenAI accounts in the process of making the thing by feeding it examples one at a time.”

It occurred to him that he had already spent some time classifying his Investec transactions, so he exported that data as training material for the AI. Using a prompt to make the connection between a transaction and its category, he trained the AI using his own data. It got better, and it got much cheaper too – from around R2 per transaction down to roughly a cent.

“The most interesting thing I found was that the model isn’t limited to one label,” says VT. “With the same training set, you could tell it who the merchant is, attach an emoji or similar to it, and pull it back into Excel to use just like any other formula. I’m going to continue working on that.”

Accelerating the pace of learning

FireID startup advisor Pieter Heyns sees potential for the tool to save a lot of time. “One of an accountant’s biggest jobs is trying to classify transactions. There’s a base of standard transactions you don’t have to think too much about, but which you still have to name and classify. So I think that being able to train an AI model to classify transactions automatically, updating itself if you change the classification, it’s really interesting and potentially quite powerful.”

Devina Maharaj, Programme Head for Investec Business Online and API Banking South Africa, says the uncategorised section of the pie is something that even the large data aggregation players like Yodlee have struggled with for years. “Personal financial management tools don’t really recognise names. I think this classification model is really powerful. Imagine having a central tool used by a vast number of clients – that uncategorised section would shrink rapidly.”

VT agrees he’s considering making the tool open source to allow the community to use their own transaction to train it. “Taking in the description isn’t enough, but context is important too. If it understands it’s a debit or credit, it can learn a little faster.” With the support of the Programmable Banking community, VT’s simple tool might become very smart indeed.

Get involved in the Programmable Banking Community

If you have questions or just want to say “hi” to the Programmable Banking Community core team, you can pop us a mail at community-investec@offerzen.com, and we will get back to you.

If you want to see more about what the community has been up to, you can:


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Subscribe to our blog

Don’t miss out on cool content. Every week we add new content to our blog, subscribe now.

By subscribing you consent to receive OfferZen’s newsletter and agree to our Privacy Policy and use of cookies.