Cheap, deterministic checks on a reflector's proposed text, run before a proposal is evaluated (and spends budget):
- Held-out leakage. A proposal that repeats a run of
8 consecutive words from a validation or test case (its input or
any string in its
expected) is rejected: text memorised from the data the candidate is judged on inflates exactly the numbers that decide acceptance. Words are compared case-folded with punctuation stripped. - Fence markers. A proposal containing
<<<,>>>or a fence boundary (INPUT_followed by a 16-character token) is rejected: it would carry a fence escape from untrusted trace text into an agent's system prompt.
The reflector never receives held-out text, so a leak can only come from train cases that share it, from the model's own knowledge, or from an injected trace; whichever it is, the proposal is not used.
Summary
Functions
Checks updates (component key => proposed text).
The held-out word windows to check proposals against, from the cases of the validation and test splits.
Functions
@spec check(%{required(String.t()) => String.t()}, MapSet.t()) :: :ok | {:error, {:heldout_leak | :fence_marker, String.t()}}
Checks updates (component key => proposed text).
Returns :ok, {:error, {:heldout_leak, key}} or
{:error, {:fence_marker, key}}.
@spec heldout_windows([Nous.Eval.Case.t()]) :: MapSet.t()
The held-out word windows to check proposals against, from the cases of the validation and test splits.