# Guardrails

> 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.

- Identifier: PTL-0160
- Category: Security & Adversarial Prompting
- Canonical URL: https://protologue.com/t/guardrails/
- Also known as: safety filters, input/output filtering, safeguard model, moderation, content filter
- Introduced: 2023

## 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.

## Narrower terms

- [Constitutional Classifiers](https://protologue.com/t/constitutional-classifiers/)

## Related terms

- [Jailbreak](https://protologue.com/t/jailbreak/)
- [Prompt Injection](https://protologue.com/t/prompt-injection/)
- [Over-Refusal](https://protologue.com/t/over-refusal/)
- [Red Teaming](https://protologue.com/t/red-teaming/)

## Sources

- Inan et al. (2023). Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations. https://arxiv.org/abs/2312.06674
- Rebedea et al. (2023). NeMo Guardrails: A Toolkit for Controllable and Safe LLM Applications with Programmable Rails. https://arxiv.org/abs/2310.10501

## Cite this entry

Protologue. (2026). Guardrails. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.4.0, PTL-0160). https://protologue.com/t/guardrails/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
