← Meta Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

A deep system design interview at Meta for a Data Scientist role, focused entirely on building a hashtag recommendation system for News Feed end-to-end. The question was massive and covered everything from label construction to safety filters, so it felt less like one question and more like ten back-to-back. Brutal but fair.

Questions Asked (10)

Q1

How would you define the prediction target and unit of observation for a hashtag recommendation system in a social media News Feed? How do you construct positive and negative labels from logs without introducing selection bias?

System DesignData ModelingTechnical Trade-offs
Author's notes

This is where I spent the most time and probably the most words.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the product goal: to recommend hashtags that maximize user engagement (e.g., clicks, posts) in the News Feed. Define the unit of observation as a user-post impression where hashtag suggestions are shown, and the prediction target as the probability of engagement with a suggested hashtag. Then discuss label construction from logs, addressing selection bias by using techniques like inverse propensity scoring or randomized exploration data.

Pro tip: Emphasize that the unit of observation should align with the decision point (e.g., when a user is composing a post) and that negative labels must include both non-impressed and impressed-but-not-clicked cases to avoid bias. Mention that using only logged data from the current system can perpetuate popularity bias, so incorporating exploration traffic or counterfactual methods is key.

1. Clarify the product goal and decision point

Understand that the system suggests hashtags to users when they create a post, aiming to increase engagement and content discoverability. The decision point is when the user is composing a post and sees hashtag suggestions.

2. Define unit of observation and prediction target

The unit of observation is a (user, post, suggested hashtag) triplet at the time of impression. The prediction target is whether the user engages with the suggested hashtag (e.g., clicks or adds it to the post).

3. Construct positive and negative labels from logs

Positives: impressions where the user clicked or added the hashtag. Negatives: impressions where the user did not engage. Also consider non-impressed hashtags as negatives, but be careful of bias.

4. Address selection bias

Acknowledge that logged data is biased because the current system only shows certain hashtags. Use randomized exploration data (e.g., A/B tests with random hashtag suggestions) or inverse propensity scoring to correct for bias.

5. Evaluate and iterate

Discuss offline evaluation metrics (e.g., AUC, log loss) and online A/B testing to validate the model. Continuously monitor for bias and retrain with fresh exploration data.

Key Points to Mention

  • Unit of observation: (user, post, hashtag) impression or (user, post) with multiple hashtags.
  • Prediction target: binary engagement (click/add) or multi-class (which hashtag).
  • Positive labels: explicit user actions (click, add, post with hashtag).
  • Negative labels: non-engagement, but distinguish between impressed and non-impressed.
  • Selection bias: from logging policy, popularity bias, position bias.
  • Mitigation: randomized exploration, inverse propensity scoring, counterfactual learning.

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

Q2

What candidate generation sources would you use for hashtag recommendations, and how do you prevent popularity bias from dominating the results?

System DesignProduct Sense & IdeationTechnical Trade-offs
Author's notes

I listed personalized affinity (user's past hashtag interactions), content-based signals from post text, and trending/recency signals.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining multiple candidate generation sources (e.g., co-occurrence, content-based, trending, user history) and explain how they feed into a ranking model. Then discuss specific debiasing techniques such as popularity penalties, diversity constraints, and exploration to prevent popularity bias from dominating.

Pro tip: Emphasize that popularity bias is often a feedback loop: popular hashtags get more exposure, leading to more engagement, which reinforces their popularity. Propose logging and counterfactual evaluation to measure and mitigate this loop.

1. Identify Candidate Generation Sources

List diverse sources: co-occurrence (hashtags used together), content-based (text/image similarity), trending/popular, user history, and social graph (friends' usage). Explain how each source contributes unique candidates.

2. Explain Ranking and Filtering

Describe how candidates from multiple sources are merged and ranked using a model that predicts engagement (e.g., CTR, likes). Mention that ranking should incorporate diversity and freshness signals.

3. Define Popularity Bias and Its Impact

Define popularity bias as the tendency to over-recommend already popular hashtags, which reduces discovery and harms long-tail content. Explain how it creates a feedback loop and reduces user satisfaction.

4. Propose Debiasing Techniques

Suggest methods: popularity penalty in ranking (e.g., divide score by popularity), diversity constraints (e.g., MMR), exploration (epsilon-greedy), and calibration to match user interests. Also mention using inverse propensity scoring in training.

5. Evaluate and Monitor

Outline evaluation metrics: beyond engagement, measure diversity, coverage, and long-tail exposure. Use A/B tests and counterfactual logging to ensure debiasing doesn't hurt relevance.

Key Points to Mention

  • Multiple candidate sources: co-occurrence, content-based, trending, user history, social graph
  • Ranking model with engagement prediction and diversity signals
  • Popularity bias feedback loop and its negative effects
  • Debiasing techniques: popularity penalty, diversity constraints, exploration, inverse propensity scoring
  • Evaluation metrics: diversity, coverage, long-tail exposure, and counterfactual evaluation
  • Trade-off between relevance and diversity, and how to balance them

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

Q3

Describe at least ten concrete features you would use in a logistic regression ranker for hashtag recommendations, covering user affinity, post relevance, temporal signals, and locale.

System DesignData ModelingProduct Analytics & Metrics
Author's notes

I rattled off things like historical hashtag CTR for the user, cosine similarity between post embeddings and hashtag embeddings, hashtag global click rate in the past 7 days, days since user last engaged with the hashtag, locale match between user and hashtag primary language, post recency, number of times hashtag appeared in user's feed recently, creator's hashtag usage frequency, session depth at impression time, and device type.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the recommendation scenario and the role of the logistic regression ranker, then systematically list features across the four requested categories, ensuring each feature is concrete and actionable. For each feature, briefly explain how it would be computed and why it is predictive, and mention how you would handle categorical variables and interactions.

Pro tip: Emphasize that logistic regression requires feature engineering for non-linear relationships and interactions, and discuss how you would validate feature importance and avoid leakage. Also, mention that you would start with a simple baseline and iterate, using offline metrics like AUC and online A/B tests.

1. Clarify the problem and data

Ask clarifying questions about the recommendation context, data available, and how the ranker fits into the overall system. Confirm that the goal is to rank hashtags for a user given a post or context.

2. Brainstorm features by category

Systematically generate features for each of the four categories: user affinity, post relevance, temporal signals, and locale. Aim for at least 10 concrete features, ensuring diversity and actionability.

3. Detail feature computation and rationale

For each feature, explain how it would be computed from available data and why it is predictive of hashtag engagement. Mention any necessary transformations (e.g., log scaling, binning) for logistic regression.

4. Address modeling considerations

Discuss how to handle categorical features (e.g., one-hot encoding, target encoding), interactions, and regularization. Mention potential issues like multicollinearity and feature leakage.

5. Summarize and prioritize

Wrap up by prioritizing features based on expected impact and ease of implementation, and suggest an evaluation plan using offline and online metrics.

Key Points to Mention

  • User affinity features: historical interaction rate with hashtag, user's past hashtag usage frequency, similarity between user and hashtag embeddings.
  • Post relevance features: cosine similarity between post content and hashtag embedding, presence of hashtag in post text, topic model probability of hashtag given post.
  • Temporal signals: hashtag trend score (e.g., rate of increase in usage over last hour), time since user last engaged with hashtag, recency of hashtag in user's network.
  • Locale features: language match between user and hashtag, geographic popularity of hashtag, local trending score.
  • Feature engineering for logistic regression: binning continuous variables, creating interaction terms (e.g., user affinity × temporal trend), and using regularization to prevent overfitting.
  • Evaluation: offline metrics like AUC, precision@k, and online A/B testing with engagement metrics.

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

Q4

Why start with a calibrated logistic regression instead of a deeper model? Walk through your regularization choices, how you'd handle class imbalance, and how you'd prevent data leakage.

Technical Trade-offsSystem DesignData Modeling
Author's notes

Classic 'justify your model choice' setup.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the calibrated logistic regression as a deliberate baseline choice that balances interpretability, speed, and risk control, then systematically address regularization, class imbalance, and leakage prevention. Emphasize that this approach enables fast iteration and clear communication with stakeholders before investing in complex models.

Pro tip: Mention that you would use the logistic regression's coefficients and calibration curve as a diagnostic tool to understand feature importance and potential issues, which can inform feature engineering for deeper models later. This shows you're not just defaulting to a simple model but using it strategically.

1. Justify the baseline choice

Explain why logistic regression is a strong starting point: it's interpretable, fast to train and deploy, provides calibrated probabilities, and sets a performance benchmark. Highlight that it helps validate data quality and feature signal before adding complexity.

2. Detail regularization strategy

Discuss using L1 (Lasso) for feature selection or L2 (Ridge) for handling multicollinearity, and how you'd tune the regularization strength via cross-validation. Mention that elastic net can combine both when needed.

3. Address class imbalance

Describe techniques like class weighting, resampling (SMOTE, undersampling), or adjusting decision thresholds, and explain how you'd evaluate with metrics like AUC-ROC, precision-recall, or F1 instead of accuracy.

4. Prevent data leakage

Outline strict separation of training and validation data, ensuring all preprocessing (scaling, imputation, encoding) is fit only on training folds, and using time-based splits if temporal leakage is a risk.

5. Connect to business impact and next steps

Tie the approach to business goals: fast iteration, explainability for stakeholders, and a clear path to more complex models if needed. Mention monitoring calibration and performance over time.

Key Points to Mention

  • Interpretability and explainability for stakeholder trust and regulatory compliance
  • Regularization techniques (L1, L2, elastic net) and hyperparameter tuning via cross-validation
  • Class imbalance handling: class weights, resampling, and appropriate evaluation metrics
  • Data leakage prevention: proper cross-validation, pipeline encapsulation, and temporal splits
  • Calibration methods (Platt scaling, isotonic regression) and their importance for probability outputs
  • Baseline as a benchmark for feature engineering and model complexity trade-offs

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

Q5

How would you check and correct model calibration, and how would you set display thresholds per user cohort or surface? What about exploration rates for new hashtags?

Technical Trade-offsA/B Testing & ExperimentationSystem Design
Author's notes

Platt scaling vs isotonic regression, I explained the tradeoff (isotonic is more flexible but needs more data).

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining calibration and its importance, then outline a systematic approach to diagnose and correct miscalibration using reliability diagrams and methods like Platt scaling or isotonic regression. Next, explain how to set display thresholds per cohort or surface by optimizing a business metric (e.g., engagement) while ensuring fairness and consistency, possibly using A/B tests. Finally, discuss exploration rates for new hashtags as a multi-armed bandit problem, balancing exploration and exploitation with contextual factors.

Pro tip: Emphasize that calibration should be evaluated on a held-out set and that thresholds should be set based on utility functions that may vary by cohort; for exploration, mention using Thompson Sampling or epsilon-greedy with decay to adapt over time.

1. Define and Diagnose Calibration

Explain what model calibration means (predicted probabilities match observed frequencies) and how to diagnose it using reliability diagrams, calibration curves, and metrics like Expected Calibration Error (ECE).

2. Correct Miscalibration

Describe methods to correct miscalibration, such as Platt scaling, isotonic regression, or temperature scaling, and discuss how to validate the correction on a held-out set.

3. Set Display Thresholds per Cohort/Surface

Outline a process to determine optimal thresholds for different user cohorts or surfaces by defining a utility function (e.g., maximize engagement subject to constraints) and using A/B testing or historical data to find thresholds that balance precision and recall.

4. Design Exploration for New Hashtags

Frame exploration as a multi-armed bandit problem, discussing algorithms like Thompson Sampling or epsilon-greedy, and how to set exploration rates based on uncertainty, novelty, and potential impact, while considering contextual factors like user cohort.

5. Monitor and Iterate

Emphasize the need for continuous monitoring of calibration, threshold performance, and exploration effectiveness, with feedback loops to adjust as data accumulates and user behavior changes.

Key Points to Mention

  • Reliability diagrams and Expected Calibration Error (ECE) for diagnosis
  • Platt scaling, isotonic regression, and temperature scaling for correction
  • Utility-based threshold optimization and A/B testing for cohort-specific thresholds
  • Multi-armed bandit algorithms (Thompson Sampling, epsilon-greedy) for exploration
  • Contextual factors: user cohort, surface, and hashtag novelty
  • Trade-offs between exploration and exploitation, and long-term vs short-term metrics

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

Q6

What offline metrics would you use to evaluate the ranker, and how would you account for position bias in historical data when estimating top-k ranking quality?

Product Analytics & MetricsA/B Testing & ExperimentationTechnical Trade-offs
Author's notes

Log loss and AUC-PR were my primary metrics.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining offline ranking metrics like NDCG, MAP, and MRR, emphasizing their relevance to top-k quality. Then discuss position bias in historical data and propose methods to correct for it, such as inverse propensity scoring (IPS) or click models. Conclude by explaining how you would validate the debiased estimates, perhaps through A/B tests or counterfactual evaluation.

Pro tip: Mention that while offline metrics are useful for model selection, they often don't align perfectly with online business metrics; therefore, use them directionally and always validate with online experiments. Also, highlight the importance of using unbiased evaluation data (e.g., from randomization) when possible.

1. Define offline ranking metrics

List and briefly explain metrics such as NDCG, MAP, MRR, and Precision@k, focusing on their strengths for evaluating top-k ranking quality.

2. Identify position bias in historical data

Explain that historical click data is biased because users are more likely to interact with items at higher positions, which can distort offline evaluation.

3. Apply debiasing techniques

Describe methods like inverse propensity scoring (IPS), click models (e.g., examination hypothesis), or using unbiased data from randomization to correct for position bias.

4. Validate debiased estimates

Discuss how to validate the debiased offline metrics, such as by comparing with online A/B test results or using counterfactual evaluation techniques.

5. Connect to business impact

Emphasize that offline metrics should be used alongside online metrics (e.g., CTR, engagement) and that the ultimate goal is to improve user experience and business outcomes.

Key Points to Mention

  • NDCG, MAP, MRR, and Precision@k as offline ranking metrics
  • Position bias in click data and its impact on evaluation
  • Inverse propensity scoring (IPS) and propensity estimation
  • Click models (e.g., examination hypothesis, cascade model)
  • Counterfactual evaluation and off-policy evaluation
  • Importance of online validation (A/B testing) and alignment with business metrics

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

Q7

How would you design the online experiment for this feature? Cover randomization unit, guardrail metrics, primary outcomes, novelty effect detection, and stopping criteria.

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

User-level randomization to avoid cross-contamination.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the feature and its goals, then systematically address each component: randomization unit, guardrail metrics, primary outcomes, novelty effect detection, and stopping criteria. Emphasize trade-offs and practical considerations specific to Meta's scale and data infrastructure.

Pro tip: Always tie your design choices back to the feature's specific context and business objectives—demonstrating that you can tailor experimentation to the problem rather than applying a one-size-fits-all approach. Also, mention how you would handle network effects or interference, a common challenge in social products.

1. Clarify Feature and Goals

Ask questions to understand the feature, its intended impact, and the business context. Identify the target population and key success metrics.

2. Define Randomization Unit

Choose the appropriate unit (e.g., user, session, device) based on the feature and potential interference. Justify your choice considering factors like network effects and consistency.

3. Select Metrics

Identify primary outcome metrics that directly measure the feature's success and guardrail metrics to monitor for unintended negative consequences. Ensure metrics are sensitive and aligned with long-term goals.

4. Plan for Novelty and Stopping

Design methods to detect novelty effects (e.g., analyze time trends, holdout groups) and define stopping criteria (e.g., fixed horizon, sequential testing) that balance statistical rigor with practical constraints.

5. Consider Practical Execution

Discuss implementation details like sample size calculation, duration, and potential pitfalls (e.g., SRM, interference). Highlight how you would monitor and adapt during the experiment.

Key Points to Mention

  • Randomization unit: user-level vs. session-level, considering network effects and consistency.
  • Guardrail metrics: latency, crash rates, user engagement, and other health metrics to ensure no harm.
  • Primary outcomes: clear, quantifiable metrics tied to the feature's goal, such as CTR, conversion, or retention.
  • Novelty effect detection: compare early vs. late experiment periods, use holdout groups, or model time trends.
  • Stopping criteria: pre-registered duration, sequential testing, or Bayesian methods to avoid peeking and false positives.
  • Sample size and power: calculate required sample size based on expected effect size and variance.

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

Q8

How do you handle cold start for new hashtags and new users, and how do you detect and respond to concept drift in hashtag popularity?

System DesignTechnical Trade-offsAdaptability & Ambiguity
Author's notes

For new hashtags I said fall back to content-based signals from the post text alone and use a prior based on similar hashtags.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem scope and success metrics, then propose a hybrid approach that combines content-based features for cold start and online learning for drift detection. Structure your answer around a scalable system design that balances exploration and exploitation, and discuss trade-offs between model complexity and latency.

Pro tip: Emphasize the importance of defining clear evaluation metrics and setting up A/B tests to validate your approach, as this shows you think end-to-end. Also, mention that you'd leverage Meta's existing infrastructure like PyTorch and FBLearner to prototype quickly.

1. Clarify Requirements and Metrics

Ask questions to understand the scale, latency requirements, and what success looks like (e.g., engagement, CTR). Define offline and online metrics to evaluate cold start and drift handling.

2. Cold Start Strategy

For new hashtags, use content-based features (text, image, metadata) and knowledge graph embeddings to infer popularity. For new users, leverage demographic and contextual features, and use meta-learning or transfer learning from similar users.

3. Drift Detection and Adaptation

Monitor hashtag popularity distributions using statistical tests (e.g., KL divergence, Page-Hinkley) and retrain models online or incrementally. Use bandit algorithms to balance exploration of new trends and exploitation of known popular hashtags.

4. System Design and Trade-offs

Propose a scalable architecture with streaming data pipelines (e.g., Kafka) and online learning (e.g., FTRL). Discuss trade-offs between model freshness and computational cost, and between personalization and generalization.

5. Evaluation and Iteration

Outline an A/B testing framework to measure the impact of your cold start and drift handling strategies. Suggest logging and monitoring to continuously improve the system.

Key Points to Mention

  • Content-based filtering and metadata for cold start
  • Meta-learning or transfer learning for new users
  • Online learning algorithms (e.g., FTRL, SGD) for drift adaptation
  • Change detection methods (e.g., ADWIN, Page-Hinkley)
  • Multi-armed bandits for exploration-exploitation trade-off
  • A/B testing and evaluation metrics (e.g., CTR, engagement)

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

Q9

What safety and policy risks exist with hashtag recommendations, and how would you handle real-time filtering and fairness across languages and regions?

System DesignProduct StrategyCross-functional Alignment
Author's notes

I flagged crisis-related tags, misinformation amplification, and coordinated manipulation as the main risks.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem as a risk taxonomy across safety, policy, and fairness dimensions, then propose a real-time filtering architecture that balances precision, recall, and latency. Emphasize cross-functional collaboration with policy, legal, and regional teams to adapt to local norms and languages.

Pro tip: Highlight the trade-off between aggressive filtering and user engagement, and suggest a tiered enforcement system (e.g., demote, blur, block) with human-in-the-loop for edge cases. Mention the importance of measuring fairness metrics across languages and regions to avoid disparate impact.

1. Identify risks

Enumerate safety risks (e.g., harassment, misinformation, self-harm) and policy risks (e.g., hate speech, regulated goods) associated with hashtag recommendations.

2. Design real-time filtering

Propose a multi-stage pipeline: candidate generation, lightweight classifiers for fast filtering, and heavier models for nuanced cases, ensuring low latency.

3. Ensure fairness across languages and regions

Use language-agnostic embeddings, region-specific policy rules, and fairness audits to detect and mitigate bias in filtering performance.

4. Implement feedback loops

Incorporate user reports, appeals, and human review to continuously improve models and adapt to evolving language and cultural contexts.

5. Measure and iterate

Define metrics (e.g., precision/recall per language, fairness gaps, latency) and set up A/B tests to evaluate trade-offs and iterate.

Key Points to Mention

  • Risk taxonomy: safety vs. policy, and how they intersect with recommendation systems
  • Real-time constraints: latency budgets, scalability, and model efficiency techniques (e.g., distillation, caching)
  • Fairness metrics: demographic parity, equal opportunity, and per-language/region performance
  • Cross-functional alignment: working with policy, legal, and regional teams to define and enforce norms
  • Human-in-the-loop: escalation paths for ambiguous content and appeals
  • Adversarial robustness: handling evasion tactics and emerging slang

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

Q10

How would you translate the logistic regression coefficients into actionable product insights, for example around diminishing returns from showing too many hashtags or language mismatch penalties?

Product Analytics & MetricsProduct Sense & IdeationTechnical Trade-offs
Author's notes

This was the last question and I was running low on energy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining how to interpret logistic regression coefficients in terms of odds ratios and marginal effects, then translate those into product metrics like engagement or retention. Use concrete examples such as hashtag count and language mismatch to illustrate diminishing returns and penalties, and suggest actionable product changes like capping hashtags or improving language detection.

Pro tip: Emphasize that coefficients show association, not causation, and propose A/B tests to validate any product changes derived from the model. This demonstrates rigor and prevents overreliance on observational data.

1. Interpret coefficients statistically

Explain that coefficients represent log-odds changes; convert to odds ratios or marginal effects for interpretability. For example, a negative coefficient for language mismatch indicates lower odds of engagement.

2. Map to product metrics

Connect the statistical effect to a product metric such as click-through rate, likes, or session time. For instance, each additional hashtag might increase engagement odds by X% up to a point, then diminish.

3. Identify diminishing returns and penalties

Use non-linear terms (e.g., hashtag count squared) or binning to detect diminishing returns. For language mismatch, quantify the penalty as a percentage drop in engagement for mismatched content.

4. Derive actionable insights

Translate findings into product recommendations: e.g., cap hashtags at the point of diminishing returns, or implement language detection to reduce mismatch penalties.

5. Validate with experiments

Propose A/B tests to confirm causal impact of the recommended changes, ensuring that the model's associations hold in practice.

Key Points to Mention

  • Odds ratios and marginal effects for interpretability
  • Non-linear transformations (e.g., polynomial terms) to capture diminishing returns
  • Quantifying language mismatch penalty as a percentage change in odds
  • Actionable product changes like hashtag caps or language filters
  • Caveat that correlation does not imply causation
  • A/B testing to validate model-driven recommendations

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