KatInterview

Architecting a Video Safety Screening Pipeline at Scale

System DesignModel answer
MediumModel answerSystem Designml-system-designcontent-moderationmultimodal

Last updated

Design a global, multi-modal system that screens uploaded videos for policy violations with ML, escalates uncertain cases to human reviewers, and keeps a tamper-proof decision history.

Build a Safety Screening System for a Video Platform

You are designing the backend that checks every video uploaded to a worldwide short- and long-form video service. The service receives millions of uploads per day. Each video must be judged against community rules such as graphic violence, hateful speech, and sexual content.

What the system must do

  1. Fast screening. A video should be assessed as soon as it is uploaded.
  2. Multi-modal inspection. Both the visual frames and the audio track (plus any accompanying text) must be examined.
  3. Human escalation. Predictions the models are unsure about must be sent to human reviewers.
  4. Audit trail. Every decision must be stored in a tamper-resistant, append-only record along with the model information that produced it, to satisfy compliance requests.

Quality targets

  • An initial moderation signal is available within 5 seconds of upload.
  • The system absorbs sudden surges, such as a viral trend, without losing or badly delaying uploads.
  • Missed violations (false negatives) on prohibited content should be kept as low as possible.

What to cover in your answer

  1. A high-level architecture: ingestion, feature extraction, model inference, queues, and the human review path.
  2. The ML pipeline: how models are served and how they are refreshed with newly labeled data.
  3. A concise data model for content metadata and moderation decisions.
  4. The trade-offs between latency and throughput when classifying several modalities together.

State your assumptions about scale up front and justify them.

Hints

Hint 1

Pin down what the 5-second target actually promises. It is likely an initial signal (allow, restrict, block, or escalate), not a final verdict, which lets you split work into a fast pass and a slower deep pass.

Hint 2

Think in cascades: cheap checks first (matching against known bad media), then a lightweight analysis of early frames and audio, then an expensive full-video analysis running asynchronously. Do back-of-envelope GPU math to show why this matters.

Hint 3

Use two thresholds per policy (auto-action vs. send to review), prioritize the review queue by severity and expected reach instead of arrival order, and make the decision log append-only with model version and threshold recorded on every row.