WitnessAI Documentation
List
Start Here
Start Here
Analytics
Analytics
Conversations
Conversations
Users
Users
Alerts
Alerts
Policy
Policy
Administration
Administration
Apps & Resources
Apps & Resources
Release Notes
Release Notes
Administrator Guide
Administrator Guide
Guardrail Studio: Edit a Guardrail
You can edit a guardrail in two places: the Editor tab, which holds the full Context and rule set, and the Diagram tab, which draws the guardrail as a flow you can click through and edit node by node.
The Editor tab
The Editor tab has two cards: Context and Rules. Changes apply as you type.
Context
Describe what the guardrail protects and any domain-specific terms, in up to 1,000 characters. Three prompts beside the box help you cover the essentials:
- What should it never allow?
- What should it always allow?
- What sensitive topics or behaviors should it watch for?
The Context card also offers three AI actions:
- Polish appears when you hover over or focus the box. It rewrites the Context for clarity without changing its meaning. You can Undo for 10 seconds afterwards.
- Refine guardrail sends your Context and rules to AI and replaces the rules with an improved set: Generated {n} intentions across {m} rules.
- Ask AI opens the assistant, ready to suggest improvements to your rules. See Guardrail Studio: Ask AI.
Note: Refine guardrail replaces all existing rules and can't be undone.
Rules
- Add Rule adds an Allow rule named Allow Rule {n}. Change its action with the THEN dropdown.
- Click a rule's name to rename it.
- Expand a rule to see IF Intention is any of the following: with one row per intention, its Definition, and Add Intention.
- On each intention, the sparkle buttons refine the name or the definition with AI, using your Context and the rule's other intentions. Undo is available for 10 seconds.
- Hover over a rule or intention to remove it. Removal is immediate, with no confirmation.
- Filter the list by action with the tabs (All, Allow, Warn, Block, Route), and expand or collapse all rules at once.
- Quick test opens Live Testing. See Guardrail Studio: Test Prompts.
- Evaluate guardrail switches to the Evaluate tab. See Guardrail Studio: Evaluate & Refine.
If the guardrail has a Context but no rules yet, Create it for Me generates the rules for you.
Intentions need a name to be tested. An intention without a name is skipped when you test. An intention with a name but no definition is tested as "User's prompt relates to {name}". Write a definition for better results.
The Diagram tab
The Diagram tab draws the guardrail as a flow: a test input at the top, then the Context, one node per rule and per intention, and the evaluation result at the bottom. Use Reset layout and Center view to tidy it.
Test from the diagram
In Test Your Guardrail, enter a prompt and click Run Test. The path lights up as your prompt flows through the guardrail. Matching nodes are marked Matched, and the Evaluation Result node shows PASSED or BLOCKED with the category and rule action.
Edit from the diagram
- Click a node to edit it, then click Save Changes. You can edit the Context, a rule (name and action), or an intention. The diagram labels intentions as behaviors, each with a name and definition.
- Rule nodes offer Add behavior and Delete rule. Intention nodes offer Delete behavior.
- Deletions in the diagram ask for confirmation.