Banks and payment companies are changing how they use artificial intelligence. For years, they used separate tools and manual coding to handle tasks like spotting fraud, checking credit scores, and sorting purchases. Building and updating these old systems required a lot of extra work and repeated effort.
Now, companies are switching to larger, unified AI models. Instead of looking at transactions one by one, these new models look at the entire stream of a customer’s activity to understand patterns over time. Financial companies now have to decide if they should build these modern AI tools themselves, buy them from other software providers, or keep tweaking their older, specialized systems.
The architecture of financial grammar
Financial transactions look a lot like human language, but using standard AI models directly on them doesn’t work well in real-world systems. Transactions happen in order, with specific timing, amounts, and results. Turning tabular transaction data into plain text uses up too much memory (about 55 tokens per transaction). With a standard 2,048-token limit, an AI can only look at fewer than 40 past transactions. However, spotting changing spending habits or financial stress requires analyzing hundreds of transactions over many months.
To fix this, companies use compact encoding methods:
Nubank’s nuFormer: Uses special tokens for numbers and timestamps alongside standard text encoding. This cuts memory use by 75%, allowing the model to look at much longer transaction histories.
Revolut’s PRAGMA: Converts transactions into structured key-value-time tokens. It groups numbers into ranges, compresses large time gaps while keeping short ones accurate, and tracks daily, weekly, or monthly patterns directly.
Transaction models must also handle two different types of information: static data (rarely changes, like account age) and dynamic data (changes with every transaction, like purchase amounts). Processing both the same way wastes computing power.


