Build Learning-to-Rank Training Data From Facebook Search Click Logs
Last updated: November 29, 2026
Quick Overview
Design the pipeline that turns raw search impression and click logs into labeled training data for a Facebook search ranker. Explain how you define labels, correct for position bias, and avoid leakage.
Meta
November 29, 20260
0
0 solved
Design the pipeline that turns raw search impression and click logs into labeled training data for a Facebook search ranker. Explain how you define labels, correct for position bias, and avoid leakage.
Ranking quality at Meta depends heavily on the training data pipeline, and interviewers often probe it directly. They look for careful label definitions, unbiased learning from clicks, sessionization and point-in-time correct features.
What the Interviewer Expects
- Joins impressions, clicks and post-click actions into graded labels
- Applies position bias correction such as propensity weighting or a bias tower
- Builds features as of impression time to avoid leakage
- Samples queries to balance head and tail
- Validates the dataset with sanity checks before training
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How would you estimate position propensities without hurting users?
- How do you handle queries where nothing is clicked?
- How would you add human relevance ratings to this dataset?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
- Input logs: search requests with query, user, shown results and their slots; clicks with timestamps; downstream actions (follow, message, join, dwell).
- Output: daily dataset of (query, user, resul...
High-Level Design
- Sessionize: group requests by user and time; link refinements of the same intent.
- Join: impression rows joined with clicks and post-click actions within a window (for example 30 minutes)...