Recommend Which Existing Board a User Will Save a Pin To
Company: Pinterest
Role: Machine Learning Engineer
Category: ML System Design
Difficulty: medium
Interview Round: Technical Screen
When users save a pin, they file it into one of their boards, the named collections in which they organize saved pins. Design an ML system that, given the pin being saved and the user's existing boards, recommends the board the user is most likely to save it to.
The problem is close to a recommender system. The discussion focuses on which signals you would collect and how you would organize them into features, and on how you would build and train a model for this task.
```hint What a board already says
A board's name is only one clue to its topic. Think about what else the board's history reveals and how to compare the new pin with it.
```
```hint Examples from past saves
Every past save is a choice among the boards the user had at that moment. Think about how to turn those choices into training examples, and how the board suggested at the time may have influenced them.
```
### Clarifying Questions
- Is the output a single preselected board, or a ranked list the user chooses from?
- How many boards do users typically have, and must new boards and new users be handled?
- How quickly must the suggestion appear once the save dialog opens?
- Should the system ever suggest creating a new board instead of an existing one?
- Is success the user accepting the top suggestion, or something broader such as faster saving?
### What a Strong Answer Covers
- Framing as ranking the user's own boards for a given pin, with labels and negatives taken from past saves
- Features for the pin, the board (beyond its name), pin-board similarity, the user's saving habits and the context of the save
- A model choice measured against strong simple baselines, and how a varying number of boards is scored
- Training pitfalls: point-in-time features, bias toward the preselected board, cold-start boards and users
- Offline ranking metrics and online acceptance metrics
- Serving within the latency of the save dialog, and keeping board representations fresh
### Follow-up Questions
- A user has just created a board and has saved nothing to it yet. How do you score it?
- Users often accept whichever board is preselected. How does that bias your training data, and how do you correct for it?
- Two of a user's boards cover nearly the same topic. What signals help choose between them?
- How do you keep board representations current as users save pins throughout the day?
Overview: Design a machine learning system that recommends which of a user's existing boards a pin is most likely to be saved to. Tests framing the task as ranking the user's own boards, building pin, board and user-habit features, handling bias toward the preselected board and cold-start boards, and serving fast.
Read the full Pinterest Machine Learning Engineer interview experience this question came from