Design Layered Safety Filtering for Meta AI Assistant Responses

Last updated: November 29, 2026

Quick Overview

Design the safety system around a Meta AI assistant that screens prompts and generated responses for harmful content, while keeping false refusals low. Cover classifiers, policy routing, streaming checks and how the system improves over time.

Meta
ML System Design
Machine Learning Engineer
Meta
November 29, 2026
Machine Learning Engineer
Onsite
ML System Design
Medium

0

0

0 solved


Design the safety system around a Meta AI assistant that screens prompts and generated responses for harmful content, while keeping false refusals low. Cover classifiers, policy routing, streaming checks and how the system improves over time.

Meta has released Llama Guard style safety classifiers, and assistants inside its apps reach teens and adults worldwide. Interviewers check for layered defenses, policy taxonomies, balancing over-refusal against harm, and red-teaming and feedback loops.

What the Interviewer Expects
  • Uses input and output classifiers with a policy taxonomy
  • Adjusts behavior by context such as teen accounts and region
  • Handles streamed output without large added latency
  • Measures both harmful response rate and false refusal rate
  • Uses red teaming, user reports and adversarial data to retrain
Key Topics to Cover
LLM safety
content classifiers
jailbreak defense
false refusals
red teaming
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How would you handle multi-turn jailbreaks that are harmless turn by turn?
  • What do you do when the classifier is unsure: block, rewrite, or answer with caution?
  • How do you evaluate safety in languages with little labeled data?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements
  • Assistant used in chat apps by large populations, including teen accounts with stricter defaults.
  • Categories: violent crime help, self-harm, sexual content involving minors, hate, dangerous weapon...
High-Level Design
  1. Input classifier: small fine-tuned model scoring the user turn plus recent conversation against the taxonomy.
  2. Policy router: decides: answer normally, answer with safety guidance (for ex...

Submit Your Answer
Markdown supported