LLM alignment for Safety

Sebastian Nabrink, Alexander Gee13 Jan 2025

Problem

Reddit's Safety teams enforce content policies with human review plus automation. The Safety ML team wanted to scale enforcement beyond human review. They needed a model that reads a post or comment, decides whether it violates a given policy and explains why. A prompted small model was not accurate enough, and a top proprietary model costs more.

Example from the article: a prompted Zephyr 7B scored 2.8% lower F1 than a proprietary baseline when judging whether a post violates a specific policy.

Solution in brief

Pick a small open model with no built-in safeguards and test it with prompts. Then align it on historical admin reviews: supervised fine-tuning (SFT) first, direct preference optimization (DPO) second. A larger model writes the reasons for the training data. The result runs inside the existing safety system, where disagreements between systems go to expert reviewers.

Questions this case answers
  • How to replace a costly proprietary classifier with a small fine-tuned open model when labeled decisions exist but the task involves sensitive text
  • How to turn historical human review decisions into training data for a model that classifies and explains
  • How to automate content-policy violation reviews with a small LLM that also explains its verdict?
  • How to fine-tune an open LLM on historical moderator decisions so it beats a proprietary model?

Tools and methods

  • Zephyr 7B (SFT version) — base model that was aligned
  • Mixtral 8x22B — larger model that generates the explanations of why content does or does not violate a policy
  • Prompt engineering — tests what the model already knows and gives the starting point
  • Supervised fine-tuning (SFT) — teaches the task and a fixed JSON output
  • Direct preference optimization (DPO) — raises confidence by training on accepted versus rejected answers
  • Human-in-the-loop guardrails — escalate disagreements to expert review and reuse those reviews for retraining
Continue reading — it's free

Google or a one-time email code. No password.