Suggestion confidence today
INF-67 · Multiple tiers of suggestion · how the ledger matcher scores its suggestions, and what auto-maps
0 – 100%One number per suggestion. Not a range.
2,040first suggestions replayed against 10 companies' Miracle books
80.9%of them were the ledger the books used
Noneconfidence threshold for auto-mapping
1. What the score is
- Measured, not guessed. Each suggestion is found in a situation: the matcher that found it, how strong its clue was, and whether it was the only candidate.
- The score is the share of suggestions in that situation that were right in the replay (
server/ledger_confidence_table.go). - A situation seen only a few times is pulled toward its matcher's average (5 rows of smoothing,
server/ledger_confidence.go). - Each entry gets up to 3 suggestions, and each one has its own score. They stay in rule order, not score order.
- Miracle-history suggestions, read on the user's PC, use fixed scores: 78% for a recurring payment and 50% for an amount match (
frontend/src/lib/book-history.ts).
2. What auto-maps, and what only suggests
Saved automatically (rules, no score)
- Contra pair: two own banks, same UTR/RRN, equal amounts (or a fee ≤ ₹50 and 1%), ≤ 3 days apart.
- Exact match: every sure exact matcher names the same ledger:
- UPI ID mapped before
- account or phone mapped before
- narration pattern mapped before
- ledger's full name in the narration
- Already in Miracle: another bank's posting in the books is booked against this bank, and nothing else matches.
Only suggested (has a score)
- Every other clue: similar narration, category, recurring, similar name, name cut short or spelled differently, one name word, and exact matchers that are not sure.
- The first suggestion is filled in. The user must accept it (Enter twice, or Ctrl+Enter).
- There is no lower limit. A 40% limit was removed because full names in narrations fell below it.
3. Where the score shows today, and the decision
- Nowhere. The ledger list stopped showing reasons and “% likely” in PR #120. The server still sends the score.
- A 97% suggestion and a 38% one look the same: the same sparkle mark in the Ledger box.
- Decided: color that mark green (≥ 90%), yellow (70–89%) or red (< 70%). Nothing more.
4. Every situation and its score
≥ 90%70–89%< 70%Shown = first suggestions in the replay · Right = the books used that ledger
| Situation | Shown | Right | Confidence |
|---|---|---|---|
Narration pattern mapped before every earlier choice agrees |
11 | 11 | 100% |
Narration pattern mapped before every earlier choice agreesonly candidate |
48 | 48 | 100% |
Ledger name, cut short, in narration most words matchonly candidate |
14 | 14 | 99% |
Ledger name, cut short, in narration part matches |
10 | 10 | 99% |
Ledger's full name in narration |
62 | 62 | 99% |
Ledger name, cut short, in narration full matchonly candidate |
7 | 7 | 98% |
Narration like an earlier mapped one full matchonly candidate |
335 | 324 | 97% |
Narration like an earlier mapped one most words matchonly candidate |
5 | 5 | 97% |
Ledger name, cut short, in narration part matchesonly candidate |
101 | 96 | 95% |
Narration like an earlier mapped one part matchesonly candidate |
60 | 57 | 95% |
Narration like an earlier mapped one full match |
84 | 79 | 94% |
Recurring payment long historyonly candidate |
11 | 11 | 93% |
Account / phone mapped before mapped the other way before |
2 | 2 | 91% |
Category (charges, interest, tax…) category has 2 ledgers |
11 | 11 | 91% |
Account / phone mapped before mapped the other way beforeonly candidate |
1 | 1 | 90% |
Recurring payment only candidate |
6 | 6 | 90% |
Ledger name, spelled differently full matchonly candidate |
20 | 18 | 90% |
Ledger name, spelled differently part matchesonly candidate |
17 | 15 | 88% |
Name like a ledger name full matchonly candidate |
240 | 199 | 83% |
Category (charges, interest, tax…) category has 2 ledgersused this way before |
3 | 3 | 82% |
Category (charges, interest, tax…) category has 3+ ledgers |
157 | 126 | 80% |
Ledger's full name in narration only candidate |
129 | 103 | 80% |
Name like a ledger name full match |
1 | 1 | 78% |
UPI ID mapped before every earlier choice agrees |
5 | 4 | 78% |
UPI ID mapped before most earlier choices agree |
9 | 7 | 77% |
Category (charges, interest, tax…) category has 3+ ledgersused this way before |
8 | 6 | 74% |
UPI ID mapped before every earlier choice agreesonly candidate |
10 | 7 | 72% |
Narration like an earlier mapped one most words match |
3 | 1 | 71% |
Category (charges, interest, tax…) category has 1 ledgeronly candidate |
388 | 267 | 69% |
Recurring payment long history |
1 | 0 | 66% |
Category (charges, interest, tax…) category has 1 ledger |
14 | 8 | 61% |
Name like a ledger name part matchesonly candidate |
143 | 87 | 61% |
Narration like an earlier mapped one part matches |
22 | 11 | 58% |
Name like a ledger name most words match |
5 | 2 | 57% |
Category (charges, interest, tax…) category has 1 ledgerused this way beforeonly candidate |
37 | 20 | 56% |
One word of a ledger name word written in full |
15 | 9 | 56% |
Name like a ledger name part matches |
2 | 0 | 53% |
Category (charges, interest, tax…) category has 1 ledgerused this way before |
2 | 0 | 51% |
Recurring payment |
5 | 1 | 49% |
One word of a ledger name word written in fullonly candidate |
30 | 11 | 38% |
One word of a ledger name word spelled differently |
6 | 0 | 20% |
5. Tier options
How the replayed suggestions fall into three tiers with different cut-offs. Each tier cell shows how many suggestions it holds, then how often they were right.
| Cut-offs | High | right | Medium | right | Low | right |
|---|---|---|---|---|---|---|
| High ≥ 90% · Medium 70–89% · Low < 70% suggested | 78839% of all | 96.7% | 58229% of all | 81.1% | 67033% of all | 62.1% |
| High ≥ 95% · Medium 75–94% · Low < 75% | 65332% of all | 97.1% | 69634% of all | 84.2% | 69134% of all | 62.2% |
| High ≥ 85% · Medium 60–84% · Low < 60% | 80539% of all | 96.5% | 111154% of all | 73.7% | 1246% of all | 43.5% |
6. How the row could look
₹12,400Sharma TradersNarration like an earlier mapped oneHigh · 97%
₹1,180Bank ChargesCategory (charges) · 3+ ledgersMedium · 80%
₹5,000Ravi KumarOne word of a ledger nameLow · 38%
7. Decisions for you
- Cut-offs. Suggested: High ≥ 90%, Medium 70–89%, Low < 70%. High is then right 96.7% of the time.
- Auto-accept High? Today nothing with a score saves by itself. Auto-accepting High would save about 39% of suggestions, and about 1 in 30 of them would be wrong.
- Suggestions step. Group or filter by tier, and let the user accept a whole tier at once?
- Badge text. Show the tier only, or the tier and the %?