In large language model (LLM) applications, the industry term commonly describes runtime screening of prompts, retrieved content, generated responses, and tool calls. Implementations may combine fixed rules, schema checks, sensitive-data detection, classifiers, and separate models that evaluate content.
A guardrail can reject, redact, block, or route a request for review. Its usefulness depends on where it operates, what information it receives, and whether the application actually enforces the result. A policy written only in a system prompt remains an instruction to the model.
Key points
Input controlsScreening can identify suspicious instructions, prohibited content, and sensitive information before processing. Retrieved documents and tool results need coverage alongside direct user messages.
Output controlsContent checks and destination-specific validation reduce disclosure and unsafe downstream use. A response that satisfies a structural schema can still contain false or unauthorized content.
Operational evidenceTests should measure missed attacks, blocked legitimate requests, language coverage, latency, and behavior after changes. Decision logs need proportionate handling of sensitive content.
Important limitationFilters and model-based checks can be bypassed, and a reviewing model can itself follow hostile instructions. Guardrails alone do not establish an authorization or data-isolation boundary.