Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions docs/benchmark-results.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
[
{
"name": "Refund",
"crossings": 3,
"t_base_us": 3.7226000567898154,
"t_rec_us": 72.48700002674013,
"overhead_us_per_crossing": 22.92146665665011,
"overhead_pct_at_model": 0.007640488885550038,
"bytes_per_crossing": 1373.3333333333333,
"replay_live_crossings": 0,
"deterministic": true,
"detected": true,
"spec_gated": true,
"spec_benign": true,
"benign_survived": 5,
"benign_total": 5
},
{
"name": "Invoice",
"crossings": 3,
"t_base_us": 4.606600035913289,
"t_rec_us": 74.36680002138019,
"overhead_us_per_crossing": 23.25339999515563,
"overhead_pct_at_model": 0.007751133331718543,
"bytes_per_crossing": 1476.0,
"replay_live_crossings": 0,
"deterministic": true,
"detected": true,
"spec_gated": true,
"spec_benign": true,
"benign_survived": 5,
"benign_total": 5
},
{
"name": "Trade",
"crossings": 3,
"t_base_us": 4.276599967852235,
"t_rec_us": 72.05800001975149,
"overhead_us_per_crossing": 22.593800017299753,
"overhead_pct_at_model": 0.007531266672433251,
"bytes_per_crossing": 1406.3333333333333,
"replay_live_crossings": 0,
"deterministic": true,
"detected": true,
"spec_gated": true,
"spec_benign": true,
"benign_survived": 5,
"benign_total": 5
},
{
"name": "Email",
"crossings": 3,
"t_base_us": 3.52159992326051,
"t_rec_us": 72.54480000119656,
"overhead_us_per_crossing": 23.007733359312024,
"overhead_pct_at_model": 0.007669244453104008,
"bytes_per_crossing": 1367.6666666666667,
"replay_live_crossings": 0,
"deterministic": true,
"detected": true,
"spec_gated": true,
"spec_benign": true,
"benign_survived": 5,
"benign_total": 5
},
{
"name": "Payout",
"crossings": 3,
"t_base_us": 3.607400110922754,
"t_rec_us": 74.70859994646162,
"overhead_us_per_crossing": 23.700399945179623,
"overhead_pct_at_model": 0.007900133315059874,
"bytes_per_crossing": 1390.0,
"replay_live_crossings": 0,
"deterministic": true,
"detected": true,
"spec_gated": true,
"spec_benign": true,
"benign_survived": 5,
"benign_total": 5
},
{
"name": "Deletion",
"crossings": 3,
"t_base_us": 2.8966000536456704,
"t_rec_us": 71.75499992445111,
"overhead_us_per_crossing": 22.952799956935152,
"overhead_pct_at_model": 0.007650933318978384,
"bytes_per_crossing": 1274.3333333333333,
"replay_live_crossings": 0,
"deterministic": true,
"detected": true,
"spec_gated": true,
"spec_benign": true,
"benign_survived": 5,
"benign_total": 5
}
]
29 changes: 29 additions & 0 deletions docs/benchmark-table.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
% Auto-generated by examples/benchmark/harness.py
\newcommand{\numincidents}{6}
\newcommand{\detectionrate}{6/6}
\newcommand{\specificity}{6/6}
\newcommand{\benignspecificity}{30/30}
\newcommand{\recoverheadus}{23.0}
\newcommand{\recoverheadpct}{0.008}
\newcommand{\kbpercrossing}{1.44}
\newcommand{\modellatencyms}{300}

\begin{table}[t]
\centering
\small
\begin{tabular}{lrrrr}
\toprule
Scenario & Cross. & $t_{\mathrm{base}}$ & $t_{\mathrm{rec}}$ & Rec./cross. \\
& & (\textmu s) & (\textmu s) & (\textmu s) \\
\midrule
Refund & 3 & 3.7 & 72.5 & 22.9 \\
Invoice & 3 & 4.6 & 74.4 & 23.3 \\
Trade & 3 & 4.3 & 72.1 & 22.6 \\
Email & 3 & 3.5 & 72.5 & 23.0 \\
Payout & 3 & 3.6 & 74.7 & 23.7 \\
Deletion & 3 & 2.9 & 71.8 & 23.0 \\
\bottomrule
\end{tabular}
\caption{Recording adds \recoverheadus{}~\textmu s per crossing (\recoverheadpct\% of a \modellatencyms~ms model call). Replaying the suite makes zero model calls; cut-point tests flag \detectionrate{} incidents and pass on \specificity{} guarded and benign changes. The store grows by at most \kbpercrossing{}~KB per crossing.}
\label{tab:overhead}
\end{table}
14 changes: 14 additions & 0 deletions examples/benchmark/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""The Chronicle incident benchmark: recorded agent incidents + an evaluation harness.

Each scenario is a small ``model -> tool -> model`` agent where an unguarded tool
produces an unsafe result and a guarded version corrects it. Every scenario has three
tool variants:

- ``ungated`` the incident (unsafe): the cut-point test must FAIL (fault detected).
- ``gated`` the fix (safe): the cut-point test must PASS.
- ``benign`` an unrelated correct change: the cut-point test must PASS (specificity).

The harness records each incident, replays it, and cut-point tests all three variants,
reporting recording overhead, store growth, replay determinism, and detection /
specificity. See ``harness.py``.
"""
Loading
Loading