Skip to main content

Overview

Guardrails let Operators define rules that inspect AI traffic flowing through a gateway. When a guardrail is triggered, the AI request is blocked before it reaches the model. Guardrails are useful to prevent sensitive or non-compliant data (such as national IDs, bank accounts, or credit cards) from being sent to the AI, helping you enforce data protection and compliance policies. Each guardrail is:
  • Assigned to one or more gateways, so it only applies to the traffic of those gateways.
  • Evaluated on every AI request handled by the assigned gateways.
  • Blocking: when the guardrail matches, the request is rejected.
For now, guardrails support regular expressions (regex) only. Additional guardrail types may be added in the future.
Only users with the Operator role can manage guardrails. Availability and limits depend on the active license.

How guardrails work

A guardrail contains one or more regex patterns. On each AI request routed through an assigned gateway:
  1. The request content is checked against the guardrail’s regex patterns.
  2. If any pattern matches, the guardrail is triggered.
  3. The AI request is blocked and does not reach the model.
Because regex guardrails run locally as a text match, they add virtually no latency to the request.

Create a guardrail

To create a guardrail:
  1. Open Guardrails in the Platform Backoffice.
  2. Click Add guardrail.
  3. Enter a name and an optional description.
  4. Select the gateways this guardrail should apply to.
  5. Add one or more regex patterns. Use Add regex to define multiple patterns in the same guardrail.
  6. Save the guardrail.
Once saved, the guardrail is active on every assigned gateway and starts blocking matching requests immediately.

Manage guardrails

From the guardrails list you can review each guardrail’s name, description, type, effect, and the gateways it is assigned to.
  • Edit a guardrail to update its patterns or reassign it to different gateways.
  • Delete a guardrail to stop it from blocking requests.

Regex examples

The table below lists common regex patterns you can use as a starting point for your guardrails. Adjust them to match the exact formats used in your organization.

Copy-ready regex snippets

Use the code blocks below when you want a one-click copy action.

Spanish DNI

Spanish NIE

IBAN

Spanish CCC

Credit card number

Email address

Phone number (Spain)

Spanish social security number

IPv4 address

Regex patterns are matched exactly as written. Always test your patterns against representative data to avoid false positives (blocking valid requests) or false negatives (letting sensitive data through).