Design Related Pins Recommendations from the Pin-Board Graph

Last updated: November 29, 2026

Quick Overview

Design the system that powers 'More like this' related Pins under a Pin closeup, using the fact that users curate Pins into boards. Cover candidate generation, ranking, freshness and serving latency.

Pinterest
ML System Design
Machine Learning Engineer
Pinterest
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design the system that powers 'More like this' related Pins under a Pin closeup, using the fact that users curate Pins into boards. Cover candidate generation, ranking, freshness and serving latency.

Related Pins is one of Pinterest's largest engagement surfaces, and the bipartite graph of Pins and boards is a uniquely strong signal because humans grouped those Pins on purpose. Interviewers expect graph-based candidate generation, embeddings, a multi-task ranker, and careful thinking about cold-start Pins.

What the Interviewer Expects
  • Uses co-occurrence on boards via random walks or graph embeddings for candidates
  • Adds visual and text embeddings to cover new Pins with little graph signal
  • Designs a multi-task ranker predicting saves, closeups and hides
  • Plans offline and online evaluation, including diversity
  • Meets latency with ANN indexes and precomputed candidates
Key Topics to Cover
recommendation systems
graph random walks
embeddings
ANN retrieval
multi-task ranking
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How do you stop related Pins from collapsing to near-duplicate images?
  • A Pin is 5 minutes old; how does it get related Pins and appear as a candidate?
  • How would you personalize related Pins for the viewer, not only the query Pin?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Goal: for a query Pin and a viewer, return about 100 ranked related Pins.

Success: saves and closeups on related Pins per closeup view, with guardrails on hides and diversity.

Constraints: billions ...

High-Level Design

Candidate generation (several sources, merged to about 2,000):

  1. Graph walks: from the query Pin, random walks on the Pin-board bipartite graph (Pin to board to Pin), restarting frequently, count vis...

Submit Your Answer
Markdown supported