AI-assisted engineering/Guardrail hardening

Harden allow() against requests to drop the rules

Guardrail hardeningMedium30 min

Every jailbreak asks for the same thing before the favor: drop the rules first.

Your task

Harden allow() so a request to drop the rules is blocked however it is phrased.

  • allow(message) returns True to let a message through, False to block it
  • the attack asks the assistant to ignore, forget or work without its rules, says it has none, or names a mode or persona that has none
  • spellings vary: capitals, other words for rules, digits standing in for letters
  • customers say pretend, hypothetically, act as, ignore, rules and no restrictions in ordinary questions, and must get through

Both corpora run at submit: attacks must block, and the happy path must not regress.