Ban Substrings Scanner
(Input and Output scanner)
Last updated
(Input and Output scanner)
Last updated
Ensure that specific undesired substrings never make it into your prompts with the BanSubstrings scanner.
It is purpose-built to screen user prompts, ensuring none of the banned substrings are present. Users have the flexibility to enforce this check at two distinct granularity levels:
String Level: The banned substring is sought throughout the entire user prompt.
Word Level: The scanner exclusively hunts for whole words that match the banned substrings, ensuring no individual standalone words from the blacklist appear in the prompt.
Ban Substrings Detection Policy for AI Chatbot
Create a new policy as same as shown in LLM Guardrails Policy, for Ban Substrings detection select scanner Ban Substrings (Google).
Optionally, perform a test to ensure the policy is functioning as intended. Check that Ban Substrings is detected and blocked as specified.