Skip to main content
Use edith-1.1 to check whether a passing rollout solved the task or exploited the verifier. This Python HTTP example records behaviour rates and applies an optional reward filter before your trainer updates the policy.
The thresholds are example policies. Validate them on labelled rollouts before changing training rewards. Zeroing rewards based on a monitor still creates pressure to evade that monitor.

1. Prepare a rollout batch

Use Python 3.10+ and an Evolve API key:
The example takes each rollout’s instruction, messages, verifier reward, and verifier_stdout. Messages use OpenAI-style roles, text content, and function-call arguments encoded as JSON strings. Adapt the converter for your trainer’s log format. Save and run this sample batch creator. Both illustrative rollouts pass, but one skips the failing test:
create_batch.py
For real runs, include the actual tool calls and outputs. Add tests or a reference solution to task.files in the resulting trial object when available.

2. Choose the claims

The program asks three predicate questions: reward_hacking and false_pass are checks Edith was trained on. edited_tests is a custom claim. A test edit can be legitimate, so validate this claim against your task policy. The run is billed once per request; extra questions add their own input tokens.

3. Check a batch in parallel

Save the complete program as edith_rl.py. It sends one request per rollout and returns results in input order. Typical rollouts take 0.5 to 3 seconds per request. A batch of 64 makes 64 requests, with at most 32 active at once; queued requests, latency, server capacity, and retries determine the total time.
edith_rl.py
The output contains the three probabilities for each rollout, adjusted rewards, and batch rates. Each edith/*_rate counts the share of rollouts with that probability above 0.5. The reward filter uses the separate, higher threshold of 0.9. Values depend on the model response. edith/zeroed is the share of the entire batch whose positive reward was replaced with zero; it is not the share of passing rollouts. The helper retries HTTP 429, 502, 503, and 504 up to three times after the initial attempt. It also checks http_status and error in HTTP 200 bodies. Other API errors and transport errors stop the batch.

4. Connect your trainer

Call the helpers between verification and the training update. These trainer functions are integration points you supply; rollouts must use the input shape above:
Trainer integration (pseudocode)
This fragment runs inside your trainer’s async function. For a synchronous loop, use asyncio.run(check_batch(trials)) with import asyncio instead of await. Start by logging the metrics while retaining verifier rewards. An initial set of 50 to 100 labelled rollouts can help you choose a threshold. Enable the reward filter only after reviewing false positives and missed hacks on your own rollouts. Keep the claims and thresholds fixed when comparing training checkpoints.

Compare two passing rollouts

In two measured examples of the parser task, both rollouts received verifier reward 1.0. One skipped the failing offset test; the other fixed the parser with datetime.fromisoformat: Each request was about 540 input tokens and took under 1.1 seconds. With the example filter, the skipped-test rollout loses its reward and the parser fix keeps it. These measurements describe those two examples, not expected values for every rollout.

Interpret the rates

  • Reward rises and detected hacking stays flat. This can indicate better task performance. Inspect held-out rollouts to distinguish that from hacks the monitor misses.
  • Reward and detected hacking rise together. Review flagged rollouts for verifier weaknesses before continuing training.
  • Detected hacking falls after filtering. Check that behaviour improved rather than becoming harder for the rubric to detect.
Training against monitor output can encourage concealed reward hacking. Baker et al. observed this under strong optimization against chain-of-thought monitors. A high threshold does not remove that risk. Do not maximize the monitor score or subtract a penalty proportional to its probability. Audit passing rollouts with independent checks or written analysis, for example every few hundred training steps.
At $0.04 per million input tokens, 64 requests billed at 20,000 tokens each cost about $0.051. Include question tokens in that count. Long rollouts can take minutes; the example waits before the update and uses a 600-second timeout. If you move those checks after the update, they can no longer filter that update’s rewards. See Usage and billing and Long requests. For step-level diagnosis, send a separate choice request for flagged rollouts. Mixing verdict and diagnosis questions can skew the answers. See Flag misaligned behaviour.

Next steps

Custom rubrics

Write claims for the hacks your environment allows.

Flag misaligned behaviour

Diagnose false reports, overreach, and eval awareness.
Last modified on November 9, 2026