← Pinterest Interview Insights

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

SeniorPrefer not to say
Jul 2026

Summary

Pinterest ML Engineer interview focused entirely on designing an ad ranking system for a personalized feed. The session was deep and technical, with the interviewer pushing hard on training data construction, bias handling, and embedding strategies. Not a casual screen.

Questions Asked (9)

Q1

Design an ML system to increase click-through rate for ads shown in a personalized social media feed. Walk through how you'd frame the problem, build and train the model, serve it, and operate it end to end.

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

This is the main question and it's basically a full system design session disguised as one prompt.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame the problem as a large-scale ranking task with CTR as the primary objective, but explicitly tie it to Pinterest's business goals (engagement, revenue, user satisfaction). Walk through the ML lifecycle: problem framing, data and feature engineering, model selection and training, serving infrastructure, and online evaluation with continuous improvement.

Pro tip: Emphasize the importance of calibrating predicted CTRs and using them in a downstream auction or ranking system, and discuss how to handle position bias and feedback loops in a social media feed.

1. Problem Framing and Metrics

Define the prediction target (e.g., P(click | user, ad, context)), clarify the business objective (maximize CTR while maintaining user experience), and select evaluation metrics (offline: AUC, log loss; online: CTR, revenue, engagement).

2. Data and Feature Engineering

Identify data sources (user profiles, ad content, interaction logs), handle challenges like position bias and delayed feedback, and engineer features (user demographics, historical CTR, ad embeddings, context features).

3. Model Selection and Training

Choose a model architecture suitable for large-scale CTR prediction (e.g., deep learning with embeddings, gradient boosted trees), train with appropriate loss (log loss), and address class imbalance and calibration.

4. Serving and Infrastructure

Design a low-latency serving system (e.g., real-time inference with caching, model versioning), integrate with the ad auction/ranking pipeline, and ensure scalability and fault tolerance.

5. Evaluation and Operations

Conduct online A/B tests, monitor key metrics and model drift, implement continuous training and feedback loops, and iterate based on business impact.

Key Points to Mention

  • Position bias and how to correct for it (e.g., using inverse propensity scoring or adding position as a feature during training but not at inference).
  • Calibration of predicted CTRs to ensure they are used correctly in downstream bidding or ranking.
  • Handling of delayed feedback (clicks may occur after impression) and its impact on training data.
  • Scalability considerations: large-scale data processing, distributed training, and low-latency serving.
  • Online evaluation via A/B testing and guardrail metrics to avoid negative user experience.
  • Continuous model retraining and monitoring for data drift and feedback loops.

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

Q2

What metrics would you track for this system, both online and offline? How do you prevent CTR optimization from degrading user experience or long-term engagement?

Product Analytics & MetricsA/B Testing & Experimentation
Author's notes

I listed AUC and calibration error as offline metrics, then session length and hide/report rate as guardrails.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the system's goals and the metrics that align with them, then structure your answer into online and offline metrics. Address the CTR optimization trade-off by proposing guardrail metrics and long-term engagement measures, and discuss how to balance short-term gains with user experience.

Pro tip: Emphasize that at Pinterest, user experience and long-term engagement are paramount, so guardrail metrics like hide/report rates and long-term retention are critical. Mention that you would use multi-objective optimization or constrained optimization to balance CTR with these guardrails.

1. Define system goals and metrics

Clarify the system's objective (e.g., recommendation, ranking) and identify key performance indicators that align with business and user goals.

2. List online metrics

Include real-time metrics such as CTR, engagement rate, session duration, and guardrail metrics like hide/report rates and user satisfaction scores.

3. List offline metrics

Cover offline evaluation metrics such as AUC, NDCG, precision/recall, and calibration, as well as long-term engagement proxies like predicted retention.

4. Address CTR optimization risks

Explain how optimizing solely for CTR can lead to clickbait and degrade user experience, and propose guardrail metrics and long-term engagement measures to prevent this.

5. Propose mitigation strategies

Suggest techniques like multi-objective optimization, constrained optimization, and A/B testing with guardrails to balance CTR with user experience and long-term engagement.

Key Points to Mention

  • Online metrics: CTR, engagement rate, session duration, hide/report rate, user satisfaction (e.g., surveys).
  • Offline metrics: AUC, NDCG, precision/recall, calibration, and long-term engagement proxies (e.g., predicted retention).
  • Guardrail metrics: hide/report rate, unsubscribe rate, long-term retention, and user satisfaction scores.
  • CTR optimization risks: clickbait, short-term gains at expense of long-term engagement, and user trust erosion.
  • Mitigation strategies: multi-objective optimization, constrained optimization, and A/B testing with guardrails.
  • Pinterest-specific context: emphasis on visual discovery, user experience, and long-term engagement.

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

Q3

How do you construct training data for the CTR model? What are your positive and negative examples, and what logs do you need?

Data ModelingTechnical Trade-offsSystem Design
Author's notes

This is where the interviewer went deepest.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the CTR prediction task and the need for labeled data. Then describe how to construct positive and negative examples from user interaction logs, emphasizing the importance of negative sampling and log selection. Finally, discuss the required logs and potential biases.

Pro tip: Mention the importance of time-based splitting to avoid data leakage and the need to handle position bias in click logs, showing awareness of real-world challenges.

1. Define the prediction task

Clarify that CTR prediction models estimate the probability of a click given a user, item, and context. This sets the stage for what data is needed.

2. Identify positive examples

Positive examples are typically clicks or other strong engagement signals (e.g., saves, close-ups) from user interaction logs. Discuss how to define positives based on business goals.

3. Generate negative examples

Negatives are impressions without clicks. Explain negative sampling strategies (e.g., random sampling, hard negatives) to handle class imbalance and improve model performance.

4. Select and process logs

Describe the necessary logs: impression logs (with user, item, context features), click logs, and possibly conversion logs. Discuss data cleaning, feature engineering, and handling missing values.

5. Address biases and validation

Acknowledge biases like position bias and selection bias. Explain techniques like inverse propensity scoring or using a separate validation set to mitigate them.

Key Points to Mention

  • Definition of positive and negative examples (clicks vs. non-clicks)
  • Negative sampling techniques to handle class imbalance
  • Required logs: impression logs, click logs, user/item features
  • Time-based splitting to prevent data leakage
  • Handling position bias and other biases in click data
  • Feature engineering from logs (e.g., user history, item popularity)

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

Q4

How would you build user and ad embeddings? Describe both a two-tower retrieval approach and a graph-based approach, including what features go into each and how you'd keep them fresh.

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

Two-tower was comfortable territory.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem: embeddings for users and ads power retrieval and ranking at Pinterest. Then describe two approaches: a two-tower retrieval model (separate user and ad towers) and a graph-based approach (e.g., PinSage-like). For each, detail input features, training objective, and how you'd keep embeddings fresh (e.g., incremental updates, streaming). Finally, compare trade-offs and suggest a hybrid approach.

Pro tip: Emphasize that freshness is critical at Pinterest's scale—discuss how you'd handle cold-start and real-time updates, and mention the trade-off between embedding staleness and computational cost.

1. Clarify the problem and constraints

Restate the goal: build embeddings for users and ads to improve retrieval and ranking. Mention scale (billions of pins, millions of users/ads) and latency requirements.

2. Describe two-tower retrieval approach

Explain the architecture: separate neural networks for user and ad towers, trained with a contrastive loss (e.g., in-batch negatives). List features: user demographics, history, context; ad content, category, advertiser.

3. Describe graph-based approach

Explain using a graph (e.g., user-ad interactions, pin-ad relationships) and graph neural networks (e.g., PinSage) to learn embeddings. Features: node features (user/ad attributes), edge features (interaction type, recency).

4. Discuss freshness and updates

For two-tower: periodic retraining, incremental updates via streaming, or online learning. For graph-based: dynamic graph updates, sampling subgraphs for incremental training. Mention caching and versioning.

5. Compare trade-offs and propose hybrid

Two-tower: simpler, scalable, but may miss complex interactions. Graph-based: captures multi-hop relationships, but harder to scale and update. Suggest hybrid: use graph embeddings as features in two-tower.

Key Points to Mention

  • Feature engineering: user features (demographics, engagement history, context), ad features (content, category, advertiser, performance metrics)
  • Training objectives: contrastive loss, triplet loss, or link prediction for graphs
  • Negative sampling strategies: in-batch negatives, hard negatives from graph
  • Freshness: incremental training, streaming updates, time-decay weighting, cold-start handling
  • Scalability: distributed training, ANN indexes (e.g., FAISS) for retrieval
  • Evaluation: offline metrics (recall@k, NDCG) and online A/B testing

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

Q5

How do you handle position bias and selection bias in your training data, and what's your approach to calibration given that the model output feeds directly into auction scoring?

Technical Trade-offsData ModelingA/B Testing & Experimentation
Author's notes

Named both biases correctly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that position and selection bias are pervasive in ranking systems and must be addressed at both data collection and modeling stages. Then, describe a concrete pipeline: using inverse propensity scoring (IPS) or position-aware models to debias training data, and applying calibration techniques like Platt scaling or isotonic regression to align predicted probabilities with actual outcomes. Finally, emphasize the importance of continuous monitoring and A/B testing to ensure that debiasing and calibration do not harm auction performance.

Pro tip: Frame your answer around the trade-off between bias correction and auction revenue: over-correcting can lead to under-prediction of high-position items, reducing revenue, while under-correcting perpetuates bias. Show that you can quantify this trade-off with offline metrics and online experiments.

1. Identify and Quantify Biases

Explain how you detect position bias (e.g., via randomization or click models) and selection bias (e.g., via propensity scores or Heckman correction). Quantify their impact on model predictions and downstream auction metrics.

2. Debias Training Data

Describe methods to correct biases during training, such as inverse propensity scoring (IPS), position-aware attention, or counterfactual learning. Mention how you validate that debiasing improves fairness without degrading relevance.

3. Calibrate Model Outputs

Detail calibration techniques (e.g., Platt scaling, isotonic regression, temperature scaling) and how you evaluate calibration (reliability diagrams, ECE). Emphasize that calibration is crucial because auction scoring often uses predicted probabilities directly.

4. Integrate with Auction Mechanism

Explain how you ensure that debiased and calibrated predictions align with auction objectives (e.g., revenue, welfare). Discuss potential conflicts and how you resolve them, such as by tuning calibration to maximize auction performance.

5. Monitor and Iterate

Describe ongoing monitoring of bias and calibration drift, and how you use A/B tests to measure the impact of debiasing and calibration on key metrics. Highlight the need for periodic re-evaluation and model retraining.

Key Points to Mention

  • Inverse Propensity Scoring (IPS) for debiasing position and selection effects
  • Position-based click models (e.g., examination hypothesis) to estimate bias
  • Calibration methods: Platt scaling, isotonic regression, and their pros/cons
  • Evaluation metrics: Expected Calibration Error (ECE), reliability diagrams, and auction-specific metrics (e.g., revenue, CTR)
  • Trade-offs between bias correction and auction revenue, and how to balance them
  • A/B testing framework to validate debiasing and calibration in production

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

Q6

Your model shows strong offline AUC improvements but the A/B test comes back flat or negative. What are the most likely causes and how do you diagnose them?

Root Cause AnalysisA/B Testing & ExperimentationTechnical Trade-offs
Author's notes

Classic follow-up and I've seen it before so I had a decent answer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that offline-offline or offline-online gaps are common and can stem from data, model, or evaluation issues. Then systematically walk through potential causes, grouping them into data, model, and experiment design, and describe how you would diagnose each using metrics, slicing, and counterfactuals.

Pro tip: Always check the A/B test's guardrail metrics and sample ratio mismatch first—sometimes the test itself is broken, not the model. Also, consider that offline AUC may not align with online business metrics; focus on the metric that matters.

1. Validate the A/B test setup

Check for sample ratio mismatch, instrumentation errors, and whether the test has enough power. Ensure the control and treatment groups are comparable and the metric is correctly defined.

2. Compare offline and online data distributions

Investigate covariate shift, concept drift, or feedback loops. Verify that the offline evaluation data matches the online serving data in terms of features, labels, and user behavior.

3. Examine model performance and metric alignment

Check if the offline metric (AUC) correlates with the online business metric. Consider that AUC may not capture ranking quality or business impact; evaluate other metrics like precision@k, recall, or NDCG.

4. Analyze segmentation and heterogeneity

Slice the A/B test results by user segments, device, geography, etc., to see if the model helps some groups but hurts others, leading to a flat overall effect.

5. Consider system and serving issues

Check for latency issues, feature serving mismatches, or model staleness. Ensure the model is actually being served and that predictions are used as intended.

Key Points to Mention

  • Sample ratio mismatch (SRM) and A/A tests to validate experiment integrity
  • Covariate shift and concept drift between offline and online data
  • Metric misalignment: offline AUC vs. online business metrics (e.g., CTR, engagement)
  • Segmentation analysis to detect heterogeneous treatment effects
  • Feedback loops and biases in online data collection
  • Feature serving consistency and model staleness in production

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

Q7

How would you jointly optimize for CTR and post-click conversions without one signal cannibalizing the other? How does the auction score change in that setup?

Technical Trade-offsSystem DesignPricing & Monetization
Author's notes

Went with multi-task learning, shared lower layers, separate heads for CTR and conversion rate.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem as a multi-objective optimization where CTR and post-click conversion are complementary signals, not competing ones. Explain how you would model them jointly (e.g., multi-task learning) and then incorporate both into the auction score with appropriate weights that reflect business value. Finally, discuss how the auction score changes to a combined expected value (e.g., eCPM = pCTR * pCVR * value) and how you would tune the weights to balance short-term and long-term objectives.

Pro tip: Emphasize that the auction score should reflect the expected value of an impression, which inherently combines CTR and CVR, and mention that you would use techniques like counterfactual logging or online experimentation to avoid feedback loops and cannibalization.

1. Define the objectives and their relationship

Clarify that CTR and post-click conversion are sequential events: a click is necessary for a conversion, but not all clicks convert. The goal is to maximize total expected value, not just one metric.

2. Model jointly with multi-task learning

Propose a multi-task model that predicts both CTR and CVR simultaneously, sharing representations to leverage common signals and reduce cannibalization. Use techniques like shared bottom layers, cross-stitch networks, or MMoE.

3. Incorporate into auction score

The auction score should be the expected value: eCPM = pCTR * pCVR * conversion_value * 1000 (or similar). This naturally balances both signals because a high CTR with low CVR may not yield high expected value.

4. Calibrate and weight the signals

Ensure predicted probabilities are well-calibrated. Adjust the relative weight of CTR and CVR in the score based on business objectives (e.g., short-term engagement vs. long-term revenue) and use online experiments to tune.

5. Monitor and mitigate cannibalization

Set up guardrail metrics and dashboards to detect if optimizing one signal hurts the other. Use techniques like multi-objective optimization with Pareto efficiency or constrained optimization to maintain balance.

Key Points to Mention

  • Multi-task learning architectures (e.g., shared bottom, MMoE) to jointly predict CTR and CVR.
  • Auction score as expected value: eCPM = pCTR * pCVR * value, which inherently combines both signals.
  • Calibration of predicted probabilities to ensure unbiased estimates.
  • Business value weighting: conversion value may differ by advertiser, so incorporate that into the score.
  • Online experimentation (A/B testing) to tune weights and detect cannibalization.
  • Feedback loops and counterfactual logging to avoid bias from using logged data.

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

Q8

A brand-new advertiser campaign launches with zero history. Trace exactly how it gets retrieved, ranked, and given a fair opportunity to accumulate signal without burning through budget.

System DesignAdaptability & AmbiguityPricing & Monetization
Author's notes

Cold start for ads.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the ad retrieval and ranking pipeline, then focus on how a new campaign with no history is handled at each stage. Emphasize exploration mechanisms, budget pacing, and feedback loops that allow the campaign to gather signal efficiently without overspending.

Pro tip: Highlight the importance of calibrating exploration based on advertiser value and using multi-armed bandit approaches to balance exploration and exploitation, ensuring fair opportunity while protecting budget.

1. Retrieval with Cold-Start Handling

Explain how the campaign is retrieved despite no historical data, using content-based signals, advertiser-provided metadata, and broad targeting to ensure initial impressions.

2. Ranking with Exploration

Describe how the ranking model incorporates exploration by allocating a portion of traffic to new campaigns, using techniques like Thompson sampling or epsilon-greedy to gather performance data.

3. Budget Pacing and Fairness

Discuss budget pacing algorithms that limit spend while allowing the campaign to participate in auctions, and fairness constraints to prevent starvation of new advertisers.

4. Signal Accumulation and Feedback

Detail how early signals (clicks, conversions) are collected and fed back into the ranking model to refine predictions and adjust exploration rates over time.

5. Monitoring and Adaptation

Explain how the system monitors campaign performance and dynamically adjusts exploration, budget, and targeting to optimize long-term value and prevent budget burn.

Key Points to Mention

  • Cold-start problem and content-based features
  • Exploration-exploitation trade-off (e.g., multi-armed bandits)
  • Budget pacing and throttling mechanisms
  • Fairness in ad allocation (e.g., new advertiser boost)
  • Real-time feedback loops and model updates
  • Metrics for success: CTR, conversion rate, ROI, and budget utilization

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

Q9

How do delayed conversions break a naive training pipeline, and what changes would you make to handle them properly?

Data ModelingTechnical Trade-offs
Author's notes

Short answer: if you train before the attribution window closes, you label real conversions as negatives.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining how delayed conversions cause label leakage and training-serving skew in a naive pipeline that assumes immediate feedback. Then describe a robust solution that incorporates a conversion delay window, uses techniques like importance weighting or survival analysis, and ensures consistency between training and serving.

Pro tip: Emphasize the importance of aligning the observation window with the business metric (e.g., 7-day conversions) and monitoring for drift in delay distribution, as this shows production maturity beyond textbook solutions.

1. Define the problem and impact

Explain that delayed conversions lead to incomplete labels at training time, causing the model to underestimate conversion rates and learn spurious patterns. This results in biased predictions and poor online performance.

2. Identify naive pipeline pitfalls

Describe how a naive pipeline might join conversions immediately after impression, missing future conversions, or use a fixed short window that doesn't match the true conversion lag distribution.

3. Propose handling strategies

Discuss approaches such as waiting for a sufficient conversion window before training, using importance weighting to correct for missing labels, or modeling time-to-conversion with survival analysis.

4. Ensure training-serving consistency

Highlight the need to apply the same delay assumptions and feature calculations during serving, and to monitor for changes in conversion delay patterns over time.

5. Evaluate and iterate

Suggest offline evaluation with simulated delays and online A/B testing to validate the chosen approach, and continuous monitoring of conversion delay distributions.

Key Points to Mention

  • Label leakage and training-serving skew due to delayed conversions
  • Importance weighting or inverse propensity scoring to correct for missing conversions
  • Survival analysis or time-to-event modeling for conversion delay
  • Choosing an appropriate conversion window based on business metrics
  • Monitoring and adapting to changes in conversion delay distribution
  • Consistency between training and serving pipelines

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