SD System Design In Depth
0%
lesson system-designsearch

Search feedback and relevance signals

Module 5.4: Information Retrieval & Search Engines Updated Sep 17, 2026
📄 Cheat Sheet
Haystack US 2022-René Kriegler,OSC-Modelling implicit user feedback for optimising e-commerce search
OpenSource Connections Haystack US 2022-René Kriegler,OSC-Modelling implicit user feedback for optimising e-commerce search Watch on YouTube ↗

Directly about turning clicks, add-to-carts and purchases into relevance labels, including click models and position bias.

0:00 / --:--

Under the Hood: Implicit Feedback & Learning to Rank (LTR)

While BM25 scores textual overlap, real-world user intent requires factoring in non-textual signals: item popularity, geographical distance, price competitiveness, seller ratings, and real-time user behavior. Learning to Rank (LTR) uses machine learning models to combine hundreds of disparate features into a single ranking score.

Two-Stage Search Architecture: Retrieval & Reranking

flowchart LR Query["User Query"] --> Phase1["Stage 1: Retrieval (BM25 + Ann Vector)"] Phase1 -->|"Filter 100,000,000 -> Top 1,000 Candidates"| Candidates["Candidate Set (1,000 Docs)"] Candidates --> Phase2["Stage 2: Heavy ML Reranker (LambdaMART / Cross-Encoder)"] Phase2 -->|"Re-score using 200 Features"| FinalTop["Top 20 Results Served to User"]

Under the Hood: Feature Engineering & Position Bias

1. Signal Categories

  • Query-Document Features: BM25 score, phrase match proximity, vector cosine similarity.
  • Document Static Features: Historical conversion rate, return rate, average review rating, page load speed.
  • User Context Features: User location, browsing history, past brand affinity, device type.

2. The Position Bias Trap

Users click the #1 result significantly more often than the #5 result, regardless of true relevance. Training an ML model directly on raw click logs creates a feedback loop that permanently cements existing top results. High-performance search engines apply Inverse Propensity Scoring (IPS) to debias click data before model training.

Worked example: inverse propensity weighting

Suppose eye-tracking or randomisation experiments estimate the probability that a user examines each position:

PositionExamination propensityClicks observedWeighted clicks, clicks divided by propensity
11.00500500
30.50200400
100.1060600

Raw clicks say the position-1 document is best by far. After correcting for how rarely position 10 is even seen, the position-10 document shows the strongest relevance signal. In practice propensities are clipped, for example to at least 0.05, because a click at a rarely seen position gets a huge weight and makes training noisy.

Where propensities come from

  • Result randomisation: swap positions for a small slice of traffic and measure how CTR changes with position alone.
  • Intervention harvesting: reuse natural ranking changes between model versions as free experiments.
  • Click models: cascade and position-based models fit examination and attractiveness jointly from logs.

Signal trade-offs

SignalVolumeNoiseNotes
ClickHighHighPosition and presentation biased; attractive thumbnails inflate it
Dwell time over about 30 sMediumMediumBetter satisfaction proxy; depends on content type
Add to cart or purchaseLowLowStrongest for e-commerce; sparse on the long tail
Human judgmentsVery lowLowExpensive; used for evaluation sets and calibration

Production pattern: log every impression with its position, the ranker version and features at serving time; join with downstream events; build labels offline; train a LambdaMART or neural ranker; ship behind an interleaving or A/B test. Airbnb, Etsy and many e-commerce teams have described this loop publicly. Logging features at serving time avoids train and serve skew.

Failure modes

  • Rich-get-richer loops: without exploration, new items never collect clicks. Reserve a small share of impressions for exploration or boost fresh items explicitly.
  • Bot and fraud clicks: filter automated traffic before labels are built, or competitors can manipulate rankings.
  • Presentation bias: larger images, badges and prices shown in bold change CTR independently of relevance; include presentation features in the model or control for them.
Check yourself Question 1 of 3
Raw click feedback loop recall
From: Under the Hood: Feature Engineering & Position Bias

A ranker is retrained every night on the previous day's raw click-through rates. What long-run behaviour does this produce?

Key Takeaways

Production search operates in two stages: fast lexical/vector candidate retrieval (Top 1,000) followed by heavy ML reranking (Top 20).
Learning-to-Rank models (LambdaMART, GBDT) combine BM25, static document quality, and personalized user affinity.
Position bias must be counteracted using Inverse Propensity Scoring to prevent self-reinforcing click feedback loops.
Was this lesson helpful? Spot an issue or have a suggestion? Let us know on GitHub.
Report an issue