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.