Context validation (grounding)

Use the grounding context validation filter to detect when generated output contains information that isn't supported by the input or an associated knowledge base. For example, if the generated content discusses a fee structure for a product your organisation does not provide.

Grounding validation is helpful in preventing hallucinated content that isn't supported by your provided data, but it doesn't check whether the content is also relevant. To filter content that isn't relevant, use the context validation (relevance) filter.

Keep your knowledge base up to date

Grounding validation relies on the data you provide in your knowledge base. Make sure you keep your knowledge base current by adding new information and updating or removing obsolete or outdated data.

The grounding validation filter is only available on output guardrails. Grounding validation filters must be connected to a knowledge base that contains the information to compare against.

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

The grounding validation filter can:

  • Flag and block ungrounded content.
    Your chatbot does not receive the generated output. Your script can start a specific passage instead.
  • Flag the ungrounded content but allow the chatbot to continue normally. 
    If you want to stop filtering ungrounded content, clear the Grounding Validation checkbox to disable the filter.

You can configure how strictly the filter detects content:

  • Use higher strength to prioritise detecting ungrounded content, even if some grounded content is also impacted.
    Higher strength filters are more likely to incorrectly flag grounded content as ungrounded .
  • User lower strength to prioritise permitting content through, even if some ungrounded content is not detected.
    Lower strength filters are less likely to detect all ungrounded content.

Each strength level has a value between 0 and .99. Higher values correspond to higher strength. If you want greater control than the available levels, you can set a custom value.

Changes that you make to grounding validation filters must be published before they take effect.

To filter ungrounded content:

  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 Context Validation tab, make sure Grounding Validation is enabled.
  4. Select the Action:
    • Flag & Block to respond to the content differently.
      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.
      If you want to stop filtering ungrounded content, clear the Grounding Validation checkbox to disable the filter.
  5. Select the Strength that the filter should use when detecting ungrounded content.
    Higher strength detects more ungrounded content but may also incorrectly flag grounded content more often.
    To use a custom strength value, select Custom, then type a Strength value between 0 and .99.
  6. Click Save.

 

Was this article helpful?
0 out of 0 found this helpful