Guardrails let you define what generative AI models can and cannot do by controlling inputs and outputs before they reach your model or your users.
Rob Geada from Red Hat’s TrustyAI team shows how guardrails work in OpenShift AI using real examples like detecting prompt injection, filtering profanity, and blocking unwanted topics such as competitor keywords. You will learn how to build a modular detection system, route requests through a guardrails gateway, reduce inference costs by stopping irrelevant prompts early, and quickly switch between guardrailed and unguardrailed models without changing your API.
This walkthrough is ideal for teams deploying large language models in enterprise environments who want to enforce safety, relevance, and compliance across AI-powered applications.
00:00 What are AI Guardrails
01:22 Benefits of Guardrails for AI models
02:48 What Guardrailing looks like in OpenShift AI
04:55 Demo: Lemonade Stand Customer Service
05:22 Setting Up Detectors
06:36 Configuring the Orchestrator
07:14 Live Command Line Demo
Full code to run the lemonade stand demo on OpenShift Al: https://github.com/trustyai-explainability/trustyai-llm-demo/tree/lemonade-stand
TrustyAl Community GitHub: https://github.com/trustyai-explainability
Subscribe for more demos: @redhat