Skip to main content
Test policies before deployment to ensure they work as expected. Simulation is mode-specific: the Simulate tab uses the same mode as the policy (Conditions, Instructions, or Guardrails), and the payload shape and evaluation result format depend on that mode.

Testing Policies with Sample Payloads

  1. Open a policy in the editor
  2. Navigate to the “Simulate” tab in the right sidebar
  3. Enter a sample payload (format depends on policy mode — see below)
  4. 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:
ModePayload shapeExample
ConditionsStructured object (e.g. request, user){ "request": { "amount": 5000, "currency": "USD" }, "user": { "id": "user-123", "risk_level": "high" } }
InstructionsPrompt plus response (or input){ "prompt": "User question...", "input": "LLM response text..." } — the field names may match the Instructions evaluate API.
GuardrailsText to checkA string or object with a single text field (e.g. the model output or user message to scan).
The evaluation trace and result (decision, reason, matched rules) may vary by mode; for example, Conditions show structured condition evaluation, while Guardrails show which guardrail type triggered.

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 with request and optional user (or other fields your conditions reference):
{
  "request": {
    "amount": 5000,
    "currency": "USD"
  },
  "user": {
    "id": "user-123",
    "risk_level": "high",
    "country": "US"
  }
}
For Instructions or Guardrails, use the prompt/input or text shape described in the table above.

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