← Meta Interview Insights

Meta·Data Scientist·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jul 2026

Summary

Brutal system design question for a DS role at Meta, all centered around Instagram Shopping's ranking system. The scope was massive and I felt like I was playing catch-up the whole time.

Questions Asked (5)

Q1

Design a multi-objective ranking framework for Instagram Shopping's home feed that balances buyer GMV, buyer satisfaction, and seller fairness. Walk through your model architecture, how you aggregate competing objectives, and how you handle training data bias from historical rankings.

System DesignTechnical Trade-offsData Modeling
Author's notes

This is the kind of question where you think you know where to start and then realize five minutes in that you've already painted yourself into a corner.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business objectives and constraints, then propose a multi-task learning architecture that predicts GMV, satisfaction, and fairness metrics, and finally describe how to combine them into a single ranking score while addressing biases. Emphasize the trade-offs and the need for continuous evaluation and iteration.

Pro tip: Show awareness that fairness constraints can be integrated via constrained optimization or post-processing, and that counterfactual or unbiased learning techniques are essential to mitigate historical ranking bias. Mention the importance of online experiments to validate offline metrics.

1. Clarify Objectives and Metrics

Define precise metrics for buyer GMV (e.g., revenue per session), buyer satisfaction (e.g., predicted CTR, dwell time, survey scores), and seller fairness (e.g., exposure parity across seller segments). Discuss how these metrics might conflict and the need for trade-offs.

2. Design Model Architecture

Propose a multi-task learning model (e.g., shared bottom layers with task-specific towers) to predict each objective. Consider using a mixture of experts or multi-gate Mixture-of-Experts to handle task correlations and conflicts.

3. Aggregate Competing Objectives

Explain how to combine predictions into a final ranking score: linear weighted sum, multiplicative, or constrained optimization (e.g., maximize GMV subject to fairness constraints). Discuss how to set weights (e.g., via business rules, multi-objective optimization, or reinforcement learning).

4. Address Training Data Bias

Acknowledge that historical rankings create feedback loops and biased labels. Propose techniques like inverse propensity scoring (IPS), counterfactual learning, or unbiased learning-to-rank to correct for position and exposure bias.

5. Evaluate and Iterate

Outline offline evaluation (e.g., counterfactual estimators, fairness metrics) and online A/B testing to measure long-term effects. Emphasize monitoring for fairness drift and adapting the model over time.

Key Points to Mention

  • Multi-task learning with shared representations to capture task relationships
  • Trade-off mechanisms: weighted sum, constrained optimization, Pareto frontier
  • Bias correction techniques: inverse propensity scoring, counterfactual reasoning
  • Fairness definitions: exposure parity, opportunity equality, and how to operationalize
  • Online evaluation: A/B testing, interleaving, and long-term holdout groups
  • Feedback loops and the need for exploration (e.g., epsilon-greedy) to reduce bias

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

Q2

How would you enforce minimum exposure guarantees for sellers, including cold-start sellers with no historical data, without tanking overall feed quality?

Product StrategyTechnical Trade-offsAdaptability & Ambiguity
Author's notes

Went with a constraint-based floor on seller-level impression share and a separate exploration budget for new sellers, something like a bandit arm.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem as a constrained optimization: maximize feed quality subject to minimum exposure guarantees for sellers, especially cold-start ones. Propose a multi-stage solution that uses exploration for cold-start sellers, then transitions to performance-based allocation with guardrails. Emphasize measurement, experimentation, and trade-off management to ensure overall feed quality is not degraded.

Pro tip: Acknowledge that cold-start sellers lack data, so use contextual bandits or Bayesian priors to estimate quality, and set exposure guarantees as soft constraints that adapt based on real-time feedback. This shows you balance fairness with system health.

1. Define Objectives and Constraints

Clarify the goal: enforce minimum exposure for all sellers, including cold-start, while maintaining or improving overall feed quality metrics (e.g., CTR, engagement). Identify constraints like fairness, seller retention, and user experience.

2. Design Exploration Strategy for Cold-Start

For sellers with no history, allocate a small, controlled portion of traffic using exploration algorithms (e.g., epsilon-greedy, Thompson sampling) to gather data without significantly impacting feed quality. Use contextual features to personalize exploration.

3. Implement Performance-Based Allocation with Guarantees

For sellers with data, use a ranking model that incorporates a minimum exposure constraint (e.g., via constrained optimization or re-ranking). Ensure guarantees are dynamic and can be relaxed if feed quality drops below a threshold.

4. Monitor and Adapt

Continuously monitor feed quality and seller exposure. Use A/B tests to measure impact and adjust parameters (e.g., exploration rate, guarantee levels) to balance objectives. Consider multi-armed bandit approaches for real-time adaptation.

5. Evaluate Trade-offs and Iterate

Quantify the trade-off between exposure guarantees and feed quality. If quality degrades, refine the model or adjust guarantees. Communicate findings and iterate with stakeholders.

Key Points to Mention

  • Constrained optimization: maximize feed quality subject to minimum exposure constraints.
  • Exploration-exploitation trade-off for cold-start sellers using bandit algorithms.
  • Use of Bayesian methods or priors to estimate quality for new sellers.
  • Dynamic adjustment of guarantees based on real-time feedback and A/B testing.
  • Guardrails to prevent feed quality degradation, such as capping exploration traffic.
  • Metrics: define both seller exposure (e.g., impressions) and feed quality (e.g., CTR, user engagement).

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

Q3

How do you make the ranking system robust to fraudulent sellers and fake engagement signals?

Product Analytics & MetricsRoot Cause AnalysisSystem Design
Author's notes

Talked about anomaly detection on engagement velocity and seller-level risk scoring as a multiplicative penalty on the ranking score.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem as an adversarial classification task where fraudulent sellers and fake engagement are the positive class, and the ranking system must minimize their impact while preserving legitimate signals. Then outline a multi-layered defense: data validation, feature engineering to detect fraud, model robustness techniques, and continuous monitoring with feedback loops. Finally, emphasize trade-offs between fraud detection and user experience, and how you'd measure success.

Pro tip: Show awareness that fraudsters adapt, so static rules fail; propose an adversarial training loop where the model is periodically retrained on newly discovered fraud patterns. Also, mention the importance of explainability to trust and safety teams for manual review.

1. Define and Quantify Fraud

Clearly define what constitutes fraudulent sellers and fake engagement (e.g., fake reviews, click farms, bot accounts). Establish metrics to quantify their prevalence and impact on ranking quality.

2. Data Validation and Feature Engineering

Implement data validation checks (e.g., anomaly detection on seller behavior, review patterns). Engineer features that capture suspicious signals, such as velocity of reviews, IP diversity, and graph-based features (e.g., seller-buyer network anomalies).

3. Robust Model Training

Use robust loss functions (e.g., Huber loss) and regularization to reduce overfitting to fraudulent patterns. Incorporate adversarial training by generating synthetic fraud examples or using historical fraud data to make the model resilient to evolving tactics.

4. Post-Model Safeguards

Apply post-processing rules to demote or filter out suspicious items. Use ensemble methods and human-in-the-loop review for borderline cases. Implement rate limiting and account verification to prevent new fraud.

5. Monitoring and Iteration

Set up continuous monitoring for model drift and new fraud patterns. Create feedback loops with trust and safety teams to label new fraud instances and retrain models regularly. A/B test changes to ensure ranking quality is maintained.

Key Points to Mention

  • Adversarial nature of fraud: fraudsters constantly evolve, so the system must be adaptive.
  • Graph-based features: leverage relationships between users, sellers, and transactions to detect collusion.
  • Robustness techniques: regularization, adversarial training, and ensemble methods.
  • Trade-offs: balancing fraud detection with false positives that could harm legitimate sellers.
  • Evaluation metrics: precision/recall for fraud detection, and impact on ranking metrics like NDCG.
  • Cross-functional collaboration: working with trust and safety, legal, and engineering teams.

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

Q4

The ranking system needs to support on-device prefetching within a 20 ms latency budget. How do you design for that constraint?

System DesignTechnical Trade-offs
Author's notes

Honestly the part I felt best about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scope: what is being prefetched (candidate items, features, or scores) and where the 20 ms budget applies (on-device inference vs. network fetch). Then propose a tiered architecture that separates heavy offline computation from lightweight on-device ranking, using caching, quantization, and early exit to meet the latency constraint. Finally, discuss trade-offs between latency, freshness, and accuracy, and how you would measure and monitor the system.

Pro tip: Anchor your answer in the actual user experience: prefetching is only valuable if it reduces perceived latency without wasting resources, so explicitly tie your design to metrics like cache hit rate, staleness, and battery/network cost.

1. Clarify requirements and constraints

Ask what exactly is prefetched (items, features, embeddings), the device environment (CPU, memory, network), and how the 20 ms budget is measured (p50 vs p99). Confirm whether the budget includes network or only on-device computation.

2. Design a tiered computation pipeline

Split ranking into an offline/heavy stage (e.g., candidate generation, embedding computation) and an on-device lightweight stage (e.g., dot product, small MLP). Precompute and cache as much as possible to keep on-device work minimal.

3. Optimize the on-device model and data path

Use model quantization, pruning, and early-exit networks to reduce inference time. Store features in compact formats (e.g., int8, sparse vectors) and use efficient data structures for fast lookup.

4. Implement caching and prefetch strategies

Prefetch candidate items and their features during idle time or based on user context (e.g., time of day, location). Use a cache with TTL and eviction policies, and consider speculative prefetching with fallback to network if cache misses.

5. Measure, monitor, and iterate

Define metrics: p50/p99 latency, cache hit rate, staleness, and ranking quality (e.g., NDCG). Set up A/B tests to balance latency vs. accuracy, and monitor on-device performance across device tiers.

Key Points to Mention

  • Latency budget breakdown: distinguish between network, feature retrieval, and model inference time.
  • Model optimization techniques: quantization (int8), pruning, knowledge distillation, and early exit.
  • Caching strategies: LRU, TTL, and prefetch triggers based on user behavior or context.
  • Trade-offs: freshness vs. latency, accuracy vs. speed, and resource usage (battery, memory).
  • Fallback mechanisms: graceful degradation to a simpler model or network call when cache misses or latency spikes.
  • Evaluation metrics: p99 latency, cache hit rate, staleness, and online ranking metrics (CTR, NDCG).

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

Q5

After launch, how do you monitor for fairness drift and fraud drift, and how do you throttle supply during demand spikes like flash sales?

A/B Testing & ExperimentationProduct Analytics & MetricsSystem Design
Author's notes

I kind of lumped fairness and fraud monitoring together which probably wasn't the move.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining fairness and fraud metrics and establishing baselines, then describe a monitoring system with statistical process control to detect drift. For demand spikes, explain a throttling mechanism that balances fairness, fraud risk, and system stability, using real-time data and adaptive policies.

Pro tip: Emphasize the trade-offs between fairness, fraud prevention, and user experience during throttling, and propose a multi-armed bandit or reinforcement learning approach to dynamically adjust throttling parameters based on real-time feedback.

1. Define Metrics and Baselines

Identify key fairness metrics (e.g., demographic parity, equal opportunity) and fraud metrics (e.g., fraud rate, false positive rate). Establish baseline values from pre-launch or early post-launch data.

2. Set Up Monitoring and Alerting

Implement dashboards and automated alerts for significant deviations in fairness and fraud metrics. Use statistical tests like Kolmogorov-Smirnov or control charts to detect drift over time.

3. Detect and Diagnose Drift

When drift is detected, investigate root causes: data distribution shifts, model degradation, or adversarial behavior. Segment analysis by user groups to pinpoint issues.

4. Design Throttling Mechanism

For demand spikes, implement a throttling system that limits supply (e.g., inventory, server capacity) based on real-time demand. Use rules or adaptive algorithms to prioritize fair access and minimize fraud.

5. Iterate and Optimize

Continuously evaluate the impact of throttling on fairness and fraud metrics. Use A/B testing to compare throttling strategies and refine parameters for better trade-offs.

Key Points to Mention

  • Statistical process control and drift detection techniques (e.g., CUSUM, EWMA)
  • Fairness metrics such as demographic parity, equalized odds, and their limitations
  • Fraud detection methods like anomaly detection, graph-based approaches, and real-time scoring
  • Throttling strategies: rate limiting, queueing, lottery systems, and dynamic pricing
  • Trade-offs between fairness, fraud prevention, and user experience during throttling
  • Use of reinforcement learning or bandit algorithms for adaptive throttling

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