Guardrails

A guardrail checks input before it reaches the model, or output before it reaches the user. The simplest version is a keyword blocklist: if the text contains one of these words, block it. Cheap, fast, and only as smart as its word list.

Learn

A filter that only knows its list

A keyword filter can't understand intent — it can only pattern-match text. That makes it fast and explainable, but it means every word you add is a tradeoff: block too little and attacks get through, block too much and you start rejecting ordinary requests that happen to share a word.

Build

Block the attacks, not the real traffic

Mission A · build a blocklist that catches every attack and zero false positives

Six prompts are about to hit your system. Pick which words to blocklist so every attack below gets blocked and every ordinary prompt still goes through.

pick some keywords…
Break

The same attack, one word different

Your blocklist works perfectly on the attacks you just saw. Now someone who can read your filter's rejection message starts probing it for words it doesn't know.

Mission B · evade the deployed filter

This filter is already live, blocking exactly ["ignore", "override", "delete"]. Pick the message below that gets the same malicious outcome as a blocked one, without tripping the filter.

pick the message that slips through…

What just happened: swapping "ignore" for "disregard" changed zero bytes of meaning and every byte the filter actually looks at. The filter never saw intent — it saw a word list, and you just weren't on it.

Defend

Why this works, and the fix

Why it works: keyword and regex filters match strings, not meaning, so any paraphrase, synonym, translation, or encoding that preserves intent while changing the surface text defeats them for free. This is why nearly every production jailbreak dataset includes trivial synonym-substitution variants.

The fix: layer defenses instead of relying on one — pair a cheap keyword filter with a model-based classifier trained to judge intent, not vocabulary, and treat the keyword layer as a fast first pass that reduces load, never as the actual security boundary.