What defenses actually work against jailbreaks?
hardAnswer
- (1) Robust alignment: RLHF/DPO on curated jailbreak examples significantly reduces success rate but never to zero.
- (2) Input classifiers (Llama Guard, PromptGuard) that filter obvious attacks before reaching the LLM.
- (3) Output classifiers to catch unsafe generations post-hoc.
- (4) Instruction hierarchy training (developer > user > tool > 3rd party).
- (5) System-prompt reinforcement: repeat key rules mid-conversation.
- (6) Rate-limiting / anomaly detection on repeated attempts.
- Defense-in-depth: no single layer is sufficient.
Check yourself — multiple choice
- Alignment alone
- Aligned model + input/output classifiers + instruction hierarchy + rate-limiting + system-prompt reinforcement — defense in depth
- Only prompt engineering
- Impossible to defend
Jailbreak defense = alignment + classifiers + instruction hierarchy + rate limiting + system prompts.
#safety#guardrails#red-team
Practise LLMs & GenAI
214 interview questions in this topic.