Diagnose Poor Search Quality for Named-Entity Queries
Statistics & ExperimentsModel answerLast updated
Design a metrics framework to identify and fix relevance and safety failures when users search for well-known brand or entity names on a content platform.
Scenario
Your team runs search for a large content platform. Several large organizations have escalated complaints: when users search for their name directly, the results frequently include off-topic content, impostor accounts, and in some cases policy-violating material.
Your Task
You are in a product analytics or applied-science role. Walk through how you would:
- Define and instrument the right metrics to measure both relevance quality and content safety for these queries specifically.
- Diagnose the root cause — is this a retrieval problem, a ranking problem, or a safety-filtering problem? How do you tell?
- Prioritize and validate fixes — what do you ship first, and how do you confirm it worked?
What a Strong Answer Covers
- Separating the relevance problem from the safety problem: they have different owners, metrics, and fixes.
- Choosing metrics that reflect user intent for a navigational query (the user wants the official account and on-topic content), not just raw engagement.
- Tracing the failure to a specific stage in the search pipeline using segmented data and time-series analysis.
- Proposing fixes in realistic priority order: immediate mitigation first, then structural changes.
- Describing an experiment design that can confirm a fix actually worked.
You don't need to write code. Communicate clearly, use concrete numbers where they add precision, and explain the reasoning behind each choice.
Hints
Hint 1
Start by splitting the problem in two: a result being irrelevant is a different failure mode from a result being harmful. The metrics, root causes, and teams responsible differ — treating them as one problem will muddy your diagnosis.
Hint 2
Engagement metrics like click-through rate can mislead you here. Sensational or harmful content often gets high CTR, so optimizing for it can actively make the problem worse. Think about what signal better captures whether the user actually found what they came for.
Hint 3
Once you have candidate root causes, trace the failure to a specific stage: did the right content fail to enter the candidate pool at all (retrieval), was it retrieved but ranked low (ranking), or was it ranked highly but not caught by safety filters? Each stage points to a different fix.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Approach: From Vague Complaint to Measurable Fix
Step 1 — Clarify Before Measuring
Before choosing any metric, pin down what "bad" actually means here. The answer shapes everything downstream.
- Scope: Is this affecting a handful of top-tier brands or a long tail of smaller ones? One market or many? Does it affect only the search results page or also autocomplete and hashtag pages?
- Onset: Did complaints spike suddenly, suggesting a model launch or index change? Or has this drifted over weeks, suggesting adversarial content growth?
- Intent of the query: A named-entity search (searching "Nike", "NASA", "Taylor Swift") is navigational. The user most likely wants the verified official account at rank 1, then high-quality on-topic content. That's a different success state than an informational query.
Define the segment first: use an entity dictionary to tag navigational/brand queries, size it (typically a few percent of total query volume but much higher advertiser importance), and analyze it separately from the rest of search.
Step 2 — Metric Framework, Organized by Layer
Group metrics into four layers. Always compare the brand-query segment against the platform baseline; a gap is your diagnostic signal.
Relevance quality (offline, ground truth) These don't depend on user behavior, which makes them your most reliable signal.
- Precision@10: share of top-10 results rated relevant by human raters on a stratified sample of brand queries.
- NDCG@10: using graded labels — official account > on-topic content > loosely related > irrelevant.
- Official-account coverage: what share of brand queries have the verified account in the candidate set at all, and what share rank it #1?
User behavior (online proxies) These are faster to compute but noisier.
- Long-click / dwell rate: clicks followed by meaningful engagement (e.g., >10 s watch time). Better than raw CTR.
- Quick-back rate: click followed by return in under ~3 seconds — a reliable dissatisfaction signal.
- Query reformulation rate: "apple" → "apple official account" tells you the first page failed.
- Successful-search rate (composite): at least one long click with no reformulation in the session.
Avoid using raw CTR as a primary metric. Clickbait and harmful content routinely outperform relevant content on CTR. Optimizing for it makes the problem worse.
Safety and brand integrity
- Harmful-impression rate:
harmful impressions in top-k / total impressions in top-k, weighted by position (rank-1 harms matter far more than rank-20). - Policy-violation rate by category: break this out — scam, impersonation, hate, adult — because each has a different fix.
- Impersonation rate: unverified accounts whose display name closely matches the brand that rank above the official account.
- User reports per 1k impressions on brand-query result pages.
Business impact Complaint volume, advertiser spend on brand-query pages, churn from affected accounts. These confirm severity but are lagging and not diagnostic on their own.
Step 3 — Find the Root Cause
Time-series analysis first. Plot precision@10, harmful-impression rate, and quick-back rate daily. Overlay model launches, index refreshes, safety-classifier threshold changes, and policy updates. A metric that steps at the same time as a launch is your strongest lead — and you should check whether that launch's A/B results were disaggregated by this segment, because an overall win can hide a segment-level loss.
Segment to locate the pattern.
| Pattern | Likely cause |
|---|---|
| Only ambiguous names ("Apple" the fruit vs. the company) | Entity disambiguation failing |
| Only recently uploaded content | Freshness boost overriding safety scoring |
| One region/language | Localized model or labeling gap |
| Spikes on trending days | Hashtag hijacking or coordinated spam |
Trace to a pipeline stage. Search has at least three distinct stages; the fix differs by stage.
- Retrieval — Is the official account even in the top-500 candidates? Low recall@500 points to an embedding or indexing failure.
- Ranking — Is it retrieved but ranked below harmful content? Likely the ranker is overweighting engagement signals on which problematic content scores well.
- Safety filtering — Is harmful content scored but not suppressed? Check classifier recall on this specific content type, threshold settings, and whether newly uploaded content has a scoring delay that lets it surface briefly before review.
Step 4 — Fix in Priority Order
Immediate (days): contain the damage
- Roll back or exclude the brand-query segment from any launch that correlates with the regression.
- Pin the verified official account to position 1 for exact-match brand queries — this is deterministic and requires no model change.
- Tighten safety thresholds on navigational queries specifically; accept some recall loss as a trade-off.
- Emergency blocklists for categories already identified (impersonation, scam) for the top escalated brands.
Short-to-medium term (weeks): structural fixes
- Build a navigational-intent classifier with entity linking so ambiguous queries resolve correctly.
- Add relevance features to the ranker: entity match score, verified-account boost, query-to-content semantic similarity.
- Apply safety scoring at query time (not only at upload time) so that new violations don't surface during the indexing delay.
- Add penalties for hashtag stuffing and impersonation signals.
Longer term: fix the objective The core issue is often that the ranking model is optimizing a single engagement signal. The structural fix is a multi-objective ranker — maximizing relevance (trained on human judgments) and engagement together, with safety as a hard constraint rather than a soft penalty. Pair this with a regression test: maintain a golden set of the top brand queries with labeled results and make it launch-blocking for every ranking change.
Step 5 — Validate the Fix
Offline: Run the golden-set evaluation before any launch. The change must improve NDCG@10 and harmful-impression rate on the brand segment without regressing generic queries. Both conditions required, not just one.
Online A/B test (randomized by user):
- Primary metric: successful-search rate on brand queries.
- Co-primary guardrail: harmful-impression rate must not increase.
- Watch for: overall engagement should not drop significantly — a fix that tanks session length is trading one problem for another.
Run the test long enough to capture a full weekly cycle, since brand-related events (product launches, controversies) are uneven across days. Pre-register the primary metric before peeking at results.
Common Mistakes to Avoid
- Using CTR as the north-star metric — it rewards the wrong content.
- Treating relevance and safety as one problem — they need different metrics, different fixes, and often different teams.
- Analyzing the full query distribution rather than isolating the navigational segment — brand queries are a small slice that won't move aggregate numbers even when badly broken.
- Proposing a single ranking change without first confirming which pipeline stage is actually failing.