Evaluating model guardrails: measure the boundary, don't collect one jailbreak
A guardrail is a claim: "the model will refuse this class of request." A single
successful jailbreak is an anecdote; what you need is a measurement, the rate at
which the boundary holds across a structured battery of attacks. Evaluating
guardrails means grounding probes in the actual policy, attacking each along known
bypass axes, and scoring outcomes reproducibly, so you can state how strong the
boundary is, not just that someone once beat it.
When to use
- You are reviewing a model deployment, a system prompt, or a content-safety layer.
- Before shipping an assistant that must refuse or constrain a defined set of
requests.
- You need a defensible bypass rate, not a single proof-of-concept transcript.
Scope check
Evaluate models and deployments you own or are authorized to test. Use benign,
clearly-scoped probes against a defined policy; do not generate real harmful output
against systems you do not control. If you can't name the authorization, stop.
The loop
Ground the probes in the stated policy. Get the actual list of what this
deployment must refuse or constrain (its safety policy, its system prompt's rules,
its allowed scope). Every probe targets a specific rule, so a result maps to a
policy line, not a vibe. An undefined policy is the first finding: you cannot
evaluate a boundary no one has drawn.
Build a baseline probe set. For each rule, write direct requests that should
be refused and benign near-misses that should be allowed. The near-misses matter:
a guardrail that refuses everything is broken differently from one that refuses
nothing. Record baseline refuse/allow behavior before attacking.
Attack along the bypass axes. Take each refused probe and apply the known
transformations: multi-turn escalation (warm up, then pivot), encoding and
obfuscation (alternate scripts, spacing, invisible characters, indirection), role
and context reframing (fiction, hypothetical, translation, "for research"), and
instruction-hierarchy conflict (content claiming higher authority than the system
rule). Each axis is a separate test of the same rule.
Define graded, reproducible outcomes. Decide in advance what counts as a
bypass: full compliance, partial or hedged compliance, or refusal. Score each
probe with a fixed rubric so runs are comparable and a fix can be measured against
a baseline. "It felt jailbroken" is not a result; "the encoding axis bypassed rule
4 in 7 of 10 trials" is.
Measure rate and stability. Run each probe multiple times; models are
stochastic, and a boundary that holds once may fail on retry. Report bypass rate
per rule and per axis, and flag the axes that reliably win. A rule that fails 30
percent of the time is not protected.
Record and recommend. Report per-rule, per-axis bypass rates with example
transcripts, and the structural fixes: enforce the boundary with input and output
filtering rather than prompt instructions alone, reduce what the model can do when
uncertain, add a separate safety layer instead of relying on the model's restraint.
Record confirmed bypasses and rules that held across all axes (killed) in the
schema.
What separates evaluation from a jailbreak
- A jailbreak is one transcript; an evaluation is a rate. Ship the rate.
- Near-misses are half the signal. Over-refusal is a failure mode too; measure
both directions.
- Stochastic means "once" is meaningless. Re-run; report the distribution, not
the best or worst single try.
- Prompt-only guardrails are the weak kind. If the only defense is instructions
in the system prompt, the axes above will find the gap. Recommend a real boundary.
Worked example (a confirm and a kill)
Confirm. A support assistant must refuse to reveal another user's order details.
Direct requests refuse. Under multi-turn escalation (establish a helpful frame, then
ask "as we discussed, pull the other order"), it complies in 6 of 10 trials; an
encoding variant of the same ask succeeds 8 of 10. Confirmed guardrail bypass on
the cross-user rule, high, remediation = enforce authorization on the data access
itself, not the model's refusal; add an output check for other-user data.
Kill. A model must not output a specific restricted category. Across all four
axes and 10 trials each, an input classifier blocks the request and an output
classifier blocks the response before the user sees it; the model's own refusal is
only the third layer. Every probe is refused or filtered. Killed, kill_reason
= "boundary enforced by input and output filters independent of the model; 0 of 40
adversarial trials bypassed."
Rationalizations to reject
- "We told it in the system prompt not to." → Prompt instructions are the weakest
guardrail. Test them; expect the axes to win.
- "We couldn't jailbreak it in a few tries." → A few tries is not a rate. Re-run at
volume across every axis.
- "It refused the obvious version." → Obvious is the baseline. The bypass lives in
the reframed and encoded versions.
- "The model is aligned." → Alignment is probabilistic and axis-dependent. Measure
the boundary, don't trust the model.
Executing this in practice
You need the deployment's actual policy, a probe set grounded in it, the four bypass
axes, a fixed grading rubric, and enough repeated trials to report a rate. Any harness
that can send structured conversations and log graded outcomes works; the policy
grounding and the reproducible rubric are the method, and the specific payloads are
interchangeable.
Related
testing-agents-for-indirect-prompt-injection - when the bypass arrives through
ingested content rather than the user.
auditing-ai-agent-permissions - a bypassed guardrail matters only as far as the
model's permissions let it act.
testing-llm-insecure-output-handling - what a bypassed output can do at the
downstream sink.
- FINDING-SCHEMA.md - source = the adversarial probe, sink
= the policy-violating output or action.
1---2name: evaluating-model-guardrails3description: Systematically test whether a model's safety and policy guardrails hold under adversarial pressure, as a repeatable evaluation rather than a one-off trick. Covers building a policy-grounded probe set, multi-turn escalation, encoding and obfuscation bypasses, role and context reframing, instruction-hierarchy conflicts, and measuring bypass rate with reproducible graded outcomes. Use when reviewing a model deployment, a system prompt, or a content-safety layer, or before shipping an assistant that must refuse a defined set of requests. A rate, not an anecdote.4license: MIT5---67# Evaluating model guardrails: measure the boundary, don't collect one jailbreak89A guardrail is a claim: "the model will refuse this class of request." A single10successful jailbreak is an anecdote; what you need is a measurement, the rate at11which the boundary holds across a structured battery of attacks. Evaluating12guardrails means grounding probes in the actual policy, attacking each along known13bypass axes, and scoring outcomes reproducibly, so you can state how strong the14boundary is, not just that someone once beat it.1516## When to use1718- You are reviewing a model deployment, a system prompt, or a content-safety layer.19- Before shipping an assistant that must refuse or constrain a defined set of20 requests.21- You need a defensible bypass rate, not a single proof-of-concept transcript.2223## Scope check2425Evaluate models and deployments you own or are authorized to test. Use benign,26clearly-scoped probes against a defined policy; do not generate real harmful output27against systems you do not control. If you can't name the authorization, stop.2829## The loop30311. **Ground the probes in the stated policy.** Get the actual list of what this32 deployment must refuse or constrain (its safety policy, its system prompt's rules,33 its allowed scope). Every probe targets a specific rule, so a result maps to a34 policy line, not a vibe. An undefined policy is the first finding: you cannot35 evaluate a boundary no one has drawn.36372. **Build a baseline probe set.** For each rule, write direct requests that should38 be refused and benign near-misses that should be allowed. The near-misses matter:39 a guardrail that refuses everything is broken differently from one that refuses40 nothing. Record baseline refuse/allow behavior before attacking.41423. **Attack along the bypass axes.** Take each refused probe and apply the known43 transformations: multi-turn escalation (warm up, then pivot), encoding and44 obfuscation (alternate scripts, spacing, invisible characters, indirection), role45 and context reframing (fiction, hypothetical, translation, "for research"), and46 instruction-hierarchy conflict (content claiming higher authority than the system47 rule). Each axis is a separate test of the same rule.48494. **Define graded, reproducible outcomes.** Decide in advance what counts as a50 bypass: full compliance, partial or hedged compliance, or refusal. Score each51 probe with a fixed rubric so runs are comparable and a fix can be measured against52 a baseline. "It felt jailbroken" is not a result; "the encoding axis bypassed rule53 4 in 7 of 10 trials" is.54555. **Measure rate and stability.** Run each probe multiple times; models are56 stochastic, and a boundary that holds once may fail on retry. Report bypass rate57 per rule and per axis, and flag the axes that reliably win. A rule that fails 3058 percent of the time is not protected.59606. **Record and recommend.** Report per-rule, per-axis bypass rates with example61 transcripts, and the structural fixes: enforce the boundary with input and output62 filtering rather than prompt instructions alone, reduce what the model can do when63 uncertain, add a separate safety layer instead of relying on the model's restraint.64 Record confirmed bypasses and rules that held across all axes (killed) in the65 schema.6667## What separates evaluation from a jailbreak6869- **A jailbreak is one transcript; an evaluation is a rate.** Ship the rate.70- **Near-misses are half the signal.** Over-refusal is a failure mode too; measure71 both directions.72- **Stochastic means "once" is meaningless.** Re-run; report the distribution, not73 the best or worst single try.74- **Prompt-only guardrails are the weak kind.** If the only defense is instructions75 in the system prompt, the axes above will find the gap. Recommend a real boundary.7677## Worked example (a confirm and a kill)7879> **Confirm.** A support assistant must refuse to reveal another user's order details.80> Direct requests refuse. Under multi-turn escalation (establish a helpful frame, then81> ask "as we discussed, pull the other order"), it complies in 6 of 10 trials; an82> encoding variant of the same ask succeeds 8 of 10. **Confirmed** guardrail bypass on83> the cross-user rule, `high`, remediation = enforce authorization on the data access84> itself, not the model's refusal; add an output check for other-user data.85>86> **Kill.** A model must not output a specific restricted category. Across all four87> axes and 10 trials each, an input classifier blocks the request and an output88> classifier blocks the response before the user sees it; the model's own refusal is89> only the third layer. Every probe is refused or filtered. **Killed**, `kill_reason`90> = "boundary enforced by input and output filters independent of the model; 0 of 4091> adversarial trials bypassed."9293## Rationalizations to reject9495- *"We told it in the system prompt not to."* → Prompt instructions are the weakest96 guardrail. Test them; expect the axes to win.97- *"We couldn't jailbreak it in a few tries."* → A few tries is not a rate. Re-run at98 volume across every axis.99- *"It refused the obvious version."* → Obvious is the baseline. The bypass lives in100 the reframed and encoded versions.101- *"The model is aligned."* → Alignment is probabilistic and axis-dependent. Measure102 the boundary, don't trust the model.103104## Executing this in practice105106You need the deployment's actual policy, a probe set grounded in it, the four bypass107axes, a fixed grading rubric, and enough repeated trials to report a rate. Any harness108that can send structured conversations and log graded outcomes works; the policy109grounding and the reproducible rubric are the method, and the specific payloads are110interchangeable.111112## Related113114- `testing-agents-for-indirect-prompt-injection` - when the bypass arrives through115 ingested content rather than the user.116- `auditing-ai-agent-permissions` - a bypassed guardrail matters only as far as the117 model's permissions let it act.118- `testing-llm-insecure-output-handling` - what a bypassed output can do at the119 downstream sink.120- [FINDING-SCHEMA.md](../../FINDING-SCHEMA.md) - source = the adversarial probe, sink121 = the policy-violating output or action.