Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
ExperiencesCoaching
New
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Get started

Design Hate-Speech Comment Detection

HardSystem Design00:00
Practice interviewer
In session
5 left
00:00

Whenever you're ready, walk me through how you'd approach this.

You need to log in / sign up to chat or submit.

Problem

Product Context

Meta wants to detect and act on hateful text comments across Facebook and Instagram. The system should score comments in real time for enforcement and also support downstream human review, user reporting, and policy analytics.

Scale

SignalValue
DAU impacted1.8B users across Facebook + Instagram
New text comments/day9B
Peak comment creation QPS220K
Peak comment-view QPS needing precomputed safety scores1.2M
Supported languages120+
p99 latency budget for write-time decision120ms end-to-end
Human review queue capacity~8M comments/day

Task

Design an end-to-end ML system for hate-speech detection on text comments. Your design should address:

  1. How you define the prediction target, policy tiers, and product actions (allow, downrank, send to review, remove).
  2. The full architecture from data collection and labeling to online serving, including a multi-stage pipeline rather than a single model.
  3. Model choices for fast filtering, ranking, and high-precision re-scoring under strict latency and cost constraints.
  4. Offline and online evaluation, including how you handle delayed labels, policy changes, and multilingual performance.
  5. Monitoring, failure modes, and rollback plans, especially for feature drift, training-serving skew, adversarial evasion, and fairness across languages/dialects.

Constraints

  • False positives are costly: incorrect removals harm user trust and creator experience.
  • False negatives are also costly: missed hate speech creates safety and regulatory risk.
  • Some actions must happen synchronously at comment creation; others can be asynchronous within minutes.
  • Labels are noisy and partially delayed: user reports, reviewer decisions, and appeals may arrive hours or days later.
  • The system must support policy updates without requiring a full retrain for every threshold change.
  • Raw text retention is limited in some regions, so feature logging and compliance constraints matter.