The Alternatives Issue For tool owners Sign in

Guardrails

Guardrails are deterministic checks layered around a language model to prevent unsafe, off-topic, or non-compliant outputs from reaching the user.

In more detail

What it means

Guardrails sit on the input or output side of a model call. Input guardrails (PII detection, prompt injection scanners, policy classifiers) reject or rewrite the request before the model sees it. Output guardrails (toxicity checks, JSON validators, fact-checkers, profanity filters) inspect the model's response and either pass, rewrite, or refuse. Frameworks: Guardrails AI, NeMo Guardrails, Llama Guard, OpenAI Moderation, Lakera. In production every LLM-facing surface in 2026 has at least lightweight guardrails — the question is which ones. Mature deployments combine fast deterministic checks for known risks with model-based judges for ambiguous cases, log every guardrail decision with the triggering rule, and review false positives regularly so legitimate traffic is not silently degraded.

Part 1 of 2

When to use it, and when not

Use it for

  • Any user-facing AI feature.
  • Regulated industries (finance, healthcare, education).

Part 2 of 2

Common mistakes

  • Relying only on prompt instructions for safety — easily bypassed.
  • Using guardrails as a substitute for an evals system.

FAQ

Questions readers ask.

What is guardrails?

Guardrails are deterministic checks layered around a language model to prevent unsafe, off-topic, or non-compliant outputs from reaching the user.

When should you use guardrails?

Any user-facing AI feature. Regulated industries (finance, healthcare, education).

What are the common mistakes with guardrails?

Relying only on prompt instructions for safety — easily bypassed. Using guardrails as a substitute for an evals system.

Last updated: 2026-09-18. Raw markdown: https://promtable.com/glossary/guardrails.md. Found a mistake? Tell us.