Guard Nodes
Check workflow inputs and generated answers, then route execution based on the result.
Guard nodes let you check inputs and generated answers before your workflow continues. Use them to detect prompt attacks, check for unsafe content, or verify that an AI-generated answer is supported by its source material.
With Guard nodes, you can:
Check incoming text before sending it to an LLM.
Check generated answers before using them in subsequent actions.
Choose between Prompt guard, Content guard, and Hallucination guard.
Define separate paths for Not triggered and Triggered results.
Guard types
Prompt guard
Check incoming text for attempts to manipulate the LLM’s behaviour.
Content guard
Check incoming text or generated answers against content categories or custom rules.
Hallucination guard
Check whether an AI-generated answer is supported by its source material.
Configuration guide
Add a Guard node from the System section in the workflow builder.
Connect it to the preceding node.
Select a Guard type.
Configure the content to check.
Connect the Not triggered and Triggered branches to the appropriate next steps.
Prompt guard
A Prompt guard checks incoming text for attempts to manipulate the LLM’s behaviour, such as instructions to ignore its original prompt or perform an unintended action.
Place it before the LLM node that will process the text.
Text to check
Required. Provide the text you want to inspect. Typical inputs include:
A customer’s support ticket.
An incoming email.
A message submitted through a form.
Text received through a webhook.
Example: Check an incoming ticket
In a ticket-classification workflow, select the incoming ticket description as Text to check.
Connect Not triggered to the LLM node that classifies the ticket.
Connect Triggered to an alternative path, such as flagging the ticket for review.
Content guard
A Content guard checks text against content categories or custom rules. Use it to check incoming content before an LLM processes it, or to check an AI-generated answer before sending it.
Text to check
Required. Provide the text you want to inspect. For example, select an incoming message or the text output from an LLM node.
Role
Specify whose text is being checked. For example:
user
Incoming messages.
assistant
Generated replies.
Leave this field empty to use the default role, user.
Content categories
Select the categories you want the guard to check. Leave the selection empty to check all categories.
Custom categories
Use Add custom category to define additional content rules for your workflow. Each custom category requires:
Category code
Name
Description
Hallucination guard
A Hallucination guard compares an AI-generated answer with source material to identify claims that are unsupported by, or disagree with, that material.
Use it after an LLM node and before an action that sends or uses the answer.
Answer
Required. Provide the generated answer you want to check. Typically, this is the text output from a preceding LLM node.
Source context
Required. Provide the source material the answer should be based on. Examples include:
Relevant knowledge-base content.
Retrieved documents.
Product information or policy text.
Data returned by an integration.
Question
Optional. Provide the original question that the answer responds to. This gives the guard additional context when evaluating the answer.
Sensitivity
Sensitivity controls how strictly the guard evaluates the answer against the source context. Available settings are:
Service default — uses Permissive sensitivity.
Restrictive
Cautious
Permissive
None
If the check is too strict for your use case, try a more lenient sensitivity. To disable the check without removing the node or changing your workflow layout, select None.
Branching
Guard nodes have two outgoing branches. Connect these to define what happens after the check.
Not triggered
Continue along the path for content that does not trigger the guard.
Triggered
Follow an alternative path, such as flagging a ticket for review.
If the selected branch is not connected to another node, the flow ends at the Guard node.
A triggered result does not automatically send a fallback message or create a review task. Configure the Triggered branch with the actions you want the workflow to take.
Example: Check a support reply before sending it
In this example, an LLM generates a support reply using knowledge-base content. A Hallucination guard checks the answer before it is sent to the customer.
Configure the Hallucination guard
Add a Guard node after the LLM node and select Hallucination guard.
Answer
The generated reply from the LLM node.
Source context
The knowledge-base content used to generate the reply.
Question
The customer’s original question (optional).
Sensitivity
The setting appropriate for your use case.
Node outputs
Guard results are available to downstream nodes. The available fields depend on the selected guard type.
Common outputs
guardType, triggered, blocking
Prompt guard
ok, reason, confidenceScore
Content guard
categories, safetyLevel
Hallucination guard
reason, level, disagreementClaims
Type-specific details may vary depending on the result returned by the guard service.
Related documentation
Last updated
Was this helpful?

