Experiment Plan for a Recency-Boosted Search Ranker
Statistics & ExperimentsModel answerLast updated
Plan a controlled experiment for a recency-weighted search ranker: hypotheses, success and guardrail metrics, randomization unit, and biases such as novelty and interference.
Scenario
A search team wants to ship a ranker that gives extra weight to how recently a page was published. You are asked to plan the online experiment that decides whether this change makes search better for users.
The team's worry: a recency boost may lift clicks on breaking or time-sensitive items while making it harder for people to reach older, authoritative pages that are still the best answer (evergreen content). That could hurt satisfaction over the long run.
Context
- Surface: the search results page.
- Population: active users worldwide.
- Baseline: the current production ranker.
What to cover
- Hypotheses. State a null and an alternative hypothesis, and say how you would frame the test (one-sided or two-sided) and why.
- Metrics. Name one primary metric that decides the outcome, plus secondary and guardrail metrics. Explain why your primary metric is a better choice than raw click-through rate.
- Randomization unit. Say what you randomize on (user, query, or something else), how assignment works, and the trade-offs against the alternatives.
- Risks and biases. Describe at least two threats to a trustworthy result (for example novelty effects, seasonality, interference between groups, or mixed effects across query types) and how you would counter each.
Follow-ups to be ready for
- Roughly how many samples do you need if the baseline success rate is 10% and you want to detect a 0.5% relative lift?
- Clicks rise but search abandonment also rises. How do you decide whether to ship?
- Could users in control and treatment influence one another, for example through feedback loops?
Hints
Hint 1
Define success in terms of whether users found what they needed (for example a satisfied click with no quick return or rewrite of the query), not just whether they clicked.
Hint 2
Your guardrails should directly probe the stated worry: measure success separately on evergreen and navigational queries, and watch reformulations, quick back-clicks, latency, and retention.
Hint 3
Think about why showing one user two different rankers for the same query is a problem, and what that implies for the randomization unit and for how you compute standard errors.
Hint 4
Plan the duration around the novelty effect, not around sample size; at large traffic volumes you will hit the required sample long before the effect stabilizes.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Framing
The key judgment in a search experiment is that engagement is easy to inflate. Fresher, sensational results can raise clicks while users leave unsatisfied. A strong plan therefore centers on user success, tests the evergreen concern directly, picks a sensible randomization unit, and anticipates novelty and feedback effects.
1. Hypotheses
- H0: the recency-weighted ranker leaves session success rate unchanged versus the current ranker (difference = 0).
- H1: the success rate differs (difference ≠ 0).
Use a two-sided test, because a ranking change can harm users and you need to detect that. Before launch, pre-register the minimum detectable effect, the significance level (0.05), the power (typically 80%), and a decision rule that combines the primary metric with guardrails.
2. Metrics
Primary: session success rate, the share of search sessions that end in a satisfied click. Define satisfied as a long dwell (for example 30 seconds or more) without a return to the results page or a query rewrite. This measures whether the user got what they needed. CTR does not, since appealing but shallow results can raise CTR while users bounce.
Secondary: CTR, long-click rate, time to first satisfied click.
Guardrails (must not degrade meaningfully):
- Success rate on evergreen and navigational queries, which targets the team's concern.
- Query reformulation rate; a rise suggests good older pages got buried.
- Pogo-sticking (back to results within roughly 10 seconds).
- Abandonment, split into good (answer was in the snippet) and bad.
- Latency at p50 and p99, since a recency signal can add retrieval cost.
- Revenue per search and ad CTR.
- Searches per user and 7/28-day retention for long-term health.
Slice all results by query intent (news, evergreen, navigational, local). A big gain on news queries can mask a loss elsewhere, so fix the slices before the test starts.
3. Randomization unit
Randomize by user: hash a stable ID (logged-in ID, else a durable cookie) with an experiment-specific salt, and allocate equal-size treatment and control arms (a few percent of traffic each is ample at large scale).
Why not by query:
- The same query could return different rankings minutes apart, confusing users and inflating reformulations.
- Long-term effects (trust, retention, abandoning searches for evergreen topics) only appear if each user experiences one consistent ranker.
- Queries from one user are correlated, so query-level analysis overstates precision.
The cost is fewer independent units, so lower power. Compensate by using the delta method or cluster-robust standard errors for ratio metrics, and CUPED (adjusting by each user's pre-experiment behavior) to cut variance.
Optionally run interleaving first: blend results from both rankers on one page and see which gets the satisfied clicks. It is far more sensitive for pure ranking quality, so it works as a fast pre-screen, followed by the user-level test for whole-page and long-term effects.
4. Pitfalls and mitigations
- Novelty effect. New, timely results may spike engagement that fades. Run at least 2-4 full weeks, plot the effect by days since each user's first exposure, and trust it only once the curve flattens. Keep a small long-term holdback after launch.
- Seasonality and news cycles. A major event can exaggerate the value of freshness. Run whole weeks, avoid known big events, and report news-intent queries separately. Both arms see the same shocks, but the result may not generalize to quiet periods.
- Heterogeneous effects. Traffic mix differs by intent, so pooled numbers can mislead (Simpson's paradox). Analyze pre-defined segments.
- Data quality. Run a sample ratio mismatch check (chi-square on assignment counts), filter bots, watch cookie churn, and use sequential testing if you need to peek early.
- Interference. See follow-up 3.
Follow-up: sample size
For two proportions, per group:
n = (z(1-α/2) + z(1-β))² · [p1(1-p1) + p2(1-p2)] / δ²
With p1 = 0.10, a 0.5% relative lift gives p2 = 0.1005 and δ = 0.0005. Then (1.96 + 0.84)² ≈ 7.84 and the variance term ≈ 0.09 + 0.0904 ≈ 0.1804, giving
n ≈ 7.84 × 0.1804 / 2.5e-7 ≈ 5.7 million per group.
This assumes independent observations. With user-level randomization, inflate by the design effect 1 + (m-1)ρ (m = queries per user, ρ = within-user correlation), then CUPED can reclaim often 20-50%. At large traffic the constraint is duration (outlasting novelty), not sample size.
Follow-up: clicks up, abandonment up
Diagnose before deciding:
- Split abandonment into good and bad. Fresher snippets may answer the query directly.
- Check click quality. If pogo-sticking and reformulation also rose, users click more and find less, which is a regression.
- Look at the primary metric and the evergreen segment. If success is flat or down there, do not ship broadly.
- Apply the pre-registered decision rule and long-term metrics.
A common outcome is a targeted launch: apply the boost only to queries classified as time-sensitive, then retest.
Follow-up: interference
User-level randomization mostly isolates users, but shared effects exist: click data feeds back into ranking models and freshness signals, so treatment-driven clicks can shift what both arms see; shared caches or indexes can couple arms; and content creators may react to ranking changes. Mitigate by training or serving models separately per arm during the test, keeping caches arm-specific, and using a long-term holdback to measure effects after feedback loops settle.
Common mistakes
- Using CTR as the primary metric.
- Randomizing by query and then analyzing as if units were independent.
- Ending the test early after a novelty spike.
- Reporting only the pooled average and hiding an evergreen regression.
- Choosing segments after seeing the data.