PracHub
QuestionsLearningGuidesInterview Prep
|Home/ML System Design/Pinterest

Design Pin recommendation system

Last updated: Jun 24, 2026

Quick Overview

This question evaluates ability to design a large-scale personalized home feed recommendation system, testing skills in ML system design, recommender algorithms, retrieval and ranking architectures, feature engineering, data pipelines, low-latency serving, evaluation metrics, safety, and privacy.

  • hard
  • Pinterest
  • ML System Design
  • Software Engineer

Design Pin recommendation system

Company: Pinterest

Role: Software Engineer

Category: ML System Design

Difficulty: hard

Interview Round: Onsite

Design the recommendation system for Pin’s home feed. Define goals and metrics (short- vs long-term), outline data sources and feature engineering (user profiles, content embeddings, graph/interaction signals), propose candidate generation methods, ranking architecture (multi-objective, calibration), feedback loops and explore/exploit, cold-start for users/items, diversity/freshness/novelty controls, abuse/spam defenses, privacy/compliance, online/offline evaluation (A/B testing), and a scalable low-latency serving/training architecture with feature store and monitoring.

Quick Answer: This question evaluates ability to design a large-scale personalized home feed recommendation system, testing skills in ML system design, recommender algorithms, retrieval and ranking architectures, feature engineering, data pipelines, low-latency serving, evaluation metrics, safety, and privacy.

Related Interview Questions

  • Design User and Item Embeddings from Long Histories - Pinterest (medium)
  • Rank Newly Launched Ads Under Cold Start - Pinterest (medium)
  • Design notification and feed recommenders - Pinterest (medium)
  • Design Detection Systems for Risk and Safety - Pinterest (medium)
  • Design a real-time home feed ranker - Pinterest (hard)
|Home/ML System Design/Pinterest

Design Pin recommendation system

Pinterest logo
Pinterest
Jul 28, 2025, 12:00 AM
hardSoftware EngineerOnsiteML System Design
13
0

Design Pinterest's Home Feed Recommendation System

Problem

Design an end-to-end recommendation system that powers the personalized home feed on Pinterest at large scale (hundreds of millions of monthly active users, billions of Pins). When a user opens the app, the home feed is an infinitely-scrolling grid of Pins (each Pin is primarily an image plus a title, description, link, and board context). Your system decides which Pins to show and in what order.

The feed must be relevant (matched to each user's tastes and intent), diverse (not all from one topic or creator), fresh (surfaces new and timely content), safe (no spam, abuse, or policy-violating content), and fast (loads within a tight latency budget). The system runs continuously, with models and features updated on an ongoing basis as new engagement streams in.

Walk through the full design: how you frame objectives and metrics, what data and features you use, how you retrieve candidates, how you rank them across multiple objectives, how you close the feedback loop and explore, how you handle cold-start, how you enforce diversity/freshness/safety/privacy, how you evaluate offline and online, and how you build the training and serving infrastructure to hit the latency target.

Constraints & Assumptions

  • Scale: hundreds of millions of MAUs; billions of candidate Pins; the system must serve thousands of feed requests per second at peak.
  • Latency: server-side ranking budget of p95 < 200 ms for assembling a page of the feed (retrieval + ranking + re-ranking), excluding image download.
  • Freshness: new Pins and new users appear continuously; the system must incorporate them without waiting for a full daily retrain.
  • Content: each Pin is multimodal — image, title/description text, OCR text on the image, link domain, creator, and the board(s) it lives on. Assume image and text embeddings are available or can be computed.
  • Page size: the feed returns roughly a page (~25–50 Pins) per request and prefetches the next page; users scroll for many pages per session.
  • Assume the usual production guarantees are required: graceful degradation, rollbacks, and continuous online learning/refresh.

Clarifying Questions to Ask Guidance

  • What is the primary north-star metric the org optimizes for — short-term engagement (saves, sessions) or a long-term proxy (weekly active pinners, retention)? This dictates the objective weighting.
  • Is the home feed organic-only , or must it interleave ads / promoted Pins , which changes the auction and the objective?
  • What are the hard guardrails that can never regress (latency p95, content-safety incident rate, creator fairness, diversity floor)?
  • What is the freshness SLA for new content and new users — minutes, hours, or next-day?
  • Are there regional/regulatory constraints (GDPR/CCPA, regional data residency) that restrict which features or storage we can use?
  • What does the existing infra already provide — a feature store, a vector index, an embedding service — versus what must be built?

What a Strong Answer Covers Guidance

A strong answer treats this as one coherent system with a clear funnel, and reasons about trade-offs rather than just listing components. Across the design, the interviewer is looking for the following dimensions:

  • Objectives & metrics: distinguishes short-term engagement (CTR, save/repin rate, long-dwell rate, session length) from long-term value (D1/D7/D28 retention, weekly active pinners, creator-ecosystem health); names primary, secondary, and guardrail metrics; explains how conflicting objectives are traded off (e.g., a weighted multi-objective score, with diversity/safety as constraints rather than terms).
  • Data & features: enumerates user (profile, follows, short- and long-term action sequences), content (multimodal image/text embeddings, taxonomy, creator, freshness), graph (board–Pin, user–creator, co-engagement), and context (device, geo, time) sources; describes feature engineering — recency-decayed aggregations over multiple windows, sequence/attention features, graph embeddings (e.g., PinSage-style) — and flags training–serving parity .
  • Candidate generation: proposes multiple complementary retrieval sources (two-tower content ANN, collaborative filtering / co-engagement, graph walks, followed boards/creators, trending/fresh, an exploration pool) with a blending + dedup strategy and per-source quotas.
  • Ranking: a multi-stage design (lightweight pre-rank → heavy multi-task final ranker) with explicit funnel widths; multi-objective modeling with per-head calibration and source-score normalization; post-ranking constraints.
  • Feedback loops & explore/exploit: identifies position/selection bias and delayed/long-horizon rewards ; gives concrete debiasing (IPS / propensity logging, randomized exploration) and an exploration policy (e.g., Thompson sampling / bandits on a slice of slots) with off-policy evaluation in mind.
  • Cold-start: distinct strategies for new users (onboarding interests, locale/popularity priors, fast session adaptation) and new items (content-embedding-based retrieval, creator priors, gentle exploration exposure).
  • Diversity, freshness, novelty: concrete re-ranking algorithms (MMR / submodular / determinantal-style) plus creator and category caps, near-duplicate suppression, and freshness boosts.
  • Abuse, spam & safety: layered defenses (retrieval blocklists, ranking penalties, re-ranking caps), content-safety classifiers, bot/spam/cloaking detection, and human-in-the-loop review.
  • Privacy & compliance: data minimization, retention TTLs, consent and user controls, regional storage, and avoiding sensitive-inference features.
  • Evaluation: offline (time-sliced splits, per-task AUC/logloss, NDCG@K, calibration/ECE, counterfactual estimators) and online A/B (bucketing, SRM checks, power/MDE, guardrails, interference, long-term holdbacks, staged ramp).
  • Scalable low-latency architecture: end-to-end ingestion (event bus, stream + batch), a feature store with offline/online parity , a sharded vector index , the ranking services, caching/prefetch, a per-stage latency budget that sums under 200 ms , fallbacks/degradation, and ML-health monitoring (drift, calibration, recall, freshness) with automated rollback.

Follow-up Questions Guidance

  • Suppose offline AUC improves but the online A/B shows flat engagement and worse D7 retention . How do you debug, and what does this tell you about your offline metric and label choice?
  • A new ranking model over-optimizes CTR and the feed becomes a "clickbait spiral" of low-quality but high-click Pins. Concretely, how do your labels, objective, and re-ranking constraints prevent this?
  • One retrieval source (say, trending ) starts dominating the blend and crowds out personalized sources. How does your calibration/blending design detect and correct source dominance?
  • The image embedding model is retrained , shifting the entire vector space. Walk through how you migrate the ANN index and the two-tower model without a feed-quality outage.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More ML System Design•More Pinterest•More Software Engineer•Pinterest Software Engineer•Pinterest ML System Design•Software Engineer ML System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.