Skip to content
mlmentorship

How would you evaluate a search ranker?

Evaluate a search ranker with judged queries, explicit averaging weights, exposure controls, slice guardrails and a recorded release decision.

Published · 8 min read ·Role-specific ·Advanced

ML breadth · active recall

Practice before you read

8 minutes. Explain the mechanism, why it works, when it fails, and one alternative.

ML breadth · closed-book attempt

How would you evaluate a search ranker?

Explain the mechanism, why it works, when it fails, and one alternative.

Problem

Context. Two rankers have relevance judgments for frequent head queries and less frequent tail queries. NDCG@10 summarizes ranking quality over the first ten results. Task. Compute the traffic-weighted comparison below, apply the tail gate, and identify evidence still needed for a launch decision. Constraints. Use the stated traffic weights rather than equal slice weights. These invented offline scores do not by themselves measure user outcomes or causal product impact. Compare A and B on two equally sized sets of judged queries: head and tail. Suppose traffic is 90% head and 10% tail. These are fictional slice means and traffic weights, not measured production results. | Ranker | Head NDCG@10 | Tail NDCG@10 | | --- | ---: | ---: | | A | 0.80 | 0.80 | | B | 0.90 | 0.70 | The proposed offline gate requires tail NDCG@10 of at least 0.78. Does B improve the headline metric, pass the gate or establish better user outcomes?

08:00recommended time

Closing or reloading clears the scratchpad. Only score, weak rubric dimensions, attempt count, and retry date can be stored locally.

30-second answer map

Route a ranker candidate through human-judgment calibration, fast offline screening, and randomized online validation without treating any one evidence layer as a substitute for the others.

The better average still fails the tail floor

The better average still fails the tail floorFixed illustrative head and tail scores are A 0.80 and 0.80, and B 0.90 and 0.70. Shared-scale bars show each matched slice. The 90-to-10 traffic mixture gives averages 0.80 and 0.88, but B fails the declared tail floor 0.78 and must hold.Illustrative fixed slices; head/tailweights 90% / 10%HEADA0.80B0.90TAILA0.80B0.70floor 0.78Weighted: A = 0.80; B = 0.88B tail 0.70 < 0.78 -> HOLD
Traffic weighting improves B's average while its tail breaches the floor. Hold B and diagnose the slice. An aggregate improvement is not release permission.
Check: Why must B be held despite improving the weighted average from 0.80 to 0.88?
Full interview answer 8 min read
Reading depth

Decide whether a proposed search ranker improves the relevant metric and satisfies a required query-slice quality gate.

Problem

Context. Two rankers have relevance judgments for frequent head queries and less frequent tail queries. NDCG@10 summarizes ranking quality over the first ten results.

Task. Compute the traffic-weighted comparison below, apply the tail gate, and identify evidence still needed for a launch decision.

Constraints. Use the stated traffic weights rather than equal slice weights. These invented offline scores do not by themselves measure user outcomes or causal product impact.

Compare A and B on two equally sized sets of judged queries: head and tail. Suppose traffic is 90% head and 10% tail. These are fictional slice means and traffic weights, not measured production results.

RankerHead NDCG@10Tail NDCG@10
A0.800.80
B0.900.70

The proposed offline gate requires tail NDCG@10 of at least 0.78. Does B improve the headline metric, pass the gate or establish better user outcomes?

Picture: The Weights Change the Headline

Imagine one equal-sized stack of judged queries for each slice. Equal-slice averaging gives both rankers 0.80. Traffic averaging gives the head stack nine times the tail stack’s weight.

B gains 0.08 in traffic-weighted NDCG but loses 0.10 on tail queries. It fails the declared 0.78 tail gate. Neither weighted average establishes causal user benefit.

Declare the averaging population, preserve the tail gate, and separate offline from product evidence

Declare the averaging population, preserve the tail gate, and separate offline from product evidenceEqual-sized judged query sets give both rankers an equal-slice mean of 0.80. Target traffic instead weights head queries nine times more. B reaches 0.88 but its 0.70 tail fails the declared 0.78 floor. Neither average proves user benefit. New unjudged documents are unknown, not irrelevant; pool and version judgments. Freeze the evaluation manifest, then test defined product effects under randomized exposure with safety, uncertainty, ownership, and rollback gates.Same judged-set sizes; differenttraffic weightsEqual-sized head and tail query setsHeadTailTarget traffic: head 90%, tail 10%Candidate A: traffic mean 0.80Head 0.8; tail 0.8; tail floor 0.78Candidate B: traffic mean 0.88Head 0.9; tail 0.7; tail floor 0.78Equal-slice means: A 0.80, B 0.80B gains on traffic average, but failsthe independent tail gate.New unjudged documents: unknown, notirrelevant.Pool multiple systems, obtainrubric-based judgments, and versioncoverage by slice.Offline gates do not establish userbenefit. Randomize exposure for thedefined product outcome.Clicks depend on position; no-clickmay also mean success.Freeze query, judgment, candidate,and exposure versions; recorduncertainty, decision owner, androllback rules.
Read it this way: Equal-sized judged query sets give both rankers an equal-slice mean of 0.80. Target traffic instead weights head queries nine times more. B reaches 0.88 but its 0.70 tail fails the declared 0.78 floor. Neither average proves user benefit. New unjudged documents are unknown, not irrelevant; pool and version judgments. Freeze the evaluation manifest, then test defined product effects under randomized exposure with safety, uncertainty, ownership, and rollback gates. Does equal-slice averaging preserve B's headline gain?
Reference drawing

Declare the averaging population, preserve the tail gate, and separate offline from product evidence

Declare the averaging population, preserve the tail gate, and separate offline from product evidenceEqual-sized judged query sets give both rankers an equal-slice mean of 0.80. Target traffic instead weights head queries nine times more. B reaches 0.88 but its 0.70 tail fails the declared 0.78 floor. Neither average proves user benefit. New unjudged documents are unknown, not irrelevant; pool and version judgments. Freeze the evaluation manifest, then test defined product effects under randomized exposure with safety, uncertainty, ownership, and rollback gates.Same judged-set sizes; differenttraffic weightsEqual-sized head and tail query setsHeadTailTarget traffic: head 90%, tail 10%Candidate A: traffic mean 0.80Head 0.8; tail 0.8; tail floor 0.78Candidate B: traffic mean 0.88Head 0.9; tail 0.7; tail floor 0.78Equal-slice means: A 0.80, B 0.80B gains on traffic average, but failsthe independent tail gate.New unjudged documents: unknown, notirrelevant.Pool multiple systems, obtainrubric-based judgments, and versioncoverage by slice.Offline gates do not establish userbenefit. Randomize exposure for thedefined product outcome.Clicks depend on position; no-clickmay also mean success.Freeze query, judgment, candidate,and exposure versions; recorduncertainty, decision owner, androllback rules.
Derivation
The better average still fails the tail floorFixed illustrative head and tail scores are A 0.80 and 0.80, and B 0.90 and 0.70. Shared-scale bars show each matched slice. The 90-to-10 traffic mixture gives averages 0.80 and 0.88, but B fails the declared tail floor 0.78 and must hold.Illustrative fixed slices; head/tailweights 90% / 10%HEADA0.80B0.90TAILA0.80B0.70floor 0.78Weighted: A = 0.80; B = 0.88B tail 0.70 < 0.78 -> HOLD
Traffic weighting improves B's average while its tail breaches the floor. Hold B and diagnose the slice. An aggregate improvement is not release permission.
Check: Why must B be held despite improving the weighted average from 0.80 to 0.88?
Read it this way: Equal-sized judged query sets give both rankers an equal-slice mean of 0.80. Target traffic instead weights head queries nine times more. B reaches 0.88 but its 0.70 tail fails the declared 0.78 floor. Neither average proves user benefit. New unjudged documents are unknown, not irrelevant; pool and version judgments. Freeze the evaluation manifest, then test defined product effects under randomized exposure with safety, uncertainty, ownership, and rollback gates. Does equal-slice averaging preserve B's headline gain?

Decision Contract: Three Different Questions

LayerMeasuresImportant limit
Human judgmentsRelevance under a documented rubricRater agreement is not truth or user satisfaction
Offline metricsFixed-label ranking comparison, including slicesNDCG: graded ordering; MRR: first relevant result; Recall@K: relevant-result coverage
Online experimentDefined behavioral/product effect under randomized exposureClicks depend on position and prior exposure; no-click can also mean success

Freeze an evaluation manifest: query/candidate/judgment/exposure versions, cutoff, gains, weights, slices and uncertainty. Also declare randomization unit, target effect, outcome maturity, guardrails, decision owner and rollback conditions. Define zero-ideal-gain queries and relevance thresholds before computing metrics.

Change 1: New Documents Have No Judgments

New task. A new retriever finds documents absent from the old judging pool.

Picture and change. Mark them unknown, pool candidates from multiple systems and obtain rubric-based judgments. Version the resulting comparison and report judged coverage by slice.

Check. The old ranker must not win merely because its documents already have labels.

Use when. Candidate support changes.

Change 2: The Goal Is Long-Term Satisfaction

New task. Relative click preference is insufficient for the release decision.

Picture and change. Choose a product experiment with suitable randomization, duration, mature outcomes and safety/cost/latency guardrails. Interleaving can still compare rankers through attributed clicks under its protocol.

Check. Interleaving preference is not automatically long-term causal value or universally more powerful than A/B testing.

Use when. The target effect changes.

Failure: Production Clicks Become Relevance Truth

Sampling only the current ranker’s top results excludes unseen candidates. Treating their raw clicks as relevance labels also confounds exposure, position and usefulness. More data from that same selection process does not resolve missing support.

Transfer Check

Does refreshing labels every quarter keep the evaluation valid?

Reasoned Answer

No fixed calendar guarantees validity. Monitor intents, candidates, policy, data and raters; refresh versioned rubrics while protecting ongoing comparisons.

Position and Counterfactual Evidence

Position-aware prediction alone does not identify relevance independently of exposure. Randomized swaps and explicit click models need their own design and assumptions; they are not synonyms for interleaving. Cascade and dynamic Bayesian click models impose behavioral assumptions, not guaranteed bias removal.

Logged-policy evaluation requires valid exposure propensities, support for evaluated actions, an identified outcome and controlled confounding/interference assumptions. Inverse propensity weighting can have high variance. It cannot recover unsupported actions by assigning them invented probabilities. Record clipping and sensitivity analyses when used; correction changes uncertainty and sometimes the target.

Build and Maintain the Judged Set

Sample production queries across head, torso, tail, verticals and relevant user segments. Record sampling weights and privacy constraints; pool candidate documents beyond the current ranker’s results. Document graded relevance criteria, rater training, adjudication and disagreement. Measure agreement by slice and investigate shared rubric errors; agreement alone cannot establish validity. Rejudge ambiguous/new candidates and retain a protected comparison set with versioned updates. There is no universal agreement target or refresh interval.


Related: learning-to-rank losses, counterfactual ranking, A/B testing for ML systems, and personalized search ranking.