Order the Instagram Stories Tray for Each Viewer
Last updated: November 29, 2026
Quick Overview
Design the ranking that decides which accounts appear first in a user's Instagram Stories tray. Discuss signals, labels, and how freshness and already-seen stories should affect order.
Meta
November 29, 20260
0
0 solved
Design the ranking that decides which accounts appear first in a user's Instagram Stories tray. Discuss signals, labels, and how freshness and already-seen stories should affect order.
Stories tray ranking is a contained ranking problem over followed accounts, so it suits an early technical round. The interviewer checks that you can pick the right prediction target, handle seen versus unseen state, and keep the system simple and fast.
What the Interviewer Expects
- Frames it as ranking a few hundred followed accounts with active stories
- Predicts probability of viewing and tapping through rather than just opening
- Moves fully seen trays to the end deterministically
- Uses relationship closeness features such as DMs and profile visits
- Explains latency and refresh needs
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How do you handle a close friend who posts 30 stories a day?
- Should ads appear in the tray ranking model?
- How would you detect that the model favors celebrities over friends?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
- Candidates: accounts the viewer follows that have active stories (24-hour window), usually tens to a few hundred.
- Output: ordered tray, recomputed on app open and pull to refresh.
- Latency: well ...
High-Level Design
- Fetch followed accounts with active stories from the stories index.
- Compute features per (viewer, author) pair.
- Score with a model predicting P(view) and P(reply or reaction), combine into a ...