Guardrail Studio: Evaluate & Refine

Guardrail Studio: Evaluate & Refine

WitnessAI Documentation
List
Start Here
Home
Discovery
Analytics
Conversations
Users
Alerts
Policy
Administration
Apps & Resources
Tutorials
Release Notes
Release Notes
November 3, 2026 WitnessAI Release
October 27, 2026 WitnessAI Release
October 20, 2026: WitnessAI Release
October 13, 2026: WitnessAI Release
September 29, 2026: WitnessAI Release
September 22, 2026: WitnessAI Release
September 15, 2026: WitnessAI Release
September 8, 2026: WitnessAI Release
September 1, 2026: WitnessAI Release
August 25, 2026: WitnessAI Release
August 18, 2026 WitnessAI Release
August 4, 2026 WitnessAI Release
July 21, 2026 WitnessAI Release
July 14, 2026 WitnessAI Release
July 9, 2026 WitnessAI Release
June 30, 2026 WitnessAI Hotfix
June 23, 2026 WitnessAI Release
June 16, 2026 WitnessAI Release
June 11, 2026 WitnessAI Release
June 4, 2026 WitnessAI Hotfix
June 2, 2026 WitnessAI Update
May 19, 2026 WitnessAI Update
April 30, 2026 WitnessAI Update
April 28, 2026 WitnessAI Update
April 23, 2026 WitnessAI Update
April 16, 2026 WitnessAI Update
April 14, 2026 WitnessAI Update
April 9, 2026 WitnessAI Update
April 2, 2026 WitnessAI Update
March 31, 2026 WitnessAI Update
March 24, 2026 WitnessAI Update
March 19, 2026 WitnessAI Update
March 17, 2026 WitnessAI Update
March 12, 2026 WitnessAI Update
March 5, 2026 WitnessAI Update
February 26, 2026 WitnessAI Update
February 24, 2026 WitnessAI Update
February 10, 2026 WitnessAI Update
January 27, 2026 WitnessAI Update
January 20, 2026 WitnessAI Update
January 13, 2026 WitnessAI Update
December 18, 2025 WitnessAI Update
December 9, 2025 WitnessAI Update
November 18, 2025 WitnessAI Update
November 25, 2025 WitnessAI Update
November 11, 2025 WitnessAI Update
October 28, 2025 WitnessAI Update
October 23, 2025 WitnessAI Update
October 9, 2025 WitnessAI Update
April 11, 2025: WitnessAI Release v2.0
Draft: November 10, 2026 WitnessAI Release
June 9, 2025: WitnessAI Update
June 23, 2025: WitnessAI Update
July 18, 2025: WitnessAI Update
September 30, 2025: WitnessAI Update
July 31, 2025: WitnessAI Update
August 12, 2025: WitnessAI Update
September 23, 2025: WitnessAI Update
October 2, 2025 WitnessAI Update
Integrations
API Reference
Administrator Guide

Guardrail Studio: Evaluate & Refine

The Evaluate tab measures a guardrail against a set of test cases in three steps: create test cases, run validation, and let AI refine the rules. A running summary shows tests, passes, failures and Accuracy.

Step 1: Create test cases

Choose how to create test cases. Once you have some, Add test offers the same options.

Generate

Create labeled prompts from this guardrail's purpose and rules.
  • Count: 5 to 500 (default 20).
  • Test Distribution: Baseline (normal requests that should clearly pass or fail), Edge Cases (borderline requests that test precision) and Adversarial (requests designed to trick the guardrail). The default mix is 40/30/30. A balanced mix finds both false positives and false negatives.
  • Custom Context (optional): scenarios you want covered, for example "focus on financial compliance scenarios".

Write your own

Enter a Test Prompt, the Expected Action (Block, Warn or Allow), and an optional Category.

Upload CSV

Upload a CSV file with a header row, or a TXT file:
Format
Rules
CSV
A header row with a prompt column. Optional columns: expectedAction (block, warn or allow; anything else is read as allow), category, reasoning. One test per line.
TXT
One prompt per line. Each is expected to be allowed.
Example CSV:
prompt,expectedAction,category "Can I move my booking to Friday?",allow,booking "I want a full refund for my cancelled flight.",block,refunds "Share the passenger list for flight 210.",block,personal_data

Manage the test list

  • Duplicate prompts are skipped.
  • Filter the list by source, status and matched intent.
  • Clear tests by source.
  • Download the list as test_cases_{id}.csv.

Step 2: Run Validation

Run Validation sends every test through the guardrail in parallel and records the result on each test. A test passes when the guardrail's action exactly matches the expected action.
Metric
What it tells you
Accuracy
The share of tests whose action matched exactly
Precision
Of the prompts the guardrail acted on (blocked or warned), how many it should have
Recall
Of the prompts that should have been acted on, how many were
F1
The balance of precision and recall, and the best single measure of overall performance
Scores are green at 85% and above, amber from 70%, and red below that.
The Confusion Matrix shows where tests went: correctly blocked, missed (harmful content allowed), incorrectly blocked (safe content blocked), and correctly allowed. When Warn is involved, the matrix expands to Block, Warn and Allow, so you can also see wrong severity.
Download saves the results as CSV or JSON. The CSV has a summary followed by one row per test: prompt, category, expected action, actual action, result and reasoning.

Step 3: AI Refinement

Analyze & Refine has AI study the failed tests and adjust your rules, pass after pass.
  • Iterations: 1 to 5 (default 3). How many improvement passes to run.
  • Target: 70% to 95% (default 85%). The accuracy to aim for on this set of tests.
When it finishes, Proposed Refinements shows the Context and rules Before and After, with a Summary of Changes.
  • Accept Changes applies them.
  • Reject Changes keeps your guardrail as it was.
Note: After you accept, run validation again to confirm the new accuracy. The refinement's figure is a projection until you do.

Version History

The panel on the left shows the guardrail's Context and rules, and Version History:
  • An Initial version, recorded when you first open Evaluate for a guardrail.
  • A Refined version each time you accept a refinement, with its accuracy.
  • An Edited version for each version saved on the server. These carry no accuracy figure.
Click a version to restore it.
Note: Test cases and version history are kept in your browser, up to 20 versions per guardrail. When the platform is reachable, the guardrail's saved server versions are added to the same list. To keep test cases and results beyond this browser, download them.