Partner Solution Hub
DEMO
Real-Time AI Guardrails
Detect unsafe inputs, hallucinated answers and low-quality responses as they happen, and block them before they reach your customers, with configurable guardrails.
Building Blocks used: ai.govern
1 Review use case

As AI agents become part of everyday business operations, one question becomes critical: how do you make sure they are safe, reliable and delivering the right results? A user might share sensitive information or try to bypass security controls, and the AI might produce an answer that sounds convincing but is not true. Real-Time AI Guardrails, powered by IBM watsonx.governance, detects these risks as they happen and enforces your policies before they affect your business. This demo shows how, in a web application you can run, tune and rerun in seconds.

Different risks need different protection, so the demo draws on a catalog of 18 guardrail metrics in three families. Content safety metrics detect personal information exposure, harmful content, jailbreak attempts and bias. RAG metrics check whether a generated answer is relevant and grounded in the retrieved documents, so unsupported claims are stopped before they reach a customer. Response quality metrics use an LLM as a judge to assess completeness, conciseness and helpfulness, and a custom Action Oriented Validator shows how to encode a rule of your own, such as requiring every troubleshooting answer to include next steps. Each metric has its own configurable threshold, so a customer service agent that must collect personal data can be tuned differently from one that must never see it.

Four scenarios walk through the metric categories one at a time: an input that combines personal data with a jailbreak attempt, an answer that claims facts its sources never mention, a long response that leaves out essential steps, and an explanation that never tells the customer what to do next. In each case you see which guardrails fired, the scores behind the decision, and the request or response being blocked. Because the guardrails are built with the watsonx.governance SDK, the same calls run inside your own agents, applications and workflows, with configurable policies and audit logging.

Start Here
Watch this short overview
Preview the application
Explore key screens from the demo
2 Try the interactive application
Experience the interactive demo and explore its features. A demo script is provided to help when presenting the application to partners.
Try the demo

Have questions, want a walkthrough or found a bug?

Contact the demo owner for assistance.

Submit a request →
3 Explore how it was built
The architecture has three layers. A web application on IBM Cloud Code Engine is the orchestration layer: it takes the user's selected guardrails and thresholds, sends one batched evaluation request, and turns the returned scores into a Pass or Block decision per metric. IBM watsonx.governance is the evaluation engine, where Granite Guardian models score the content safety and grounding metrics. IBM watsonx.ai supplies the LLM-as-judge for the quality metrics, calling Llama 3.3 70B. A custom metric built with the watsonx.governance SDK shows how organizations can extend the catalogue with their own rules.
Architecture
4 Download and modify with IBM Bob
Download the source code and specifications for this application to set up and run it locally. Once downloaded, open the code in IBM Bob to modify and adapt it to your own use case.