← Meta Interview Insights

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

Senior
May 2026

Summary

Meta ML engineer interview focused entirely on designing an ads ranking system from scratch. Pretty deep dive covering everything from problem framing to serving infrastructure, and calibration came up in a way I wasn't fully prepared for.

Questions Asked (5)

Q1

How would you frame the core ML problem for a sponsored ads ranking system? What are you actually predicting and how does that feed into the final ranking?

System DesignTechnical Trade-offsProduct Analytics & Metrics
Author's notes

I went straight to CTR prediction, which was fine, but the follow-up pushed me on whether CTR alone is enough for ranking.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the core prediction problem as estimating the expected value of showing a specific ad to a specific user in a specific context, then explain how that prediction feeds into a ranking function that orders ads by expected utility. Emphasize the multi-stage nature of the system (retrieval, ranking, auction) and how the ML model's output is used in the final auction to determine which ads are shown and in what order.

Pro tip: Don't just focus on CTR; discuss how you'd incorporate business constraints like advertiser value, user experience, and long-term satisfaction into the objective, and how you'd handle the feedback loop and position bias in training data.

1. Define the prediction target

Clarify that the core ML problem is predicting the probability and value of a user engaging with an ad (e.g., click, conversion) given user, ad, and context features. This is typically framed as a binary classification or regression problem.

2. Incorporate business value

Explain how the predicted probabilities are combined with advertiser bids and other business metrics (e.g., expected revenue, user experience) to compute an expected utility score for each ad.

3. Ranking and auction integration

Describe how the expected utility scores are used in the auction mechanism to rank ads and determine the final set and order of ads shown to the user, often involving a second-price auction or similar.

4. Handle data challenges

Discuss how to address position bias, selection bias, and the feedback loop by using techniques like inverse propensity scoring, counterfactual logging, or exploration.

5. Evaluate and iterate

Mention offline metrics (AUC, log loss) and online metrics (CTR, revenue, user satisfaction) and how to run A/B tests to validate and improve the model.

Key Points to Mention

  • Expected value calculation: pCTR * bid or pConversion * value
  • Multi-stage ranking: retrieval, light ranking, heavy ranking
  • Position bias and how to correct for it in training
  • Business constraints: advertiser ROI, user experience, long-term value
  • Auction theory: second-price auction, reserve prices
  • Online evaluation: A/B testing, interleaving, counterfactual evaluation

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

Q2

Walk me through the feature engineering you'd do for an ads ranking model. What feature groups matter most and how do you handle interactions between them?

System DesignData ModelingTechnical Trade-offs
Author's notes

Covered user features, ad features, and context features without much trouble.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem: ads ranking is a large-scale, low-latency prediction task where feature engineering must balance predictive power with serving constraints. Then walk through the major feature groups (user, ad, context, interaction) and explain how you'd handle interactions using techniques like cross features, embeddings, and model architecture. Emphasize trade-offs between model complexity, latency, and maintainability.

Pro tip: Meta's ads ranking heavily relies on real-time features and embeddings; mention how you'd handle feature freshness and high-cardinality IDs with hashing and embedding tables, and how you'd monitor feature drift in production.

1. Clarify the problem and constraints

Ask about scale, latency requirements, and available data. Establish that the goal is to predict click-through rate (CTR) or conversion rate (CVR) with high accuracy under strict serving constraints.

2. Identify key feature groups

List the main groups: user features (demographics, historical behavior), ad features (creative, targeting, advertiser), context features (time, device, placement), and interaction features (user-ad cross features). Explain why each matters.

3. Handle high-cardinality and sparse features

Describe techniques like hashing, embedding tables, and feature hashing for user IDs, ad IDs, and categorical features. Mention how to handle unseen categories and manage embedding dimensions.

4. Model feature interactions

Explain approaches for capturing interactions: manual cross features (e.g., user age x ad category), factorization machines, deep & cross networks, or attention mechanisms. Discuss trade-offs between explicit crosses and learned interactions.

5. Address productionization and iteration

Cover how to serve features in real-time (feature store, streaming), monitor drift, and iterate with A/B tests. Emphasize the importance of feature freshness and online-offline consistency.

Key Points to Mention

  • User features: demographics, historical CTR, engagement patterns, and real-time session behavior.
  • Ad features: ad creative, category, advertiser quality, and targeting criteria.
  • Context features: time of day, device type, placement, and page context.
  • Interaction features: user-ad cross features, e.g., user interest x ad topic, or user age x ad category.
  • Embedding techniques for high-cardinality IDs (e.g., user ID, ad ID) and handling of sparse features.
  • Trade-offs: model complexity vs. latency, feature freshness vs. cost, and offline vs. online consistency.

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

Q3

What model architectures would you consider for ads ranking and what are the tradeoffs between them?

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

Wide-and-deep was my anchor and I built out from there.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the key requirements of ads ranking (scale, latency, multi-objective optimization) and then present a progression of model architectures from simple to complex, discussing trade-offs in terms of accuracy, latency, scalability, and engineering complexity. Conclude by recommending a hybrid or ensemble approach that balances these factors for Meta's production environment.

Pro tip: Emphasize that the choice of architecture is often constrained by serving latency and infrastructure, so always tie trade-offs back to real-world deployment considerations like QPS and hardware limits.

1. Clarify Requirements

Ask about scale (QPS, number of ads), latency constraints, and objectives (CTR, CVR, etc.) to frame the discussion.

2. Survey Architectures

List candidate architectures: logistic regression, gradient boosted trees, wide & deep, deep neural networks (DNNs), factorization machines, and two-tower models.

3. Analyze Trade-offs

For each architecture, discuss trade-offs in accuracy, training/serving latency, scalability, feature interactions, and ease of implementation.

4. Consider Meta's Context

Highlight Meta-specific factors: massive scale, real-time bidding, multi-task learning, and the need for low-latency inference.

5. Recommend and Justify

Propose a hybrid approach (e.g., two-tower for retrieval + DNN for ranking) and justify why it best balances the trade-offs.

Key Points to Mention

  • Logistic regression: simple, fast, but limited in capturing non-linear feature interactions.
  • Gradient boosted trees (e.g., XGBoost): strong for tabular data, but high latency for online serving and less effective for sparse high-dimensional data.
  • Wide & Deep: combines memorization (wide) and generalization (deep), but requires careful feature engineering and can be complex to tune.
  • Deep neural networks (DNNs): high capacity for feature interactions, but require large data, careful regularization, and can be computationally expensive.
  • Two-tower models: efficient for retrieval and candidate generation, but may sacrifice ranking accuracy due to separate encoding.
  • Multi-task learning: important for optimizing multiple objectives (CTR, CVR) simultaneously, but introduces challenges in loss weighting and negative transfer.

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

Q4

Why does probability calibration matter in an ads auction, and how would you actually calibrate your model's outputs?

Technical Trade-offsProduct Analytics & MetricsSystem Design
Author's notes

This is where I felt most underprepared.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining why calibration matters in ads auctions—it directly affects bid shading, auction efficiency, and revenue. Then outline a practical calibration pipeline: choose a calibration method (e.g., Platt scaling, isotonic regression, or beta calibration), fit it on a held-out validation set, and monitor calibration drift over time. Emphasize the trade-offs between methods and the importance of evaluating with proper metrics like log loss, calibration curves, and expected calibration error (ECE).

Pro tip: Mention that calibration should be done post-hoc on a separate calibration set to avoid overfitting, and that in production you need to recalibrate frequently due to distribution shifts (e.g., new ad campaigns, seasonality). Also, highlight that calibration is not just about the model but also about the auction mechanism—e.g., if the auction uses a second-price rule, well-calibrated probabilities lead to truthful bidding.

1. Explain the importance of calibration in ads auctions

Describe how predicted probabilities are used to compute expected value and bids. Uncalibrated probabilities lead to suboptimal bids, reduced auction efficiency, and potential revenue loss.

2. Choose a calibration method

Discuss common methods: Platt scaling (logistic regression on scores), isotonic regression (non-parametric, flexible but needs more data), and beta calibration. Mention trade-offs: isotonic can overfit with small data, Platt is more robust but assumes a sigmoid shape.

3. Implement calibration with proper data splits

Use a held-out calibration set (not used for training) to fit the calibrator. Ensure the calibration set is representative of the production distribution. Optionally, use cross-validation to get out-of-fold predictions for calibration.

4. Evaluate and monitor calibration

Use metrics like reliability diagrams, expected calibration error (ECE), and log loss. Monitor calibration over time and retrain the calibrator periodically or when distribution shifts are detected.

5. Integrate with the auction system

Explain how calibrated probabilities feed into bid shading and auction decisions. Consider the impact on key business metrics like CTR, CVR, and revenue. Discuss potential feedback loops and how to mitigate them.

Key Points to Mention

  • Calibration ensures predicted probabilities reflect true likelihoods, which is crucial for optimal bidding in auctions.
  • Common calibration techniques: Platt scaling, isotonic regression, beta calibration, and their trade-offs.
  • Use a separate calibration set to avoid overfitting and ensure unbiased calibration.
  • Evaluation metrics: reliability diagrams, ECE, MCE, log loss, and Brier score.
  • Monitor calibration drift and retrain calibrator regularly due to changing ad inventory and user behavior.
  • Calibration impacts auction efficiency, revenue, and advertiser ROI; misalignment can lead to the winner's curse or lost opportunities.

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

Q5

Describe the training and serving infrastructure for this ads ranking system at a high level, including how you'd validate changes before full rollout.

System DesignA/B Testing & ExperimentationTechnical Trade-offs
Author's notes

Offline pipeline and online inference I handled fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the end-to-end ML lifecycle for ads ranking, covering data ingestion, training, and serving. Then describe a multi-stage validation process that includes offline evaluation, online A/B testing, and gradual rollout with guardrails. Emphasize how you balance model performance with system constraints and business metrics.

Pro tip: Highlight the importance of counterfactual logging and unbiased offline evaluation to catch issues before online testing, and mention how you'd monitor for feedback loops and delayed conversions in ads.

1. Training Infrastructure

Describe the data pipeline (e.g., feature engineering, logging), distributed training setup (e.g., parameter servers, all-reduce), and model refresh cadence (e.g., daily retraining).

2. Serving Infrastructure

Explain the model serving architecture (e.g., real-time inference, feature store, caching), latency requirements, and how you handle high throughput and fault tolerance.

3. Offline Validation

Detail offline metrics (e.g., AUC, calibration, business metrics like CTR) and techniques like counterfactual evaluation, holdout sets, and sanity checks.

4. Online Validation

Describe A/B testing methodology, including experiment design, sample size, guardrail metrics, and statistical significance.

5. Gradual Rollout

Explain staged rollout (e.g., 1% -> 5% -> 50% -> 100%) with monitoring for regressions, automated rollback, and canary analysis.

Key Points to Mention

  • Feature store for consistent features between training and serving
  • Distributed training with parameter servers or all-reduce
  • Real-time serving with low latency (e.g., <100ms) and high QPS
  • Counterfactual logging and unbiased offline evaluation
  • A/B testing with guardrail metrics (e.g., revenue, user experience)
  • Gradual rollout with canary and automated rollback

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