{
  "id": "guardrails",
  "code": "PTL-0160",
  "term": "Guardrails",
  "aliases": [
    "safety filters",
    "input/output filtering",
    "safeguard model",
    "moderation",
    "content filter"
  ],
  "category": "security",
  "definition": "Guardrails are checks placed around a model call that screen inputs and outputs, using classifiers, rules, or a second model, to block, redact, or redirect content that violates a policy before it reaches the model or the user.",
  "description": "Typical guardrails detect jailbreak attempts and prompt injection, unsafe content, personal data, and off-topic requests. Safeguard models such as Llama Guard classify messages against a taxonomy of risks, and toolkits such as NeMo Guardrails define programmable rails for dialogue. Guardrails add latency and can over-block, and none is complete, so they are layered with model training and least-privilege design.",
  "example": null,
  "broader": [],
  "narrower": [
    "constitutional-classifiers"
  ],
  "related": [
    "jailbreak",
    "prompt-injection",
    "over-refusal",
    "red-teaming"
  ],
  "introduced": 2023,
  "added": "2026-10-10",
  "sources": [
    {
      "title": "Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations",
      "authors": "Inan et al.",
      "year": 2023,
      "url": "https://arxiv.org/abs/2312.06674"
    },
    {
      "title": "NeMo Guardrails: A Toolkit for Controllable and Safe LLM Applications with Programmable Rails",
      "authors": "Rebedea et al.",
      "year": 2023,
      "url": "https://arxiv.org/abs/2310.10501"
    }
  ],
  "url": "https://protologue.com/t/guardrails/",
  "citation": "Protologue. (2026). Guardrails. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.4.0, PTL-0160). https://protologue.com/t/guardrails/"
}