{"head":{"title":"What Are AI Guardrails? Definition and Examples | OceanLab","description":"AI guardrails are the checks around a model that stop unsafe, off-topic or wrong inputs and outputs. Types of guardrails, an example and common mistakes.","canonical":"https://oceanlab.in/glossary/guardrails"},"crumbs":[{"name":"Home","path":"/"},{"name":"Glossary","path":"/glossary"},{"name":"guardrails","path":"/glossary/guardrails"}],"slug":"guardrails","term":"Guardrails (AI)","aka":["AI guardrails","safety filters"],"category":"AI building blocks","short":"Checks placed around an AI model that block, fix or flag unsafe, off-topic or incorrect inputs and outputs.","body":[["Guardrails sit before and after the model. Input checks catch prompt injection, personal data that should not be sent and requests outside the product's scope. Output checks validate format with ",{"href":"/glossary/structured-output","text":"structured output"},", check facts against sources, filter harmful content and enforce business rules such as refund limits."],["Some guardrails are rules in code, some are classifiers, some are a second model call. The strongest ones are permissions: an ",{"href":"/glossary/ai-agent","text":"agent"}," that cannot reach a system cannot misuse it."]],"why":["A model's behaviour can be steered but not guaranteed. Guardrails turn the rules the business cares about into checks that run every time, keep a record of what was blocked, and make the system's behaviour easier to explain to customers, auditors and regulators."],"example":["A banking chatbot is limited to account questions. Input checks refuse investment advice requests and mask card numbers before they reach the model. Output checks block any reply that quotes a balance not returned by the account tool."],"inBuild":null,"mistakes":[["Relying on the system prompt as the only guardrail."],["Blocking so much that the product stops being useful. Measure false blocks too."],["Checking output text but not the actions an agent takes."]],"related":[{"href":"/glossary/human-in-the-loop","label":"Human-in-the-loop (HITL)","detail":"A design where a person reviews, corrects or approves what an AI system produces before it takes effect."},{"href":"/glossary/hallucination","label":"Hallucination (AI)","detail":"When an AI model produces information that is false or made up, presented as if it were true."},{"href":"/glossary/ai-agent","label":"AI agent","detail":"Software where a language model decides which steps to take and which tools to call, in a loop, to reach a goal."},{"href":"/glossary/high-risk-ai-system","label":"High-risk AI system (EU AI Act)","detail":"An AI system the EU AI Act places in its high-risk class, which brings extra duties before and after it is placed on the market."}],"tools":[{"href":"/tools/eu-ai-act-risk-checker","label":"EU AI act risk checker","detail":"Free tool"}],"links":[{"href":"/ai-automation","label":"AI automation","detail":"How OceanLab automates company workflows with AI."},{"href":"/compliance/eu-ai-act","label":"EU AI Act guide","detail":"Risk classes, duties and the current dates."},{"href":"/ai","label":"AI by industry","detail":"AI use cases, costs and risks per industry."}],"sources":[],"legal":false,"updatedAt":"2026-10-25"}