Blend People, Groups, Posts and Videos in Facebook Search Results

Last updated: November 29, 2026

Quick Overview

Facebook search returns results from several verticals with separate rankers. Design the system that decides which verticals to show, in what order, and how many results from each, for a given query and user.

Meta
ML System Design
Machine Learning Engineer
Meta
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Facebook search returns results from several verticals with separate rankers. Design the system that decides which verticals to show, in what order, and how many results from each, for a given query and user.

Vertical blending is a senior search problem at Meta because each vertical ranker has its own score scale and objectives. Interviewers probe query intent classification, score calibration across verticals, and how you learn a blended page layout from biased logs.

What the Interviewer Expects
  • Uses query intent prediction to choose which verticals to call and display
  • Calibrates vertical scores onto a shared scale before mixing
  • Learns slot allocation from page-level outcomes, not single clicks
  • Handles latency by fanning out to verticals in parallel with timeouts
  • Corrects for position and presentation bias in logged data
Key Topics to Cover
vertical blending
query intent
score calibration
whole-page optimization
counterfactual learning
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How do you compare the value of a people result with a video result?
  • How would you run an experiment on a new vertical such as Marketplace?
  • What happens when one vertical backend times out?
  • How do you avoid always showing people results because they get the most clicks?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements
  • Verticals: people, pages, groups, posts, videos, Marketplace, events.
  • Each vertical returns its own top results with scores from its own ranker.
  • Output: a single results page with modules ordere...
High-Level Design
  1. Query understanding: classify the query into intent probabilities per vertical, for example P(people∣q,u)P(\text{people}\mid q, u), using query text, user history, and entity matches (the query exactly ma...

Submit Your Answer
Markdown supported