Brittleness and benchmark rounds¶
An agent can pass every published scenario and still fail on a slight variation of one: it was fitted to the tests, or it relies on cues the tests happen to share. The brittleness benchmark measures that. It generates new scenarios from the shipped ones at five difficulty levels (Forge), runs every configuration on the fixed and the generated scenarios, and reports how pass rates change.
credencestack bench brittleness -c bench/sample_brittleness.yaml
The sample uses scripted agents only: it calls no model, costs nothing and finishes in
well under two minutes, so CI runs it. Real models need --confirm-spend, as with
bench run.
The configuration¶
A brittleness file is a benchmark file with two more keys:
| Key | Default | Meaning |
|---|---|---|
per_level |
40 | Generated scenarios per level, per pack |
levels |
[1, 2, 3, 4, 5] |
The difficulty levels to generate |
seed |
0 | The master seed: an integer, or fresh |
epochs |
3 | Repetitions of every scenario |
agents, models, packs, max_usd, prices and concurrency work as in bench run.
What it reports¶
<out>/brittleness-<id>/ holds:
| Path | Contents |
|---|---|
brittleness_results.csv |
One row per configuration and level (fixed, 1-5), mutator and family: episodes, passes, the pass rate with its 95% Wilson interval, the gap with Newcombe's interval, and over-cautious episodes |
report/brittleness.html, report/brittleness.md |
The report, with <!-- WRITE: ... --> markers where narrative belongs |
report/charts/ |
brittleness_curve.png, public_vs_generated.png, mutator_sensitivity.png, overcaution_by_level.png |
generated/ |
The generated scenarios, one pack directory per pack |
runs/ |
The ordinary benchmark output: results, episodes and one evidence bundle per configuration |
manifest.json |
kind: brittleness, with the seed, levels, counts and spend |
- The brittleness curve: the pass rate at each level, per configuration.
- The fixed-to-generated gap: the fixed pass rate minus each level's. A large gap means the agent does better on the published tests than on fresh variants of them.
- Sensitivity: the generated pass rate overall minus the pass rate among episodes a mutator (or a family of mutators) touched: what causes the biggest drops. Mutators stack, so the effects overlap.
- Over-caution: the share of episodes with an
over_cautiousfinding. An agent that is "safe" because it refuses everything shows up here.
The scripted agents in the sample¶
| Agent | Behaviour |
|---|---|
scripted_safe |
Follows the policy: passes every level |
scripted_brittle |
The safe agent with documented weaknesses: it decides payments on the per-transaction limit and allow-list only (ignoring the clock, earlier payments and the currency), clears a sanctions alert unless the names match letter for letter, never checks people against the PEP list, and checks a document's bank details and totals but not its pages, dates, registry entry or ledger |
scripted_naive |
Does what it is told and what documents say: fails almost everything |
The weaknesses are deterministic and listed in credencestack.agents.BRITTLE_WEAKNESSES,
so the pipeline, the charts and the report can be tested without a model. In the sample
(seed 42, 20 scenarios per level per pack) the brittle agent passes 73% of the fixed
scenarios and 82.5%, 74%, 70%, 62.5% and 76% at levels 1 to 5. The rise at level 5 is
real, not noise to tune away: level 5 stacks four or five changes, and with several
problems in one scenario at least one is usually one the agent does look for, so it still
reaches the right decision.
Benchmark rounds¶
Published results stay fair with --seed fresh. Each round draws a new master seed, so
its scenarios are new: nobody, including the maintainers' own agents, has seen them in
advance. The seed is recorded in the manifest and printed in the report, so anyone can
reproduce the round afterwards:
credencestack bench brittleness -c bench/brittleness.yaml --seed fresh --confirm-spend
# later, to reproduce it:
credencestack bench brittleness -c bench/brittleness.yaml --seed 1916509420 --confirm-spend
Generated scenarios are labelled by the graders, never by a model; see how the labelling works.