# How to Design a Content-Moderation Pipeline

> How to design a content-moderation pipeline for a busy platform: fast checks, a ranked review queue, appeals and the numbers to watch, explained simply for your AI interview.

**In short:** A content-moderation pipeline runs cheap checks on every post before it shows, sends only the unsure ones to people, and keeps a slower scan and an appeal route going after publishing. The number of reviewers comes from the volume, and block rate and overturned appeals show whether it works.

AI and LLM interview question Q351, LLM system design. Intermediate, common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/design-a-content-moderation-pipeline

## Say it in 30 seconds

A content-moderation pipeline is the chain of checks a platform runs on what users post. Cheap rules and a quick model score run before an item shows, and clear cases are decided at once. Only the unsure ones go to people, ranked by harm. After publishing, a fuller scan and user reports catch the rest, and a person decides every appeal. I size the team from the volume and watch block rate and overturned appeals.

## Say it in 2 minutes

I'd start with the volume, because it sets the design. Say a marketplace for second-hand goods gets 1.2 million new listings, photos and messages a day. Nobody can read that, so automatic checks must clear almost all of it. Before an item shows, only fast checks run: exact banned terms and a quick model score for each category. They have to answer in well under a second, or the seller is left waiting.

What the checks can't decide goes to a person. Say that is four in a thousand items, about 4,800 a day. A reviewer clears about 240 an hour, so that is 20 hours of work. With breaks, training and busy days I plan about 30 hours, which means four people on eight-hour shifts. The queue is ranked by harm, so a threat against someone is seen within minutes, and every decision a reviewer makes becomes a labelled example for tuning the thresholds.

Two things need a rule before launch. If the model is down, I hold the risky categories and let plain listings through to the slow scan, with the rule for each category decided before any outage. And a seller can appeal a removal, a restriction, a suspension or a loss of earnings. If you run an online platform in the EU, the Digital Services Act says an appeal decision must not rest on automated means alone, and the complaint route stays open for at least six months after each decision.

Last, I watch the block rate, the audit misses and how often appeals win, because a pipeline that nobody measures drifts.

## What is a content-moderation pipeline, in plain words?

A content-moderation pipeline is the set of checks a platform runs on what its users post: listings, photos, comments and messages. Each item is passed, held, or sent to a person. A good pipeline clears most items in well under a second.

Think of an airport security line. Everyone goes through the scanner, a few bags get a closer look, and a supervisor settles the hard cases. A moderation pipeline works the same way, with a model as the scanner and a million posts a day as the bags.

Here is the case for this answer, with made-up numbers. A marketplace for second-hand goods gets 1.2 million new listings, photos and messages a day. Some are scams, some sell banned items, and some are abuse aimed at a seller. The platform has to catch the harm without stopping honest sellers.

- **Pipeline:** The chain of checks, in order, from upload to a decision.
- **Unsure band:** Scores in the middle, where the rules and the model cannot decide alone.
- **Threshold:** The score line that turns a score into hold or publish.
- **Appeal:** A request that someone else looks again at a decision.
- **False positive:** An honest post stopped by mistake.

## What is checked before a post shows, what after, and what if the model is down?

Items get two checks on two clocks. The fast clock runs before publishing: exact-word rules from a blocklist you maintain for your own use case, and a quick model score, which must answer in well under a second. The slow clock runs after publishing: a fuller scan, user reports and audits, which can take minutes.

The model returns a score for each category of harm. A score is the model's confidence that an item fits a category, so the team chooses the line where a score becomes an action. OpenAI's guide says to treat scores as signals for your own policy:

> "Treat moderation scores as signals for your application's policy, not as an automatic blocking decision." (OpenAI, moderation guide)

The moderation models accept images, but only some categories check them. OpenAI's category table marks categories such as illicit and hate as text only, so photos of banned goods need their own check. Keep the fast clock cheap, though, because it runs on every single item.

*Diagram, Two clocks: before and after publishing: A new item meets the fast checks first, and a clearly harmful score blocks it before it shows. Once it is live, the slow scan and reports run on it. Only unsure items reach a person.*
1. A new item meets the fast checks first.
2. Once it is live, the slow scan starts on it.
3. A low score: the item stays up at once.
4. An unsure score: a person decides, in queue order.
5. A clearly harmful score: the item is blocked before it shows.
6. A high score or a report later: the item comes down.

A moderation step can fail. OpenAI's guide says that when a step cannot finish, the result can contain an error instead of scores, so the code has to decide on purpose what happens next.

- **Option A: Publish everything.** Sellers are never stuck, but scams and abuse go live with no check until the model returns.
- **Option B: Hold the risky, publish the plain.** Risky categories, such as weapons and medicines, wait for the check. Plain listings go live and get the slow scan later.

Option B is my default. Holding everything protects more, but it also stops every plain listing for the length of the outage, which is a heavy cost for honest sellers. I would set the rule for each category before any outage, because nobody wants to argue about it in the middle of an incident.

> **Tip:** Write the per-category rule down before the outage. During the incident, the rule should already be decided.

## How many reviewers do you need, and what goes first?

Size the team before you hire. Multiply the volume by the share the automatic checks can't clear, then divide by what one reviewer clears in an hour. That gives hours of work. Multiply by a buffer for breaks, training and busy days (1.5 here), then divide by the hours in one shift and round up to get the number of people. Here is the sum with this answer's numbers:

```python
# A simplified capacity check for a marketplace's review queue. Every number is made up.
ITEMS_PER_DAY = 1_200_000
SENT_TO_PEOPLE = 0.004   # share the automatic checks cannot clear
PER_HOUR = 240           # items one reviewer clears in an hour
BUFFER = 1.5             # extra time for breaks, training and peaks
SHIFT_HOURS = 8

to_people = round(ITEMS_PER_DAY * SENT_TO_PEOPLE)
hours = to_people / PER_HOUR
with_buffer = hours * BUFFER
reviewers = -(-with_buffer // SHIFT_HOURS)  # round up

print(f"Items sent to people a day: {to_people:,}")
print(f"Review hours needed: {hours:.1f}")
print(f"With breaks and peaks: {with_buffer:.1f} hours")
print(f"Reviewers on {SHIFT_HOURS}-hour shifts: {int(reviewers)}")
```

Output:

```text
Items sent to people a day: 4,800
Review hours needed: 20.0
With breaks and peaks: 30.0 hours
Reviewers on 8-hour shifts: 4
```

Four people cover a working day. The ranked queue decides who sees what first, so urgent items are not stuck behind spam. Urgent items need cover round the clock, so weekends and leave make the roster bigger. Threats against someone and self-harm signs go to the top and are seen within minutes. Spam and minor rule breaks wait at the bottom, where a slower decision is acceptable.

*Diagram, Three queues, one pool of reviewers: Unsure items are sorted by harm into three queues. Every reviewer decision is saved, so the labels can later tune the thresholds.*
1. Everything the checks left unsure joins the queues.
2. Threats and self-harm signs skip the line.
3. Most unsure items wait here, in order of harm.
4. Spam and minor rule breaks get the slowest queue.
5. Urgent items are decided within minutes.
6. Standard items are decided the same shift.
7. Low-risk items are decided when there is time.

> **Tip:** Say the trade-off out loud. A higher threshold sends fewer items to people, but more harm stays live for longer.

## How do reports and appeals work, and what does the law ask?

Two routes feed the queue. A report is a user saying a post is wrong, and an appeal is a seller asking for a second look. If your platform is in scope, the EU's Digital Services Act sets rules for both.

Hosting services must give anyone a way to report content they think is illegal, and must give the affected person a clear reason when they restrict a post. For online platforms, the internal complaint route covers removal, restriction, suspension and monetisation decisions, and it must stay open for at least six months after the decision.

> "Providers of online platforms shall ensure that the decisions, referred to in paragraph 5, are taken under the supervision of appropriately qualified staff, and not solely on the basis of automated means." (EU Digital Services Act, Article 20(6))

Article 20(6) requires that appeal decisions are not taken solely by automated means, so a person makes the final call. Sending the appeal to a different reviewer than the first one is my design choice, not a legal rule. Overturned appeals are data too: they show where a threshold is too strict.

## How do you know the pipeline works, and keep it working?

Watch four numbers every week. Azure's guidance lists the same kinds of measures, from technical ones such as latency, accuracy and recall, to business ones such as block rate.

- **Block rate:** The share of items stopped. A sudden jump or drop means a threshold changed or a new scam wave arrived.
- **Overturned appeals:** The share of decisions a second reviewer reverses. A high number means honest sellers are being stopped. These are false positives: honest posts stopped by mistake.
- **Audit misses:** Harm found in a random sample of items the pipeline cleared. It measures what gets through.
- **Urgent wait time:** How long an urgent item waits before a person sees it. The target is minutes.

Thresholds drift, so tune them on purpose. OpenAI says it keeps upgrading its moderation model, so custom policies that rely on category scores may need recalibration over time. Policy experts can make the test set. In its August 2023 post, OpenAI describes a golden set, a small number of examples that experts label once a policy is written.

Reviewers need protecting too. OpenAI's post says constant exposure to harmful content can lead to emotional exhaustion and psychological stress, so I cap shift length and rotate people away from the worst queues.

### How would you handle a sudden wave of scam listings?

Scam waves can build within hours, so the response has to be agreed in advance. These are the steps I would run:

1. **Spot the spike:** The block rate for one category jumps. An alert fires within minutes, and the on-call lead is told.
2. **Tighten that one category:** Lower its threshold and add the new phrases to the exact-word list. Leave the other categories alone.
3. **Move the queue:** Send that category's items to the top of the queue, and hold new sellers' listings in it until they are checked.
4. **Clean up, then relax:** Pull the live scams, tell the buyers who saw them, and loosen the rule only after the wave has passed.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] Volume first: the numbers decide whether people can be in the loop at all.
- [ ] Two clocks: a fast check before publishing, a fuller scan after.
- [ ] A ranked review queue, with the headcount worked out from the numbers.
- [ ] A rule for when the model is down, decided per category.
- [ ] Reports and appeals, with a time limit and a person making the final call on each appeal.
- [ ] Metrics that catch drift: block rate, overturned appeals, audit misses.

**Common traps**

- Trap: "One big model call decides every item." Better: Cheap checks run on everything. The big, costly step is for the unsure band only.
- Trap: "Humans review everything, to be safe." Better: Nobody can read 1.2 million items a day. Let the rules clear most, and rank what people see.
- Trap: "We will ban it and move on." Better: Appeals and audits are part of the design. Without them, honest sellers and missed scams both go unseen.

## Can you spot the problem?

**Spot the problem:** Which of these four designs is the risk?

A. Each post passes the fast checks first. The slow scan runs after it is live, and anything it flags comes down.
B. Each post waits up to 300 milliseconds for a score. If there is no answer in time, the post follows its category's fallback rule.
C. Each post waits for the model with no time limit. A slow model call stops the whole feed.
D. Appeals stay open for six months, and each one is decided by a trained person, not by the model alone.

**Answer:** C. The third option has no time limit, so one slow model call stalls the whole feed. Put a timeout on every call and decide what happens when it fires, as the second option does.

**Quick check:** The model is down for 20 minutes. Which rule suits a marketplace check for prohibited items?

A. Publish every item and check them the next morning
B. Hold items in risky categories until the check returns, and let plain listings through
C. Turn the check off until the model is back
D. Stop all new listings for the day

**Answer:** B. Risky items wait for the check, and plain listings keep flowing. Publishing everything or switching the check off drops the protection for 20 minutes, and stopping all listings protects more, but it blocks every honest seller for the whole outage.

## Can you answer these from memory?

**Flash cards**

- **What is a moderation pipeline?** The ordered checks a platform runs on user content, from upload to a decision.
- **Why two clocks?** A fast check before publishing, and a fuller scan after, so sellers are not kept waiting.
- **What is the unsure band?** Scores the rules and model cannot decide alone. People review these, ranked by harm.
- **How many reviewers do you need?** Volume × share to people ÷ items per hour × buffer ÷ shift hours, rounded up.
- **Model down: let items through or hold them?** Decide per category before any outage. Hold risky items, let plain ones through.
- **What does the EU ask for appeals?** An internal route open for at least six months, and a decision not made by automation alone.

## Likely follow-up questions

- Q218 How do you build content moderation? https://designervenkat.online/interview/ai/how-do-you-build-content-moderation
- Q248 What is a golden dataset, and how do you build one? https://designervenkat.online/interview/ai/what-is-a-golden-dataset
- Q264 When do you need human evaluation? https://designervenkat.online/interview/ai/when-do-you-need-human-evaluation
- Q355 What is your fallback when a provider is down? https://designervenkat.online/interview/ai/what-is-your-fallback-when-a-provider-is-down
- Q357 Scale to millions of users. https://designervenkat.online/interview/ai/scale-to-millions-of-users
- Q267 How do you evaluate safety? https://designervenkat.online/interview/ai/how-do-you-evaluate-safety

## Learn it in depth

- [Content Moderation APIs](https://designervenkat.online/learn/ai-engineering/content-moderation-apis)
