Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
ExperiencesCoaching
New
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Get started

Design Facebook PYMK Ranker

HardSystem Design00:00
Practice interviewer
In session
5 left
00:00

Whenever you're ready, walk me through how you'd approach this.

You need to log in / sign up to chat or submit.

Problem

Product Context

Design the ML system behind Facebook People You May Know (PYMK), which recommends potential friends across surfaces like Home, Notifications, and the Friends tab. The goal is to help users form meaningful connections while avoiding spammy, low-quality, or privacy-sensitive suggestions.

Scale

SignalValue
DAU1.2B Facebook users
Peak recommendation requests900K QPS across surfaces
Social graph size3B+ accounts, 400B+ edges
Candidate pool per usermillions of reachable users before filtering
Suggestions shown/request10-20
End-to-end latency budget (p99)150ms

Task

  1. Clarify the product objective, prediction target, and key constraints for PYMK.
  2. Estimate system scale and design a multi-stage architecture from candidate generation to ranking and re-ranking.
  3. Choose models for each stage and explain what features are computed online vs offline.
  4. Design the training data pipeline, labels, and feedback loop while addressing delayed outcomes and negative sampling.
  5. Define offline and online evaluation, including guardrails for user trust, privacy, and ecosystem health.
  6. Identify major failure modes such as feature drift, training-serving skew, graph abuse, and cold-start, and explain mitigations.

Constraints

  • Must exclude blocked users, existing friends, recent rejects, integrity-bad accounts, and policy-restricted pairs.
  • Suggestions should reflect fresh graph activity within minutes, but serving must stay within strict latency and cost limits.
  • New users and low-activity users have sparse history; the system still needs reasonable recommendations.
  • The system should optimize for accepted friend requests and long-term connection quality, not just clicks on suggestions.