Guardrails are deterministic and ML-based controls that wrap LLM calls — blocking prompt injection, PII leaks, jailbreaks, off-topic queries, and unsafe completions. They turn an unpredictable model into a constrained, auditable system component.
Per-request guardrail decision flow with bypass and audit paths.
No single guardrail is sufficient. Stack input + model + output checks; failures should be isolated, not catastrophic.
Each rail adds 30-150ms. Run independent rails in parallel; cache decisions for repeat inputs.
Express rules as signed YAML/Rego, not hardcoded. Enables review, rollback, and audit.
Always tell the user *why* a request was blocked (briefly). Silent failures destroy trust.
Maintain a red-team set: known jailbreaks, prompt injections, PII traps. Run on every release.
Aggressive rails block legitimate users. Track allow/block ratio per cohort; tune thresholds quarterly.
Sign in to share your feedback and join the discussion.