Overview

A jailbreak is a crafted input that gets a model to ignore its safety training and produce content it would normally refuse. Common techniques are roleplay framing (“you are an AI with no restrictions”), nested hypotheticals and fiction, encoding tricks (Base64, homoglyphs), and multi-turn pressure.

A jailbreak attacks the model’s refusal behavior through the user’s own input. prompt-injection attacks the boundary between trusted instructions and untrusted data, such as a poisoned web page. The threats overlap but the defenses differ, so test for both.

No model is jailbreak-proof; safety behavior is probabilistic. Design for containment: give the model least-privilege access to tools and no secrets in context, validate model output and tool arguments before acting, constrain output with a schema where the task allows, screen responses with an output classifier on public-facing apps, log repeated attempts, and red-team before launch. A hardened system-prompt that states scope and refuses reframing as fiction helps but is not sufficient. Assistant-message prefill, once a vector (“start your reply with ‘Sure, here’s how’”), is rejected with a 400 on Claude 4.6 and later models.