← Meta Interview Insights

Meta·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jul 2026

Summary

ML system design round at Meta for a Research Scientist role. The whole thing was basically one long deep-dive into building a TikTok-style short video recommendation system from scratch, and it went pretty wide pretty fast.

Questions Asked (8)

Q1

Design a short-video recommendation system that serves a personalized infinite feed to hundreds of millions of users with sub-100ms latency.

System DesignTechnical Trade-offs
Author's notes

This is the kind of question where you think you know where to start and then realize you're already behind.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a multi-stage recommendation pipeline with candidate generation, ranking, and serving layers. Focus on latency optimizations like caching, approximate nearest neighbor search, and precomputed embeddings, while discussing trade-offs between personalization and speed.

Pro tip: Emphasize that the system must handle the 'cold start' problem for new users and videos, and propose a fallback to trending content to maintain engagement. Also, mention the importance of monitoring and A/B testing to continuously improve recommendations.

1. Clarify Requirements and Scale

Ask questions to understand the expected QPS, user base size, video catalog size, and latency SLA. Confirm that the feed is infinite and personalized, and discuss the need for real-time updates.

2. High-Level Architecture

Outline the main components: client, API gateway, recommendation service, feature store, candidate generation, ranking service, and video metadata store. Explain how they interact to produce a feed.

3. Candidate Generation and Ranking

Describe how to generate a set of candidate videos (e.g., via collaborative filtering, content-based, or ANN over embeddings) and then rank them using a lightweight model to meet latency constraints.

4. Latency Optimization Techniques

Discuss strategies like caching user embeddings and precomputed video vectors, using in-memory databases, sharding, and parallel processing to achieve sub-100ms latency.

5. Trade-offs and Scalability

Address trade-offs between model complexity and latency, consistency vs. availability, and how to scale horizontally. Mention monitoring, A/B testing, and handling cold start.

Key Points to Mention

  • Two-stage architecture: candidate generation (fast, recall-oriented) followed by ranking (slower, precision-oriented).
  • Use of approximate nearest neighbor (ANN) search (e.g., FAISS, HNSW) for efficient similarity search over embeddings.
  • Caching strategies: precompute user and video embeddings, use Redis or Memcached for low-latency feature retrieval.
  • Handling cold start: fallback to trending or popular videos for new users; use content features for new videos.
  • Latency budget breakdown: network, candidate generation, ranking, and post-processing must sum to <100ms.
  • Scalability: sharding by user ID, using CDNs for video delivery, and asynchronous logging for model updates.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How would you handle candidate generation at scale, and what are the tradeoffs between collaborative filtering and a two-tower retrieval model?

System DesignTechnical Trade-offs
Author's notes

Went fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing candidate generation as a retrieval problem in a multi-stage recommendation system, then compare collaborative filtering and two-tower models across dimensions like scalability, personalization, and cold-start. Emphasize the tradeoffs and propose a hybrid approach that leverages the strengths of both.

Pro tip: Mention that two-tower models can be trained with in-batch negatives and served via approximate nearest neighbor search, but collaborative filtering is still valuable for capturing explicit user-item interactions and can be used as a feature in the two-tower model.

1. Define the problem and constraints

Clarify the scale (e.g., billions of users/items), latency requirements, and the goal of candidate generation (e.g., retrieve hundreds of relevant items from millions).

2. Explain collaborative filtering (CF)

Describe CF (memory-based or model-based like matrix factorization) and its strengths (simple, interpretable, effective with dense interactions) and weaknesses (cold-start, scalability, difficulty incorporating side features).

3. Explain two-tower retrieval

Describe the two-tower architecture (separate user and item encoders) and how it enables efficient retrieval via ANN, and discuss its ability to incorporate side features and handle cold-start better.

4. Compare tradeoffs

Contrast CF and two-tower on scalability, personalization, cold-start, training complexity, and serving latency. Highlight that two-tower is more scalable and flexible but requires more data and infrastructure.

5. Propose a hybrid approach

Suggest using CF as a baseline or as a feature in the two-tower model, and combining multiple retrieval sources (e.g., CF, two-tower, trending) to improve coverage and relevance.

Key Points to Mention

  • Scalability: CF struggles with large-scale data due to O(n^2) similarity computations, while two-tower uses ANN for sub-linear retrieval.
  • Cold-start: Two-tower can incorporate content features to handle new users/items, whereas CF fails without interactions.
  • Personalization: Two-tower can learn complex user-item interactions via deep learning, while CF is limited to linear interactions.
  • Serving latency: Two-tower precomputes item embeddings and uses ANN for fast retrieval; CF may require on-the-fly similarity calculations.
  • Training complexity: Two-tower requires large-scale distributed training and negative sampling, while CF is simpler but less expressive.
  • Hybrid systems: Combining CF and two-tower (e.g., ensemble or feature augmentation) often yields better results than either alone.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Walk through how you'd design the ranking model, including what objectives you'd optimize and how multi-task learning fits in.

System DesignTechnical Trade-offs
Author's notes

I probably over-indexed on watch time as the primary signal and the interviewer had to nudge me toward thinking about shares and follows as separate tasks.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the product context and scale, then outline a multi-stage ranking system (candidate generation, ranking, re-ranking) with a multi-task learning model that optimizes for multiple objectives like engagement and satisfaction. Emphasize trade-offs, offline/online evaluation, and iteration based on metrics.

Pro tip: Show awareness of Meta's emphasis on long-term user value and integrity by discussing how you'd balance short-term engagement metrics with long-term satisfaction and societal impact. Mention specific techniques like MMoE or PLE for multi-task learning to demonstrate depth.

1. Clarify Requirements and Scale

Ask about the product (e.g., Feed, Reels), scale (users, items), and key business objectives. Confirm latency and resource constraints.

2. Design Multi-Stage Architecture

Propose a funnel: candidate generation (e.g., embedding-based retrieval), ranking (multi-task model), and re-ranking (business rules, diversity). Explain why multi-stage is needed for efficiency.

3. Define Objectives and Multi-Task Learning

List objectives (e.g., CTR, watch time, likes, shares, hide/report rates). Explain how multi-task learning (e.g., MMoE, PLE) shares representations while handling task conflicts, and how to combine outputs into a final score.

4. Discuss Model Architecture and Features

Outline feature types (user, item, context, cross features) and model choices (e.g., DNN, Wide&Deep, transformers). Mention handling of sequential data and embeddings.

5. Evaluation and Iteration

Describe offline metrics (e.g., AUC, NDCG) and online A/B testing. Discuss how to monitor for feedback loops, biases, and long-term effects, and iterate on model and objectives.

Key Points to Mention

  • Multi-task learning architectures like MMoE or PLE to handle multiple objectives and task relationships.
  • Trade-offs between short-term engagement metrics (CTR) and long-term user satisfaction (e.g., meaningful interactions).
  • Handling of negative signals (hide, report) and integrity considerations.
  • Feature engineering: user history, item embeddings, context, and cross features.
  • Offline evaluation metrics and online A/B testing methodology.
  • Scalability and latency constraints in a production ranking system.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How would you build the real-time feature pipeline to capture a user's recent watch history and update embeddings quickly enough to matter?

System DesignTechnical Trade-offs
Author's notes

Honestly the part I felt least prepared for.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, such as latency targets, scale, and consistency needs. Then propose a high-level architecture that decouples ingestion from embedding updates, using a streaming pipeline with incremental processing. Finally, discuss trade-offs between freshness, cost, and complexity, and how you would validate and monitor the system.

Pro tip: Emphasize the importance of defining a clear freshness SLA and designing for graceful degradation—e.g., falling back to batch updates if the stream lags—to show you prioritize reliability over chasing the lowest possible latency.

1. Clarify Requirements

Ask about expected QPS, latency SLA (e.g., seconds vs. minutes), data sources, and how embeddings are consumed. This ensures you design for the right scale and freshness.

2. Design Ingestion Layer

Propose a scalable event ingestion system (e.g., Kafka) to capture watch events in real time, with partitioning by user ID for ordered processing.

3. Stream Processing & Embedding Update

Use a stream processor (e.g., Flink) to aggregate recent watch history per user and trigger incremental embedding updates, possibly via a model server or online learning.

4. Serving & Storage

Store updated embeddings in a low-latency store (e.g., a feature store or KV store) and serve them to downstream applications, ensuring read-after-write consistency where needed.

5. Trade-offs & Monitoring

Discuss trade-offs between latency, cost, and accuracy (e.g., approximate vs. exact updates). Outline monitoring for lag, throughput, and embedding quality, with fallback to batch processing.

Key Points to Mention

  • Event-driven architecture with Kafka or similar for real-time ingestion
  • Stream processing with windowing and state management (e.g., Flink, Spark Streaming)
  • Incremental embedding updates vs. full recomputation to reduce latency
  • Low-latency storage and serving (e.g., Redis, feature stores)
  • Trade-offs: freshness vs. cost, consistency vs. availability
  • Monitoring and fallback mechanisms for reliability

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How do you prevent label leakage when logging training data for the ranking model?

System DesignA/B Testing & Experimentation
Author's notes

This tripped me up for a second.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining label leakage in ranking models and its impact on offline/online metric mismatch. Then describe a systematic approach to prevent it, covering data collection, feature computation, and validation. Emphasize temporal correctness and point-in-time joins.

Pro tip: Mention that you validate by comparing offline metrics to online A/B results; a large gap often indicates leakage. Also, use a holdout set that mimics production logging to catch leakage early.

1. Define label leakage and its sources

Explain what label leakage is in ranking: using future information or target-correlated features that won't be available at inference. Identify common sources like post-event features, improper joins, or using the label itself as a feature.

2. Ensure point-in-time correctness

Describe how to log features as they were at the time of prediction, using event timestamps and point-in-time joins. Avoid using aggregated data that includes future events.

3. Separate label and feature logging

Log labels (e.g., clicks, conversions) separately from features, and ensure labels are not accidentally included in the feature set. Use distinct pipelines and schemas.

4. Implement validation checks

Set up automated checks to detect leakage, such as feature importance analysis, temporal validation, and comparing offline metrics to online A/B test results.

5. Monitor and iterate

Continuously monitor for leakage after deployment by tracking feature distributions and model performance. Establish a feedback loop to fix issues quickly.

Key Points to Mention

  • Temporal integrity: use event timestamps and avoid future data
  • Point-in-time joins for feature computation
  • Separate logging pipelines for features and labels
  • Feature importance and correlation analysis to detect leakage
  • Offline-online metric consistency as a validation signal
  • A/B testing to confirm model performance in production

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How would you set up A/B testing for ranking model updates, and what metrics would you track on both the user side and the creator side?

A/B Testing & ExperimentationProduct Analytics & Metrics
Author's notes

User-side metrics felt straightforward: engagement rate, session length, retention.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining a structured A/B testing framework: define hypotheses, randomize users, select metrics, run the test, and analyze results. Emphasize the importance of balancing user and creator metrics to ensure long-term ecosystem health. Conclude with how you would iterate based on the results.

Pro tip: Mention the need for guardrail metrics to catch unintended consequences, and discuss how to handle network effects and interference in social platforms like Meta.

1. Define Hypothesis and Goals

Clearly state what you aim to improve with the ranking model update, such as user engagement or creator satisfaction, and formulate a testable hypothesis.

2. Design Experiment

Choose randomization unit (e.g., user-level), determine sample size and duration, and set up control and treatment groups. Consider potential interference and network effects.

3. Select Metrics

Identify primary and secondary metrics for both users (e.g., CTR, time spent, satisfaction) and creators (e.g., reach, engagement, retention). Include guardrail metrics to monitor negative impacts.

4. Run Experiment and Monitor

Launch the test, monitor for technical issues and early signals, and ensure data quality. Avoid peeking at results prematurely to prevent false positives.

5. Analyze and Decide

Perform statistical analysis to determine significance, evaluate trade-offs between user and creator metrics, and decide whether to launch, iterate, or abandon the update.

Key Points to Mention

  • Randomization unit and sample size calculation
  • User-side metrics: engagement (CTR, likes, comments), retention, session time, and satisfaction surveys
  • Creator-side metrics: reach, impressions, follower growth, content creation rate, and creator retention
  • Guardrail metrics: user-reported issues, hide/report rates, and platform health indicators
  • Statistical significance, confidence intervals, and power analysis
  • Handling network effects and interference in social networks

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q7

What risks does this kind of recommendation system create around filter bubbles and content quality degradation, and how would you mitigate them?

Product StrategyTechnical Trade-offs
Author's notes

Saved for near the end and by then I was a bit mentally drained.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Acknowledge that recommendation systems inherently create filter bubbles and can degrade content quality, then systematically outline the risks and propose a balanced mitigation strategy that combines algorithmic adjustments, user controls, and content diversity metrics. Emphasize the trade-offs between engagement and long-term user satisfaction, and how to measure and iterate on solutions.

Pro tip: Frame the discussion around Meta's commitment to meaningful social interactions and long-term user well-being, not just short-term engagement metrics, to show alignment with company values.

1. Define the Risks

Clearly articulate how filter bubbles (echo chambers, polarization) and content quality degradation (clickbait, misinformation, low-quality content) manifest in recommendation systems.

2. Identify Root Causes

Explain the underlying mechanisms: over-optimization for engagement metrics, lack of diversity in training data, feedback loops, and popularity bias.

3. Propose Mitigation Strategies

Suggest algorithmic solutions (diversity constraints, exploration-exploitation, quality scores), user controls (preference settings, transparency), and content policies (quality guidelines, fact-checking).

4. Measure and Iterate

Describe metrics to track (diversity indices, user satisfaction surveys, long-term retention) and how to A/B test and refine solutions.

5. Address Trade-offs

Discuss balancing engagement with diversity and quality, and how to communicate these trade-offs to stakeholders.

Key Points to Mention

  • Diversity and serendipity metrics in recommendation algorithms
  • Exploration vs. exploitation to avoid feedback loops
  • User controls and transparency (e.g., adjustable preferences, explanations)
  • Content quality signals (author credibility, fact-checking, user reports)
  • Long-term user satisfaction vs. short-term engagement
  • A/B testing and multi-objective optimization

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q8

How would you approach cold start for both new users and new videos?

System DesignTechnical Trade-offs
Author's notes

New users: onboarding signals, demographic priors, popular content as a bootstrap.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem scope and defining what 'cold start' means for both new users and new videos in the context of a recommendation system. Then, propose a multi-pronged strategy that leverages available signals (e.g., demographics, content metadata, contextual information) and explores exploration-exploitation trade-offs. Finally, discuss how to evaluate and iterate on the approach using metrics like click-through rate and user engagement.

Pro tip: Emphasize the importance of balancing exploration and exploitation, and mention how you would use bandit algorithms or reinforcement learning to dynamically adjust the cold start strategy. Also, highlight the need for fallback mechanisms to ensure a good user experience when signals are sparse.

1. Clarify the problem and constraints

Ask clarifying questions to understand the scale, available data, and business objectives. Define what constitutes a 'new user' and 'new video' and the success metrics.

2. Leverage available signals

For new users, use demographic, contextual, and onboarding data; for new videos, use content metadata, creator information, and early engagement signals. Discuss how to extract and utilize these features.

3. Design exploration strategies

Propose methods like multi-armed bandits, Thompson sampling, or epsilon-greedy to explore new items and gather feedback efficiently while minimizing poor user experiences.

4. Integrate with existing systems

Explain how the cold start solution fits into the broader recommendation pipeline, including fallback models, caching, and real-time serving considerations.

5. Evaluate and iterate

Define offline and online evaluation metrics (e.g., CTR, watch time, diversity) and describe how to A/B test and refine the approach over time.

Key Points to Mention

  • Exploration-exploitation trade-off and bandit algorithms
  • Feature engineering for new users and videos (e.g., demographics, content embeddings)
  • Fallback strategies such as popularity-based or content-based recommendations
  • Real-time vs. batch processing considerations
  • Evaluation metrics and A/B testing methodology
  • Scalability and latency requirements in a large-scale system

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.