Skip to main content

Configure guardrails

Enterprise Tier

A guardrail is a named policy for a project: a collection of rules plus shared settings such as failure mode, evaluation timeout, and a blocked-response message. Each rule names a check type (what to look for), a provider (which engine scores the content), an action (block or redact), and a mode (enforce or monitor). Providers return a normalised score; the gateway compares that score to the rule's threshold and applies the action. This guide covers creating guardrails from scratch or from a template, adding rules, using the Patterns library, and validating with monitor mode before enforcement.


Persona: Platform operator working in the Admin Dashboard, often alongside security and compliance stakeholders who own the underlying policy.

Estimated time: 20 to 40 minutes for a first guardrail, including time spent validating in monitor mode; less thereafter once the pattern is familiar.

When this guide applies

SituationWhat it covers
Creating a project baseline safety policyAdd guardrail, or clone from the template catalog
Redacting PII or secrets before traffic reaches a modelA redact rule with the regexp, builtin, or tetrate provider
Blocking jailbreaks or prompt injectionA block rule with jailbreak or prompt_injection
Piloting a new rule without disrupting live trafficMonitor mode before promote to enforce
Reusing a canonical regex across many rulesThe Patterns library

For how the scoring engines differ and which check types each supports, see Configure guardrail providers. For the developer-side view of blocked and redacted traffic, see Protect requests with guardrails.

Outcomes

By the end of this guide:

  • At least one guardrail exists in the selected project with type, category, severity, failure mode, and timeout set.
  • At least one rule is attached with a supported check type, provider, action, and mode.
  • The guardrail has been validated in monitor mode against live traffic before enforcement.
  • Project scope, patterns, and the template catalog are understood.

Prerequisites

  • Administrator access to the Admin Dashboard with permission to manage guardrails for a project.
  • An active project selected. Guardrails are bound to a project, not the organisation.
  • A written statement of the policy the guardrail is meant to enforce.
  • For pattern-based rules: the specific terms or catalog pattern names to match, ideally reviewed with the policy owner.

Enabling guardrails

By default, new guardrails are NOT enabled. If you wish to use a newly created guardrail, make sure to enable it.

Step 1: select the project

Guardrails, patterns, and guardrail providers all operate inside the currently selected project. A guardrail authored under one project does not apply to another.

  1. Sign in to the Admin Dashboard.
  2. Use the top-left selector to choose the project (not Organisation scope).

Project selector open: Organisation above the Projects list, with Default selected

Step 2: open Rules and choose how to create the guardrail

  1. Open Guardrails → Rules.

Rules page with a guardrail expanded to show nested rules (provider, check, action, mode)

Two entry points create a guardrail in the current project:

  • Add guardrail: start empty. Name the policy, set type, category, severity, failure mode, evaluation timeout, and blocked-response message, then add rules one at a time.
  • Create from template: clone a curated guardrail from the catalog (rules already wired) and tailor it.

Create from template catalog grouped by domain, with type and severity filters

Templates are grouped by domain (for example data privacy, healthcare, and compliance) and filterable by type and severity. Cloning copies a fully formed guardrail into the project; edit it afterward like any other policy.

Step 3: set guardrail-level settings

When adding a guardrail from scratch, supply:

SettingMeaning
NameDisplay name; use a phrase that states the policy
TypeBroad purpose (for example Security, Compliance, Policy, Custom)
CategoryDomain context (for example data privacy, healthcare, government, custom)
SeverityRisk level of violations this policy catches
Failure modeIf a provider cannot evaluate a rule: fail-close (default) treats it as blocked; fail-open lets traffic pass
Evaluation timeout (ms)Maximum time to wait for evaluation before the failure mode applies
Triggered responseOptional message returned when a block fires

New Guardrail form with Name, Description, Type, Category, Severity, Failure mode, Evaluation timeout in milliseconds, and Triggered response

Creating the guardrail does not by itself change live traffic until rules are active and set to enforce mode.

Step 4: add a rule

A rule is the unit of enforcement. It answers what to look for, where to look, who evaluates it, and what to do on a hit.

FieldMeaning
Name / descriptionOptional labels for the rule
ActiveWhether the rule is evaluated
ProviderEngine that scores the check (regexp, builtin, or tetrate, or another configured provider)
Check typeCanonical safety check (for example pii, toxicity, jailbreak, banned_topics)
Run onInput, output, or both. Leaving it unset means both, so a check the provider supports on only one stage needs the stage set explicitly
Actionblock or redact: what enforcement would do
Modeenforce applies the action; monitor records the would-be action without applying it
ConfigurationStructured fields for the selected provider and check-type pair, with an Edit as JSON (advanced) panel underneath for the stored form
Triggered responseOptional message shown when this rule fires

Provider and check type are chosen first because they determine everything below them. The check-type list is scoped to the selected provider, so an unsupported pair cannot be created; the full matrix of provider, check type, and stage is in the guardrails reference, and an unsupported combination submitted directly to the API is rejected at save time with an error naming the supported set. Changing either dropdown replaces the Configuration section with the fields that pair needs, and switching provider re-seeds it: regexp starts as {"regex":{"patternNames":[]}}, tetrate as {}, and builtin opens its structured form.

Add Rule form with Provider regexp and Check type Pii, showing a Patterns picker and a Redaction format field

regexp with pii: the configuration is a pattern picker plus a redaction format, which accepts the {pattern_name} placeholder.

Add Rule form with Provider builtin, showing Category Name, Minimum Severity, Keywords, Blocked Keywords, Target Subjects, Flagged Terms, Allowlist Phrases, and Detection Patterns

builtin: the same rule shell with a multi-field configuration covering each layer of its detection pipeline.

Add Rule form with Provider Tetrate Guardrails and the Check type dropdown open

tetrate: the check-type dropdown is scoped to the ML checks this provider can run.

Add Rule form with Provider Tetrate Guardrails and Check type Banned Topics, showing a Banned topics list and a Similarity threshold field

tetrate with banned_topics: a list of topics matched semantically rather than literally, plus a similarity threshold.

Whatever the form shows is stored as the rule's configuration and forwarded to the provider as that check's parameters. The Edit as JSON (advanced) panel exposes that stored object for cases the fields do not cover.

Providers score; the gateway decides. A provider never chooses to block or redact on its own: it returns a normalised score, and for redaction a sanitised copy of the text. The gateway applies the action when mode is enforce. A block returns an error code. A redact swaps in sanitised text and may re-run providers with rules still pending against the new content. Monitor mode logs the would-be action and lets the content pass unchanged.

Step 5: use the Patterns library

A pattern is a named regular expression (for example a national identifier format) stored in a shared catalog. Rules can reference patterns by name instead of embedding regexes, so one canonical definition is reused across many rules.

Patterns library of built-in named regex entries

The library ships many built-in entries grouped by category (82 in a typical deployment). Filter to built-in only, search by name, or add a custom pattern. A rule on the regexp provider selects patterns from this library in its Patterns field; the builtin provider's detection patterns can each name a catalog entry instead of carrying an inline regex.

Step 6: validate in monitor mode before enforcing

There is no separate test-content surface that dry-runs a rule against pasted samples. Validation is monitor mode against live traffic:

  1. Create or edit the rule with the intended action (block or redact) and set mode to monitor.
  2. Allow representative traffic through the project.
  3. Review whether the rule would have fired at an acceptable rate (false positives and misses).
  4. Only then switch mode to enforce.

Fail-close remains the default when a provider errors; set fail-open deliberately on paths where availability must dominate safety. See Guardrails best practices and FAQ.

How evaluation works for one rule

  1. The gateway groups active rules by provider and hands each provider its checks.
  2. The provider scores the content and may return a sanitised copy if it transformed anything.
  3. The gateway compares the score to the threshold.
  4. On a violation: enforce applies block or redact; monitor records the would-be action and continues.

If a provider errors, the guardrail's failure mode decides: fail-close treats the rule as blocked; fail-open skips it.

What to do next