Content moderation

A Java system would filter with rules and a database of banned terms. LLM moderation is powerful but far too expensive to run on everything, so the design is a cascade — and base rates matter: when only 1% of posts violate policy, even a good classifier produces mostly false alarms.

45 min round 6 computed numbers 4-part eval plan 8-point rubric
⚠️ Planning numbers, not measurements. Hardware and model facts are dated on the numbers sheet; traffic, prices and efficiency are labelled assumptions. Replace them with your own measurements (the vLLM load-test exercise) before quoting them.

The prompt

Design moderation for 50 million posts a day.

Attempt it first: the 45-minute round

Set the timer, answer out loud or on paper, then score yourself against the rubric before you read the model answer below.

  1. Framing (5 min) — Ask questions, fix the scale and the latency/quality/cost targets, state assumptions with numbers.
  2. Architecture (10 min) — Draw the boxes end to end: data in, the model call, storage, serving, feedback.
  3. Deep dive (15 min) — Pick the hardest part and do the arithmetic: tokens/s, KV memory, QPS → replicas, cost per 1,000 requests.
  4. Trade-offs (10 min) — Name what you would trade (batch vs latency, quality vs cost, build vs buy) and what breaks.
  5. Wrap-up (5 min) — Evaluation plan, monitoring, failure modes, and what you would do next.
45:00
Not started

Self-grade

Tick what you did. 0 of 8.

The model answer, step by step

Five steps, one tap each. The readout gives the step's answer and lists the numbers it uses; the same numbers are highlighted in the table underneath.

Content moderation, one tap per step

👉 Predict first, then tap. Every number below is computed from the assumptions in the table.

1. Framing

5 min

2. Architecture

10 min

3. Deep dive

15 min

4. Trade-offs

10 min

5. Wrap-up

5 min

Tap a step above.
QuantityHow it is computedValue
Posts per dayassumption50,000,000
Peak-to-mean traffic ratioassumption3
Share decided by the cheap classifierassumption92%
LLM prompt tokens (post + policy)assumption600
LLM output tokens (label + reason)assumption20
Decode batchassumption32
Utilisationassumption60%
Share sent to human reviewassumption0.5%
Items one reviewer handles per dayassumption400
Base rate of violating postsassumption1%
Classifier recallassumption95%
Classifier false-positive rateassumption2%
Peak posts per secondposts ÷ 86400 × peak ratio1,737
Peak posts reaching the LLMqps × (1 − decided)139
GPU-seconds per LLM call (8B)prefill + decode0.0275 s
GPUsLLM qps × GPU-s ÷ utilisation7
Human reviewers neededposts × human share ÷ per reviewer625
Precision of the cheap classifier's flagsTP ÷ (TP + FP) at 1% base rate32.4%
Takeaway. The headline figure — human reviewers needed — is 625 (posts × human share ÷ per reviewer). Say the assumption, show the formula, then give the number.

The evaluation plan

Go deeper on this site

Check yourself