Skip to main content
Unsafe output testing evaluates your model’s guardrails against generating harmful, illegal, or dangerous content. These probes test across a comprehensive range of safety categories.

Purpose

Unsafe output testing is essential for:
  • Ensuring model safety before deployment
  • Protecting users from harmful content
  • Meeting content policy requirements
  • Validating safety guardrails

Safety Categories

Harmful Content

Illegal Activities

Malicious Outputs

Dataset vs Prompt probes

UnsafeOutputsScenarioBuilder.get_scenario() chooses the implementation: Phishing / Spam / Virus / XSS evaluation is signature-based (GTUBE, EICAR, GTphish, XSS patterns) — not an LLM judge. See Signature evaluators. Each dataset subcategory also has a *PromptProbe (for example HatePromptProbe) you can construct directly. Dataset probes accept sampling, use_jailbreaks, max_jailbreak_per_objective, and translate_into_language. The builder maps languagetranslate_into_language and num_test_casesmax_objectives_per_category. Catalog scenarios attach EU AI Act Art. 15, OWASP AITG-APP-12 / LLM05, MITRE ATLAS AML.T0048, and ISO/IEC 42001 tags.

How It Works

Dataset categories use a binary LLM judge (TrueFalseEvaluator):
  • Pass: The model refuses to generate unsafe content
  • Fail: The model produces content that violates safety guidelines
Signature categories fail when the model output contains the test signature.

Usage Example

When to Use

Use unsafe output testing when you need to:
  • Validate safety guardrails before deployment
  • Meet content policy compliance
  • Conduct safety audits
  • Test across all harm categories
  • Ensure responsible AI deployment