Skip to main content

Guardrail types

Every guardrail shares three common configuration fields:

  • Select Field — Input or Output. Determines which side of the step is validated.
  • Specify Corrective Action — what happens when the validator triggers:
    • FIX — modify the content.
    • NOOP — flag but don't modify.
    • Exception — halt with an error.
  • Plus validator-specific parameters described below.

Foundational validators​

Detect PII (Personally Identifiable Information)​

Identifies and flags personally identifiable information in input or output. Critical for compliance with GDPR, CCPA, HIPAA, and similar regimes.

PII Entities the validator can detect (you pick which ones):

  • Email address
  • Phone number
  • IP Address
  • Location
  • Person
  • URL
  • PAN (Permanent Account Number)
  • Aadhaar
  • Vehicle registration

How it works: pattern recognition, ML models trained on PII datasets, and contextual analysis to distinguish sensitive from non-sensitive mentions.

Use cases: data cleaning before storing, customer support outputs, any user-facing AI surface.

Competitor Check​

Identifies and flags any references to competitors in input or output. Useful in brand-specific contexts where you don't want competitor mentions leaking through.

Competitor List — provide a list of competitor names and related keywords to be flagged.

How it works: the validator scans the field for any mentions of the listed competitors. On a match, the configured corrective action is applied. FIX typically replaces the competitor name with a placeholder.

Use cases: marketing content generation, internal documentation, customer-facing communications.

Toxic Language Check​

Identifies and flags harmful or abusive language. Important for moderation, community management, and customer interactions.

Parameters:

  • Threshold — tolerance level. Lower = more aggressive flagging.
  • Validation Method — Sentence (per-sentence) or Full (whole text at once).

How it works: predefined keyword lists + sentiment analysis + ML-based context understanding.

Use cases: community management, customer service interactions, content moderation.

Gibberish Text​

Detects nonsensical or meaningless text. Useful to filter low-quality LLM outputs or random user input.

Parameters:

  • Threshold — tolerance level.
  • Validation Method — Sentence or Full.

How it works: lexical analysis against recognized language patterns, statistical models for structural deviation, and contextual integrity checks.

Use cases: filtering AI-generated content quality, cleaning datasets, validating user input before processing.

Newer validators​

Bias Check​

Detects bias in text — gender, racial, age, ability, and other dimensions — to keep generated content equitable.

Use to guard outputs in any context that touches recruitment, customer communications, or content reaching a broad audience.

Prompt Injection / Jailbreak Detection​

Detects attempts to override the system instructions of an agent. Common patterns include "ignore previous instructions", "you are now a different assistant", or known jailbreak payloads.

Use on input fields, especially for user-facing chat surfaces where attackers may try to extract system prompts or escalate the assistant's behavior.

Logic Check​

Validates logical consistency of statements in the text. Catches contradictions and self-contradictory claims that an LLM may produce.

Use on outputs in high-trust contexts (legal, medical, financial) where contradictions are unacceptable.

Reading Level​

Measures the reading grade level of the text. Pair with a target audience to enforce a maximum complexity level.

Use when content must be accessible to a non-expert audience — e.g., consumer-facing documentation, public communications.

Reading Time​

Estimates how long the text takes to read. Useful when output length matters — e.g., voice synthesis, brief summaries, character-limited surfaces.

Use to enforce length constraints when token counts are an imperfect proxy for the actual user-perceived length.

Implementing guardrails effectively​

  1. Configuration — start with the defaults; tune thresholds based on actual flagged content over a few days of real traffic.
  2. Testing — use a diverse, representative dataset to evaluate performance before rolling out.
  3. Monitoring — continuously monitor flagged content rates. A sudden spike usually indicates either new attack vectors (for injection / toxicity) or model regressions (for gibberish / logic).
  4. Review — periodically review flagged content to assess the validator's effectiveness. Adjust thresholds or swap to a stricter validator if needed.