Design comment ranking for a news feed
Company: Meta
Role: Machine Learning Engineer
Category: ML System Design
Difficulty: medium
Interview Round: Onsite
Design an ML-powered system to rank comments under posts in a news feed product.
### Requirements
- For each feed item (post/story), users can open the comment section and should see an ordered list of comments.
- Ranking should be **personalized** (depends on the viewer) and should balance:
- relevance/engagement (e.g., likes, replies, dwell time),
- quality (avoid spam/toxicity/low-effort),
- freshness (new comments can surface),
- author/viewer relationships.
### Constraints / considerations
- High QPS and strict latency (assume p95 end-to-end budget ~100–200 ms for the comment list).
- Support new comments arriving continuously.
- Handle abuse (spam, brigading, adversarial behavior), deleted comments, and block lists.
- You should describe: data, labels, modeling approach, online serving architecture, evaluation (offline + A/B), and monitoring/guardrails.
Quick Answer: This question evaluates a candidate's ability to design an ML-powered comment-ranking system, testing competencies in personalization, engagement and quality modeling, data and label definition, online serving, and robustness to abuse and latency constraints within the ML System Design domain.