Prompt Lab
🤖 AI & Guardrails 4 min read

AI Guardrails

How content safety works — input checking, response validation, audience rules, and how to configure them.

Guardrails ensure every AI interaction on the platform is safe, on-topic, and appropriate for the audience — without needing to moderate responses manually.

The two-stage safety layer

1️⃣

Input check

Before your prompt reaches the AI, it's checked against blocked patterns, topic rules, and a length limit. Off-topic or harmful prompts are blocked immediately.

2️⃣

Response check

After the AI responds, the JSON is validated for required fields and scanned for blocked content. If it fails, the local fallback is used instead.

Action levels

ActionWhat happens
passRequest proceeds normally
warnRequest proceeds but the violation is logged
blockRequest is rejected; user sees a safe error message

Audience-specific rules

  • Teen (high strictness) — extra patterns blocked: alcohol, gambling, adult content; requires school-safe language
  • Teacher (medium) — standard blocked patterns only
  • Professional (low) — most permissive; only clearly harmful content is blocked

What's blocked by default

The default blocked patterns cover:

  • Jailbreak attempts ("ignore previous instructions", "act as DAN", "bypass restrictions")
  • Violence and weapons vocabulary
  • Adult content
  • Drug references
  • Teen-only extras: alcohol, gambling

Configuring guardrails

Go to Admin → Guardrails to:

  • Enable or disable guardrails globally
  • Adjust the allowed topics list
  • Add or remove blocked patterns (written as regex)
  • Set per-audience strictness
  • Test any prompt live in the built-in tester
The live tester on the Guardrails page lets you paste any text, pick an audience, and see the exact verdict (pass / warn / block) instantly — before students ever see it.
Was this article helpful?
📚 All articles Start learning →