
A narration is a string a payment system assembled for its own purposes, and somewhere inside it is the name of the person or business on the other side of the transaction.
POS 5177XXXX0927 SWIGGY BANGALORE is a payment to a party called Swiggy. The rest is a masked card number, a channel marker and a city.
Doing that once is easy. Doing it across a year of a client's statements, consistently, so that the same merchant lands in the same ledger every time, is the work. And two of the obvious ways to make it better quietly make it worse.
It is layers, and the first confident answer wins
The structure that works is a fixed order of attempts, each more general and less certain than the last, stopping at the first one that is confident.
The category, where there is one. Some rows are already classified by what they are. A cash withdrawal does not have a counterparty to find, and asking the question wastes a chance to get it wrong.
An exact match on a narration shape seen before. Not the same narration: the same shape, already labelled.
A known layout with an unfamiliar name in it. This is the layer that earns its keep. A bank's NEFT narration follows a fixed pattern, so once that pattern is known, a name that has never been seen can still be lifted out of the right position in it. That is the difference between recognising merchants and reading narrations.
The rails. NEFT, RTGS, IMPS, UPI, POS and ATM narrations each have their own grammar, and often their own grammar per bank, which is why a reader that handles one bank's UPI format well can be useless on another's.
A gazetteer, last, for names that can be recognised on sight.
The order matters more than any single layer. A gazetteer consulted first will confidently find a common word inside a reference number.
The shortcut that breaks testing
Here is the first tempting improvement: let the reader learn. Every time it works out a party, write that back into a cache so next time it answers faster and better.
It sounds strictly good and it has a real cost. The second run over the same statement answers differently from the first, because the first run changed what the second one reads. The output depends on the path taken to reach it.
And once output is path-dependent, you cannot check it. "Does this month's reading match last month's" stops being a meaningful question, because the thing doing the reading is not the same thing it was. A regression and a successful learning step look identical from the outside.
The discipline worth holding is that the same narration with the same reference data gives the same answer, always. Nothing learns at the moment of reading. Corrections are absolutely worth keeping, but as data that is reviewed and versioned, not as a side effect of having run the thing.
Important
A reader that improves itself as it goes cannot be compared against its own past behaviour. If accuracy matters enough to measure, it matters enough to keep the reader deterministic.
The other shortcut, and why it is also refused
The second tempting improvement is to put a language model on the narration and ask it who the party is.
It works, often impressively, and it brings three problems to a job like this one.
It is not reproducible: the same narration can come back differently, which defeats measurement for the same reason the learning cache does. It needs a model on the machine, which is a substantial download for something that has to run on an ordinary office PC. And it is confidently wrong in a particular way, inventing a plausible business name out of a reference number, which is much harder to spot than leaving the field blank.
"I do not know" is a better answer than a plausible guess, because a blank is visible and a wrong party name looks like work already done.
Greenote's reader is deterministic for exactly this reason: the same narration and the same reference data always give the same party, nothing is learned at the moment of reading, and extraction accuracy is measured against a fixed corpus precisely because it can be.
What this means at the desk
Three things follow for anybody reviewing an import.
Check the unknowns, not the knowns. The rows a reader refused to name are the honest ones, and they are a short list. The dangerous rows are the ones confidently assigned to a party that looks right.
Watch for one party under several names. The same merchant can arrive as three spellings from three rails, and each spelling becomes its own ledger unless something binds them. That is the practical reason to match against the ledgers a client already has rather than creating new ones, which is the same problem UPI makes worst.
Inbound and outbound are different questions. On a retail client, inbound is mostly revenue and does not need a party at all. Outbound is where a supplier relationship exists and where getting the party right has consequences.
Pro tip
When you correct a party, correct it as a rule for that client rather than on the one row. The same narration shape will arrive eleven more times this year.
Conclusion
Reading a party out of a narration is a layered problem with a fixed order, and the layer that matters most is the one that understands a bank's narration layout rather than the one that recognises famous names.
The two obvious ways to make it cleverer, learning as it goes and asking a language model, both trade away the ability to check it. For something that feeds a client's ledgers, that is the wrong trade.
Turn bank statements into Tally vouchers on your own PC
Greenote reads 100+ Indian banks and posts clean vouchers straight into Tally, from your own PC. The statement is not uploaded, and nothing is typed by hand.
Free trial: 7 days or 5 statements, no card. Works with Tally Prime & ERP 9.


