Guardrails are how Spro protects your AI applications. Every request and response that passes through your workspace can be inspected in real time, and every guardrail can be individually enabled or disabled from the dashboard — changes take effect immediately, no redeployment required.
Guardrails fall into two categories:
- Input Guardrails — inspect and sanitize user prompts before they reach the model
- Output Guardrails — validate and filter model responses before they reach your users
Configuring guardrails
To configure guardrails, go to Workspace → Guardrails in the dashboard. Guardrails are split into two tabs — Input and Output — matching the two stages of the request path.
For each guardrail you can:
- Enable or disable it with the toggle
- Choose an action — one of
log,warn,block, orredact, depending on what should happen on a violation - Tune its configuration — thresholds for moderation guardrails, limits for rate/budget guardrails, and entity selection for sensitive-data detection
Guardrail actions
| Action | Behavior |
|---|---|
log | The violation is recorded in your dashboard. The request continues normally. Use this to monitor without disrupting traffic. |
warn | The violation is flagged and surfaced as a warning. The request still goes through. Use this during testing or gradual rollout. |
block | The request is stopped immediately with an HTTP 403. The model never sees the input. Use this for zero-tolerance policies. |
redact | Sensitive values are masked in-place and the sanitized input is forwarded to the model. Available on sensitive-data guardrails only. |
When a guardrail blocks a request, no tokens are consumed and no cost is incurred — the provider never sees the request.
Example: a detected input
User input: "My email is john@example.com and my card is 4111 1111 1111 1111"With redact: "My email is [EMAIL_ADDRESS] and my card is [CREDIT_CARD_NUMBER]"With block: HTTP 403 — the request never reaches the modelInput Guardrails
Sensitive Information Disclosure
Prevents sensitive data exposure by inspecting and sanitizing user inputs prior to model processing. Detects and masks PII, PHI, PFI, and other confidential information to safeguard against unauthorized data leakage to LLMs.
This is the most configurable guardrail: select the entities you care about — email addresses, credit card numbers, SSNs, API keys, and more (full list below) — then choose the action (log, redact, block, or warn). Detected values are replaced with placeholder tokens such as [EMAIL_ADDRESS] or [US_SSN].
All supported entities
| Entity | Detects |
|---|---|
| Person Name | Individuals' names |
| Email Address | Email addresses |
| Phone Number | Phone numbers |
| Date / Timestamp | Dates and timestamps |
| Geographic Location | Physical locations |
| Organization Name | Organization names |
| URL | URLs |
| IP v4 / IPv6 Address | IP addresses |
| MAC Address | MAC addresses |
| Credit Card Number | Payment card numbers |
| US ABA Routing Number | US bank routing numbers |
| US Bank Account Number | US bank account numbers |
| International Bank Account Number (IBAN) | IBANs |
| SWIFT Code | SWIFT/BIC codes |
| Hashed Value | Hashed values |
| ASP.NET Machine Key | ASP.NET machine keys |
| AWS Secret Access Key | AWS secret keys |
| US Social Security Number | US SSNs |
| US Individual Taxpayer Identification Number (ITIN) | US ITINs |
| US Passport Number | US passport numbers |
| US Driver's License Number | US driver's licenses |
| India Aadhaar Number | Indian Aadhaar numbers |
| India PAN Number | Indian PAN numbers |
| India GST Number | Indian GST numbers |
| India Voter ID Number | Indian voter IDs |
| India Driver's License Number | Indian driver's licenses |
| UK Driver's License Number | UK driver's licenses |
| DEA Registration Number | DEA registration numbers |
| Drug Name | Drug names |
| Legal Term | Legal terms |
Content Moderation
A family of trained moderation models that detect harmful content in user prompts. Each supports a configurable confidence threshold:
| Guardrail | Detects |
|---|---|
| Sexual Content Detection | Explicit language, sexual themes, and adult content requests |
| NSFW / Explicit Content Detection | Sexually explicit, adult, or otherwise inappropriate content |
| Violence Detection | Threats, descriptions of violence, and content promoting physical harm |
| Severe Violence Detection | Extreme violence, gore, torture, kidnapping, and graphic harm |
| Harassment Detection | Targeted harassment, bullying, name-calling, and intimidation |
| Hate Speech Detection | Discriminatory language across protected characteristics — race, ethnicity, gender, religion, nationality, disability, sexual orientation |
| Hate Threatening Content Detection | The intersection of hate speech and violent or threatening language |
| Self-Harm Detection | Expressions of self-harm, suicidal ideation, and psychological distress |
| Sexual Content Involving Minors | Any content referencing child sexual exploitation or abuse (CSAM/COPPA) |
| Input Toxicity Detection | Broad-spectrum toxicity — hate, harassment, threats, and abuse in one catch-all |
Language Filters
| Guardrail | Detects |
|---|---|
| Profanity & Vulgarity Filter | Profanity and vulgar expressions, including obfuscated variants — fuzzy matching plus contextual analysis |
| Offensive / Harassing Language Filter | Abusive or derogatory terms and character-substituted variants (e.g. stup1d, idi0t) |
Adversarial Input Detection
| Guardrail | Detects |
|---|---|
| Invisible / Hidden Text Detection | Zero-width characters, invisible Unicode, and control sequences used for prompt injection, data exfiltration, or evasion |
| ASCII Art Attack Detection | Symbol-dense, ASCII-art, or image-like text used to obscure instructions or jailbreak payloads — pattern recognition, symbol-density thresholds, and sequence-shape heuristics |
| Gibberish / Nonsensical Text Detection | Keyboard mashes, high-symbol strings, spam, and corrupted copy-paste data — token entropy, symbol-to-letter ratio, and dictionary-match rate |
Rate & Budget Limits
| Guardrail | Enforces |
|---|---|
| Request Limit | Request thresholds per minute / hour / day, per project, user, or system — protects against quota exhaustion and API abuse |
| Cost Limit | Monthly budget threshold — LLM activity is restricted once reached |
| Token Usage Limit | Token limits on input and output within a time window — prevents runaway generation loops and uncontrolled consumption |
Output Guardrails
Output guardrails run on every model response before it is returned to your users.
| Guardrail | Detects |
|---|---|
| Improper Output Handling (JSON) | Invalid or non-conforming JSON structures — validated and sanitized before downstream use |
| NSFW / Explicit Content Detection | Sexually explicit or adult material in model output |
| Profanity & Vulgarity Filter | Profanity and vulgar language in responses, including disguised variants |
| Output Toxicity Detection | Toxic, offensive, or aggressive content, scanned in real time |
| Hallucination Detection ⚗️ | Factual errors, unsupported claims, and contradictions — cross-validated against the provided context |
| Comprehensive Gender Bias Detection | Gender stereotypes, occupational bias, LGBTQ+ exclusion, and non-binary erasure |
| Comprehensive Age Bias Detection | Generational assumptions, idiomatic ageism, and capability stereotypes |
| No OpenAI Reference Detection | References to OpenAI, ChatGPT, GPT, or o-series model identifiers — configurable pattern list |
| Model Apology Detection | Apologies, regret, and soft refusal phrasing ("I'm sorry, I can't do that") that undermine tone consistency |
| Model Refusal Detection | Hard refusals and policy-driven declines — logged to surface coverage gaps and alignment behavior |
⚗️ Hallucination Detection is experimental — it's available to enable but has higher false-positive rates while the underlying models are refined.
