Founder Notes
No Number Could Separate Them
I had a record matcher merging business entities on a similarity score, and I found that it had merged two companies with nothing whatsoever to do with each other. Different industries, different states, no relationship of any kind. My first instinct was to go and look at the threshold.
That instinct was wrong, and working out why has changed how I think about identity in data.
The pair scored a perfect 1.0.
Order was the information
The matcher compared names as sets of tokens. Two names built from the same words in a different arrangement produce the same set, and a set has no order. So a comparison meant to answer are these the same business was handed two inputs it had already rendered indistinguishable, and it answered correctly given what it could see.
There was no threshold that would have caught this. At 0.82 it merges. At 0.95 it merges. At 0.999 it merges, because the score is 1.0 and the score is honest. Wherever I put the line, that pair sits above it — and every legitimate match I lose on the way up is a real cost paid for nothing.
That took me a while to accept. I kept wanting the fix to live in the number, because the number is the knob, and knobs are what you turn. But the defect was upstream of the number. Order had been discarded before scoring began, and no amount of care applied afterwards recovers information that is already gone.
A threshold cannot repair a representation. It can only rank the things the representation was capable of telling apart.
Identity is not a quantity
The deeper problem is what a similarity score is for.
A score answers how much do these two records agree? That is a useful question. It is not the question I was asking. I was asking are these the same thing?, which is a claim about the world, and I was answering it by comparing a float to a constant.
The conversion between those two questions is where it all goes wrong. Any single number flattens every field into one dimension, and once flattened you can no longer ask which part of the agreement was load-bearing. Two records agreeing closely on their names and two records agreeing on a registration number can produce the same 0.9, and those are not remotely the same evidence.
So I stopped asking how much agreed and started asking which field agreed.
Some fields can assert identity alone. A licence number, issued by a registrar whose entire job is uniqueness, means what it says: two rows carrying the same one are the same business. Other fields can only corroborate. They can raise confidence in a match something else proposed, and they may never propose one themselves.
The ranking I would have guessed was wrong
Then the genuinely useful part, which was measuring that rather than reasoning about it.
For each candidate key I counted its fan-out — how many distinct businesses share a single value. Not in principle. In the actual table.
Licence numbers never exceeded two. A professional profile slug, likewise two. Email addresses peaked at seven, which is already more than I expected and is mostly shared inboxes. Web domains reached twenty-nine. Phone numbers reached one hundred and thirty: a single franchise switchboard sitting behind a hundred and thirty separately licensed businesses.
Any rule that let a shared phone number promote a merge would have collapsed all of them into one entity. It would have done it silently, at high confidence, on a field every engineer intuitively treats as a strong identifier.
I would have ranked those keys differently before I counted them. I would have put phone above domain, and I would have been comfortable letting either one merge on its own. The data disagreed with me by a factor of four on one and sixty-five on the other.
That is the part I want to keep. The strength of an identifier is not a property of the field. It is a property of your data. Two systems in the same industry can have wildly different fan-out on the same column, depending on who entered the rows, what they were doing at the time, and which real-world entities happen to overlap in that particular slice of the world. There is no way to know except to count.
What actually changed
The threshold stayed exactly where it was. Nothing was wrong with it. It was never the thing making the decision I cared about.
What changed is that promotion became a property of the key rather than the score. Two keys may assert a merge on their own. Everything else may only corroborate one that has already been asserted, and no volume of corroborating evidence, at any strength, is permitted to create a link by itself.
That is slower, and it produces fewer merges. It also stopped producing merges that were wrong in a way nobody would ever have caught — because a bad merge does not look like a bug. It looks like a record.
The general form
When something that scores confidence gets an answer badly wrong, the reflex is to tune the confidence. Nearly every time I have done that, the real defect was one step earlier, in what the score was allowed to see.
Ask what your comparison threw away before it started comparing. Ask whether the question you are actually asking is a quantity question at all, or whether you converted a claim about the world into an arithmetic one because arithmetic came with a knob attached. And if you are treating a field as an identifier, count how many distinct things share a value in your own table before you let it speak for them.
The number was fine. It was answering a different question, perfectly.