Five places to intervene
A guardrail is a check that runs outside the model and can block, modify or flag. NVIDIA's NeMo Guardrails organises them into five rail types, and the taxonomy is useful regardless of which tool you use, because it names five distinct decision points.
Input rails run on what arrives before the model sees it: injection detection, PII redaction, topic restriction, length and rate limits.
Dialog rails operate on the conversation rather than a single message, which is what catches the multi-turn and crescendo attacks that single-message classifiers miss by construction.
Retrieval rails run on what comes back from a knowledge base before it enters context: permission checks, provenance checks, and scanning retrieved chunks for embedded instructions.
Execution rails sit around tool calls: is this action permitted, are the arguments in range, does it need confirmation.
Output rails run on what the model produced: policy violations, leaked secrets, hallucinated citations, and validation before anything downstream consumes it.
Most deployments implement input and output rails and stop. The three in the middle are where the serious failures from the previous lesson actually live.

