Policy backtesting

Policy backtesting is running a new or changed guardrail policy over past traffic before it goes live, to see what it would have flagged. It shows the false positives before any user meets them.

How it works

  1. Take a sample of stored traffic: inputs, outputs and tool calls.
  2. Run the candidate policy over it offline. Nothing is blocked and no user is affected.
  3. Compare its verdicts with the current policy's. Look at what is newly flagged and what is no longer flagged.
  4. Read a sample of each group by hand, fix the wording, and run it again.

Why it matters

A guardrail policy is written in plain language, and its reach is hard to predict from the words alone. A policy against giving medical advice may also catch an answer about a sore knee after the gym. Backtesting turns the guess into a count: how many sessions the policy would have flagged, and which ones. See false positives in guardrails.

Limits

Past traffic holds only the attacks someone has already tried, so pair backtesting with red teaming. It also needs stored traffic, which depends on what you log and for how long.

With White Circle

Improve backtests a new policy against historical traffic and checks policy coverage before a rollout. Policies are versioned, and a rollback is one click.

Train your own models

Post-train any Hugging Face model with Halo. Up to 4× faster than TRL