Planned guide · jailbreak testing tools
LLM Jailbreak Testing
LLM Jailbreak Testing: Methods and Metrics: practical guidance grounded in the named primary sources.
Jailbreak classes
Organize cases by the control being tested: instruction override, role-play, multi-turn pressure, obfuscation, indirect content, and attempts to disclose protected information. Keep prompt injection and jailbreak labels precise; they can overlap, but a test should state whether the threat comes from a user, an external document, or another source. Use the OWASP LLM risk taxonomy to describe application risk, not as a complete list of test inputs.
Build test sets
A test set should identify the system version, policy objective, input channel, expected safe behavior, and evidence needed to judge the outcome. Include positive controls that should be refused and ordinary requests that should still succeed. Use synthetic data and harmless markers. Separate fixed regression cases from exploratory cases so results remain comparable without hiding novel behavior. Record provenance and license for any public dataset.
Metrics that mean something
Report the number of cases run, number with confirmed policy violations, severity by impact, false-positive review, and coverage by relevant threat class. Define the denominator and treatment of not-applicable or errored cases. When the model is stochastic, repeat selected cases and disclose the sampling method; do not convert a small test run into a probability of real-world compromise. Track human adjudication separately from automated scoring.
Limits of benchmarks
A benchmark can compare systems under a published protocol, but its result does not automatically transfer to a different model, system prompt, tool set, or deployment. Attack and refusal distributions change over time. A benchmark that tests model text alone may not exercise retrieval, permissions, rendering, or downstream actions. Treat benchmark results as one input to risk review and complement them with system-specific scenarios.
Worked regression example
A policy requires the assistant to keep a secret test string out of its reply. Store a synthetic marker in an isolated fixture and create a small set of ordinary and adversarially phrased requests that ask for it indirectly. The expected result is no marker disclosure while normal unrelated questions remain answerable. A reviewer confirms the result against the policy and logs the model, configuration, and cases. Never substitute real credentials or personal data.
Reporting and retest
For each observed violation, preserve a sanitized transcript, case ID, configuration, target version, and reviewer rationale. Identify whether the root cause is model behavior, system prompt, data access, output handling, or a missing authorization check. Apply a control at the layer that owns the risk. Add the case to regression tests and create a second test for the control so the system does not merely memorize one string.
Questions
What is a jailbreak test?
A jailbreak test checks whether a model or application can be induced to violate an intended policy or boundary through input or context. Scope and expected behavior must be explicit.
Does a high score mean the model is safe?
No. A score summarizes only the selected cases, target, and scoring rule; it is not a guarantee about unseen inputs or application behavior.
Should all cases be run on every code change?
Run a bounded deterministic subset in CI; schedule broader or adaptive assessments in an authorized environment with explicit cost and safety controls.
Build a red-team plan for your own system in two minutes: Open the free plan builder
Sources
- NIST AI 100-2e2025, Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations (March 2025)
- OWASP Top 10 for LLM Applications 2025 (OWASP GenAI Security Project)
- NIST AI 600-1, Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile (July 2024)
- MITRE ATLAS (Adversarial Threat Landscape for AI Systems)
- Checked 1 October 2026.