If you write customer data for an Egyptian or Gulf business, you already know the problem: Arabic names written in Latin letters have no single spelling. Mohamed, Mohammed and Muhammad are one name. So are Hassan and Hasan. A dedupe job that compares strings exactly will keep all of them as separate customers.
The opposite mistake is worse, and it's the one this post is about. I built a .NET 10 duplicate-customer pipeline (blocking, Fellegi–Sunter match weights, and an LLM only for the grey zone), and the bugs that actually hurt weren't missed duplicates. They were two different people merged into one account because my name rules were too loose.
Here are the four name traps the benchmark caught, with the shape of each fix.
Tech Skill Builder is $5/month for a very limited time only (normally $10). Grab it now before it goes back to $10. Join Tech Skill Builder. The complete, tested dedupe project behind this post is in there.
Building the CRM those customers live in? CRM PRO is a .NET 10 + Blazor Clean Architecture CRM with a customer and vendor hub and quick search.
The setup in one paragraph
Comparing every record with every other one doesn't scale: 2,986 synthetic records are already 4,456,605 pairs. So the pipeline first blocks (only pairs that share an email, a phone, a name key, or a nearby embedding get compared), then scores each candidate pair field by field, then decides: auto-merge, review, or reject. The name key is where the trouble starts.
Trap 1: Using the blocking key as the matching rule
To catch spelling variants, the name key reduces each token to its first letter plus consonants. Mohamed, Mohammed and Muhammad all become mhmd:
public static string Skeleton(string token) { // normalise a few letter pairs (ph -> f, q -> k), drop a trailing 'h' // keep the first letter (any vowel becomes 'a'), // then keep consonants only, collapsing doubles // ...full implementation in the complete project } That's a great blocking key precisely because it's loose: it brings variants together so they get compared at all. My first version also used "same skeleton" to mean "same name". The benchmark immediately flagged an auto-merge of a synthetic Amira with her brother Amr, who shared the family email. Both skeletons are amr.
Once you look, the collisions are everywhere:
| Pair | Skeleton | Same person? |
|---|---|---|
| Mohamed / Muhammad | mhmd | yes |
| Amira / Amr | amr | no |
| Hany / Hana | hn | no |
| Mahmoud / Mohamed | mhmd | no |
Rule: a key that is good for finding candidates is almost never good enough for deciding them. Keep the two separate in your code.
Trap 2: Throwing away the ending
The skeleton drops vowels, and in these names the final vowel carries real information: a final a is often the feminine ending. So the fix keeps it in a separate, tiny function:
// 'a' (often feminine), 'y' (y/i), other vowel 'v', or consonant 'c' public static char EndingClass(string token) { /* ... */ } Amira ends in a, Amr in a consonant: different classes, so they're no longer treated as spelling variants of each other. Then a same-skeleton pair only counts as a transliteration variant if:
- a curated variant list says so, or
- the spellings are near-identical (Jaro–Winkler ≥ 0.92) and have the same ending class, like Hassan/Hasan.
A curated list feels like a hack until you notice that Salesforce's matching rules ship one too, with documentation saying plainly that the dictionaries aren't comprehensive. Same limitation here. That's fine, as long as the rest of the pipeline doesn't trust the name level blindly.
Trap 3: Letting a shared contact carry a weak name match
After fixing Amira/Amr, the next bad merge candidate was Ayman Walid El Masry vs Eman Walid El Masry, with one shared email and one shared phone. The score: probability 0.99992. The contact evidence was so strong it drowned out the fact that the first names are different names (the variant list now separates them, too).
The decision rule that fixed this class of bug: auto-merge needs two independent agreements, a shared contact and a matching name. A high probability alone only gets you to review.
public MatchBand Decide(MatchFeatures f, double probability) { // guard 1 (Trap 4) runs first: reordered name + shared contact -> Review if (probability >= AutoMatchAt) return f.SharesContact && NameAgrees(f.Name) // exact, variant or close ? MatchBand.AutoMatch : MatchBand.Review; // ...threshold check for Review vs AutoReject in the complete project } A review costs someone ten seconds. A wrong merge moves orders, tickets and consent records into the wrong person's account.
Trap 4: Treating a reordered name as a typo
In Egyptian naming, the second name is the father's first name. So Mohamed Ahmed Ali and Ahmed Mohamed Ali sharing a home phone are most likely father and son, not one person who typed his name backwards. The score can't tell those apart, so the policy never decides it: reordered name + shared contact always goes to a human.
And the LLM?
It only sees the grey zone. On the seeded benchmark, blocking cut 4,456,605 pairs to 20,376 while keeping every true duplicate pair, 665 pairs auto-merged with 0 wrong, and 254 pairs went to review. The model gets a minimised view (names, cities, email domains, comparison levels, never an email local part or phone digit) and it can flag or dismiss, never merge. All four traps above were caught by deterministic rules before any model was involved.
A short checklist if you match Arabic names
- [ ] Separate the blocking key from the matching rule
- [ ] Keep the ending (or whatever your skeleton throws away) as its own signal
- [ ] Curated variant list for known spellings, plus a strict string-similarity fallback
- [ ] Auto-merge needs a shared contact and an agreeing name
- [ ] Reordered names with a shared contact go to review, always
- [ ] Your benchmark includes siblings and parent/child pairs sharing a phone or email, or it will never find these bugs
All numbers are from a local, offline run (seed 1, 2,986 synthetic records); no real customer data and no real model were used.
Get the complete project
The snippets above are the skeleton. The full, tested .NET 10 project is in Tech Skill Builder: normalisation and the name key, four blocking strategies, Fellegi–Sunter scoring with readable weight breakdowns, the guarded decision policy, a fail-closed IChatClient adjudicator, union-find clustering, an API and a benchmark, with 214 passing tests and a 91-page PDF walkthrough with architecture and request-flow diagrams. It's $5/month for a very limited time only (normally $10). Grab it now before it goes back to $10.
If the duplicates live in a CRM you're building, CRM PRO gives you a .NET 10 + Blazor Clean Architecture CRM with a customer hub to plug this into.
Which name pair has fooled your dedupe rules?

