Safety and MLOps

Guardrail

A guardrail is a control that constrains inputs, outputs, or actions around a model.

Input checkModelOutput checkUser sees the result
A guardrail is a control that constrains inputs, outputs, or actions around a model. Values shown in the worked visual are illustrative unless the labels state otherwise.

How it works

Guardrails may validate schemas, classify content, limit tools, or require approval. No single guardrail covers every failure mode.

A concrete example

Illustrative: reject transfers above $100 and require human approval from $25 through $100.

Do not confuse it with System prompt

a system prompt is model context; a guardrail can enforce policy outside the model.

Study the full lesson