Zenaique

Why run a toxicity classifier on output even when the model was RLHF tuned to refuse harmful content

Flashcard·Easy·4.0 · 0·~30s·Asked atGraphcoreNeo4j
Attempt it
TL;DR

RLHF is a soft prior that fails under adversarial input and cannot encode per-deployment policy; a separate output classifier is the deterministic backstop with an audit trail.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine a restaurant where the chef has been trained for years not to serve raw chicken. Most days, the food is fine. But people sometimes still get sick, because the chef has a bad day, because a supplier slipped in contaminated stock, or because someone deliberately tricked the chef into a shortcut. A health inspector at the kitchen door tasting every plate before it goes out catches the cases the chef missed. The inspector does not replace the chef's training; it backs the training up with an independent check that has nothing invested in the chef being right.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

RLHF-tuned models refuse most harmful requests most of the time. That is a real safety contribution. It is also not a complete safety system, and treating it as one is a mistake organisations make routinely.

The gap between 'usually refuses' and 'will never emit unsafe output' is where the output classifier lives. Knowing exactly what the classifier adds, and why it cannot be replaced by stronger model training, is the difference between a safety stack that works under adversarial pressure and one that looks good on a slide.

What RLHF training actually does, and does not, give you

RLHF takes a base language model and tunes it against a reward signal that incorporates human preferences. Part of the preference signal is 'refuse harmful requests'. The result is a model whose probability distribution puts much less mass on harmful responses to typical inputs.

What that gives you is a lower base rate. Inputs that look like the training distribution produce safer outputs than they would from an un-tuned model. On benign user interactions, the harmful-output rate is very small.

What it does not give you is a guarantee. The model is still a probability distribution over outputs. Inputs that look unlike the training distribution, jailbreaks, persuasion attacks, indirect injection via retrieved content, push the model into regions where the safety prior is weaker. The model can and does emit harmful output in those regions. The question is whether a second, independent layer is watching when it happens.

Gap one: adversarial input
Gap two: indirect injection through retrieval
Gap three: per-deployment policy the base model never trained on
Audit, compliance, and the case for an explicit verdict
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • Meta Llama Guard 4 (2026), open-weights multimodal output classifier with configurable taxonomy, deployed alongside Llama 4 generation models.
  • OpenAI Moderation API, hosted text and image classifier paired with GPT models for output-side filtering.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow would you tune the classifier threshold for a customer-support bot vs a code-generation bot?
A

Talk about the cost asymmetry of false positives (annoying refusal) vs false negatives (harmful emission), the different harm taxonomies for the two surfaces, and using a paired benign-suite Pareto plot to pick the operating point.

1 more follow-up an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Believing RLHF-tuned refusals are a sufficient safety control. They reduce the base rate; they do not generalise to adversarial input or to per-deployment policy.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Explain why RLHF is a probability distribution rather than a deterministic refusal

  • Name three categories of harmful output the classifier catches that RLHF misses

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Pick the strongest reason…
MCQ·Medium