Use logged exposure probabilities and judged evidence to keep clicks from reinforcing the ranking that produced them.
Click feedback: correct exposure bias before tuning retrieval
A click is an observation, not a label
Search logs record what users were shown and what they clicked. A top-ranked result is usually examined more often than a lower-ranked result, so more clicks do not prove greater relevance. Snippet wording, device layout, query ambiguity and a satisfied user who never clicks can alter behavior as well. Keep impressions, rank positions, query class and click outcomes together. Do not label every unclicked result irrelevant, because it may never have been seen. Judged relevance labels remain the anchor for measuring whether retrieved evidence truly answers a question.
Log the policy that chose the result
Offline comparison of two rankings needs to know how likely the logging policy was to show each observed result in that position. Randomized or carefully designed interleaving traffic can provide such propensities, but changing the order of high-stakes evidence merely to collect data can be unacceptable. Record policy version and selection probability at impression time; reconstructing it later from final rankings is fragile. A target policy must have support wherever it assigns probability, otherwise logged data cannot estimate its behavior there. Retrieval traces give each exposure its candidate and policy identity.
Estimate with bounded weights
Inverse-propensity weighting gives greater weight to observations that were unlikely under the logging policy but likely under the target policy. Very small logging probabilities produce high-variance estimates, so define a floor or clip and report the resulting bias-variance tradeoff. Keep query-level confidence intervals and do not call an offline score a guaranteed online gain. A tiny code sample can demonstrate the arithmetic; real deployment evaluation needs a randomized logging design and careful outcome definition. Release evaluation should compare offline evidence with judged slices before any traffic change.
Avoid feedback loops
If a retriever promotes what was clicked yesterday, those results get more exposure today and may collect still more clicks. New or niche documents receive little data and can be unfairly buried. Keep some exploration within safe, eligible candidate sets, cap how quickly behavior changes ranking weights and audit exposure by source and topic. Never use clicks to bypass permission or source-trust filters. Evidence admission must happen before any learned click signal is applied.
Evaluate the outcome that matters
A click on a plausible but stale snippet can be worse than no click. Combine behavioral signals with supported-answer judgments, abandonment, reformulation and task-completion measures. Segment by mobile versus desktop, head versus rare queries and new versus established documents. Check for a ranking that improves click-through while reducing answer-bearing passage recall or increasing unsupported claims. Preserve a fixed holdout set and an escape path to the previous ranking policy if a monitored slice degrades.
Worked contract
from dataclasses import dataclass
@dataclass(frozen=True)
class LoggedExposure:
query_id: str
clicked: bool
logged_probability: float
target_probability: float
def propensity_weighted_clicks(events: list[LoggedExposure]) -> float:
if not events:
raise ValueError("evaluation needs impressions")
total = 0.0
for event in events:
if not 0 < event.logged_probability <= 1:
raise ValueError("invalid logging probability")
if not 0 <= event.target_probability <= 1:
raise ValueError("invalid target probability")
total += float(event.clicked) * event.target_probability / event.logged_probability
return total / len(events)
impressions = [LoggedExposure("seal-pressure-1", True, .5, .25),
LoggedExposure("seal-pressure-2", False, .5, .75)]
assert propensity_weighted_clicks(impressions) == .25Performance and operating cost
Computing this illustrative inverse-propensity estimate costs O(E) time for E logged impressions and O(1) extra space. Collection and storage costs grow with impressions, policy metadata and retention period. Low logging probabilities increase estimator variance; clipping reduces that variance but changes the estimate. Use the code as an arithmetic contract, not as a complete causal evaluation design or a substitute for judged relevance and online safety checks.
Common Mistakes
- Treating an unclicked low-ranked result as a negative relevance label.
- Estimating a target policy where the logging policy never exposed its candidates.
- Ignoring very large inverse-propensity weights and their variance.
- Optimizing click-through while answer support and source trust get worse.
Validation drill
Design 31 judged queries with two safe ranking policies. Log impressions, positions, policy probabilities and support labels; compare raw clicks with weighted estimates and report uncertainty by query slice.
