Denied words

The denied words filter detects words and phrases you specify.

The filter can:

  • Flag and block content with the specified words or phrases.

    • If the filter is on an input guardrail, the chatbot does not send the content to the LLM model. 
    • If the filter is on an output guardrail, the chatbot discards the content it received from the LLM model.

    Your script can start a passage designed to handle this type of content instead.

  • Flag the content but allow it to be processed.

You need an administrator or publisher role on your team to edit guardrail filters.

The denied words filter matches the specific words and phrases you define. If you want to filter a broader range of content without defining specific words, use a custom topic or harmful category filter.

Words and phrases are not case-sensitive, ignore punctuation, and won't return partial matches. For example, if your denied word was 'crypto':

  • CRYPTO, crypto! Crypto, and crYpto. would all match the filter.
  • Cryptography or encrypt would not match the filter.

You can define up to 10,000 words or phrases. Each page displays ten words you've defined. Use the search field at the top of the list to find words you've defined, or use the navigation at the bottom to page through the list.

To download a list of all denied words, click the menu at the top of the list, then click Download as CSV.

You can:

  • Define words individually
  • Upload a CSV to replace the existing list

Changes that you make to denied words must be published before they take effect.

Define words individually

To add an individual denied word:

  1. Click Manage > More in the left navigation, then click Guardrails.
  2. Click the guardrail you want to modify or create one.
  3. In the Denied Words tab, make sure Denied Words is enabled. 
  4. Click + Word.
    Your first word is created automatically when you enable the filter.
  5. Type the Word or phrase to filter.
    Each word or phrase can be a maximum of 100 characters.
  6. Select the Action:
    • Flag & Block to respond to the content differently.
      If this is an input guardrail, the LLM model will not receive the content. If this is an output guardrail, the chatbot will not receive the generated output. Your script can start a specific passage instead.
    • Flag Only to flag the content but allow the chatbot to continue normally.
    • To stop filtering a word, click the menu next to it then click Delete.
      If you want to stop filtering all denied words, clear the Denied Words checkbox to disable the filter.
  7. Click Save.

Upload a CSV

Upload a CSV to replace the existing list of words with the CSV data.

The previous list of denied words can't be retrieved once it's overwritten. If you want to download it for safekeeping first, click the menu at the top of the denied words list, then click Download As CSV.

Your CSV can have up to 10,000 rows and must have two columns:

  • Word, with the words and phrases you want to filter
  • Action, with the action for each word:
    • block for Flag & Block.
    • detect for Flag Only.

You can download a CSV template to use before you upload your file.

To replace the list with a CSV of words:

  1. Click Manage > More in the left navigation, then click Guardrails.
  2. Click the guardrail you want to modify or create one.
  3. In the Denied Words tab, make sure Denied Words is enabled. 
  4. Click + Upload CSV.
  5. If you need to download the CSV template, click CSV Template.
  6. Add your completed CSV and click Upload.
  7. Click Save.
Was this article helpful?
0 out of 0 found this helpful