AI glossary · Basic · Safety & alignment · AI security
Guardrails
Guardrails are safety mechanisms that check and block content before and after an AI model, so that the model does not take in or produce content that is dangerous or breaks the rules.
About this term
- Level
- Basic · Technical terms you often meet in AI news
- Category
- Security & safety
- Fields
- Safety & alignment, AI security
- Added
- 2026-10-08
How it works
Guardrails usually work at two points. First, before the user's input reaches the model, they check it for harmful requests or hidden instructions. Then, before the model's answer reaches the user, they check again for personal information, harmful content or company policy violations. Methods for checking range from simple rules such as banned-word lists to small AI models trained specifically for checking.
Why it matters
No matter how well a model itself is trained, jailbreaks and mistakes cannot be fully prevented. Guardrails add one more layer outside the model to reduce risk. When companies use AI for customer service or internal work, they must follow industry regulations and company policies, so guardrails are especially important. When AI agents handle real tools, guardrails are also used to stop them before they take dangerous actions.
Things to know
If guardrails are too strict, they refuse even normal questions and become inconvenient to use. If they are too loose, dangerous content gets through. More checking steps make responses slower and costs higher. So the key challenge for each service is finding the right balance between safety and convenience.
Example
For a workplace chatbot that searches internal documents to answer questions, guardrails might filter out questions in which an employee asks about another person's HR information at the input stage, and mask personal information such as resident registration numbers or contact details if it appears in an answer at the output stage. Several cloud and AI companies offer these checking functions as separate tools.