Evaluation
An honest benchmark - including where it fails
Anyone can print 99% by testing on training data. Here every number says what it was tested on, how many messages that was, and what is biased about it.
Same system, six test conditions
Why the protocol matters more than the model
F1 for the 'scam' class. A leaky split flatters the model; honest holdouts are 10 to 15 points lower.
Random row splitleaky - do not trustSame templates in train and test
99.7%n=580
Template-held-out testML model, unseen templates
97.3%n=604
Hand-written holdout (ML only)64 messages, new phrasings & scam types
85.3%n=64
Blind-40 (ML only)Written after the rules were frozen
91.9%n=40
Hybrid engine - hand-written holdoutoptimisticRules were authored while seeing this set
96.9%n=64
Hybrid engine - blind-40Best estimate of real-world behaviour
94.7%n=40
Model comparison
Three models, two fair test sets
Character n-grams beat word n-grams on messy transliterated text, and both crush keyword rules.
| Model | F1 · template-test | AUC | ECE ↓ | F1 · hand-written | Precision | Recall |
|---|---|---|---|---|---|---|
| Keyword rules (baseline) | 68.1% | 0.867 | 0.259 | 50.0% | 91.7% | 34.4% |
| Word TF-IDF + LR | 94.1% | 0.990 | 0.104 | 82.0% | 86.2% | 78.1% |
| Char n-gram TF-IDF + LR (shipped) | 97.3% | 0.996 | 0.098 | 85.3% | 89.7% | 81.3% |
ECE = expected calibration error (lower is better). The model is over-confident (ECE ≈ 0.10): its probabilities are used as one input to a fusion layer, not shown as a standalone "confidence".
Errors that hurt: hybrid engine, blind-40
18
caught
2
missed
0
false alarm
20
cleared
Precision 100.0% · recall 90.0%. For a safety tool a missed scam (bottom-right of "real scam") is costlier than a false alarm, so the thresholds lean cautious.
Accuracy by language (template-test)
English
100.0%n=128
Hindi
88.5%n=148
Hinglish
100.0%n=120
Telugu (roman)
100.0%n=166
Telugu (script)
100.0%n=42
Hindi (Devanagari) is the weakest language on held-out templates. On the 64 hand-written messages, Telugu script has only 2 examples, so that cell is anecdotal.
Deep dive: what the model learned and where it still fails
What did the model learn?
Top words - and the shortcuts hiding in them
Reading the coefficients is how I found the dataset's biases.
Pushes toward scam
Pushes toward safe
Spurious shortcuts spotted: nov (month names appear mostly in my legitimate templates), rs (amounts appear mostly in scams) and single Devanagari/Telugu letters (the word tokenizer splits combining marks). This is exactly why the shipped model uses character n-grams plus rules, and why real-world data collection is the next step.
Failure analysis
What it still gets wrong
Dear sir, we are from RBI fraud monitoring. Suspicious activity found on your account. Move your savings to the RBI protected account number we share to keep it safe.
blind-40missed scamrisk 37
आपका बैंक खाता अस्थायी रूप से बंद कर दिया गया है। वेरिफिकेशन के लिए अपना ATM पिन और OTP इस नंबर पर भेजें।
blind-40missed scamrisk 22
आपका गैस सिलेंडर सब्सिडी रुक गई है। अपडेट करने के लिए इस नंबर पर अपना बैंक OTP बताएं।
hand-writtenmissed scamrisk 28
Your Uber ride with Ramesh (AP 31 AB 1234) is arriving. Share OTP 4521 with the driver at pickup.
hand-writtenfalse alarmrisk 40
Known gaps
- Hindi (Devanagari) "send me your PIN/OTP" phrasing is only partly covered by the rules.
- Novel "move money to a protected/safe account" wording from impersonated regulators.
- Genuine messages that legitimately say "share OTP with the delivery person" can look suspicious.
- No image/QR analysis yet; scammers often send screenshots.