Glossary · AI
AI guardrails
Also called: LLM guardrails, AI safety checks, output filters
AI guardrails are automated checks placed before or after a model call that block, correct or route away inputs and outputs that break your rules, such as banned content, leaked data or invalid formats.
A prompt asks the model to behave. A guardrail checks whether it did. Because models are probabilistic, any rule that really matters should be enforced by a deterministic check outside the model.
Types of guardrails
| Type | Checks | Example |
|---|---|---|
| Format | Output parses and matches a schema | Reject a reply missing category |
| Content | Banned terms, topics or tone | Block "guarantee" in a sales draft |
| Data leakage | Fields that must never leave | Strip internal notes or account numbers |
| Value range | Numbers and choices within limits | Discount no higher than 10% |
| Grounding | Claims supported by provided data | Flag a reply citing a policy that isn't in the prompt |
Where to put them
- Before the model: redact sensitive fields, trim input, refuse obviously malicious text.
- After the model: validate format, scan content, check values.
- Before the action: the last gate. If a guardrail fails, route to a person or a safe default; don't just log it and carry on.
Guardrails reduce risk; they don't remove it. Pair them with human review for anything irreversible, and with least-privilege tools against prompt injection.
In Fluxo Flow
The Guardrail node blocks or warns on banned terms or fields; the Validator node checks rules or a JSON schema and routes to pass or fail; Human Review is the final gate before risky actions. A typical support-reply workflow runs an AI draft through a Guardrail that blocks internal notes and banned terms, then waits for an agent's approval.
Read next
Related terms
- Prompt injectionPrompt injection is an attack in which text that a language model processes (an email, a web page, a document) contains instructions that override or subvert the instructions the developer gave it.
- Structured outputStructured output is a model response in a predefined, machine-readable format, typically a JSON object matching a schema, so the next steps of a workflow can use the fields directly instead of parsing prose.
- JSON schemaJSON Schema is a standard vocabulary for describing what a JSON document must look like (which fields are required, their types, formats, allowed values and ranges) so data can be validated automatically.
- Human in the loop (HITL)Human in the loop (HITL) is a design in which an automated process pauses at chosen points for a person to review, correct, approve or reject its output before it continues.
- API key vs OAuthAn API key is a static secret that identifies the caller and grants whatever access it was created with, while OAuth issues short-lived, scoped tokens after a user approves access; OAuth is safer for user-facing connections, keys are simpler for server-to-server use.
- AI agentAn AI agent is a system in which a language model decides its own next step, calls tools (APIs, searches, other systems), reads the results and repeats until it judges the goal reached.