@tangle-network/agent-eval 0.180.0 → 0.182.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -0
- package/README.md +119 -159
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-B7yErX0q.d.ts → agent-profile-CivaSsSy.d.ts} +4 -4
- package/dist/{agent-profile-B7yErX0q.d.ts.map → agent-profile-CivaSsSy.d.ts.map} +1 -1
- package/dist/{agent-profile-cell-0gSi5ffD.js → agent-profile-cell-Cv6UA-W_.js} +20 -57
- package/dist/agent-profile-cell-Cv6UA-W_.js.map +1 -0
- package/dist/{agent-profile-cell-CTOZJUuE.d.ts → agent-profile-cell-s__adRnK.d.ts} +3 -3
- package/dist/agent-profile-cell-s__adRnK.d.ts.map +1 -0
- package/dist/analyst/index.d.ts +11 -11
- package/dist/analyst/index.js +4 -4
- package/dist/ast-CP9ae9B0.js +557 -0
- package/dist/ast-CP9ae9B0.js.map +1 -0
- package/dist/ast-hI-vjW6J.d.ts +457 -0
- package/dist/ast-hI-vjW6J.d.ts.map +1 -0
- package/dist/{benchmark-command-D4vpnAdO.js → benchmark-command-7X7HPNHh.js} +8 -7
- package/dist/{benchmark-command-D4vpnAdO.js.map → benchmark-command-7X7HPNHh.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +4 -4
- package/dist/benchmarks/index.js +3 -3
- package/dist/campaign/index.d.ts +6 -6
- package/dist/campaign/index.js +8 -8
- package/dist/{campaign-BGEurASO.js → campaign-B2U7WcFz.js} +13 -13
- package/dist/{campaign-BGEurASO.js.map → campaign-B2U7WcFz.js.map} +1 -1
- package/dist/{campaign-evidence-D8DBLqLI.js → campaign-evidence-PYPUftRy.js} +515 -471
- package/dist/campaign-evidence-PYPUftRy.js.map +1 -0
- package/dist/cli.js +5 -8
- package/dist/cli.js.map +1 -1
- package/dist/{client-BlLY6o2w.js → client-CXE-U1SA.js} +3 -1
- package/dist/client-CXE-U1SA.js.map +1 -0
- package/dist/{client-CuQgX33c.d.ts → client-kh2jOjTK.d.ts} +4 -4
- package/dist/{client-CuQgX33c.d.ts.map → client-kh2jOjTK.d.ts.map} +1 -1
- package/dist/contract/index.d.ts +13 -13
- package/dist/contract/index.js +11 -10
- package/dist/contract/index.js.map +1 -1
- package/dist/{default-registry-IGDE9XIC.d.ts → default-registry-BwDSWVzg.d.ts} +6 -6
- package/dist/{default-registry-IGDE9XIC.d.ts.map → default-registry-BwDSWVzg.d.ts.map} +1 -1
- package/dist/{default-registry-aL7xUrUz.js → default-registry-DHWwIwa8.js} +2 -2
- package/dist/{default-registry-aL7xUrUz.js.map → default-registry-DHWwIwa8.js.map} +1 -1
- package/dist/{define-agent-eval-Cx4Ls9ta.d.ts → define-agent-eval-CwOWWQt_.d.ts} +33 -12
- package/dist/define-agent-eval-CwOWWQt_.d.ts.map +1 -0
- package/dist/{define-agent-eval-Dzidv34q.js → define-agent-eval-DSIPB4hi.js} +136 -69
- package/dist/define-agent-eval-DSIPB4hi.js.map +1 -0
- package/dist/{dspy-rlm-engine-xKiWmj_G.js → dspy-rlm-engine-S53V0HhE.js} +2 -2
- package/dist/{dspy-rlm-engine-xKiWmj_G.js.map → dspy-rlm-engine-S53V0HhE.js.map} +1 -1
- package/dist/{engine-CX8ReXkn.d.ts → engine-DS1cysJy.d.ts} +10 -7
- package/dist/engine-DS1cysJy.d.ts.map +1 -0
- package/dist/{eval-campaign-Cs-7MiCs.js → eval-campaign-CCEkwzoH.js} +4 -4
- package/dist/{eval-campaign-Cs-7MiCs.js.map → eval-campaign-CCEkwzoH.js.map} +1 -1
- package/dist/{exact-types-B7LC1EyX.d.ts → exact-types-BZDe0W2D.d.ts} +2 -2
- package/dist/{exact-types-B7LC1EyX.d.ts.map → exact-types-BZDe0W2D.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +27 -477
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +97 -561
- package/dist/experiment/index.js.map +1 -1
- package/dist/{experiment-tracker-B3TiF5-u.d.ts → experiment-tracker-C7PfnF4b.d.ts} +2 -2
- package/dist/{experiment-tracker-B3TiF5-u.d.ts.map → experiment-tracker-C7PfnF4b.d.ts.map} +1 -1
- package/dist/{external-optimizer-process-Dlz8YxrT.js → external-optimizer-process-QDRURJAM.js} +3 -3
- package/dist/{external-optimizer-process-Dlz8YxrT.js.map → external-optimizer-process-QDRURJAM.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-q3VzlGAO.js → external-optimizer-subprocess-D4dzUBZI.js} +3 -2
- package/dist/{external-optimizer-subprocess-q3VzlGAO.js.map → external-optimizer-subprocess-D4dzUBZI.js.map} +1 -1
- package/dist/{feedback-trajectory-eHWNv5Aj.d.ts → feedback-trajectory-CXmtITBo.d.ts} +3 -3
- package/dist/{feedback-trajectory-eHWNv5Aj.d.ts.map → feedback-trajectory-CXmtITBo.d.ts.map} +1 -1
- package/dist/hosted/index.d.ts +2 -2
- package/dist/hosted/index.d.ts.map +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/{index-BxWvILU8.d.ts → index-Bp_6sj3x.d.ts} +109 -56
- package/dist/index-Bp_6sj3x.d.ts.map +1 -0
- package/dist/{index-e7LXeRVa.d.ts → index-CJ3LhKIX.d.ts} +2 -2
- package/dist/{index-e7LXeRVa.d.ts.map → index-CJ3LhKIX.d.ts.map} +1 -1
- package/dist/{index-CiUjjEIa.d.ts → index-DbG8QbH9.d.ts} +8 -8
- package/dist/{index-CiUjjEIa.d.ts.map → index-DbG8QbH9.d.ts.map} +1 -1
- package/dist/{index-DxNYmx4a.d.ts → index-DoykkxW0.d.ts} +11 -11
- package/dist/{index-DxNYmx4a.d.ts.map → index-DoykkxW0.d.ts.map} +1 -1
- package/dist/index.d.ts +28 -28
- package/dist/index.js +27 -18
- package/dist/index.js.map +1 -1
- package/dist/{insight-report-DETqPc_A.d.ts → insight-report-D1qa0HWs.d.ts} +9 -5
- package/dist/{insight-report-DETqPc_A.d.ts.map → insight-report-D1qa0HWs.d.ts.map} +1 -1
- package/dist/{integrity-DH5ng72x.js → integrity-CgQce0FV.js} +2 -2
- package/dist/{integrity-DH5ng72x.js.map → integrity-CgQce0FV.js.map} +1 -1
- package/dist/{integrity-BKTcA-HP.d.ts → integrity-rGOfSUle.d.ts} +2 -2
- package/dist/{integrity-BKTcA-HP.d.ts.map → integrity-rGOfSUle.d.ts.map} +1 -1
- package/dist/{ledger-core-Cs9f7385.js → journal-Cs9f7385.js} +1 -1
- package/dist/journal-Cs9f7385.js.map +1 -0
- package/dist/{judge-calibration-C5CbMYce.d.ts → judge-calibration-DFtEMlde.d.ts} +31 -2
- package/dist/judge-calibration-DFtEMlde.d.ts.map +1 -0
- package/dist/{judge-calibration-BnpVKtnb.js → judge-calibration-DYmaBtJr.js} +48 -2
- package/dist/{judge-calibration-BnpVKtnb.js.map → judge-calibration-DYmaBtJr.js.map} +1 -1
- package/dist/ledger-core/index.d.ts +1 -1
- package/dist/ledger-core/index.js +1 -1
- package/dist/{llm-judge-v80Kmu9g.js → llm-judge-BPFR12VJ.js} +645 -456
- package/dist/llm-judge-BPFR12VJ.js.map +1 -0
- package/dist/{matrix-DeMmnWrP.d.ts → matrix-CyhW-vgJ.d.ts} +2 -2
- package/dist/{matrix-DeMmnWrP.d.ts.map → matrix-CyhW-vgJ.d.ts.map} +1 -1
- package/dist/meta-eval/index.d.ts +138 -7
- package/dist/meta-eval/index.d.ts.map +1 -1
- package/dist/meta-eval/index.js +245 -97
- package/dist/meta-eval/index.js.map +1 -1
- package/dist/{mint-Cc1_zwRQ.js → mint-ySIIkKlV.js} +2 -2
- package/dist/{mint-Cc1_zwRQ.js.map → mint-ySIIkKlV.js.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/openapi.json +1 -1
- package/dist/outcome-store-BXlkwMPR.js +131 -0
- package/dist/outcome-store-BXlkwMPR.js.map +1 -0
- package/dist/{outcome-store-BYHIuO0e.d.ts → outcome-store-CNt4iZ67.d.ts} +18 -25
- package/dist/outcome-store-CNt4iZ67.d.ts.map +1 -0
- package/dist/{paired-arms-D4aeIHUy.js → paired-arms-JSDcs2zx.js} +16 -3
- package/dist/paired-arms-JSDcs2zx.js.map +1 -0
- package/dist/{paired-promotion-decision-CGzg0cI_.d.ts → paired-promotion-decision-DPsMQm-0.d.ts} +13 -7
- package/dist/{paired-promotion-decision-CGzg0cI_.d.ts.map → paired-promotion-decision-DPsMQm-0.d.ts.map} +1 -1
- package/dist/pipelines/index.js +1 -1
- package/dist/{power-and-mde-B8F2RdcD.js → power-and-mde-BJOpt6pq.js} +2 -2
- package/dist/{power-and-mde-B8F2RdcD.js.map → power-and-mde-BJOpt6pq.js.map} +1 -1
- package/dist/{produced-state-Cv0kJJuP.js → produced-state-CkoG43gI.js} +3 -3
- package/dist/{produced-state-Cv0kJJuP.js.map → produced-state-CkoG43gI.js.map} +1 -1
- package/dist/profile-cell.d.ts +1 -1
- package/dist/profile-cell.js +1 -1
- package/dist/{promotion-policy-DWOm70gx.js → promotion-policy-BKFrl7CC.js} +28 -40
- package/dist/promotion-policy-BKFrl7CC.js.map +1 -0
- package/dist/{registry-ByVld1-5.d.ts → registry-BRbB6Y0v.d.ts} +4 -4
- package/dist/{registry-ByVld1-5.d.ts.map → registry-BRbB6Y0v.d.ts.map} +1 -1
- package/dist/{release-confidence-BAcNYOf1.d.ts → release-confidence-BcqeQTHW.d.ts} +3 -3
- package/dist/{release-confidence-BAcNYOf1.d.ts.map → release-confidence-BcqeQTHW.d.ts.map} +1 -1
- package/dist/{release-confidence-BcGCclTB.js → release-confidence-DMg8n18l.js} +2 -2
- package/dist/{release-confidence-BcGCclTB.js.map → release-confidence-DMg8n18l.js.map} +1 -1
- package/dist/{report-command-V1ecVgAv.js → report-command-BvqaxlVG.js} +32 -201
- package/dist/report-command-BvqaxlVG.js.map +1 -0
- package/dist/reporting.d.ts +4 -4
- package/dist/reporting.js +5 -5
- package/dist/{researcher-jsW1X94L.d.ts → researcher-64T49THL.d.ts} +6 -6
- package/dist/{researcher-jsW1X94L.d.ts.map → researcher-64T49THL.d.ts.map} +1 -1
- package/dist/{reward-hacking-ZXEi9VCq.d.ts → reward-hacking-uzO_ihep.d.ts} +2 -2
- package/dist/{reward-hacking-ZXEi9VCq.d.ts.map → reward-hacking-uzO_ihep.d.ts.map} +1 -1
- package/dist/rl.d.ts +53 -99
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +183 -170
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +1 -1
- package/dist/rollout/index.js +2 -3
- package/dist/{rollout-DmoJVqrF.js → rollout-BsN6pOU7.js} +154 -13
- package/dist/rollout-BsN6pOU7.js.map +1 -0
- package/dist/rubric-predictive-validity-Bmj2_cll.d.ts +79 -0
- package/dist/rubric-predictive-validity-Bmj2_cll.d.ts.map +1 -0
- package/dist/rubric-predictive-validity-CCK-1B7w.js +178 -0
- package/dist/rubric-predictive-validity-CCK-1B7w.js.map +1 -0
- package/dist/{run-record-DTv1MdjK.d.ts → run-record-BiTWauyO.d.ts} +2 -2
- package/dist/{run-record-DTv1MdjK.d.ts.map → run-record-BiTWauyO.d.ts.map} +1 -1
- package/dist/run-record-DPa2PeHx.js +464 -0
- package/dist/run-record-DPa2PeHx.js.map +1 -0
- package/dist/{run-record-DQpSf7t-.js → run-record-DualPTn2.js} +2 -2
- package/dist/{run-record-DQpSf7t-.js.map → run-record-DualPTn2.js.map} +1 -1
- package/dist/{semantic-concept-judge-Bi6_iGqg.js → semantic-concept-judge-Bm5JDEKO.js} +3 -3
- package/dist/{semantic-concept-judge-Bi6_iGqg.js.map → semantic-concept-judge-Bm5JDEKO.js.map} +1 -1
- package/dist/{sequential-B5gXgcyp.js → sequential-D_xHrBZe.js} +42 -25
- package/dist/sequential-D_xHrBZe.js.map +1 -0
- package/dist/{series-convergence-DeG33RpC.d.ts → series-convergence-BnMs_uAr.d.ts} +3 -3
- package/dist/{series-convergence-DeG33RpC.d.ts.map → series-convergence-BnMs_uAr.d.ts.map} +1 -1
- package/dist/{skillopt-optimization-method-C3oYul8v.js → skillopt-optimization-method-B2IEaCeF.js} +5 -5
- package/dist/{skillopt-optimization-method-C3oYul8v.js.map → skillopt-optimization-method-B2IEaCeF.js.map} +1 -1
- package/dist/{statistical-heldout-0La5ZTlv.d.ts → statistical-heldout-CpVd6FmY.d.ts} +207 -144
- package/dist/statistical-heldout-CpVd6FmY.d.ts.map +1 -0
- package/dist/{store-tool-spans-4J1EDElP.d.ts → store-tool-spans-Dt-YdAuE.d.ts} +6 -6
- package/dist/{store-tool-spans-4J1EDElP.d.ts.map → store-tool-spans-Dt-YdAuE.d.ts.map} +1 -1
- package/dist/{summary-report-gMrbYawB.d.ts → summary-report-D1h4dlrK.d.ts} +3 -3
- package/dist/{summary-report-gMrbYawB.d.ts.map → summary-report-D1h4dlrK.d.ts.map} +1 -1
- package/dist/{summary-report-B16xy9Kd.js → summary-report-IGAOtgPd.js} +4 -4
- package/dist/{summary-report-B16xy9Kd.js.map → summary-report-IGAOtgPd.js.map} +1 -1
- package/dist/supervisor-run/index.d.ts +20 -44
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +8 -8
- package/dist/supervisor-run/index.js.map +1 -1
- package/dist/{terminal-record-BtPwKTSr.js → terminal-record-BHocwFw1.js} +5 -22
- package/dist/terminal-record-BHocwFw1.js.map +1 -0
- package/dist/{tool-groups-2QA0S7dK.d.ts → tool-groups-B2bSNaJB.d.ts} +3 -3
- package/dist/tool-groups-B2bSNaJB.d.ts.map +1 -0
- package/dist/{tool-waste-B9tdWV6g.js → tool-waste-C7MU9u1e.js} +2 -2
- package/dist/{tool-waste-B9tdWV6g.js.map → tool-waste-C7MU9u1e.js.map} +1 -1
- package/dist/trace-repair/index.d.ts +2 -2
- package/dist/traces.d.ts +6 -6
- package/dist/traces.js +1 -1
- package/dist/{types-lPkDQNqJ.d.ts → types-BlIJ5URG.d.ts} +17 -26
- package/dist/types-BlIJ5URG.d.ts.map +1 -0
- package/dist/{types-BmlkCrg0.d.ts → types-BvZoPTGa.d.ts} +3 -3
- package/dist/{types-BmlkCrg0.d.ts.map → types-BvZoPTGa.d.ts.map} +1 -1
- package/dist/{types-gvRsyJLh.d.ts → types-CBbLtr2J.d.ts} +38 -3
- package/dist/{types-gvRsyJLh.d.ts.map → types-CBbLtr2J.d.ts.map} +1 -1
- package/dist/{types-C34V4Vto.d.ts → types-CS0qk_Yp.d.ts} +4 -4
- package/dist/{types-C34V4Vto.d.ts.map → types-CS0qk_Yp.d.ts.map} +1 -1
- package/dist/{types-DzuaM493.d.ts → types-D7gEdPoQ.d.ts} +3 -3
- package/dist/{types-DzuaM493.d.ts.map → types-D7gEdPoQ.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +2 -2
- package/docs/adapters-observability.md +14 -0
- package/docs/campaign-proposers.md +86 -128
- package/docs/charter.md +108 -112
- package/docs/concepts.md +157 -69
- package/docs/design/mlbenchmarks-book-review.md +440 -0
- package/docs/design/mlbenchmarks-review/observations.json +713 -0
- package/docs/design/mlbenchmarks-review/probes.mts +476 -0
- package/docs/design/mlbenchmarks-review/sources.json +200 -0
- package/docs/design/self-improvement-evidence-audit.md +263 -0
- package/docs/design.md +2 -1
- package/docs/eval-surface-map.md +95 -42
- package/docs/evaluation-integrity.md +220 -0
- package/docs/experiment.md +111 -55
- package/docs/feature-guide.md +5 -6
- package/docs/hosted-ingest-spec.md +4 -11
- package/docs/insight-report.md +187 -455
- package/docs/outcome-validity.md +182 -0
- package/docs/product-eval-adoption.md +1 -2
- package/docs/public-api.md +5 -8
- package/docs/research-report-methodology.md +7 -7
- package/docs/search-history-receipts.md +8 -0
- package/docs/statistical-evidence.md +129 -0
- package/docs/verdicts.md +76 -49
- package/package.json +1 -1
- package/dist/agent-profile-cell-0gSi5ffD.js.map +0 -1
- package/dist/agent-profile-cell-CTOZJUuE.d.ts.map +0 -1
- package/dist/campaign-evidence-D8DBLqLI.js.map +0 -1
- package/dist/client-BlLY6o2w.js.map +0 -1
- package/dist/define-agent-eval-Cx4Ls9ta.d.ts.map +0 -1
- package/dist/define-agent-eval-Dzidv34q.js.map +0 -1
- package/dist/engine-CX8ReXkn.d.ts.map +0 -1
- package/dist/index-BxWvILU8.d.ts.map +0 -1
- package/dist/judge-calibration-C5CbMYce.d.ts.map +0 -1
- package/dist/ledger-core-Cs9f7385.js.map +0 -1
- package/dist/llm-judge-v80Kmu9g.js.map +0 -1
- package/dist/opencode-sqlite-CNw3vubS.js +0 -145
- package/dist/opencode-sqlite-CNw3vubS.js.map +0 -1
- package/dist/outcome-store-BYHIuO0e.d.ts.map +0 -1
- package/dist/outcome-store-ChBKlTd_.js +0 -75
- package/dist/outcome-store-ChBKlTd_.js.map +0 -1
- package/dist/paired-arms-D4aeIHUy.js.map +0 -1
- package/dist/promotion-policy-DWOm70gx.js.map +0 -1
- package/dist/report-command-V1ecVgAv.js.map +0 -1
- package/dist/rollout-DmoJVqrF.js.map +0 -1
- package/dist/rubric-predictive-validity-2D5Gw9z9.js +0 -131
- package/dist/rubric-predictive-validity-2D5Gw9z9.js.map +0 -1
- package/dist/rubric-predictive-validity-Dl1dvKCv.d.ts +0 -75
- package/dist/rubric-predictive-validity-Dl1dvKCv.d.ts.map +0 -1
- package/dist/run-record-CR63CpHK.js +0 -216
- package/dist/run-record-CR63CpHK.js.map +0 -1
- package/dist/sequential-B5gXgcyp.js.map +0 -1
- package/dist/statistical-heldout-0La5ZTlv.d.ts.map +0 -1
- package/dist/terminal-record-BtPwKTSr.js.map +0 -1
- package/dist/tool-groups-2QA0S7dK.d.ts.map +0 -1
- package/dist/types-lPkDQNqJ.d.ts.map +0 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# Connect rubric scores to deployment outcomes
|
|
2
|
+
|
|
3
|
+
`rubricPredictiveValidity()` measures associations between rubric scores and observations from deployment.
|
|
4
|
+
Declare the desired direction for each outcome before reading the results.
|
|
5
|
+
Define rubric scores so higher values mean better evaluated behavior.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import {
|
|
9
|
+
InMemoryOutcomeStore,
|
|
10
|
+
rubricPredictiveValidity,
|
|
11
|
+
type DeploymentOutcome,
|
|
12
|
+
type OutcomeMetricSpec,
|
|
13
|
+
} from '@tangle-network/agent-eval/meta-eval'
|
|
14
|
+
import type { RunRecord } from '@tangle-network/agent-eval'
|
|
15
|
+
|
|
16
|
+
async function assessOutcomes(runs: RunRecord[], observations: DeploymentOutcome[]) {
|
|
17
|
+
const outcomes = new InMemoryOutcomeStore()
|
|
18
|
+
for (const observation of observations) await outcomes.append(observation)
|
|
19
|
+
const metrics: OutcomeMetricSpec[] = [
|
|
20
|
+
{ id: 'success_rate', direction: 'higher-is-better' },
|
|
21
|
+
{ id: 'failure_rate', direction: 'lower-is-better' },
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
return rubricPredictiveValidity({
|
|
25
|
+
runs,
|
|
26
|
+
outcomes,
|
|
27
|
+
outcomeMetrics: metrics,
|
|
28
|
+
rubrics: ['task_quality'],
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Populate `RunRecord.outcome.raw.task_quality` with the captured rubric score.
|
|
34
|
+
Append deployment observations with the same `runId` and exact outcome metric keys.
|
|
35
|
+
The store accepts finite numbers, including zero.
|
|
36
|
+
Omit an unmeasured metric instead of replacing it with zero.
|
|
37
|
+
|
|
38
|
+
An observation records when and where its outcomes were captured:
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
const observation: DeploymentOutcome = {
|
|
42
|
+
runId: 'support-run-42',
|
|
43
|
+
capturedAt: Date.now(),
|
|
44
|
+
metrics: { success_rate: 1, failure_rate: 0 },
|
|
45
|
+
labels: { cohort: 'support' },
|
|
46
|
+
source: 'resolution-events-v1',
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`capturedAt` uses epoch milliseconds.
|
|
51
|
+
The matching run supplies the rubric score; this observation supplies the measured deployment outcome.
|
|
52
|
+
|
|
53
|
+
The default reduction selects the latest finite observation of each requested metric.
|
|
54
|
+
A newer row containing another metric cannot supply its value or erase an older observation.
|
|
55
|
+
The `mean` and `max` reductions operate on that metric alone.
|
|
56
|
+
|
|
57
|
+
## Read the report
|
|
58
|
+
|
|
59
|
+
| Field | Interpretation |
|
|
60
|
+
|---|---|
|
|
61
|
+
| `pearson`, `spearman` | Association with the recorded outcome, retaining its original sign. |
|
|
62
|
+
| `alignedPearson`, `alignedSpearman` | Positive means higher rubric scores associate with better outcomes. |
|
|
63
|
+
| `pearsonCi95`, `spearmanCi95` | Bootstrap intervals for the raw associations. |
|
|
64
|
+
| `alignedSpearmanCi95` | Spearman interval after applying the declared outcome direction. |
|
|
65
|
+
| `verdict` | `aligned` at aligned Spearman ≥ 0.4; `inverse` at ≤ −0.4; otherwise `weak`. |
|
|
66
|
+
| `n` | Finite joined run observations for this rubric and outcome. |
|
|
67
|
+
| `excludedPairs` | Unestimated pairs, their observation counts, and the reason for exclusion. |
|
|
68
|
+
| `rubricsWithoutData` | Declared rubrics with no finite score in the supplied runs. |
|
|
69
|
+
|
|
70
|
+
A rubric can correlate negatively with failure rate and still receive `aligned`.
|
|
71
|
+
The same negative correlation with success rate receives `inverse`.
|
|
72
|
+
These labels describe association strength and direction.
|
|
73
|
+
They do not grant release authority or establish that changing a rubric weight will improve outcomes.
|
|
74
|
+
|
|
75
|
+
Pairs require eight observations by default.
|
|
76
|
+
`minSamples` can set another integer of at least three.
|
|
77
|
+
Insufficient observations and constant scores or outcomes remain explicit exclusions.
|
|
78
|
+
Constant observations cannot establish a perfect predictor.
|
|
79
|
+
Intervals remain `null` when no bootstrap resample has an estimable correlation.
|
|
80
|
+
|
|
81
|
+
`joinedSamples + skippedRuns` equals the supplied run count.
|
|
82
|
+
A run is joined when at least one finite score and outcome pair exists.
|
|
83
|
+
It remains joined even if that pair has too few observations for estimation.
|
|
84
|
+
Duplicate run IDs are rejected.
|
|
85
|
+
|
|
86
|
+
Each run is an independent bootstrap observation.
|
|
87
|
+
Repeated observations from the same person or task can violate that assumption.
|
|
88
|
+
Aggregate at the independent unit or use a study with an appropriate grouped estimator.
|
|
89
|
+
|
|
90
|
+
`ranked` selects each rubric's highest direction-aligned association across the declared outcomes.
|
|
91
|
+
This ordering is exploratory and can conceal conflicts among outcomes.
|
|
92
|
+
Inspect all `pairs` and use a target chosen before analysis for an automated recommendation.
|
|
93
|
+
Confirm any proposed change with fresh evidence and fixed scoring rules.
|
|
94
|
+
|
|
95
|
+
## Propose an experiment against one target
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import { PredictiveValidityResearcher } from '@tangle-network/agent-eval/rl'
|
|
99
|
+
import { InMemoryOutcomeStore } from '@tangle-network/agent-eval/meta-eval'
|
|
100
|
+
|
|
101
|
+
const outcomes = new InMemoryOutcomeStore()
|
|
102
|
+
const researcher = new PredictiveValidityResearcher({
|
|
103
|
+
outcomes,
|
|
104
|
+
targetOutcome: { id: 'success_rate', direction: 'higher-is-better' },
|
|
105
|
+
rubrics: ['task_quality'],
|
|
106
|
+
})
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Supply observed outcomes before calling `runValidityCheck(runs)`.
|
|
110
|
+
Pass the resulting failure groups to `proposeChange(failures)`.
|
|
111
|
+
The researcher uses its declared target even if another outcome has a stronger association.
|
|
112
|
+
It proposes increased-weight experiments for aligned associations and reversal or replacement experiments for inverse associations.
|
|
113
|
+
Both require an aligned Spearman interval that excludes zero.
|
|
114
|
+
Weak or uncertain associations produce requests for calibration evidence.
|
|
115
|
+
Missing estimates produce requests for more outcome observations.
|
|
116
|
+
|
|
117
|
+
The proposals contain their association, interval, sample count, and target direction.
|
|
118
|
+
They contain no predicted improvement because a correlation does not identify a causal treatment effect.
|
|
119
|
+
`applyChange()` appends proposals to a plan.
|
|
120
|
+
`evaluateChange()` declines promotion because the caller owns experiment execution.
|
|
121
|
+
|
|
122
|
+
`runRLCampaign()` accepts the same outcome specifications through `outcomeMetrics` when `outcomeStore` is supplied.
|
|
123
|
+
Supply both options together; incomplete or empty declarations fail before campaign execution.
|
|
124
|
+
Its summary reports direction-aligned association and preserves missing estimates.
|
|
125
|
+
The target declaration remains fixed while the campaign runs.
|
|
126
|
+
|
|
127
|
+
The researcher copies its target declaration, rubric list, and cached reports.
|
|
128
|
+
Changing callback arguments, returned reports, or proposal payloads cannot rewrite its cached evidence.
|
|
129
|
+
|
|
130
|
+
## Store observations without losing failures
|
|
131
|
+
|
|
132
|
+
`InMemoryOutcomeStore` and `FileSystemOutcomeStore` copy observations at ingestion and retrieval.
|
|
133
|
+
Changing a caller's metric or label object cannot rewrite stored evidence.
|
|
134
|
+
The filesystem store rereads observations so another instance's later writes remain visible.
|
|
135
|
+
Use one writer per directory; operations on that writer are serialized.
|
|
136
|
+
|
|
137
|
+
A nonexistent directory is an empty store.
|
|
138
|
+
An unreadable file, malformed JSON, or invalid outcome record throws `OutcomeStoreError`.
|
|
139
|
+
The error carries its operation, path, source line when available, and original cause.
|
|
140
|
+
Read errors never become empty studies or partial successful results.
|
|
141
|
+
Repair the source and retry the read.
|
|
142
|
+
|
|
143
|
+
For trace data, `correlationStudy()` accepts outcome names and reports descriptive associations without a desired direction.
|
|
144
|
+
It shares the metric reduction, bootstrap, and exclusion behavior.
|
|
145
|
+
It excludes observations captured before the run started.
|
|
146
|
+
`maxCaptureLagMs` optionally bounds the elapsed time from run start through outcome capture, including both endpoints.
|
|
147
|
+
|
|
148
|
+
## Inspect calibration by score range
|
|
149
|
+
|
|
150
|
+
Use `calibrationFromPairs()` when scores and outcomes are already joined.
|
|
151
|
+
It accepts readonly observations directly.
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
import { calibrationFromPairs } from '@tangle-network/agent-eval/meta-eval'
|
|
155
|
+
|
|
156
|
+
const calibration = calibrationFromPairs([
|
|
157
|
+
{ evalScore: 1, outcome: 0 },
|
|
158
|
+
{ evalScore: 1, outcome: 0 },
|
|
159
|
+
], 'predicted-success', 'observed-success')
|
|
160
|
+
|
|
161
|
+
console.log(calibration?.ece) // 1: confident predictions, observed failures.
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Direct input rejects nonfinite pairs with the offending index.
|
|
165
|
+
It does not silently discard them from the denominator.
|
|
166
|
+
`calibrationCurve()` performs the join for trace and outcome stores using the latest finite observation of the named outcome metric.
|
|
167
|
+
It reports each bin's count, mean score, mean outcome, and absolute gap.
|
|
168
|
+
`ece` weights each bin's gap by its share of the finite joined observations.
|
|
169
|
+
Both quantities must use comparable numerical scales for this difference to measure calibration.
|
|
170
|
+
|
|
171
|
+
The `range` option clips scores before binning and retains every joined observation.
|
|
172
|
+
The reported calibration error then describes the clipped scores; retain that transformation with the result.
|
|
173
|
+
Constant scores form one bin, so a consistently wrong predictor still receives a measured calibration error.
|
|
174
|
+
Equal-frequency binning produces the requested number of bins, capped by the observation count.
|
|
175
|
+
Bin counts differ by at most one, except when all scores share one value.
|
|
176
|
+
Equal-width binning omits empty bins.
|
|
177
|
+
On either path, bin counts sum to the reported `n`.
|
|
178
|
+
|
|
179
|
+
Fewer than two finite pairs returns `null`.
|
|
180
|
+
Both entry points validate metric identities, binning options, and range bounds.
|
|
181
|
+
Invalid requests fail even when no evidence is available.
|
|
182
|
+
The store entry point validates before reading evidence.
|
|
@@ -152,8 +152,7 @@ set with a signed note.
|
|
|
152
152
|
|
|
153
153
|
## Optimization
|
|
154
154
|
|
|
155
|
-
Use `runImprovementLoop()` when
|
|
156
|
-
single prompt.
|
|
155
|
+
Use `runImprovementLoop()` when a `SurfaceProposer` supplies candidates for Agent Eval's search loop.
|
|
157
156
|
|
|
158
157
|
Good optimization targets:
|
|
159
158
|
|
package/docs/public-api.md
CHANGED
|
@@ -7,11 +7,11 @@ Generated by `pnpm api:census` on demand — this is a dated reading, not a gate
|
|
|
7
7
|
| measure | count |
|
|
8
8
|
| --- | --- |
|
|
9
9
|
| export subpaths | 28 |
|
|
10
|
-
| published value exports (subpath x symbol) |
|
|
11
|
-
| distinct symbols |
|
|
10
|
+
| published value exports (subpath x symbol) | 1400 |
|
|
11
|
+
| distinct symbols | 1228 |
|
|
12
12
|
| production | 944 |
|
|
13
|
-
| planned |
|
|
14
|
-
| none |
|
|
13
|
+
| planned | 216 |
|
|
14
|
+
| none | 240 |
|
|
15
15
|
|
|
16
16
|
Type-only exports are not listed: a type binds no runtime surface, and removing one cannot break a caller at run time.
|
|
17
17
|
|
|
@@ -1289,7 +1289,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1289
1289
|
|
|
1290
1290
|
### `./supervisor-run`
|
|
1291
1291
|
|
|
1292
|
-
|
|
1292
|
+
30 value exports — 23 production, 2 planned, 5 none.
|
|
1293
1293
|
|
|
1294
1294
|
| symbol | consumer | evidence |
|
|
1295
1295
|
| --- | --- | --- |
|
|
@@ -1297,17 +1297,14 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1297
1297
|
| `analyzeSupervisorRunIntegrity` | production | discovery-lab:pursuits/final-agent-authored-campaign-20260810/materialize-candidates.mjs |
|
|
1298
1298
|
| `analyzeSupervisorRunSources` | production | discovery-lab:experiments/0005-run-visibility/probe.mjs |
|
|
1299
1299
|
| `claudeCodeSupervisorRunReader` | none | only this package's tests: src/supervisor-run/claude-code-reader.test.ts:6 |
|
|
1300
|
-
| `findSupervisorRunDirIn` | none | only this package's tests: src/supervisor-run/loops-reader.test.ts:11 |
|
|
1301
1300
|
| `findSupervisorRunDirs` | production | traces:src/cli.ts |
|
|
1302
1301
|
| `isRuntimeSupervisorRunDir` | production | discovery-lab:tools/disco.mjs |
|
|
1303
1302
|
| `isUnavailable` | production | discovery-lab:tools/disco.mjs |
|
|
1304
|
-
| `loopsSupervisorRunReader` | planned | named in traces (bind not in the import graph) |
|
|
1305
1303
|
| `NO_SOURCE_LIMITS` | production | traces:src/supervisor-run-context.ts |
|
|
1306
1304
|
| `NO_TERMINAL_RECORD` | none | only this package's tests: src/supervisor-run/terminal-record.test.ts:8 |
|
|
1307
1305
|
| `parsePatch` | planned | named in browser-agent-driver (bind not in the import graph) |
|
|
1308
1306
|
| `parseSupervisorTree` | production | discovery-lab:experiments/0005-run-visibility/probe.mjs |
|
|
1309
1307
|
| `readClaudeCodeSupervisorRun` | none | only this package's tests: src/supervisor-run/claude-code-reader.test.ts:6 |
|
|
1310
|
-
| `readLoopsSupervisorRun` | planned | named in discovery-lab (bind not in the import graph) |
|
|
1311
1308
|
| `readRuntimeSupervisorRun` | production | discovery-lab:pursuits/final-agent-authored-campaign-20260810/materialize-candidates.mjs |
|
|
1312
1309
|
| `readTerminalRecord` | production | this package: src/supervisor-run/analyze.ts:18 |
|
|
1313
1310
|
| `renderSupervisorRollupMarkdown` | production | traces:src/cli.ts |
|
|
@@ -60,14 +60,14 @@ In order: first match wins:
|
|
|
60
60
|
|
|
61
61
|
| Quantity | Function | Source file |
|
|
62
62
|
|---|---|---|
|
|
63
|
-
| Marginal CI on score mean | `confidenceInterval` | `statistics.ts
|
|
64
|
-
| Paired Cohen's dz vs comparator | `pairedCohensDz` | `statistics.ts
|
|
65
|
-
| Wilcoxon signed-rank (paired), exact at n ≤ 20 | `wilcoxonSignedRank` | `statistics.ts
|
|
66
|
-
| BH-FDR q-values | `benjaminiHochberg` | `statistics.ts
|
|
67
|
-
| Paired bootstrap CI on median delta | `pairedBootstrap` | `statistics.ts
|
|
68
|
-
| Smallest p a rank-test design can produce | `pFloor` on the result | `statistics.ts
|
|
63
|
+
| Marginal CI on score mean | `confidenceInterval` | [`descriptive.ts`](../src/statistics/descriptive.ts) |
|
|
64
|
+
| Paired Cohen's dz vs comparator | `pairedCohensDz` | [`effect-sizes.ts`](../src/statistics/effect-sizes.ts) |
|
|
65
|
+
| Wilcoxon signed-rank (paired), exact at n ≤ 20 | `wilcoxonSignedRank` | [`rank-tests.ts`](../src/statistics/rank-tests.ts) |
|
|
66
|
+
| BH-FDR q-values | `benjaminiHochberg` | [`multiplicity.ts`](../src/statistics/multiplicity.ts) |
|
|
67
|
+
| Paired bootstrap CI on median delta | `pairedBootstrap` | [`paired-tests.ts`](../src/statistics/paired-tests.ts) |
|
|
68
|
+
| Smallest p a rank-test design can produce | `pFloor` on the result | [`rank-tests.ts`](../src/statistics/rank-tests.ts) |
|
|
69
69
|
| Bayesian-bootstrap Pr(Δ>0), Pr(Δ∈ROPE) | `bayesianBootstrapMeanSamples` | `summary-report.ts` (private) |
|
|
70
|
-
| Minimum detectable paired effect | `pairedMde` | `statistics.ts
|
|
70
|
+
| Minimum detectable paired effect | `pairedMde` | [`power-and-mde.ts`](../src/statistics/power-and-mde.ts) |
|
|
71
71
|
| Run fingerprint | `hashJson(...)` | `pre-registration.ts` |
|
|
72
72
|
|
|
73
73
|
The Pr(Δ>0) and Pr(Δ∈ROPE) summaries use Rubin's Bayesian bootstrap.
|
|
@@ -222,3 +222,11 @@ Receipts describe measurements; they do not override the release gate or replace
|
|
|
222
222
|
`createCampaignEvidenceReceipt` on `/experiment` provides the same binding for other complete campaign consumers.
|
|
223
223
|
Changing an output changes its output digest; changing a judge result changes its measurement digest.
|
|
224
224
|
The final receipt retains caller authority, including `candidate-self-report`, without upgrading it.
|
|
225
|
+
|
|
226
|
+
## Implementation ownership
|
|
227
|
+
|
|
228
|
+
`src/campaign/search-ledger.ts` owns validation, canonical event normalization, and composition with the shared ledger journal.
|
|
229
|
+
`search-ledger-projector.ts` owns campaign replay invariants and audit projection.
|
|
230
|
+
`search-ledger-types.ts` defines the shared data contracts, reexported through the existing facade.
|
|
231
|
+
`search-ledger-ordering.ts` shares artifact identity and deterministic string ordering between normalization and replay.
|
|
232
|
+
The journal in `src/ledger-core` owns hashing, locking, durable appends, and chain verification.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Statistical evidence
|
|
2
|
+
|
|
3
|
+
Repeated runs measure execution variation on the cases you supplied.
|
|
4
|
+
A claim about new cases also needs independent observations from its target population.
|
|
5
|
+
Repeating one incident 100 times supplies one incident, even when every execution has a distinct identifier.
|
|
6
|
+
|
|
7
|
+
## Declare the independent unit
|
|
8
|
+
|
|
9
|
+
Pass `independentUnitByScenarioId` to `defaultProductionGate`, `heldoutSignificance`, or `dimensionRegressions` when scenarios share a source.
|
|
10
|
+
The map assigns each scenario to the incident, document, task family, or other unit sampled independently.
|
|
11
|
+
Choose this assignment before examining scores.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { defaultProductionGate } from '@tangle-network/agent-eval/campaign'
|
|
15
|
+
|
|
16
|
+
const holdoutScenarios = [
|
|
17
|
+
{ id: 'incident:17:original', kind: 'support' },
|
|
18
|
+
{ id: 'incident:17:paraphrase', kind: 'support' },
|
|
19
|
+
{ id: 'incident:28:original', kind: 'support' },
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
const gate = defaultProductionGate({
|
|
23
|
+
holdoutScenarios,
|
|
24
|
+
independentUnitByScenarioId: new Map([
|
|
25
|
+
['incident:17:original', 'incident-17'],
|
|
26
|
+
['incident:17:paraphrase', 'incident-17'],
|
|
27
|
+
['incident:28:original', 'incident-28'],
|
|
28
|
+
]),
|
|
29
|
+
deltaThreshold: 0.05,
|
|
30
|
+
criticalDimensions: ['factualAccuracy'],
|
|
31
|
+
})
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This example has two independent units and cannot meet its observation minimum.
|
|
35
|
+
More repetitions of these scenarios will not change that count.
|
|
36
|
+
The default gate copies the map when it is constructed.
|
|
37
|
+
Later mutations cannot change the grouping used by that gate.
|
|
38
|
+
|
|
39
|
+
Pairing precedes aggregation.
|
|
40
|
+
Candidate and baseline must contain the same full cell identifiers and the same selected judges within each cell.
|
|
41
|
+
The last numeric suffix identifies a repetition, so colons within scenario identifiers remain valid.
|
|
42
|
+
The implementation averages matched cells within each unit, then gives every unit equal weight.
|
|
43
|
+
It refuses asymmetric cells, asymmetric selected judges, duplicate cells, non-finite scores, and missing unit assignments.
|
|
44
|
+
|
|
45
|
+
Reports distinguish the following counts:
|
|
46
|
+
|
|
47
|
+
| Field | Meaning |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `n` | Paired observation units used for inference |
|
|
50
|
+
| `pairedCellN` | Matched execution cells before grouping |
|
|
51
|
+
| `observationUnit` | `registered` when a supplied map defines units; `cell` on an ungrouped fixed-roster path |
|
|
52
|
+
| `unitIds` | The units represented in a held-out significance result |
|
|
53
|
+
|
|
54
|
+
Without a map, fixed-roster significance uses execution cells as observations.
|
|
55
|
+
Its uncertainty concerns independently sampled execution outcomes conditional on that roster.
|
|
56
|
+
It does not establish generalization to new incidents or task families.
|
|
57
|
+
Identifiers and aggregation do not establish independence; the sampling design must justify it.
|
|
58
|
+
|
|
59
|
+
## Read the interval that decided
|
|
60
|
+
|
|
61
|
+
`heldoutSignificance().decision` contains the test, interval, observation minimum, and promotion decision.
|
|
62
|
+
Pass/fail scores use the shared paired risk-difference rule.
|
|
63
|
+
Continuous scores use the shared paired bootstrap or its small-sample test.
|
|
64
|
+
`bootstrap` and `medianBootstrap` remain diagnostics when another test decides.
|
|
65
|
+
|
|
66
|
+
Continuous mean targets require 20 observations for bootstrap eligibility.
|
|
67
|
+
Below that count, a reported exact sign-test diagnostic cannot establish a mean effect.
|
|
68
|
+
Binary outcomes and explicitly requested median targets use their actual confidence-dependent observation minimum.
|
|
69
|
+
The observation minimum establishes estimator eligibility; it does not establish statistical power or representative sampling.
|
|
70
|
+
A zero-width bootstrap interval cannot establish improvement under the shared decision rule.
|
|
71
|
+
|
|
72
|
+
Required dimensions also need sufficient observations and complete coverage.
|
|
73
|
+
The default gate reports `not_evaluated` when a required dimension lacks enough units or omits matched cells or scenarios.
|
|
74
|
+
`fewRuns`, `missingCellIds`, and `missingScenarioIds` preserve the missing evidence.
|
|
75
|
+
An observed regression can still hold the gate while evidence remains incomplete.
|
|
76
|
+
Passing the regression guard does not certify every safety property of the candidate.
|
|
77
|
+
|
|
78
|
+
## Sequential decisions require a conditional-mean assumption
|
|
79
|
+
|
|
80
|
+
`sequentialPairedGate` consumes one observation per scenario by default in `decide()`.
|
|
81
|
+
Its `independentUnitByScenarioId` option groups related scenarios before testing and copies the mapping at construction.
|
|
82
|
+
`maxN` counts these independent units.
|
|
83
|
+
The report preserves both the consumed count `n` and the available counts `pairedN` and `pairedCellN`.
|
|
84
|
+
|
|
85
|
+
The statistical guarantee requires each next delta's conditional expectation to remain below the registered null boundary.
|
|
86
|
+
Independent sampling with that bound is sufficient.
|
|
87
|
+
Shuffling an exchangeable sequence does not establish the condition.
|
|
88
|
+
One random sign repeated 100 times has only one independent draw.
|
|
89
|
+
After its first observation, later signs reveal no new evidence.
|
|
90
|
+
|
|
91
|
+
Direct `observe(delta)` callers must perform the required aggregation themselves.
|
|
92
|
+
They must also justify the sampling assumption.
|
|
93
|
+
`sequentialDecide` stops candidate exploration heuristically; candidate selection and reused incumbent scores prevent a general type-I error guarantee.
|
|
94
|
+
The selected candidate still requires fresh held-out evidence.
|
|
95
|
+
|
|
96
|
+
## Adaptation comparisons pair whole scenarios
|
|
97
|
+
|
|
98
|
+
`runAdaptationCurve` and `compareAdaptationCurves` are exported from `@tangle-network/agent-eval/rl`.
|
|
99
|
+
Scenarios require explicit, unique `scenarioId` values.
|
|
100
|
+
The runner validates repetitions, the demonstration grid, and finite scores in `[0,1]`.
|
|
101
|
+
|
|
102
|
+
Comparisons require identical scenario cohorts and identical demonstration grids.
|
|
103
|
+
Missing pairs, duplicate identities, and changing cohorts are errors.
|
|
104
|
+
The comparison computes one area per scenario before applying the existing paired estimators.
|
|
105
|
+
This preserves dependence across demonstration counts.
|
|
106
|
+
Repeated executions improve each scenario mean without increasing the number of independent scenarios.
|
|
107
|
+
|
|
108
|
+
`perK` intervals describe the curve.
|
|
109
|
+
The paired area decisions determine `a_better`, `b_better`, `inconclusive`, or `insufficient_evidence`.
|
|
110
|
+
Continuous area outcomes require the bootstrap minimum of 20 paired scenarios.
|
|
111
|
+
Binary area outcomes use the shared score-interval rule and can support a decision with fewer observations.
|
|
112
|
+
The deciding interval must remain nondegenerate.
|
|
113
|
+
`inconclusive` does not establish equivalence.
|
|
114
|
+
`firstPassK` describes the first observed crossing and carries no reliability guarantee.
|
|
115
|
+
|
|
116
|
+
## Perturbation sensitivity is a diagnostic
|
|
117
|
+
|
|
118
|
+
`runContaminationProbe` reports observed score differences and one global Wilcoxon paired test.
|
|
119
|
+
Use `alpha` for that test's significance threshold.
|
|
120
|
+
Per-item differences carry no p-values or q-values because the probe defines no calibrated item-level sampling null.
|
|
121
|
+
|
|
122
|
+
The report retains every observed pair and lists `excludedScenarioIds` when a score floor excludes evidence.
|
|
123
|
+
Summaries describe the included population.
|
|
124
|
+
Fewer than four included pairs produce `pairedTest: null` while preserving measured means and medians.
|
|
125
|
+
Zero included pairs produce null summaries.
|
|
126
|
+
|
|
127
|
+
A significant drop can reflect changed task difficulty, broken perturbations, or contamination.
|
|
128
|
+
`contaminationSuspected` therefore requests investigation; it does not identify the cause.
|
|
129
|
+
The global test also relies on independent pairs and the Wilcoxon assumptions for paired differences.
|
package/docs/verdicts.md
CHANGED
|
@@ -1,67 +1,94 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Verdicts and certifications
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
`DefaultVerdict` is the shared base type for validator results.
|
|
4
|
+
Campaign judges return `JudgeScore`, and release gates return `GateResult`; their fields and score scales differ.
|
|
5
|
+
See [release check results](./concepts.md#release-check-results) when interpreting a campaign decision.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
In `DefaultVerdict`, `valid` reports whether the validator's pass criteria were met, and `score` is its aggregate in [0, 1].
|
|
8
|
+
Optional `scores` and `notes` carry dimensions and explanation.
|
|
9
|
+
Optional `certification` records the verification strategy, checker identity, assumptions, and evidence digest.
|
|
10
|
+
A certification can accompany a failed or incomplete check.
|
|
11
|
+
It does not establish that the result passed or that every required measurement exists.
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
- `checker` — the exact identity that ran, with version and content pins, so the check is re-runnable;
|
|
11
|
-
- `assumptions` — every step the certificate rests on that the checker did NOT verify, named one by one;
|
|
12
|
-
- `evidenceDigest` — sha-256 of the evidence artifact (`certificationEvidenceDigest`).
|
|
13
|
+
The certification fields are:
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
- `strategy`: the [verification strategy](./verification-strategies.md), with its documented failure mode.
|
|
16
|
+
- `checker`: a name, version, and optional dependency pins.
|
|
17
|
+
- `assumptions`: the producer's list of steps the checker did not verify.
|
|
18
|
+
- `evidenceDigest`: the evidence identity; `certificationEvidenceDigest()` hashes its JSON-serialized form with canonical JSON and SHA-256.
|
|
19
|
+
|
|
20
|
+
These fields record the producer's claims.
|
|
21
|
+
Reproduction also requires access to the evidence, checker, dependencies, and execution environment.
|
|
22
|
+
An absent certification means no verification strategy is recorded for that verdict.
|
|
16
23
|
|
|
17
24
|
## Producers
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
These result types extend `DefaultVerdict`.
|
|
27
|
+
Their additional fields distinguish failed checks from incomplete or unmeasured work.
|
|
20
28
|
|
|
21
|
-
|
|
|
29
|
+
| Producer | Result type | Strategy | Scope | Fields to inspect |
|
|
22
30
|
| --- | --- | --- | --- | --- |
|
|
23
|
-
| `MultiLayerVerifier.run
|
|
24
|
-
| `verifyCompletion
|
|
25
|
-
| `evaluateTraceContract
|
|
26
|
-
| `evaluateOracles
|
|
27
|
-
| `replayVerify
|
|
28
|
-
| `verifyFindings
|
|
29
|
-
| `gradeRepairRow
|
|
30
|
-
| `
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- `
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
| `MultiLayerVerifier.run()` | `VerificationReport` | `composite` | Ordered verification layers | `layers`, `allPass`, and optional `taskScore` |
|
|
32
|
+
| `verifyCompletion()` | `CompletionVerdict` | The supplied checker's strategy | Completion requirements matched against produced state | Requirement evidence, `correct`, and `unmeasured` |
|
|
33
|
+
| `evaluateTraceContract()` | `ContractVerdict` | `invariant` | Temporal rules over recorded spans | Rule results and assumptions about ordering and predicates |
|
|
34
|
+
| `evaluateOracles()` | `OracleReport` | `test` | Declared expected-outcome assertions | `results`, `passCount`, and `failCount` |
|
|
35
|
+
| `replayVerify()` | `ReplayVerdict` | `replication` | Failure reproduction and an optional fix under re-execution | Prefix fidelity, signature matches, and both execution arms |
|
|
36
|
+
| `verifyFindings()` | `VerifyFindingsRun` | `replication` | Analyst findings checked through replay | `executions`, `counts`, and individual verifications |
|
|
37
|
+
| `gradeRepairRow()` | `RepairRowResult` | `test` | A repair against the admitted row's held-out suite | The grade's outcome and funnel evidence |
|
|
38
|
+
| `equivalenceVerdict(record)` | `DefaultVerdict` | The record's strategy | Formal-statement equivalence checked by `runEquivalenceCheck()` | Whether the obligation was proved, refuted, or unresolved |
|
|
39
|
+
|
|
40
|
+
Certification is conditional for several producers:
|
|
41
|
+
|
|
42
|
+
- `verifyCompletion()` includes it when the supplied checker provides an attestation.
|
|
43
|
+
Inspect requirement evidence to see which checks were assessed.
|
|
44
|
+
- `equivalenceVerdict()` includes it for a proved or refuted obligation with an evidence digest.
|
|
45
|
+
A certified refutation has `valid: false`.
|
|
46
|
+
- `gradeRepairRow()` includes it only for a `measured` grade.
|
|
47
|
+
- `verifyFindings()` includes it only when at least one replay execution ran.
|
|
48
|
+
Non-replayable findings remain in `counts` and are excluded from the score's denominator.
|
|
49
|
+
A score of 1 can therefore coexist with `valid: false` when some findings were not replayable.
|
|
50
|
+
|
|
51
|
+
Some result shapes use `score: 0` when no task measurement is available.
|
|
52
|
+
For `VerificationReport`, use the presence of `taskScore` to identify a complete task measurement; `blendedScore` can describe a partial panel.
|
|
53
|
+
An empty oracle set has certification metadata but returns `valid: false` and no executed oracle results.
|
|
54
|
+
Read these completeness fields before using scores as task labels or release evidence.
|
|
55
|
+
|
|
56
|
+
## Reading a score from a model judge
|
|
57
|
+
|
|
58
|
+
A tied dimension score supplies no ordering between candidates.
|
|
59
|
+
`llmJudge({ scoring })` controls how the dimension score is read:
|
|
60
|
+
|
|
61
|
+
| `scoring` | Measurement | Requirement |
|
|
44
62
|
|---|---|---|
|
|
45
|
-
| `{ method: 'sampled' }` (default) |
|
|
46
|
-
| `{ method: 'expectation', whenUnavailable }` |
|
|
47
|
-
|
|
48
|
-
Expectation scoring asks the provider for `logprobs` with `top_logprobs`, finds the token that carried each dimension's grade, and averages the integer grades in that token's probability window, weighted by probability. Two answers that both sample `8` separate by how much mass sat on `7` versus `9`.
|
|
63
|
+
| `{ method: 'sampled' }` (default) | The emitted grade | A valid grade response |
|
|
64
|
+
| `{ method: 'expectation', whenUnavailable }` | A probability-weighted grade from returned token alternatives | `scale: 'ten'` and provider log probabilities |
|
|
49
65
|
|
|
50
|
-
|
|
66
|
+
With `scale: 'ten'`, the model emits grades from 0 to 10; `llmJudge()` divides them by 10 before returning dimensions and composite.
|
|
67
|
+
Expectation scoring finds each grade's token, keeps valid integer alternatives, and renormalizes their returned probabilities before averaging.
|
|
68
|
+
Its distribution is limited to those returned alternatives.
|
|
69
|
+
Additional precision alone does not establish better calibration or ranking accuracy.
|
|
51
70
|
|
|
52
|
-
|
|
71
|
+
Each emitted grade must occupy one integer token for expectation scoring.
|
|
72
|
+
A split `10`, missing grade token, or unavailable log probabilities invokes `whenUnavailable`:
|
|
53
73
|
|
|
54
|
-
- `'fail'` throws
|
|
55
|
-
- `'sampled'`
|
|
74
|
+
- `'fail'` throws; the campaign records a judge failure.
|
|
75
|
+
- `'sampled'` uses the emitted grades for that judge result.
|
|
56
76
|
|
|
57
|
-
`JudgeScore.scoringMethod`
|
|
77
|
+
`JudgeScore.scoringMethod` is present when `scoring` was explicitly configured and records the method used.
|
|
78
|
+
An expectation request that falls back reports `'sampled'`.
|
|
79
|
+
When `scoring` is omitted, sampled scoring is the default and this metadata field is absent.
|
|
80
|
+
`JudgeScore.distribution` is present only for expectation scoring and contains the normalized probabilities over returned integer alternatives.
|
|
81
|
+
`ensembleJudge()` consumes the resulting composite through its usual interface.
|
|
58
82
|
|
|
59
|
-
|
|
83
|
+
Provider and model support determines whether log probabilities are available.
|
|
84
|
+
`LlmCallResult.logprobs` is `null` when none were returned.
|
|
85
|
+
The [recorded wire check](../evidence/records/judge-logprob-wire-support.json) documents the endpoints and conditions that were inspected.
|
|
60
86
|
|
|
61
|
-
##
|
|
87
|
+
## Interpreting certification limits
|
|
62
88
|
|
|
63
|
-
Read `
|
|
64
|
-
|
|
65
|
-
|
|
89
|
+
Read `VERIFICATION_STRATEGIES[strategy].failureMode` alongside the evidence and assumptions.
|
|
90
|
+
A judge can reward misleading output; tests cover their suite; a proof can establish the wrong formal statement for the intended task.
|
|
91
|
+
A composite certification requires inspection of its component results.
|
|
92
|
+
An empty assumptions list is the producer's declaration, not independent verification that no assumptions remain.
|
|
66
93
|
|
|
67
|
-
|
|
94
|
+
See [verification strategies](./verification-strategies.md), [repair grading](./trace-repair-grader.md), and [trajectory replay](./trajectory-replay.md) for the corresponding execution contracts.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-eval",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.182.0",
|
|
4
4
|
"description": "Evaluate and improve AI agents from runs, traces, judges, and feedback. Compare candidates, cluster failures, measure lift, and gate releases.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-eval#readme",
|
|
6
6
|
"repository": {
|