What is Regex Refusal?

Regex Refusal is a type of policy designed to allow users to filter out keywords that should not be flagged in your results.

For example

  • Guardrail response: if your guardrail responds with “BLOCKED” when a malicious prompt is detected, then you can use the regex .*BLOCKED.* to ignore responses that have been blocked by your guardrail.