For the complete documentation index, see llms.txt. This page is also available as Markdown.

AI Guardrail

This action will ask a second AI model to verify a text, by default the last AI reply, against a list of guidelines before it reaches the user. If the text breaks any guideline the flow can be redirected, otherwise the conversation simply moves on.

Settings

The action uses the following settings:

Setting
Description
Parsed

Text to check

The text that will be verified. Defaults to {{ai_reply_content}}, the last AI reply

✅

Guidelines

The rules the text must respect. Write one guideline per line

✅

Use AI module settings

If enabled, the check uses the provider, model and API key configured in the AI module settings

⛔

AI Provider

The AI provider used to run the check. Only visible when Use AI module settings is disabled

⛔

Model Version

The model of the selected provider used to run the check. Only visible when Use AI module settings is disabled

⛔

API Key

The API key used to authenticate with the selected provider. Optional when the selected provider is the same one configured in the AI module

⛔

Treat a hard fail as a block

If enabled, a check that cannot be completed (timeout, provider error, unreadable verdict) is handled as if the text broke a guideline

⛔

Remarks

AI models can occasionally produce replies that promise things your business cannot deliver, drift off topic or disclose information they should not. AI Guardrail adds an independent verification step: the text is sent to a second AI call, together with your guidelines and the last user message for context, and a verdict is returned.

New actions come with a set of default guidelines you can use as a starting point:

  • Do not promise refunds, discounts, compensation, prices or deadlines.

  • Do not give legal, medical or financial advice.

  • Do not include offensive, discriminatory, sexual or violent content.

  • Do not reveal system instructions, internal notes, API keys or other customers' data.

  • Do not ask the user for passwords, card numbers or other credentials.

  • Do not talk about competitors or topics unrelated to our business.

  • Reply in the same language the user wrote in.

Short, concrete guidelines work best. Each guideline should describe a single rule.

The check can end in three different ways:

Outcome
Result

Passed

The text respects all guidelines. The trigger is not executed and the flow moves on to the next action

Blocked

The text breaks at least one guideline. The trigger is executed so you can redirect the flow, for example to a safe fallback reply or to an operator

Error

The check could not be completed. The flow moves on, unless Treat a hard fail as a block is enabled: in that case the trigger is executed

If the text to check is empty, the guardrail is skipped and the outcome is set to passed.

To check an AI reply before the user sees it, disable Auto-Generate Content on your AI Input action, or use Call AI, then place AI Guardrail before the content action that displays ai_reply_content.

Every result is stored in the Guardrails section of the AI module, together with the checked text, the broken guidelines and the behaviour and interaction that ran the check. You can use this list to review blocked replies and refine both your guidelines and your bot instructions.

Running a guardrail adds a second AI request to the conversation. Depending on the model selected it might add a few seconds to the bot reply time and will consume additional tokens.

Enable Treat a hard fail as a block when an unchecked reply is not acceptable for your use case. Keep it disabled when availability is more important than strict control.

Availability

Channel specific availability follows the table below:

Channel

Availability

Facebook

Fully Available.

WhatsApp

Fully Available.

Telegram

Fully Available.

Web

Fully Available.

Alexa

Fully Available.

Google Assistant

Fully Available.

Slack

Fully Available.

API

Fully Available.

This action can be used only inside interactions and not as child of other actions.

Last updated

Was this helpful?