How a dispute gets classified
Classification is the only genuinely model-shaped task in this system, and it is a narrow one: read a customer’s sentence and say which of six things they mean. The interesting design question is not how to make it accurate. It is what to do when it is not.
Key takeaways
- Six classes, plus “cannot tell”, which is a normal and useful outcome.
- A dispute can carry two reasons, and the message says so rather than picking one.
- The model gets the invoice lines in the prompt, so a quantity claim can be checked for plausibility.
- A low-confidence class gathers nothing and hands over the raw message.
- Every classification is stored with the message, so accuracy can be measured rather than assumed.
One call, seven possible answers
- App integration
- Machine learning
- Analytics
- People
Why the invoice lines go in the prompt
“We only got 6, not 10” is ambiguous without the invoice. Six of what? If the invoice has one line for 10 pallets, it is a quantity dispute on that line. If it has four lines and one of them is for 10 boxes of something, it is a quantity dispute on that line specifically, and knowing which line matters enormously for what evidence gets pulled.
So the prompt includes the invoice lines, and the output includes which line is being disputed where it can be determined. That is not the model doing arithmetic — it is the model matching a customer’s phrasing to a line description, which is precisely what it is good at.
Two reasons at once
Disputes are frequently compound: “we only got 6, and the price is higher than the quote anyway”. The temptation is to pick the dominant one, and it is a mistake, because resolving the quantity issue and leaving the price issue produces a second dispute a week later that looks like the first one was handled badly.
So a dispute can carry up to two reasons, evidence is gathered for both, and the message says so plainly at the top: “two issues raised”. Beyond two, the system stops classifying and hands the message over raw, because a message with three distinct complaints in it is a conversation rather than a dispute.
The confidence floor
Below the floor, nothing is gathered and the raw message goes to a person with a note saying the system could not tell what was being claimed. That feels like a failure and is the correct behaviour, for a specific reason: gathering the wrong evidence is worse than gathering none.
- Machine learning
- Management
- People
Measuring it
Every classification is stored alongside the raw message and, once a person has resolved the dispute, alongside what the reason actually turned out to be. That is a labelled dataset that accumulates for free, and after a few months it answers a question most people guess at: how often is this thing right?
In practice the answer tends to be that quantity, duplicate and price classify very reliably, “never ordered” and “wrong entity” are frequently confused with each other, and “not about the invoice” is the one worth watching, because misrouting one of those into an accounts queue is how a service complaint sits unanswered for a week.
Next: what the gatherer actually fetches for each reason.
All posts