← Back to all posts

Guardrail

On this page

Purpose

Guardrail checks an English Message for selected PII entities and selected OpenAI moderation categories. It routes the original Message to Pass or Fail. It does not redact or rewrite the message.

Guardrail controls with PII, moderation, output mode, and Pass and Fail outputs

When to use it

  • Route a user Message with selected PII to a review path.
  • Check an Agent response for selected moderation categories before display.
  • Send clean and flagged Messages to different downstream paths.

Required setup

PII checks need no credential. Moderation checks require an OpenAI API key.

How to use it

  1. Connect the Message to Message.
  2. Select the PII categories, moderation categories, or both.
  3. Connect Pass to the clean-message path and Fail to the flagged-message path.
  4. Use Single Output when the two paths should not both run.

Configuration

SettingWhat it controlsRecommended starting point
Personally identifiable informationSelected Presidio PII entity types.Select only the PII types the flow must route.
ModerationSelected OpenAI moderation categories.Select only the categories required by the flow policy.
OpenAI API KeyAuthenticates moderation requests.Use a saved Credential when moderation is enabled.
Output ModeControls the inactive branch.Start with Both Outputs; use Single Output for separate downstream chains.

Expected result

With no selected detection, Pass returns the original Message. With any selected PII or moderation detection, Fail returns the original Message. In Both Outputs mode, the inactive output is an empty Message. In Single Output mode, the inactive branch is stopped.

Both category lists default to empty, so every Message passes until you select a detector. The component returns no scores, detected categories, redaction, or audit record. A moderation selection without a valid OpenAI key fails instead of routing the Message.

Reference details

PII detection uses Presidio with English text. Moderation uses OpenAI omni-moderation-latest. PII-only use does not call OpenAI. Guardrail does not provide custom rules, regexes, keywords, sensitivity thresholds, jailbreak checks, hallucination checks, or general policy enforcement. Guardrail is not supported in Agent deployments. Automated PII detection can miss sensitive information, so a Pass result is not a privacy or compliance guarantee.

  • Chat Input supplies a user Message before model processing.
  • Agent Core can receive approved input or have its response checked before display.
  • Chat Output displays either handled path.
← Back to all posts