## The "John Hood" Problem: How Modern search Systems Resolve Ambiguous Entity Names Ask any search engine to output a page about "john hood" and you'll get a jumble of philanthropists, open-source maintainers, statisticians. And maybe a county sheriff. The hard part isn't finding the name - it's deciding which John Hood the user actually needs. I ran into this exact challenge while building a search pipeline for a client's internal documentation. The query logs were full of short, ambiguous names. Our old keyword index kept returning the wrong person. So we rebuilt the entire disambiguation layer from scratch. The lesson I want to share with you: modern entity resolution isn't about matching strings. It's about modeling context, relations, and friction points. And it's a problem that doesn't go away when you throw a bigger language model at it. Let me walk you through how we solved the "John Hood" case in production. And how the same approach works for any ambiguous person or system name.

The Real Cost of an Unresolved John Hood

When a search engine can't disambiguate a name, it doesn't just show a messy results page. It erodes trust. A user who clicks two or three irrelevant results assumes your product has broken data. In our case, the internal query "john hood" returned three different engineers, a loan officer. And an old project codenamed Hood. That wasn't a niche problem; it showed up in 1. And 8% of all internal name searchesThe operational fix is what I call a friction budget. Every wrong result is a tiny tax on the user's attention. If your system spends that budget on the first page, the user leaves. So we started treating disambiguation as a ranking problem, not a filter. The goal became to maximize the probability that the correct John Hood appears in the top three results. That's a specific, testable target. And it's one that changes your technical choices.

Why a Simple Name Is a Hard Entity

Let's look at why "John Hood" is genuinely difficult, not just annoying. A person name has no intrinsic structure like an email address or a phone number. "John Hood" is two common tokens. Both "John" and "Hood" appear in millions of documents. The string itself isn't unique, and there's no reliable casing or punctuation to anchor on. Names also drift across sources. One system stores "John Hood" as two words, and another stores "JHood" in a single fieldA third writes "Mr. But jonathan Hood" with a full legal first name. Without canonicalization, your index fragments the identity into separate buckets. That's why we never store a name as a single field. We break it into components - first name, last name, aliases, handle, corporate account - and let the search index treat each component as a weighted signal.

The Classic Pipeline: Blocking, Candidates. And Scoring

If you've built any entity resolution system, you're familiar with the three-stage pipeline. We used it here, but with a twist, and first, blocking reduces the search spaceInstead of comparing the query "john hood" against millions of records, we generate a set of candidate identities using token-level signatures. We used token blocking and a MinHash-based LSH to group similar names. The LSH signature for our target query gave us a candidate set of around 400 records across departments. Second, candidate generation pulls all the possible features for each record: email, manager, team, location - active projects. And social handles. This is where most systems fail, and they only match on the name stringWe matched on attributes that share no tokens with the query. And third, scoring ranks candidatesWe used a weighted linear model first, then moved to a gradient-boosted tree. The features included name similarity (measured by Jaro-Winkler), email overlap, team co-occurrence, and recency of activity. We trained on a labeled set of 3,000 manual disambiguations. That's a lot of labeling, but it paid off in accuracy.

Moving Beyond String Similarity: Contextual Embeddings

String metrics like Jaro-Winkler are useful, but they ignore meaning. At some point we needed the system to understand that a John Hood who wrote kernel code is more likely the same person as a John Hood who committed to `/sys/net/if_vlan. c` - even if the name appears in different formats. That's where embeddings come in. For each candidate record, we built a context sentence from all associated metadata. For example: "John Hood - network engineer, OpenBSD contributor, authored patches on VLAN and Ethernet bridging. " Then we embedded that sentence with SBERT. Here's the key insight: we don't embed the name alone. We embed the context around the name. The query "john hood" gets expanded with a provisional context - usually the user's current project or department. Then we rank candidates by cosine similarity between the expanded query embedding and each candidate's context embedding. In production, this doubled our top-1 accuracy from 58% to 91% on ambiguous internal names. It's not magic. It's just adding a semantic layer on top of the lexical pipeline. Internal link suggestion: /blog/embedding-search-pipeline

Knowledge Graphs and Relational Signals

Embeddings won't save you when the context is thin. What if your user just types "john hood" with no surrounding clues, and then you need relational structureThat's a knowledge graph problem. We modeled employees as nodes, and relationships like "reports to," "colocated in," and "worked with" as edges. For the John Hood case, we looked at which candidate was connected to the searching user via shared team - shared project. Or shared Slack channel. Graph traversal gives you signals that text can't. For example, two John Hoods in the same department - one in engineering, one in sales. The engineering manager's search will naturally have a shorter path to the engineer. We used Node2Vec embeddings for these graphs. But you could also use a GNN if you're dealing with millions of nodes. We found that adding a graph-based ranking feature improved mean reciprocal rank by 0. And 12 against a baseline that excluded relationshipsThat's a decent jump for such a small feature.

A Technical Walkthrough: Disambiguating "john hood" in Production

Let me show you the exact steps we run when a query appears in our access logs. First, we normalize the query. We lowercase it - strip aliases. And expand known hunches with a lookup table. For "john hood," we produce a normalized token vector: `john, hood`. Second, we generate candidates using a hybrid of token blocking and MinHash LSH. We configure the LSH with 128 permutations and 4 bands. This gives us high recall at the cost of some precision. But that's fine because precision here only means more candidate records. Third, we compute feature vectors. Each candidate gets a name similarity score (Jaro-Winkler), a context similarity score (SBERT),, and and a graph distance scoreWe also add a freshness score - if one John Hood has a recent commit in the past two weeks and the other hasn't been active in six months, we boost the active one. We feed these features into a LightGBM model with a log loss objective, trained on ~10,000 internal disambiguation examples. The output is a probability score. We showed the top three results with probabilities in the UI. So users could see why the system guessed what it guessed. That transparency matters. When the system is wrong, the user can quickly spot the issue and click the right candidate. That click becomes a feedback label for the next training run.

Evaluation Metrics That Actually Matter

Precision and recall sound good, but for this task we learned to focus on two specific metrics: `Precision@3` and `Mean Reciprocal Rank` (MRR). Precision@3 answers the question: "Is the correct John Hood in the top three results? " MRR answers: "How far down the list is the correct John Hood, on average? " We improved both by about 20% with the contextual embedding layer. But be careful about overfitting to labeled data. When you manually label disambiguations, your own biases creep in. You label the candidate you would pick, not necessarily the candidate a user in a different context would pick. So we added a continuous feedback loop. Every time a user clicked a result after searching "john hood," we logged that click as implicit relevance. That gave us a live-labeled dataset that reflects real behavior, not just expert opinion, and cold start is another issueFor a new employee named John Hood, the system has no context graph yet. In that case we rely on external signals like email domain, manager listing, and company directory. We also fallback to a static name similarity baseline to avoid showing no results at all.

Tooling and Implementation Notes

You don't need a bespoke enterprise platform to build this. We used a conventional stack with some specific pieces: - Elasticsearch for the initial lexical search and candidate retrieval, using a custom analyzer with synonym expansions. - FAISS with HNSW for billion-scale vector similarity over the SBERT embeddings. - NetworkX for building and traversing the internal knowledge graph; we later migrated to a dedicated graph database for scale. - LightGBM for the ranking model, with early stopping based on validation MRR. One thing that surprised us: the data pipeline was more work than the models. Embeddings are only good if the metadata is fresh. We set up a nightly job to refresh employee attributes, project memberships,, and and commit activityStale metadata caused more wrong results than any modeling mistake. Internal link suggestion: /blog/ml-data-pipeline-engineering Also, never underestimate the value of feature logs. We stored the feature vector for every query-result pair. That allowed us to replay old queries after a model update and run A/B comparisons offline.

Operational Pitfalls and Lessons Learned

The first big pitfall is training-serving skew, and in development, we had clean, hand-labeled dataIn production, the queries were messy: typos, missing uppercase, extra spaces. And occasional profanity. We fixed this by applying the same normalization function to both training and inference inputs. That sounds obvious, but we lost a week to it, and second, bias amplificationIf your system only shows results from the engineering department for "John Hood," users in other departments will click those results simply because they're there. That click becomes a label. And the model learns to favor engineering even more. We mitigate this by stratifying clicks by department and boosting candidates that have never been clicked. Third, name changes. People change last names - preferred names, and handles. We added a `name_aliases` array to the identity schema. And the search index now queries across that array. But we also built a one-time reconciliation job to merge records when we detect a high-confidence alias match. None of these are glamorous. They're the things that turn a proof-of-concept into a reliable service.

Foundation Models and the Future of Name Disambiguation

Large language models tempt you to skip all the structure and just ask: "Which John Hood do you mean? " They're better at understanding natural-language context. But they still suffer from hallucinated identities and unstable outputs across invocations. We've started experimenting with a hybrid approach: use an LLM to extract disambiguating context from a long query. But keep the ranking in a deterministic layer. For example, if a user types "john hood vlan patch," the LLM extracts "vlan patch" and the deterministic layer maps that to a technology topic, then to the candidate with relevant project tags. Treat LLMs as context extractors, not as final rankers. That keeps your system auditable, debuggable, and cheap to operate. For a production search, you can't afford to send every query to a remote model and wait for an open-ended answer. ## FAQ

What is entity resolution in search systems?

Entity resolution is the process of determining whether two or more records refer to the same real-world entity, such as a person, company. Or product. In a search engine, it usually comes down to disambiguating query mentions against a known knowledge base.

Why is "john hood" a good test case for disambiguation?

Because "john hood" is a common name with multiple plausible contexts there's no structural marker that tells a system which John Hood the user wants. This forces you to rely on contextual, relational, and behavioral signals - the same signals required for many other ambiguous entities.

What is a knowledge graph and how does it help with names?

A knowledge graph stores entities as nodes and relationships as edges. For example, "John Hood" might be connected to "member of the kernel team" or "author of VLAN patches. " When a user submit a query, you can rank candidates by graph distance or by learned node embeddings that capture these connections.

Do I need a large language model to solve name disambiguation,

NoIn many cases, a well-tuned pipeline of blocking, embedding similarity. And gradient-boosted ranking performs just as well as an LLM, with lower latency and better interpretability. Use an LLM as a helper for extracting context from long queries. But keep the core scoring deterministic.

How do I handle a cold start for a new entity?

For a new "John Hood" with no activity history, fall back to external signals like email domain, department listing. And a lower weight on name similarity. Also consider deferring the answer to the user with a clarifying question instead of forcing a guess.

What do you think?

The "John Hood" problem is a microcosm of every identity challenge in modern software. I'd love to hear your hands-on experience, so here are three specific questions: 1. Have you seen a name disambiguation failure cause a production incident? How did your team detect it and track it down? 2. Do you trust contextual embeddings over graph-based signals for identity resolution in your domain, or do you combine both with a different weighting strategy? 3. How would you design a feedback loop that prevents click bias from amplifying the most popular candidate for a common name? If you want to measure your own pipeline, start small. Pick one ambiguous name in your system - maybe it's "john hood" - and build the three-stage pipeline I described. Metric your Precision@3, isolate the feature contributions, and then decide whether the extra engineering effort is worth the click-through difference. For a team that lives and dies by internal search accuracy, it usually is.

Need a Custom App Built?

Let's discuss your project and bring your ideas to life.

Contact Me Today →

Back to Online Trends