Choose the Right Metric for a Search Ranking Change
Statistics & ExperimentsModel answerLast updated
Pick and justify a primary success metric for a search ranking A/B test, then identify one guardrail and one counter-metric.
Context
You work on the search team at a consumer marketplace. Engineers have shipped a new ranking model that they believe surfaces more relevant listings. Before a full launch, you want to run an A/B test.
Your team is debating which metric should be the primary success metric for this experiment.
Available signals
You have the following logged events per search session:
query_issued— a user submits a searchlisting_impression— a result is shown on screenlisting_click— a user clicks a resultadd_to_cart— a user adds a clicked item to their cartpurchase_completed— a user completes a purchase
What is expected
- Identify a primary success metric. State exactly how you would compute it and why it best measures relevance improvement.
- Identify one guardrail metric. Explain what failure mode it protects against.
- Identify one counter-metric (or secondary metric). Explain what important side-effect it monitors.
- Discuss one common mistake teams make when choosing a search ranking metric.
Hints
Hint 1
Think about which event in the funnel is closest to the user's intent being satisfied — not just any engagement signal.
Hint 2
A guardrail metric protects a business concern unrelated to relevance; think about what you could accidentally break.
Hint 3
Click-through rate sounds obvious, but consider whether it can be gamed by the model and what that means.
Model answer
Easy Try it yourself first — then compare your approach, complexity and edge cases.
1. Primary Success Metric: Click-Through Rate is Tempting but Flawed — Use Post-Click Engagement Rate
Why not raw CTR?
Click-through rate (clicks / impressions) is the most natural candidate, but it has a critical weakness: a ranking model can inflate CTR by promoting eye-catching or sensational listings that do not satisfy the user's intent. The user clicks, bounces immediately, and re-queries — CTR goes up, satisfaction goes down.
Recommended primary metric: Search Session Conversion Rate
Definition:
Search Session Conversion Rate =
sessions with at least one purchase_completed
─────────────────────────────────────────────
total sessions with at least one query_issued
Why this works:
- A purchase is the strongest available signal that the user found what they were looking for.
- It is hard to game — a model cannot boost purchases without genuinely surfacing relevant listings.
- It is session-level, so one power user making many purchases does not dominate the metric (unlike summing raw purchase counts).
Practical note: Purchases are lower-frequency events, so you need a larger sample or longer experiment window to achieve sufficient statistical power. If your marketplace has low purchase volume, a reasonable fallback is Search Session Add-to-Cart Rate (same formula, using add_to_cart instead of purchase_completed), which is higher-frequency and still captures strong purchase intent.
2. Guardrail Metric: Queries Per Session
Definition:
Average queries per session =
total query_issued events
────────────────────────
total sessions
What it protects against:
If the new ranking model surfaces poor results, users will refine or repeat their search. A significant increase in queries per session is a signal that users are not finding what they need on the first try — even if conversion rate looks neutral. This guardrail catches a silent degradation in user experience before it hurts revenue.
Threshold: Flag the experiment if this metric increases by more than ~3–5% relative in the treatment group (exact threshold depends on baseline variance).
3. Counter-Metric: Average Position of Purchased Listing
Definition:
Average rank position of the first listing
that led to a purchase_completed, across
all converting sessions
What it monitors:
A good ranking model should be surfacing the right listings higher in the results page. If conversion rate improves but the average purchase position also increases (users are scrolling further down), that is a warning sign: the model may be helping users find things, but not efficiently. This metric confirms that relevance gains are also translating into better positioning, which matters for mobile experiences where scroll depth is limited.
4. Common Mistake: Using CTR as a Proxy for Relevance
The most frequent mistake is treating click-through rate as synonymous with relevance. Here is why it fails:
- Popularity bias: The model learns that well-known or heavily discounted items attract clicks regardless of fit. CTR rises, but users return items or abandon carts at higher rates.
- Position bias confounding: Listings at the top of the page get clicked more because of where they are, not because they are relevant. A model that simply shuffles popular items to position 1 will see CTR gains that disappear in a position-adjusted analysis.
- No satisfaction signal: A click tells you the user was curious. A purchase (or at minimum an add-to-cart) tells you the user was satisfied.
Better practice: Always pair any click-based metric with at least one downstream outcome metric (add-to-cart or purchase) to validate that clicks represent genuine relevance.
Summary Table
| Role | Metric | Direction for Success |
|---|---|---|
| Primary | Search Session Conversion Rate | Increase (statistically significant) |
| Guardrail | Queries Per Session | No significant increase |
| Counter / Secondary | Avg. Position of Purchased Listing | Decrease (purchased items rank higher) |
Key Takeaway
A good primary metric for a ranking experiment should be:
- Causally connected to the product goal (relevance → user finds item → purchases)
- Hard to game by the model
- Measured at the right unit (session-level, not event-level, to avoid double-counting)
Conversion rate satisfies all three. CTR satisfies none of them reliably.