AI Guardrail Rule Tester
Write keyword and regex guardrail rules that block, flag or redact text, test them against sample inputs and outputs, and export them as JSON.
AI Guardrail Rule Tester
Every enabled rule runs against this text. A rule's Input/Output scope is metadata saved with exported rules; it is not applied to the in-tool test.
jane.doe@example.com(555) 010-44774111 1111 1111 1111Actions
Updated . Provided as is. Check the output before you rely on it in production.
How to use AI Guardrail Rule Tester
- 1
Build a rule to block harmful outputs
Load a rule pack (PII Detection, Prompt Injection or Jailbreak Patterns) or add keyword, regex or pattern rules, each with a block, flag or redact action.
- 2
Test guardrail rules against real LLM outputs
Generate sample outputs from your LLM, paste into tester. Run each guardrail rule. See which rules trigger, why, and what to adjust. Catch false positives before production.
- 3
Build cascading guardrails with rule priority
Apply each rule to input, output or both. Match details show which rules fired on your sample text and the resulting action.
- 4
Use regex patterns for flexible matching
Instead of exact strings, use regex patterns like 'password|api.?key|secret' to catch common sensitive data. Tester shows which patterns matched in your test output.
- 5
Export rules as JSON config for deployment
Once rules are working in tester, export as JSON. Deploy to your LLM server/middleware to enforce guardrails in production. Rules are deterministic, no additional LLM calls needed.
Questions and answers
What are AI guardrails?
What preset rule packs are available?
Can I export rules for NeMo Guardrails?
Does this tool detect prompt injection?
Is my test data private?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/guardrail-rule-tester/
For automation planning, fetch the canonical contract at /api/tool/guardrail-rule-tester.json.