Testing Policies with Sample Payloads
- Open a policy in the editor
- Navigate to the “Simulate” tab in the right sidebar
- Enter a sample payload (format depends on policy mode — see below)
- Click “Evaluate” to see how the policy processes the payload
Mode-specific payloads
The Simulate tab sends the payload to the backend based on the policy type. Use the shape that matches your mode:| Mode | Payload shape | Example |
|---|---|---|
| Conditions | Structured object (e.g. request, user) | { "request": { "amount": 5000, "currency": "USD" }, "user": { "id": "user-123", "risk_level": "high" } } |
| Instructions | Prompt plus response (or input) | { "prompt": "User question...", "input": "LLM response text..." } — the field names may match the Instructions evaluate API. |
| Guardrails | Text to check | A string or object with a single text field (e.g. the model output or user message to scan). |
Quick Test Templates
The simulator provides quick templates for common scenarios:- Basic Request: Simple request with amount and user
- High-Value Transaction: Large amount transaction
- High-Risk User: Request from high-risk user profile
- Custom: Create your own payload
Custom Payload Input
Enter a payload that matches your policy mode. For Conditions, a typical payload is a JSON object withrequest and optional user (or other fields your conditions reference):
Evaluation Trace Visualization
After evaluation, you’ll see:- Decision: Allow, Block, or Escalate
- Matched Conditions: Which conditions evaluated to true
- Evaluation Steps: Step-by-step trace of the evaluation
- Execution Time: How long the evaluation took
Simulation History
- Previous simulations are saved in the history
- Re-run previous simulations
- Compare results across different payloads
Unit Tests Display
View and manage unit tests for the policy:- Predefined test cases
- Expected outcomes
- Run all tests to validate policy behavior
Real-time Condition Evaluation
As you modify conditions, you can:- Test immediately with the current payload
- See how changes affect the evaluation
- Iterate quickly to refine your policy