← Meta Interview Insights

Meta·Machine Learning Engineer·Onsite - System Design / Architecture·Senior

Senior
Jun 2026

Summary

ML system design round at Meta for an MLE role. The whole thing was basically one big question about building a short-video recommendation system from scratch, and they wanted you to go deep on almost every layer of it.

Questions Asked (5)

Q1

Design a personalized short-video recommendation system similar to TikTok. Walk through functional requirements, the data pipeline, candidate generation, ranking, and how you'd handle cold start and latency constraints.

System DesignTechnical Trade-offsProduct Sense & Ideation
Author's notes

This is a beast of a question and I underestimated how much they'd want to go into each layer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then walk through the end-to-end ML pipeline from data collection to serving. Emphasize trade-offs between personalization, latency, and cold start, and how you would measure success with online metrics.

Pro tip: Anchor your design around the two-tower retrieval model and a multi-stage ranking system, and explicitly discuss how you'd handle the feedback loop and position bias in implicit feedback.

1. Clarify Requirements and Scope

Ask clarifying questions to define functional requirements (e.g., personalized feed, real-time interactions) and non-functional requirements (latency <200ms, scale of users/videos).

2. Design Data Pipeline and Feature Store

Outline data collection (user interactions, video metadata), preprocessing, and storage. Describe offline/online feature computation and a feature store for consistency.

3. Candidate Generation

Explain multiple candidate generators: two-tower retrieval for personalization, trending/popular, social graph, and fresh content. Discuss how to combine and limit to hundreds of candidates.

4. Ranking and Re-ranking

Describe a multi-stage ranking system: a lightweight ranker to narrow down, then a heavy ranker (e.g., deep neural network) to predict engagement. Include re-ranking for diversity and business rules.

5. Cold Start and Latency Optimization

Address cold start for new users (onboarding, demographics, explore-exploit) and new videos (content features, early engagement). Discuss latency optimizations: caching, model quantization, approximate nearest neighbor search, and pre-computation.

Key Points to Mention

  • Two-tower model for candidate generation with user and item embeddings
  • Multi-stage ranking with a cascade of models to balance latency and accuracy
  • Feature store for consistent online/offline features and real-time updates
  • Cold start strategies: content-based features, bandits, and transfer learning
  • Latency constraints: ANN search, model distillation, caching, and asynchronous processing
  • Evaluation metrics: offline (recall@k, NDCG) and online (CTR, watch time, retention)

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

Q2

How would you structure the offline and online evaluation strategy for this recommendation system?

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

Went with offline metrics first, replay evaluation, then A/B testing for online.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining clear offline metrics that correlate with online success, then describe a robust online A/B testing framework with guardrail metrics. Emphasize the importance of validating offline gains with online experiments and iterating based on results.

Pro tip: Highlight the need to monitor for novelty effects and long-term holdout groups to ensure sustained impact, as this shows maturity beyond basic A/B testing.

1. Define Offline Metrics

Select offline metrics (e.g., recall@k, NDCG, AUC) that align with business objectives and correlate with online performance. Use a holdout set and cross-validation to avoid overfitting.

2. Design Online Experiments

Plan A/B tests with proper randomization, sufficient power, and guardrail metrics (e.g., user engagement, revenue, latency). Consider multi-armed bandits for faster iteration.

3. Validate Offline-Online Correlation

Run pilot experiments to check if offline improvements translate to online gains. If not, refine offline metrics or model.

4. Monitor and Iterate

Continuously monitor experiments for novelty effects, seasonality, and long-term impact using holdout groups. Iterate based on learnings.

5. Scale and Deploy

Once validated, roll out to larger population with gradual ramp-up, while tracking key metrics and ensuring no degradation.

Key Points to Mention

  • Offline metrics: precision, recall, NDCG, MAP, AUC
  • Online metrics: CTR, conversion rate, dwell time, revenue
  • A/B testing best practices: randomization, sample size, significance
  • Guardrail metrics: latency, user satisfaction, diversity
  • Novelty effect and long-term holdout
  • Multi-armed bandits and sequential testing

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

Q3

How do you balance exploration versus exploitation in a recommendation feed where you also need to keep users engaged?

Technical Trade-offsProduct Strategy
Author's notes

I knew this was coming and still managed to make it sound generic.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing exploration-exploitation as a trade-off between short-term engagement and long-term user satisfaction and ecosystem health. Then describe a concrete mechanism like multi-armed bandits or reinforcement learning with a tunable exploration parameter, and explain how you'd measure and adjust it using online metrics and A/B tests. Finally, highlight the importance of context (user, content, and business goals) in setting the balance.

Pro tip: Emphasize that exploration isn't just about random content—it's about intelligent exploration that maximizes information gain while minimizing user experience cost, and mention how you'd use counterfactual logging and off-policy evaluation to safely test new policies.

1. Define the objective and constraints

Clarify what 'engagement' means (e.g., clicks, time spent, return frequency) and what long-term goals (e.g., user retention, satisfaction) you're optimizing for. Identify constraints like latency, diversity requirements, and business rules.

2. Choose an algorithmic approach

Select a method such as epsilon-greedy, Thompson sampling, or contextual bandits that naturally balances exploration and exploitation. Explain how the exploration rate can be tuned or decayed over time.

3. Incorporate context and personalization

Use contextual features (user history, demographics, item attributes) to make exploration more efficient—explore where uncertainty is high but potential reward is also high, rather than uniformly at random.

4. Measure and iterate with online experiments

Set up A/B tests or interleaving experiments to compare different exploration strategies. Track both short-term engagement metrics and long-term proxies (e.g., user retention, diversity of consumed content).

5. Monitor and adapt dynamically

Implement guardrail metrics to detect negative user experiences, and adjust exploration rates based on real-time feedback. Consider multi-objective optimization to balance engagement with other goals like content diversity or freshness.

Key Points to Mention

  • Multi-armed bandits and contextual bandits as frameworks for balancing exploration and exploitation
  • The importance of off-policy evaluation and counterfactual logging to safely test new policies
  • How to set exploration rates (e.g., epsilon decay, Thompson sampling) and adapt them based on user feedback
  • Metrics for success: short-term engagement (CTR, time spent) and long-term health (retention, diversity, satisfaction)
  • The role of user context and personalization in making exploration more efficient
  • Trade-offs between exploration and exploitation in terms of user experience and business goals

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

Q4

What are your strategies for handling cold start for both new users and new content creators on the platform?

System DesignProduct Sense & Ideation
Author's notes

New creator side felt okay.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the two cold start problems: new users (lack of interaction data) and new content creators (lack of content performance data). Then propose a unified ML framework that leverages side information, meta-learning, and exploration-exploitation strategies, while addressing product-specific constraints like content quality and user retention.

Pro tip: Emphasize the importance of defining clear offline and online metrics for cold start success, and discuss how you would design A/B tests to validate your strategies without harming long-term user experience.

1. Clarify the problem and constraints

Define what cold start means for new users and new creators, and identify key constraints such as data sparsity, latency, and business goals.

2. Leverage side information and meta-learning

Use user demographics, content metadata, and cross-domain signals to build initial representations; apply meta-learning to quickly adapt to new users/creators with few interactions.

3. Design exploration strategies

Implement bandit algorithms (e.g., Thompson Sampling) or active learning to balance exploration of new content/users with exploitation of known preferences.

4. Incorporate product-specific signals

For new users, focus on onboarding and diversity; for new creators, focus on content quality and early engagement metrics to avoid negative feedback loops.

5. Evaluate and iterate

Define offline metrics (e.g., AUC, NDCG) and online metrics (e.g., CTR, retention), and set up A/B tests to measure long-term impact and refine strategies.

Key Points to Mention

  • Meta-learning (e.g., MAML, Reptile) for fast adaptation to new users/creators
  • Contextual bandits for exploration-exploitation trade-off
  • Use of side information: user demographics, content metadata, social graph
  • Hybrid recommendation systems combining content-based and collaborative filtering
  • Cold start for creators: content quality assessment, early engagement signals, and feedback loops
  • Evaluation metrics: offline (AUC, NDCG) and online (CTR, retention, diversity), and A/B testing

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

Q5

How would you design the system to meet strict latency requirements while still running a complex multi-stage ranking pipeline?

System DesignTechnical Trade-offs
Author's notes

Talked about pre-computation, caching candidate sets, and keeping the heavy ranking model out of the critical path.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the latency budget and scale, then propose a multi-stage ranking architecture where each stage progressively reduces candidate set size while increasing model complexity. Emphasize techniques like precomputation, caching, model distillation, and hardware acceleration to meet strict latency SLAs.

Pro tip: Quantify the latency budget (e.g., 100ms) and break it down per stage; show you understand that most latency comes from feature fetching and network calls, not just model inference.

1. Clarify Requirements and Constraints

Ask about latency SLA, QPS, candidate set size, and available hardware. Define what 'strict latency' means in milliseconds.

2. Design Multi-Stage Pipeline

Propose stages: candidate generation (e.g., ANN), light ranking (e.g., logistic regression), heavy ranking (e.g., deep model). Each stage reduces candidates and increases complexity.

3. Optimize Each Stage for Latency

Use precomputation, caching, model quantization, distillation, and hardware accelerators (GPU/TPU) for heavy stages. Parallelize feature fetching.

4. Implement Fallbacks and Monitoring

Design graceful degradation (e.g., skip heavy ranker under load) and monitor latency percentiles (p99) to ensure SLA adherence.

5. Evaluate Trade-offs

Discuss trade-offs between latency, accuracy, and cost. Justify choices like using a simpler model for latency-critical paths.

Key Points to Mention

  • Latency budget breakdown per stage (e.g., 20ms for candidate generation, 50ms for ranking)
  • Precomputation and caching of features and embeddings
  • Model distillation and quantization to reduce inference time
  • Hardware acceleration (GPU/TPU) and optimized serving (e.g., TensorRT, ONNX)
  • Parallelization of feature fetching and asynchronous I/O
  • Fallback mechanisms and graceful degradation under high load

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