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
ML System Design
Machine Learning Engineer
Meta
November 29, 2026
Machine Learning Engineer
Technical Screen
ML System Design
Easy

0

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
stories ranking
closeness features
seen state
pointwise ranking
freshness
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 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 Problems
Sample 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
  1. Fetch followed accounts with active stories from the stories index.
  2. Compute features per (viewer, author) pair.
  3. Score with a model predicting P(view) and P(reply or reaction), combine into a ...

Submit Your Answer
Markdown supported