← Meta Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

Meta ML Engineer interview focused entirely on designing a location-aware recommendation system. The depth they expected was pretty intense, covering everything from geospatial indexing to cold-start to A/B testing in a single session.

Questions Asked (4)

Q1

Design an ML system that recommends nearby places (restaurants, shops, attractions, etc.) to mobile users whose location is continuously updating.

System DesignTechnical Trade-offsA/B Testing & Experimentation
Author's notes

This was the whole interview basically.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., number of users, QPS, latency, and freshness needs), then outline a high-level architecture covering data ingestion, candidate generation, ranking, and serving. Dive into key ML components like feature engineering, model choices, and online/offline consistency, and discuss trade-offs and evaluation metrics.

Pro tip: Emphasize the importance of low-latency serving and how you would handle continuously updating locations—e.g., by using a streaming architecture and geospatial indexing. Also, mention how you would design A/B tests to measure business metrics like click-through rate and user engagement.

1. Clarify Requirements and Scale

Ask questions to understand functional and non-functional requirements: number of users, QPS, latency constraints, freshness of location updates, and business goals. This ensures your design meets the actual needs.

2. High-Level Architecture

Outline the end-to-end system: data ingestion (location updates, place data), candidate generation (retrieving nearby places), ranking (ML model to score and order), and serving (API to mobile clients). Mention key components like geospatial indexing and streaming pipelines.

3. ML Model and Features

Describe the ML approach: candidate generation (e.g., using geohash or KD-tree), ranking model (e.g., gradient boosted trees or neural networks), and features (user history, place attributes, context, distance, time). Discuss training data and label definition (e.g., clicks, visits).

4. Serving and Latency Optimization

Explain how to serve recommendations with low latency: pre-computation, caching, approximate nearest neighbor search, and model inference optimizations. Address how to handle continuously updating locations (e.g., via streaming updates and incremental indexing).

5. Evaluation and Experimentation

Cover offline metrics (e.g., recall@k, NDCG) and online A/B testing setup. Discuss how to measure business impact (CTR, conversion) and iterate. Mention potential pitfalls like position bias and how to mitigate them.

Key Points to Mention

  • Geospatial indexing techniques (e.g., geohash, quadtree, KD-tree) for efficient nearby search
  • Streaming data pipeline (e.g., Kafka, Flink) to handle continuous location updates
  • Two-stage architecture: candidate generation and ranking
  • Feature engineering: user features, place features, contextual features (distance, time of day)
  • Low-latency serving: caching, approximate nearest neighbor, model quantization
  • A/B testing framework and metrics (CTR, dwell time, conversion rate)

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

Q2

How would you handle the training data pipeline, specifically around generating negative samples from impression and click logs?

Data ModelingTechnical Trade-offs
Author's notes

I knew this was coming in some form but still second-guessed myself on whether to use random negatives or in-batch negatives.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem: negative sampling is critical for training ranking models, and the goal is to generate realistic negatives that reflect the true distribution of impressions while avoiding trivial or biased samples. Then walk through a pipeline that ingests logs, defines negative sampling strategies (e.g., random, hard, exposure-based), and addresses trade-offs like bias, freshness, and scalability.

Pro tip: Emphasize that negative sampling should be aligned with the serving distribution and evaluation metric—e.g., using in-batch negatives for efficiency but correcting for sampling bias via importance weighting. Also mention the importance of logging negative samples with the same features as positives to avoid train-serve skew.

1. Clarify requirements and constraints

Understand the model's objective (e.g., CTR prediction, ranking), the scale of data, and latency requirements. Identify what constitutes a 'negative' (e.g., impressions with no click) and how to handle missing labels.

2. Design the data ingestion and preprocessing

Describe how to collect impression and click logs, join them to label positives/negatives, and handle data quality issues like duplicates, bots, and delayed clicks. Mention partitioning and storage formats for efficient processing.

3. Define negative sampling strategies

Discuss options: random negatives from the full corpus, exposure-based negatives (impressions without clicks), and hard negatives (e.g., items ranked high but not clicked). Explain when to use each and how to combine them.

4. Address bias and distribution shift

Explain how sampling introduces bias (e.g., exposure bias, position bias) and propose corrections like inverse propensity scoring or using a held-out set for calibration. Emphasize matching the training distribution to the serving distribution.

5. Implement and monitor the pipeline

Outline the engineering: batch vs. streaming, feature consistency, and monitoring for drift. Suggest A/B testing and offline metrics to validate the sampling strategy.

Key Points to Mention

  • Exposure bias and position bias in click logs, and how to mitigate them (e.g., via propensity scores).
  • Trade-offs between random, hard, and exposure-based negatives in terms of model performance and computational cost.
  • Importance of feature consistency between training and serving to avoid train-serve skew.
  • Scalability considerations: distributed processing (e.g., Spark), sampling rates, and storage.
  • Evaluation metrics: offline (AUC, NDCG) and online (CTR, engagement) to validate negative sampling.
  • Handling delayed feedback and negative label confirmation (e.g., clicks may occur after a delay).

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

Q3

How do you keep the place inventory fresh, and what's your approach to cold-start for newly added venues?

System DesignAdaptability & Ambiguity
Author's notes

Cold-start I actually felt decent about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem scope and defining what 'fresh' means for the venue inventory, then outline a two-pronged strategy: continuous freshness for existing venues and a cold-start solution for new venues. Emphasize a feedback loop that leverages user interactions and side information to handle data sparsity, and discuss how you'd measure success and iterate.

Pro tip: Show that you think about the cold-start problem not just as a modeling challenge but as a product and data acquisition challenge—e.g., using active learning or strategic exploration to gather the most informative signals quickly.

1. Clarify the problem and define freshness

Ask clarifying questions to understand what 'fresh' means (e.g., new venues, updated attributes, real-time availability) and the scale of the inventory. Define success metrics such as coverage, accuracy, and user engagement.

2. Design a freshness pipeline for existing venues

Propose a system that continuously ingests signals (user reports, partner feeds, web crawls) and uses change detection to update venue data. Incorporate a feedback loop where user interactions (e.g., clicks, check-ins) validate and correct the inventory.

3. Address cold-start for new venues

For new venues with little to no interaction data, leverage content-based features (e.g., category, location, description) and meta-learning or transfer learning from similar venues. Consider exploration strategies like epsilon-greedy or Thompson sampling to gather initial feedback efficiently.

4. Unify the approach with a hybrid model

Combine collaborative filtering for warm venues with content-based methods for cold venues, using a switch or a blended model. Ensure the system can seamlessly transition venues from cold to warm as data accumulates.

5. Measure, monitor, and iterate

Define offline and online metrics (e.g., CTR, conversion, freshness latency) and set up A/B tests to evaluate the impact. Monitor for data drift and retrain models periodically to maintain freshness.

Key Points to Mention

  • Definition of 'freshness' and how it varies by venue type (e.g., restaurants vs. events)
  • Data sources for freshness: user-generated content, partner APIs, web scraping, and internal logs
  • Cold-start techniques: content-based filtering, meta-learning, and transfer learning
  • Exploration vs. exploitation trade-off and bandit algorithms for new venues
  • Feedback loops and active learning to improve data quality over time
  • Evaluation metrics and A/B testing framework for continuous improvement

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

Q4

What evaluation metrics would you use for this system, and how would you structure an A/B test to validate a ranking model change?

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

Went with CTR, coverage, and NDCG.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the evaluation metrics that align with the product goals, distinguishing between offline and online metrics. Then outline a structured A/B test plan covering hypothesis, randomization, sample size, duration, and guardrail metrics. Emphasize the importance of statistical significance and practical significance.

Pro tip: Mention that you would run an A/A test first to validate the experiment setup and check for any biases in the randomization. Also, discuss how you would handle network effects or interference if the ranking model affects multiple users simultaneously.

1. Define Evaluation Metrics

Identify key metrics such as CTR, conversion rate, revenue per user, and engagement metrics. Also consider guardrail metrics like latency, error rates, and user satisfaction.

2. Formulate Hypothesis

State a clear hypothesis: e.g., 'The new ranking model will increase CTR by X% without negatively impacting latency.' Ensure it is testable and tied to business goals.

3. Design A/B Test

Determine randomization unit (e.g., user-level), sample size using power analysis, test duration, and traffic split. Consider stratification and ensure no contamination.

4. Analyze Results

Use statistical tests (e.g., t-test, bootstrap) to compare metrics between control and treatment. Check for significance, confidence intervals, and practical impact.

5. Validate and Iterate

Run A/A tests to validate, monitor guardrail metrics, and consider long-term effects. If successful, plan for gradual rollout; if not, iterate on the model.

Key Points to Mention

  • Offline metrics (e.g., NDCG, MRR) vs online metrics (e.g., CTR, dwell time)
  • Guardrail metrics to ensure no degradation in user experience
  • Sample size calculation and power analysis
  • Randomization unit and potential network effects
  • Statistical significance and confidence intervals
  • Long-term holdout or switchback testing for sustained impact

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