@tangle-network/agent-eval 0.220.2 → 0.221.1
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 +64 -0
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-D01Io2Xw.d.ts → agent-profile-Bc7ADJY4.d.ts} +2 -2
- package/dist/{agent-profile-D01Io2Xw.d.ts.map → agent-profile-Bc7ADJY4.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +77 -78
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +204 -25
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-DqPJaJ4X.js → analyze-runs-CHmsykNJ.js} +4 -4
- package/dist/{analyze-runs-DqPJaJ4X.js.map → analyze-runs-CHmsykNJ.js.map} +1 -1
- package/dist/{analyze-runs-BWAHBDAw.d.ts → analyze-runs-D7In4c3z.d.ts} +2 -2
- package/dist/{analyze-runs-BWAHBDAw.d.ts.map → analyze-runs-D7In4c3z.d.ts.map} +1 -1
- package/dist/{benchmark-command-Dx0E4a6z.js → benchmark-command-DiGqnGUt.js} +13 -11
- package/dist/benchmark-command-DiGqnGUt.js.map +1 -0
- package/dist/benchmarks/index.d.ts +4 -4
- package/dist/benchmarks/index.js +3 -3
- package/dist/calibration-CTwxpJ-t.js +197 -0
- package/dist/calibration-CTwxpJ-t.js.map +1 -0
- package/dist/campaign/index.d.ts +6 -6
- package/dist/campaign/index.js +5 -5
- package/dist/{campaign-BVPC6ODQ.js → campaign-Bt6rbWIU.js} +9 -8
- package/dist/{campaign-BVPC6ODQ.js.map → campaign-Bt6rbWIU.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/{completion-verifier-Cigap8CG.js → completion-verifier-YwoeujPl.js} +2 -2
- package/dist/completion-verifier-YwoeujPl.js.map +1 -0
- package/dist/contract/index.d.ts +10 -10
- package/dist/contract/index.js +7 -7
- package/dist/decision-point-Co3u3W8k.js +831 -0
- package/dist/decision-point-Co3u3W8k.js.map +1 -0
- package/dist/default-registry-BMHqNR6_.d.ts +257 -0
- package/dist/default-registry-BMHqNR6_.d.ts.map +1 -0
- package/dist/{default-registry-ovrIBGmH.js → default-registry-BbFCkqvB.js} +607 -14
- package/dist/default-registry-BbFCkqvB.js.map +1 -0
- package/dist/{define-agent-eval-C2nFhHPu.d.ts → define-agent-eval-Bsoi2GUV.d.ts} +7 -7
- package/dist/{define-agent-eval-C2nFhHPu.d.ts.map → define-agent-eval-Bsoi2GUV.d.ts.map} +1 -1
- package/dist/{define-agent-eval-UQY3VbJ2.js → define-agent-eval-CJhECJNL.js} +4 -4
- package/dist/{define-agent-eval-UQY3VbJ2.js.map → define-agent-eval-CJhECJNL.js.map} +1 -1
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/diagnosis/index.js +1 -1
- package/dist/{dspy-rlm-engine-Bn_Mt_LW.js → dspy-rlm-engine-BTy7u0jQ.js} +3 -3
- package/dist/{dspy-rlm-engine-Bn_Mt_LW.js.map → dspy-rlm-engine-BTy7u0jQ.js.map} +1 -1
- package/dist/{engine-BpGGw6cd.d.ts → engine-BF95CWzH.d.ts} +2 -2
- package/dist/{engine-BpGGw6cd.d.ts.map → engine-BF95CWzH.d.ts.map} +1 -1
- package/dist/{eval-campaign-BUMIxKTE.js → eval-campaign-DoX5vz3E.js} +2 -2
- package/dist/{eval-campaign-BUMIxKTE.js.map → eval-campaign-DoX5vz3E.js.map} +1 -1
- package/dist/{evaluation-CBdQt_kr.d.ts → evaluation-D1PGzkPR.d.ts} +3 -3
- package/dist/{evaluation-CBdQt_kr.d.ts.map → evaluation-D1PGzkPR.d.ts.map} +1 -1
- package/dist/evaluation-wdGyZ7jV.js +147 -0
- package/dist/evaluation-wdGyZ7jV.js.map +1 -0
- package/dist/evaluation.d.ts +1 -1
- package/dist/evaluation.js +1 -136
- package/dist/{exact-types-BYFmYq44.d.ts → exact-types-CVn1QxFO.d.ts} +2 -2
- package/dist/{exact-types-BYFmYq44.d.ts.map → exact-types-CVn1QxFO.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +3 -3
- package/dist/experiment/index.js +2 -2
- package/dist/{external-optimizer-process-wOLfzsCC.js → external-optimizer-process-E5yY2SYS.js} +2 -2
- package/dist/{external-optimizer-process-wOLfzsCC.js.map → external-optimizer-process-E5yY2SYS.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-D670Oxf2.js → external-optimizer-subprocess-DA02c_L6.js} +12 -19
- package/dist/{external-optimizer-subprocess-D670Oxf2.js.map → external-optimizer-subprocess-DA02c_L6.js.map} +1 -1
- package/dist/{feedback-trajectory-DhB9WzYg.d.ts → feedback-trajectory-BZhVCWuz.d.ts} +3 -3
- package/dist/{feedback-trajectory-DhB9WzYg.d.ts.map → feedback-trajectory-BZhVCWuz.d.ts.map} +1 -1
- package/dist/finding-composition-8n0fFgVI.js +131 -0
- package/dist/finding-composition-8n0fFgVI.js.map +1 -0
- package/dist/{findings-store-CvNo712L.js → findings-store-DRiFdoid.js} +4 -4
- package/dist/{findings-store-CvNo712L.js.map → findings-store-DRiFdoid.js.map} +1 -1
- package/dist/{index-CVFStrQD.d.ts → index-BJZ7s-sv.d.ts} +7 -58
- package/dist/index-BJZ7s-sv.d.ts.map +1 -0
- package/dist/{index-Q6DvdcwI.d.ts → index-BvX3CFNS.d.ts} +6 -6
- package/dist/{index-Q6DvdcwI.d.ts.map → index-BvX3CFNS.d.ts.map} +1 -1
- package/dist/index-DWd1gUwR.d.ts +1086 -0
- package/dist/index-DWd1gUwR.d.ts.map +1 -0
- package/dist/{index-DAXfpVf7.d.ts → index-y7i8l6Y_.d.ts} +8 -8
- package/dist/{index-DAXfpVf7.d.ts.map → index-y7i8l6Y_.d.ts.map} +1 -1
- package/dist/index.d.ts +18 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -15
- package/dist/{kind-factory-BhxbtUsQ.js → kind-factory-Dl0PmNQL.js} +2 -2
- package/dist/{kind-factory-BhxbtUsQ.js.map → kind-factory-Dl0PmNQL.js.map} +1 -1
- package/dist/{llm-judge-Cc8vDJh_.js → llm-judge-3uAeRawE.js} +4 -4
- package/dist/{llm-judge-Cc8vDJh_.js.map → llm-judge-3uAeRawE.js.map} +1 -1
- package/dist/{matrix-Cf-AGxGh.d.ts → matrix-BXo3PSqM.d.ts} +2 -2
- package/dist/{matrix-Cf-AGxGh.d.ts.map → matrix-BXo3PSqM.d.ts.map} +1 -1
- package/dist/meta-eval/index.d.ts +3 -638
- package/dist/meta-eval/index.js +3 -193
- package/dist/meta-eval/index.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-observations-FLmRpgYa.js +78 -0
- package/dist/outcome-observations-FLmRpgYa.js.map +1 -0
- package/dist/{paired-arms-Ct4LTKc1.js → paired-arms-B2ttLc0_.js} +108 -31
- package/dist/paired-arms-B2ttLc0_.js.map +1 -0
- package/dist/{power-and-mde-N5nU4_Ly.js → power-and-mde-CQX-0weG.js} +2 -2
- package/dist/{power-and-mde-N5nU4_Ly.js.map → power-and-mde-CQX-0weG.js.map} +1 -1
- package/dist/{prime-protocol-CckHBxGu.d.ts → prime-protocol-BEaqBoQE.d.ts} +2 -2
- package/dist/{prime-protocol-CckHBxGu.d.ts.map → prime-protocol-BEaqBoQE.d.ts.map} +1 -1
- package/dist/{proposal-findings-E1aSC_cU.js → proposal-findings-D0_zkQ2l.js} +2 -2
- package/dist/{proposal-findings-E1aSC_cU.js.map → proposal-findings-D0_zkQ2l.js.map} +1 -1
- package/dist/{registry-B_yG-1jh.d.ts → registry-DDKaUrmM.d.ts} +3 -3
- package/dist/{registry-B_yG-1jh.d.ts.map → registry-DDKaUrmM.d.ts.map} +1 -1
- package/dist/reporting.d.ts +1 -1
- package/dist/reporting.js +3 -3
- package/dist/rl.d.ts +4 -5
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +5 -4
- package/dist/rl.js.map +1 -1
- package/dist/{rubric-predictive-validity-noY7uE03.d.ts → rubric-predictive-validity-Cd5SCtAf.d.ts} +58 -3
- package/dist/rubric-predictive-validity-Cd5SCtAf.d.ts.map +1 -0
- package/dist/{rubric-predictive-validity-D3_oI72N.js → rubric-predictive-validity-CeKW2GQN.js} +3 -77
- package/dist/rubric-predictive-validity-CeKW2GQN.js.map +1 -0
- package/dist/search/index.d.ts +2 -2
- package/dist/{search-kernel-Dloxd6gs.d.ts → search-kernel-C6__V0IS.d.ts} +2 -2
- package/dist/{search-kernel-Dloxd6gs.d.ts.map → search-kernel-C6__V0IS.d.ts.map} +1 -1
- package/dist/{skillopt-optimization-method-DLKqdhcR.js → skillopt-optimization-method-D21dH_Bh.js} +4 -4
- package/dist/{skillopt-optimization-method-DLKqdhcR.js.map → skillopt-optimization-method-D21dH_Bh.js.map} +1 -1
- package/dist/{statistical-heldout-3z3I-kJN.d.ts → statistical-heldout-pD1Yah-0.d.ts} +58 -8
- package/dist/statistical-heldout-pD1Yah-0.d.ts.map +1 -0
- package/dist/{store-otlp-dyWE3wAG.js → store-otlp-BVZfR168.js} +2 -2
- package/dist/{store-otlp-dyWE3wAG.js.map → store-otlp-BVZfR168.js.map} +1 -1
- package/dist/{store-tool-spans-DIUgZbzu.js → store-tool-spans-CjYiF4fF.js} +3 -3
- package/dist/{store-tool-spans-DIUgZbzu.js.map → store-tool-spans-CjYiF4fF.js.map} +1 -1
- package/dist/{store-tool-spans-DPwXHQkH.d.ts → store-tool-spans-DfnwWMFR.d.ts} +4 -4
- package/dist/{store-tool-spans-DPwXHQkH.d.ts.map → store-tool-spans-DfnwWMFR.d.ts.map} +1 -1
- package/dist/{summary-report-BsXJoYX5.js → summary-report-DHDWxe6p.js} +3 -3
- package/dist/{summary-report-BsXJoYX5.js.map → summary-report-DHDWxe6p.js.map} +1 -1
- package/dist/systemone-D3MrW63C.d.ts +400 -0
- package/dist/systemone-D3MrW63C.d.ts.map +1 -0
- package/dist/{systemone-protocol-DKoi1NdK.d.ts → systemone-protocol-Bl2EI2KQ.d.ts} +4 -2
- package/dist/{systemone-protocol-DKoi1NdK.d.ts.map → systemone-protocol-Bl2EI2KQ.d.ts.map} +1 -1
- package/dist/systemone-protocol.d.ts +2 -2
- package/dist/systemone-protocol.js +7 -7
- package/dist/systemone-protocol.js.map +1 -1
- package/dist/{systemone-review-CUBMuTLi.d.ts → systemone-review-C8DRiT_-.d.ts} +3 -3
- package/dist/{systemone-review-CUBMuTLi.d.ts.map → systemone-review-C8DRiT_-.d.ts.map} +1 -1
- package/dist/{systemone-review-DzdOJ8I6.js → systemone-review-DFGtIUcf.js} +2 -2
- package/dist/{systemone-review-DzdOJ8I6.js.map → systemone-review-DFGtIUcf.js.map} +1 -1
- package/dist/systemone.d.ts +5 -5
- package/dist/systemone.js +5 -343
- package/dist/{tool-groups-LISbBWCg.d.ts → tool-groups-DK1bu5TD.d.ts} +3 -3
- package/dist/tool-groups-DK1bu5TD.d.ts.map +1 -0
- package/dist/{trace-questions-C42fYEE4.d.ts → trace-questions-D_OKYZ6u.d.ts} +3 -3
- package/dist/{trace-questions-C42fYEE4.d.ts.map → trace-questions-D_OKYZ6u.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +1 -1
- package/dist/traces.d.ts +3 -3
- package/dist/traces.js +3 -3
- package/dist/{types-DqFMNTgK.js → types-CnWmj8NW.js} +19 -6
- package/dist/types-CnWmj8NW.js.map +1 -0
- package/dist/{types-CHfn1zg5.d.ts → types-DDKfH-N6.d.ts} +2 -2
- package/dist/{types-CHfn1zg5.d.ts.map → types-DDKfH-N6.d.ts.map} +1 -1
- package/dist/{types-8yQzNm8u.d.ts → types-DGImvHIr.d.ts} +150 -4
- package/dist/types-DGImvHIr.d.ts.map +1 -0
- package/dist/{types-D8GXK9Z5.d.ts → types-IERw_HxR.d.ts} +2 -2
- package/dist/{types-D8GXK9Z5.d.ts.map → types-IERw_HxR.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +1 -1
- package/docs/behavioral-trace-questions.md +99 -0
- package/docs/experiment.md +27 -0
- package/docs/finding-layers.md +54 -1
- package/docs/systemone.md +107 -0
- package/package.json +4 -4
- package/dist/benchmark-command-Dx0E4a6z.js.map +0 -1
- package/dist/completion-verifier-Cigap8CG.js.map +0 -1
- package/dist/default-registry-Cwg_QN3d.d.ts +0 -70
- package/dist/default-registry-Cwg_QN3d.d.ts.map +0 -1
- package/dist/default-registry-ovrIBGmH.js.map +0 -1
- package/dist/evaluation.js.map +0 -1
- package/dist/index-CVFStrQD.d.ts.map +0 -1
- package/dist/judge-gate-Dc_mXQsL.d.ts +0 -453
- package/dist/judge-gate-Dc_mXQsL.d.ts.map +0 -1
- package/dist/meta-eval/index.d.ts.map +0 -1
- package/dist/outcome-store-CNt4iZ67.d.ts +0 -58
- package/dist/outcome-store-CNt4iZ67.d.ts.map +0 -1
- package/dist/paired-arms-Ct4LTKc1.js.map +0 -1
- package/dist/rubric-predictive-validity-D3_oI72N.js.map +0 -1
- package/dist/rubric-predictive-validity-noY7uE03.d.ts.map +0 -1
- package/dist/statistical-heldout-3z3I-kJN.d.ts.map +0 -1
- package/dist/systemone-DVA7t76V.d.ts +0 -135
- package/dist/systemone-DVA7t76V.d.ts.map +0 -1
- package/dist/systemone.js.map +0 -1
- package/dist/tool-groups-LISbBWCg.d.ts.map +0 -1
- package/dist/types-8yQzNm8u.d.ts.map +0 -1
- package/dist/types-DqFMNTgK.js.map +0 -1
|
@@ -1,639 +1,4 @@
|
|
|
1
|
-
import { f as Run } from "../schema-D6EVKzTB.js";
|
|
2
1
|
import { a as ContinuousCalibrationResult, c as SelfPreferenceResult, d as calibrateJudgeContinuous, f as continuousAgreement, h as verbosityBias, i as ContinuousAgreementOptions, l as VerbosityBiasResult, m as selfPreference, n as CandidateScore, o as GoldenItem, p as positionalBias, r as ContinuousAgreement, s as PositionalBiasResult, t as CalibrationResult, u as calibrateJudge } from "../judge-calibration-DFtEMlde.js";
|
|
3
|
-
import { A as
|
|
4
|
-
import { r as
|
|
5
|
-
|
|
6
|
-
import { a as OutcomeFilter, i as InMemoryOutcomeStore, n as FileSystemOutcomeStore, o as OutcomeStore, r as FileSystemOutcomeStoreOptions, s as OutcomeStoreError, t as DeploymentOutcome } from "../outcome-store-CNt4iZ67.js";
|
|
7
|
-
import { t as ComputedInterval } from "../interval-ohuOJurX.js";
|
|
8
|
-
import { a as RubricPredictiveValidityReport, c as CorrelationInterval, i as RubricPredictiveValidityInput, l as OutcomeReduction, n as RubricOutcomeExclusion, o as RubricRanking, r as RubricOutcomePair, s as rubricPredictiveValidity, t as OutcomeMetricSpec } from "../rubric-predictive-validity-noY7uE03.js";
|
|
9
|
-
import { z } from "zod";
|
|
10
|
-
//#region src/meta-eval/correlation-study.d.ts
|
|
11
|
-
export interface EvalMetricSpec {
|
|
12
|
-
id: string;
|
|
13
|
-
/** Extract a scalar from a run. Omit it and `id` must name one of
|
|
14
|
-
* `RUN_METRICS`; any other `id` is refused. */
|
|
15
|
-
extract?: (run: Run, store: TraceStore) => Promise<number | null>;
|
|
16
|
-
}
|
|
17
|
-
export interface OutcomePair {
|
|
18
|
-
evalMetric: string;
|
|
19
|
-
outcomeMetric: string;
|
|
20
|
-
}
|
|
21
|
-
export interface CorrelationResult {
|
|
22
|
-
evalMetric: string;
|
|
23
|
-
outcomeMetric: string;
|
|
24
|
-
n: number;
|
|
25
|
-
pearson: number;
|
|
26
|
-
spearman: number;
|
|
27
|
-
/** 95% bootstrap CI for Pearson. */
|
|
28
|
-
pearsonCi95: {
|
|
29
|
-
lower: number;
|
|
30
|
-
upper: number;
|
|
31
|
-
} | null;
|
|
32
|
-
/** 95% bootstrap CI for Spearman; null when no resample is estimable. */
|
|
33
|
-
spearmanCi95: {
|
|
34
|
-
lower: number;
|
|
35
|
-
upper: number;
|
|
36
|
-
} | null;
|
|
37
|
-
/** Rough verdict: 'strong' ≥ 0.7, 'moderate' ≥ 0.4, else 'weak'. */
|
|
38
|
-
verdict: 'strong' | 'moderate' | 'weak';
|
|
39
|
-
}
|
|
40
|
-
export interface CorrelationStudyResult {
|
|
41
|
-
pairs: CorrelationResult[];
|
|
42
|
-
/** Declared pairs without an estimable correlation, including their usable sample count. */
|
|
43
|
-
excludedPairs: Array<OutcomePair & {
|
|
44
|
-
n: number;
|
|
45
|
-
reason: 'insufficient_samples' | 'constant_eval_metric' | 'constant_outcome';
|
|
46
|
-
}>;
|
|
47
|
-
joinedSamples: number;
|
|
48
|
-
skippedRuns: number;
|
|
49
|
-
}
|
|
50
|
-
export interface CorrelationStudyOptions {
|
|
51
|
-
/** Only join outcomes captured within this window after run.startedAt. */
|
|
52
|
-
maxCaptureLagMs?: number;
|
|
53
|
-
/** Restrict to a subset of outcomes (cohort, region, source). */
|
|
54
|
-
outcomeFilter?: OutcomeFilter;
|
|
55
|
-
/** Which outcome per run to use when multiple exist. Default 'latest'. */
|
|
56
|
-
reduction?: 'latest' | 'mean' | 'max';
|
|
57
|
-
/** Bootstrap iterations for the CI. Default 500. */
|
|
58
|
-
bootstrapIterations?: number;
|
|
59
|
-
/** Seed for the bootstrap resampler. Absent, the seed is derived from the
|
|
60
|
-
* paired observations, so the same study reproduces the same interval. */
|
|
61
|
-
seed?: number;
|
|
62
|
-
}
|
|
63
|
-
export declare function correlationStudy(traceStore: TraceStore, outcomeStore: OutcomeStore, evalMetrics: EvalMetricSpec[], outcomeMetricNames: string[], options?: CorrelationStudyOptions): Promise<CorrelationStudyResult>;
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region src/meta-eval/calibration.d.ts
|
|
66
|
-
export interface CalibrationBin {
|
|
67
|
-
lower: number;
|
|
68
|
-
upper: number;
|
|
69
|
-
n: number;
|
|
70
|
-
evalMean: number;
|
|
71
|
-
outcomeMean: number;
|
|
72
|
-
/** |outcomeMean − evalMean|; contributes to ECE weighted by n/total. */
|
|
73
|
-
gap: number;
|
|
74
|
-
}
|
|
75
|
-
export interface CalibrationReport {
|
|
76
|
-
evalMetric: string;
|
|
77
|
-
outcomeMetric: string;
|
|
78
|
-
n: number;
|
|
79
|
-
bins: CalibrationBin[];
|
|
80
|
-
/** Expected Calibration Error — Σ (n_i/N) × |outcomeMean_i − evalMean_i|. */
|
|
81
|
-
ece: number;
|
|
82
|
-
/** Largest observed difference between a bin's mean score and mean outcome. */
|
|
83
|
-
maxGap: number;
|
|
84
|
-
}
|
|
85
|
-
export interface CalibrationOptions {
|
|
86
|
-
/** Positive integer; empty bins are omitted. Default 10. */
|
|
87
|
-
bins?: number;
|
|
88
|
-
/** Equal-width (fixed bin edges) or equal-frequency (quantile bins). */
|
|
89
|
-
binning?: 'equal-width' | 'equal-frequency';
|
|
90
|
-
/** Clip eval values to [lo, hi] before binning. */
|
|
91
|
-
range?: {
|
|
92
|
-
lo: number;
|
|
93
|
-
hi: number;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
export interface CalibrationPair {
|
|
97
|
-
evalScore: number;
|
|
98
|
-
outcome: number;
|
|
99
|
-
}
|
|
100
|
-
export declare function calibrationCurve(traceStore: TraceStore, outcomeStore: OutcomeStore, evalMetric: EvalMetricSpec, outcomeMetric: string, options?: CalibrationOptions): Promise<CalibrationReport | null>;
|
|
101
|
-
/** Measure already joined observations without constructing trace and outcome stores. */
|
|
102
|
-
export declare function calibrationFromPairs(inputPairs: readonly CalibrationPair[], evalMetric: string, outcomeMetric: string, options?: CalibrationOptions): CalibrationReport | null;
|
|
103
|
-
/**
|
|
104
|
-
* Mean squared error of probability forecasts against binary outcomes, Σ(p − y)²/N; always
|
|
105
|
-
* forecasting 0.5 scores 0.25. For the reliability table and ECE use `calibrationFromPairs`
|
|
106
|
-
* with `range: { lo: 0, hi: 1 }` (`binning: 'equal-frequency'` gives equal-mass bins).
|
|
107
|
-
*/
|
|
108
|
-
export declare function brierScore(pairs: readonly CalibrationPair[]): number;
|
|
109
|
-
/** One categorical forecast: a distribution over named outcomes and the outcome that occurred. */
|
|
110
|
-
export interface CategoricalForecast {
|
|
111
|
-
/** Probability per outcome name. Must sum to 1 within 1e-6 and include `outcome`. */
|
|
112
|
-
probabilities: Readonly<Record<string, number>>;
|
|
113
|
-
outcome: string;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Multiclass Brier score in its sum form, mean over forecasts of Σₖ(pₖ − yₖ)², range [0, 2].
|
|
117
|
-
* With two outcomes it is twice the binary `brierScore`. A uniform forecast over K outcomes
|
|
118
|
-
* scores 1 − 1/K. The distribution is not renormalized here: repair provider rounding before
|
|
119
|
-
* scoring (`normalizeSystemOneResult` in `/systemone/protocol`), so a defective answer stays
|
|
120
|
-
* visible instead of being scored as if it were valid.
|
|
121
|
-
*/
|
|
122
|
-
export declare function multiclassBrierScore(forecasts: readonly CategoricalForecast[]): number;
|
|
123
|
-
/** One ordinal forecast: probabilities in level order, lowest level first. */
|
|
124
|
-
export interface OrdinalForecast {
|
|
125
|
-
probabilities: readonly number[];
|
|
126
|
-
/** Index into `probabilities` of the level that occurred. */
|
|
127
|
-
outcome: number;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Ranked probability score, mean over forecasts of Σₖ₌₁ᴷ⁻¹(Fₖ − Oₖ)² / (K − 1), where F and O are
|
|
131
|
-
* the cumulative forecast and observation, range [0, 1]. Unlike multiclass Brier it charges
|
|
132
|
-
* less for mass on a level next to the outcome than for mass far from it, which is the right
|
|
133
|
-
* penalty for score questions. With two levels it equals the binary Brier score.
|
|
134
|
-
*/
|
|
135
|
-
export declare function rankedProbabilityScore(forecasts: readonly OrdinalForecast[]): number;
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/meta-eval/cluster-bootstrap.d.ts
|
|
138
|
-
/** One observation and the source cluster it belongs to. */
|
|
139
|
-
export interface ClusteredObservation {
|
|
140
|
-
cluster: string;
|
|
141
|
-
value: number;
|
|
142
|
-
}
|
|
143
|
-
export interface ClusterBootstrapOptions {
|
|
144
|
-
/** Confidence level. Default 0.95. */
|
|
145
|
-
confidence?: number;
|
|
146
|
-
/** Bootstrap resample count. Default 2000. */
|
|
147
|
-
resamples?: number;
|
|
148
|
-
/** Deterministic seed. If omitted, derived from the values so the interval is reproducible. */
|
|
149
|
-
seed?: number;
|
|
150
|
-
}
|
|
151
|
-
export interface ClusterBootstrapResult {
|
|
152
|
-
n: number;
|
|
153
|
-
clusters: number;
|
|
154
|
-
/** Mean over observations, each observation weighted equally. */
|
|
155
|
-
mean: number;
|
|
156
|
-
low: number;
|
|
157
|
-
high: number;
|
|
158
|
-
confidence: number;
|
|
159
|
-
resamples: number;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Percentile cluster bootstrap of an observation mean. Whole clusters are resampled with
|
|
163
|
-
* replacement and each resample's statistic is Σ values / Σ observations over the drawn
|
|
164
|
-
* clusters, so observations that share a source move together and a large cluster cannot
|
|
165
|
-
* pose as many independent results. For a paired comparison pass the per-observation
|
|
166
|
-
* difference (candidate − baseline) under the observation's cluster.
|
|
167
|
-
*
|
|
168
|
-
* With one cluster the interval collapses to the point estimate: there is no between-cluster
|
|
169
|
-
* spread to measure, which callers must treat as no interval, not as certainty.
|
|
170
|
-
*/
|
|
171
|
-
export declare function clusterBootstrapMean(observations: readonly ClusteredObservation[], options?: ClusterBootstrapOptions): ClusterBootstrapResult;
|
|
172
|
-
//#endregion
|
|
173
|
-
//#region src/meta-eval/evaluator-admission.d.ts
|
|
174
|
-
export declare const evaluatorAdmissionPolicySchema: z.ZodObject<{
|
|
175
|
-
confidence: z.ZodNumber;
|
|
176
|
-
maxFalseAcceptanceRate: z.ZodNumber;
|
|
177
|
-
maxFalseRejectionRate: z.ZodNumber;
|
|
178
|
-
}, z.core.$strict>;
|
|
179
|
-
/** Register both error limits before inspecting audit judgments. */
|
|
180
|
-
type EvaluatorAdmissionPolicy = z.infer<typeof evaluatorAdmissionPolicySchema>;
|
|
181
|
-
export declare const evaluatorAuditObservationSchema: z.ZodObject<{
|
|
182
|
-
id: z.ZodString;
|
|
183
|
-
independentUnitId: z.ZodString;
|
|
184
|
-
evidenceRef: z.ZodString;
|
|
185
|
-
expected: z.ZodEnum<{
|
|
186
|
-
accept: "accept";
|
|
187
|
-
reject: "reject";
|
|
188
|
-
}>;
|
|
189
|
-
observed: z.ZodEnum<{
|
|
190
|
-
accept: "accept";
|
|
191
|
-
reject: "reject";
|
|
192
|
-
unknown: "unknown";
|
|
193
|
-
}>;
|
|
194
|
-
exposure: z.ZodEnum<{
|
|
195
|
-
development: "development";
|
|
196
|
-
fresh: "fresh";
|
|
197
|
-
}>;
|
|
198
|
-
}, z.core.$strict>;
|
|
199
|
-
/** Actual control judgments. Variants from one source retain one independent identity. */
|
|
200
|
-
type EvaluatorAuditObservation = z.infer<typeof evaluatorAuditObservationSchema>;
|
|
201
|
-
declare const inputSchema: z.ZodObject<{
|
|
202
|
-
evaluatorDigest: z.ZodString;
|
|
203
|
-
population: z.ZodString;
|
|
204
|
-
samplingFrame: z.ZodString;
|
|
205
|
-
authority: z.ZodObject<{
|
|
206
|
-
evaluatorAuthorId: z.ZodString;
|
|
207
|
-
auditorId: z.ZodString;
|
|
208
|
-
independenceEvidenceRef: z.ZodString;
|
|
209
|
-
}, z.core.$strict>;
|
|
210
|
-
policy: z.ZodObject<{
|
|
211
|
-
confidence: z.ZodNumber;
|
|
212
|
-
maxFalseAcceptanceRate: z.ZodNumber;
|
|
213
|
-
maxFalseRejectionRate: z.ZodNumber;
|
|
214
|
-
}, z.core.$strict>;
|
|
215
|
-
observations: z.ZodArray<z.ZodObject<{
|
|
216
|
-
id: z.ZodString;
|
|
217
|
-
independentUnitId: z.ZodString;
|
|
218
|
-
evidenceRef: z.ZodString;
|
|
219
|
-
expected: z.ZodEnum<{
|
|
220
|
-
accept: "accept";
|
|
221
|
-
reject: "reject";
|
|
222
|
-
}>;
|
|
223
|
-
observed: z.ZodEnum<{
|
|
224
|
-
accept: "accept";
|
|
225
|
-
reject: "reject";
|
|
226
|
-
unknown: "unknown";
|
|
227
|
-
}>;
|
|
228
|
-
exposure: z.ZodEnum<{
|
|
229
|
-
development: "development";
|
|
230
|
-
fresh: "fresh";
|
|
231
|
-
}>;
|
|
232
|
-
}, z.core.$strict>>;
|
|
233
|
-
}, z.core.$strict>;
|
|
234
|
-
type EvaluatorAuditInput = z.infer<typeof inputSchema>;
|
|
235
|
-
interface EvaluatorErrorRate {
|
|
236
|
-
/** Eligible control judgments in this class, including unknown judgments. */
|
|
237
|
-
cases: number;
|
|
238
|
-
independentUnits: number;
|
|
239
|
-
/** Units with at least one observed mistake. */
|
|
240
|
-
errorUnits: number;
|
|
241
|
-
/** Units with unknown judgments and no observed mistake yet. */
|
|
242
|
-
unresolvedUnits: number;
|
|
243
|
-
unknownCases: number;
|
|
244
|
-
/** Missing judgments do not become measured zeros. */
|
|
245
|
-
errorRate: number | null;
|
|
246
|
-
/** Exact bounds conservatively include every possible outcome of unknown judgments. */
|
|
247
|
-
interval: ComputedInterval | null;
|
|
248
|
-
limit: number;
|
|
249
|
-
verdict: 'pass' | 'fail' | 'inconclusive';
|
|
250
|
-
}
|
|
251
|
-
interface EvaluatorAdmissionReport {
|
|
252
|
-
evaluatorDigest: LedgerHash;
|
|
253
|
-
policyDigest: LedgerHash;
|
|
254
|
-
inputDigest: LedgerHash;
|
|
255
|
-
reportDigest: LedgerHash;
|
|
256
|
-
population: string;
|
|
257
|
-
samplingFrame: string;
|
|
258
|
-
authority: EvaluatorAuditInput['authority'];
|
|
259
|
-
policy: EvaluatorAdmissionPolicy;
|
|
260
|
-
/** Joint coverage for the two reported error-rate intervals. */
|
|
261
|
-
confidence: number;
|
|
262
|
-
intervalConfidence: number;
|
|
263
|
-
verdict: 'admit' | 'reject' | 'inconclusive';
|
|
264
|
-
reasons: string[];
|
|
265
|
-
observations: EvaluatorAuditObservation[];
|
|
266
|
-
coverage: {
|
|
267
|
-
cases: number;
|
|
268
|
-
independentUnits: number;
|
|
269
|
-
eligibleCases: number;
|
|
270
|
-
eligibleIndependentUnits: number;
|
|
271
|
-
excludedCases: number;
|
|
272
|
-
unknownCases: number;
|
|
273
|
-
};
|
|
274
|
-
exclusions: Array<{
|
|
275
|
-
id: string;
|
|
276
|
-
independentUnitId: string;
|
|
277
|
-
reason: 'development-exposure';
|
|
278
|
-
}>;
|
|
279
|
-
falseAcceptance: EvaluatorErrorRate;
|
|
280
|
-
falseRejection: EvaluatorErrorRate;
|
|
281
|
-
}
|
|
282
|
-
declare const capacitySchema: z.ZodObject<{
|
|
283
|
-
policy: z.ZodObject<{
|
|
284
|
-
confidence: z.ZodNumber;
|
|
285
|
-
maxFalseAcceptanceRate: z.ZodNumber;
|
|
286
|
-
maxFalseRejectionRate: z.ZodNumber;
|
|
287
|
-
}, z.core.$strict>;
|
|
288
|
-
controls: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
289
|
-
id: z.ZodString;
|
|
290
|
-
independentUnitId: z.ZodString;
|
|
291
|
-
expected: z.ZodEnum<{
|
|
292
|
-
accept: "accept";
|
|
293
|
-
reject: "reject";
|
|
294
|
-
}>;
|
|
295
|
-
exposure: z.ZodEnum<{
|
|
296
|
-
development: "development";
|
|
297
|
-
fresh: "fresh";
|
|
298
|
-
}>;
|
|
299
|
-
}, z.core.$strict>>>;
|
|
300
|
-
}, z.core.$strict>;
|
|
301
|
-
type EvaluatorAuditPlanInput = z.input<typeof capacitySchema>;
|
|
302
|
-
/**
|
|
303
|
-
* Can the fixed control roster meet the policy even with zero errors?
|
|
304
|
-
* Planning uses the admission rule's exact bounds and source-unit exclusions.
|
|
305
|
-
* It accepts no judgments or authority and returns no admission report.
|
|
306
|
-
*/
|
|
307
|
-
export declare function planEvaluatorAudit(input: EvaluatorAuditPlanInput): {
|
|
308
|
-
sufficient: boolean;
|
|
309
|
-
falseAcceptance: {
|
|
310
|
-
independentUnits: number;
|
|
311
|
-
bestPossibleUpperBound: number | null;
|
|
312
|
-
limit: number;
|
|
313
|
-
minimumIndependentUnits: number | null;
|
|
314
|
-
additionalIndependentUnits: number | null;
|
|
315
|
-
};
|
|
316
|
-
falseRejection: {
|
|
317
|
-
independentUnits: number;
|
|
318
|
-
bestPossibleUpperBound: number | null;
|
|
319
|
-
limit: number;
|
|
320
|
-
minimumIndependentUnits: number | null;
|
|
321
|
-
additionalIndependentUnits: number | null;
|
|
322
|
-
};
|
|
323
|
-
};
|
|
324
|
-
type EvaluatorAuditPlan = ReturnType<typeof planEvaluatorAudit>;
|
|
325
|
-
/**
|
|
326
|
-
* Audit frozen judgments using independent source units and exact binomial bounds.
|
|
327
|
-
* A unit fails a class when any control in that class is misjudged.
|
|
328
|
-
* The execution owner enforces auditor separation, fresh sampling, and evidence authenticity.
|
|
329
|
-
*/
|
|
330
|
-
export declare function auditEvaluator(input: EvaluatorAuditInput): EvaluatorAdmissionReport;
|
|
331
|
-
declare const probabilityAuditSchema: z.ZodObject<{
|
|
332
|
-
evaluatorDigest: z.ZodString;
|
|
333
|
-
population: z.ZodString;
|
|
334
|
-
samplingFrame: z.ZodString;
|
|
335
|
-
authority: z.ZodObject<{
|
|
336
|
-
evaluatorAuthorId: z.ZodString;
|
|
337
|
-
auditorId: z.ZodString;
|
|
338
|
-
independenceEvidenceRef: z.ZodString;
|
|
339
|
-
}, z.core.$strict>;
|
|
340
|
-
policy: z.ZodObject<{
|
|
341
|
-
confidence: z.ZodNumber;
|
|
342
|
-
maxFalseAcceptanceRate: z.ZodNumber;
|
|
343
|
-
maxFalseRejectionRate: z.ZodNumber;
|
|
344
|
-
}, z.core.$strict>;
|
|
345
|
-
thresholds: z.ZodObject<{
|
|
346
|
-
rejectAtOrBelow: z.ZodNumber;
|
|
347
|
-
acceptAtOrAbove: z.ZodNumber;
|
|
348
|
-
}, z.core.$strict>;
|
|
349
|
-
observations: z.ZodArray<z.ZodObject<{
|
|
350
|
-
id: z.ZodString;
|
|
351
|
-
independentUnitId: z.ZodString;
|
|
352
|
-
evidenceRef: z.ZodString;
|
|
353
|
-
expected: z.ZodEnum<{
|
|
354
|
-
accept: "accept";
|
|
355
|
-
reject: "reject";
|
|
356
|
-
}>;
|
|
357
|
-
exposure: z.ZodEnum<{
|
|
358
|
-
development: "development";
|
|
359
|
-
fresh: "fresh";
|
|
360
|
-
}>;
|
|
361
|
-
acceptProbability: z.ZodNullable<z.ZodNumber>;
|
|
362
|
-
}, z.core.$strict>>;
|
|
363
|
-
}, z.core.$strict>;
|
|
364
|
-
/** A frozen caller-owned rule over P(accept), not the provider's entropy/confidence statistic. */
|
|
365
|
-
type ProbabilityPolicyAuditInput = z.infer<typeof probabilityAuditSchema>;
|
|
366
|
-
interface ProbabilityPolicyAuditReport extends EvaluatorAdmissionReport {
|
|
367
|
-
probabilityPolicy: {
|
|
368
|
-
sourceEvaluatorDigest: LedgerHash;
|
|
369
|
-
thresholds: ProbabilityPolicyAuditInput['thresholds'];
|
|
370
|
-
/** Retain probabilities by observation id so the reported mapping can be reproduced. */
|
|
371
|
-
observations: Array<{
|
|
372
|
-
id: string;
|
|
373
|
-
acceptProbability: number | null;
|
|
374
|
-
}>;
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Audit a fixed probability-to-decision rule with the existing independent-unit error bounds.
|
|
379
|
-
* No threshold search, model calls, promotion, or assumption of calibrated probabilities.
|
|
380
|
-
* Null scores and the open interval between thresholds remain unknown, never correct by default.
|
|
381
|
-
*/
|
|
382
|
-
export declare function auditProbabilityPolicy(input: ProbabilityPolicyAuditInput): ProbabilityPolicyAuditReport;
|
|
383
|
-
//#endregion
|
|
384
|
-
//#region src/meta-eval/plants.d.ts
|
|
385
|
-
/**
|
|
386
|
-
* How a plant item was authored wrong. The class is reported separately in
|
|
387
|
-
* {@link CatchRateReport.byKind} because a grader is routinely sharp on one
|
|
388
|
-
* and blind to another.
|
|
389
|
-
*/
|
|
390
|
-
export type PlantKind =
|
|
391
|
-
/** A load-bearing value is altered: a number off by one, a comparison flipped. */
|
|
392
|
-
'wrong-value' |
|
|
393
|
-
/** The item carries its own check, and that check passes without testing the claim. */
|
|
394
|
-
'self-certifying' |
|
|
395
|
-
/** The check names an input that does not exist, so it cannot run at all. */
|
|
396
|
-
'unreachable-input' |
|
|
397
|
-
/** A copy of an item already in the set, which is owed a duplicate flag rather than a second grade. */
|
|
398
|
-
'duplicate';
|
|
399
|
-
/** What a working grader owes a seeded item. */
|
|
400
|
-
export type PlantExpectation = 'reject' | 'accept';
|
|
401
|
-
export interface Plant {
|
|
402
|
-
/** Name of the plant record. Reported in `missedIds` and `missingIds`. */
|
|
403
|
-
id: string;
|
|
404
|
-
kind: PlantKind;
|
|
405
|
-
/** The seeded item, indistinguishable from a real one once mixed. */
|
|
406
|
-
item: GoldenItem;
|
|
407
|
-
/** The verdict a working grader owes this item. */
|
|
408
|
-
expectedVerdict: PlantExpectation;
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* Build one plant record and refuse an incoherent one.
|
|
412
|
-
*
|
|
413
|
-
* The refusal that matters is the last: a record whose `expectedVerdict`
|
|
414
|
-
* disagrees with `item.humanScore` inverts the measurement silently, because
|
|
415
|
-
* the same item then reads as wrong here and as correct to every calibration
|
|
416
|
-
* instrument that joins on the id.
|
|
417
|
-
*
|
|
418
|
-
* `item` is copied field by field so a later mutation of the caller's object
|
|
419
|
-
* cannot change what the manifest sealed, and `group` is dropped when it is
|
|
420
|
-
* absent so the record always has a canonical JSON form.
|
|
421
|
-
*/
|
|
422
|
-
export declare function definePlant(input: {
|
|
423
|
-
id: string;
|
|
424
|
-
kind: PlantKind;
|
|
425
|
-
item: GoldenItem;
|
|
426
|
-
expectedVerdict: PlantExpectation;
|
|
427
|
-
}): Plant;
|
|
428
|
-
/**
|
|
429
|
-
* A claim's executable evidence: the command a grader runs and the output it
|
|
430
|
-
* must produce.
|
|
431
|
-
*/
|
|
432
|
-
export interface PlantEvidence {
|
|
433
|
-
/** The command a grader runs to test the claim. */
|
|
434
|
-
check?: string;
|
|
435
|
-
/** The output that command must produce for the claim to stand. */
|
|
436
|
-
expect?: string;
|
|
437
|
-
}
|
|
438
|
-
/** Which evidence field {@link perturbEvidence} altered. */
|
|
439
|
-
export type PerturbedField = 'check' | 'expect';
|
|
440
|
-
/** How {@link perturbEvidence} altered it. */
|
|
441
|
-
export type PerturbationKind = 'number-off-by-one' | 'comparison-flipped';
|
|
442
|
-
export interface EvidencePerturbation {
|
|
443
|
-
/** The evidence with exactly one value altered. */
|
|
444
|
-
evidence: PlantEvidence;
|
|
445
|
-
/** Which field changed. */
|
|
446
|
-
field: PerturbedField;
|
|
447
|
-
/** How it changed. */
|
|
448
|
-
how: PerturbationKind;
|
|
449
|
-
/**
|
|
450
|
-
* The exact substring that was replaced. A comparison token carries its
|
|
451
|
-
* surrounding spaces, because the spaces are what make ` -ge ` a comparison
|
|
452
|
-
* and not part of a word.
|
|
453
|
-
*/
|
|
454
|
-
original: string;
|
|
455
|
-
/** What replaced it. */
|
|
456
|
-
perturbed: string;
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* Derive a known-wrong version of a claim's evidence by altering exactly one
|
|
460
|
-
* value, or return null when no value can be altered safely.
|
|
461
|
-
*
|
|
462
|
-
* Exactly one value changes. A perturbation that moves two does not name the
|
|
463
|
-
* defect it seeded, so a grader that catches it says nothing about which defect
|
|
464
|
-
* the grader can see.
|
|
465
|
-
*
|
|
466
|
-
* The preference order IS the safety order:
|
|
467
|
-
*
|
|
468
|
-
* 1. the last standalone number in `expect` — it falsifies the claim while the
|
|
469
|
-
* command still runs exactly as it did;
|
|
470
|
-
* 2. a flipped comparison in `check` — it inverts a test that was passing;
|
|
471
|
-
* 3. the last standalone number in `check` — last because a number in a command
|
|
472
|
-
* can name an input (a port, a width, a version) rather than a threshold,
|
|
473
|
-
* and renaming an input breaks execution, not the claim.
|
|
474
|
-
*
|
|
475
|
-
* "Standalone" excludes a digit run glued to a word, a dot, a slash, or a
|
|
476
|
-
* hyphen: `python3`, `file42.txt`, `1.5`, `utf-8`. That exclusion is why this
|
|
477
|
-
* helper exists. Hand-rolled perturbation bumps one of those, the check stops
|
|
478
|
-
* executing, and the plant measures the environment instead of the grader.
|
|
479
|
-
*
|
|
480
|
-
* A number is bumped with BigInt, so a value wider than
|
|
481
|
-
* `Number.MAX_SAFE_INTEGER` moves by exactly one. Bumped as a `number` it
|
|
482
|
-
* rounds back to itself, and the plant is then a correct claim the grader is
|
|
483
|
-
* right to verify.
|
|
484
|
-
*/
|
|
485
|
-
export declare function perturbEvidence(evidence: PlantEvidence): EvidencePerturbation | null;
|
|
486
|
-
export interface PerturbedPlant {
|
|
487
|
-
plant: Plant;
|
|
488
|
-
/** The perturbed evidence to write into the item the grader is handed. */
|
|
489
|
-
evidence: PlantEvidence;
|
|
490
|
-
field: PerturbedField;
|
|
491
|
-
how: PerturbationKind;
|
|
492
|
-
original: string;
|
|
493
|
-
perturbed: string;
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* Derive a reject-direction plant from a claim a grader verified, by perturbing
|
|
497
|
-
* one value.
|
|
498
|
-
*
|
|
499
|
-
* {@link definePlant} takes a {@link GoldenItem} and never authors a wrong item
|
|
500
|
-
* from a right one, so until now every caller hand-rolled the perturbation.
|
|
501
|
-
* This is that step, done once and the same way every time: the claim's
|
|
502
|
-
* evidence is altered by {@link perturbEvidence}, the result is a `wrong-value`
|
|
503
|
-
* plant the grader owes a `reject`, and the record itself is built by
|
|
504
|
-
* `definePlant` so every refusal there still applies — in particular the one
|
|
505
|
-
* that catches an `expectedVerdict` its `humanScore` contradicts.
|
|
506
|
-
*
|
|
507
|
-
* Returns null when nothing in the evidence can be perturbed. That is not a
|
|
508
|
-
* failure: a claim with no executable evidence cannot be made wrong in a way a
|
|
509
|
-
* grader could execute, and seeding it would measure prose.
|
|
510
|
-
*
|
|
511
|
-
* Refuses an empty `id` or `itemId`. Both name the record — one in the manifest
|
|
512
|
-
* and in `missedIds`, the other in the join with the results — and a miss
|
|
513
|
-
* nobody can look up is not a measurement.
|
|
514
|
-
*/
|
|
515
|
-
export declare function plantByPerturbation(input: {
|
|
516
|
-
id: string;
|
|
517
|
-
itemId: string;
|
|
518
|
-
evidence: PlantEvidence;
|
|
519
|
-
/** Score for the perturbed item. Must sit below the run's accept threshold. Default 0. */
|
|
520
|
-
humanScore?: number;
|
|
521
|
-
group?: string;
|
|
522
|
-
}): PerturbedPlant | null;
|
|
523
|
-
export interface PlantManifest {
|
|
524
|
-
/**
|
|
525
|
-
* Digest over the seeded order, the plants, and the threshold. Publish it
|
|
526
|
-
* before the grading run: a manifest edited afterwards to match the results
|
|
527
|
-
* no longer matches its seal, and {@link catchRate} refuses it.
|
|
528
|
-
*/
|
|
529
|
-
seal: LedgerHash;
|
|
530
|
-
/** The seed that fixed the mix order. */
|
|
531
|
-
seed: number;
|
|
532
|
-
/** The grade at or above which the graded policy's own gate accepts an item. */
|
|
533
|
-
acceptThreshold: number;
|
|
534
|
-
/** Every item id in the seeded set, in the order handed out. */
|
|
535
|
-
itemIds: string[];
|
|
536
|
-
/** The seeded plants. This is the answer key; keep it out of the graded workspace. */
|
|
537
|
-
plants: Plant[];
|
|
538
|
-
}
|
|
539
|
-
export interface SeededGradingSet {
|
|
540
|
-
/**
|
|
541
|
-
* The mixed set in seeded order. Operator-side: it still carries every
|
|
542
|
-
* item's `humanScore`, so hand the graded policy the payload each `itemId`
|
|
543
|
-
* names, never this array.
|
|
544
|
-
*/
|
|
545
|
-
items: GoldenItem[];
|
|
546
|
-
manifest: PlantManifest;
|
|
547
|
-
}
|
|
548
|
-
export interface SeedPlantsOptions {
|
|
549
|
-
/**
|
|
550
|
-
* Fixes the mix order. The same dataset, plants, threshold, and seed always
|
|
551
|
-
* produce the same seeded order and the same seal.
|
|
552
|
-
*/
|
|
553
|
-
seed?: number;
|
|
554
|
-
/**
|
|
555
|
-
* The grade at or above which the graded policy's own gate accepts an item.
|
|
556
|
-
* Supply the threshold your gate uses; the default suits a judge scoring in
|
|
557
|
-
* [0, 1] with a pass at the midpoint.
|
|
558
|
-
*/
|
|
559
|
-
acceptThreshold?: number;
|
|
560
|
-
}
|
|
561
|
-
/**
|
|
562
|
-
* Mix plants into a grading set and seal which items they are.
|
|
563
|
-
*
|
|
564
|
-
* Refusals: a duplicate id anywhere in the mixed set (the join is by id, so a
|
|
565
|
-
* repeat makes one of the two unscoreable), a plant whose item id collides
|
|
566
|
-
* with a dataset item (it would shadow real work and grade it as a plant), a
|
|
567
|
-
* dataset item with no usable label, and a plant whose expectation the run's
|
|
568
|
-
* `acceptThreshold` contradicts.
|
|
569
|
-
*/
|
|
570
|
-
export declare function seedPlants(dataset: readonly GoldenItem[], plants: readonly Plant[], options?: SeedPlantsOptions): SeededGradingSet;
|
|
571
|
-
/**
|
|
572
|
-
* One grader outcome for one item. `score: null` says the grader ran and
|
|
573
|
-
* declined to decide — the check never tested the item's defect. Any
|
|
574
|
-
* `CandidateScore` from a judge run is already a valid outcome.
|
|
575
|
-
*/
|
|
576
|
-
export interface PlantOutcome {
|
|
577
|
-
itemId: string;
|
|
578
|
-
score: number | null;
|
|
579
|
-
}
|
|
580
|
-
/**
|
|
581
|
-
* `evaluated` — a rate stands. `incomplete` — a seeded id had no result.
|
|
582
|
-
* `not_evaluated` — nothing was seeded, or nothing seeded was decided.
|
|
583
|
-
*/
|
|
584
|
-
export type CatchRateStatus = 'evaluated' | 'incomplete' | 'not_evaluated';
|
|
585
|
-
export interface PlantKindCounts {
|
|
586
|
-
seeded: number;
|
|
587
|
-
caught: number;
|
|
588
|
-
missed: number;
|
|
589
|
-
indecisive: number;
|
|
590
|
-
/** caught / (caught + missed), or null when the report is not `evaluated`. */
|
|
591
|
-
rate: number | null;
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* How the same grader treated the unseeded items of the same set. No labels
|
|
595
|
-
* are needed to read it: a grader that refuses everything scores `rate` 1.0
|
|
596
|
-
* on reject-plants, and a `rejectionRate` of 1.0 here is what separates that
|
|
597
|
-
* reflex from discrimination.
|
|
598
|
-
*/
|
|
599
|
-
export interface UnseededRejection {
|
|
600
|
-
n: number;
|
|
601
|
-
decided: number;
|
|
602
|
-
rejected: number;
|
|
603
|
-
/** rejected / decided, or null when nothing unseeded was decided. */
|
|
604
|
-
rejectionRate: number | null;
|
|
605
|
-
}
|
|
606
|
-
export interface CatchRateReport {
|
|
607
|
-
status: CatchRateStatus;
|
|
608
|
-
/** Why the status is not `evaluated`. Absent when it is. */
|
|
609
|
-
reason?: string;
|
|
610
|
-
seeded: number;
|
|
611
|
-
caught: number;
|
|
612
|
-
missed: number;
|
|
613
|
-
/**
|
|
614
|
-
* The grader returned a result and declined to decide. Counted apart: it
|
|
615
|
-
* enters neither side of `rate`.
|
|
616
|
-
*/
|
|
617
|
-
indecisive: number;
|
|
618
|
-
/** caught / (caught + missed), or null unless the status is `evaluated`. */
|
|
619
|
-
rate: number | null;
|
|
620
|
-
/** One entry per kind actually seeded. A kind nobody seeded is absent, never zero. */
|
|
621
|
-
byKind: Partial<Record<PlantKind, PlantKindCounts>>;
|
|
622
|
-
/** Plant ids the grader graded as the seed says it must not. */
|
|
623
|
-
missedIds: string[];
|
|
624
|
-
/** Plant ids with no result at all — the reason a status is `incomplete`. */
|
|
625
|
-
missingIds: string[];
|
|
626
|
-
unseeded: UnseededRejection;
|
|
627
|
-
}
|
|
628
|
-
/**
|
|
629
|
-
* Score a grading run against its sealed manifest.
|
|
630
|
-
*
|
|
631
|
-
* Refusals: a manifest whose contents no longer match its seal, a result for
|
|
632
|
-
* an id the manifest never handed out, and a repeated result id. Each says
|
|
633
|
-
* the results and the manifest describe different runs, and a rate computed
|
|
634
|
-
* across two runs is a fabrication.
|
|
635
|
-
*/
|
|
636
|
-
export declare function catchRate(results: readonly PlantOutcome[], manifest: PlantManifest): CatchRateReport;
|
|
637
|
-
//#endregion
|
|
638
|
-
export { CalibrationExample, CalibrationMerge, type CalibrationResult, type CandidateScore, type ContinuousAgreement, type ContinuousAgreementOptions, type ContinuousCalibrationResult, type CorrelationInterval, DEFAULT_JUDGE_GATE_POLICY, DeploymentOutcome, type EvalHealthStamp, type EvaluatorAdmissionPolicy, type EvaluatorAdmissionReport, type EvaluatorAuditInput, type EvaluatorAuditObservation, type EvaluatorAuditPlan, type EvaluatorAuditPlanInput, type EvaluatorErrorRate, FileSystemOutcomeStore, FileSystemOutcomeStoreOptions, type GoldenItem, InMemoryOutcomeStore, JudgeAgreement, JudgeCalibrationSet, JudgeConfusion, JudgeExampleAgreement, JudgeGateDecision, JudgeGateInput, JudgeGatePolicy, JudgeGateRefusedError, JudgeGateStatus, JudgeRun, JudgeRunMeta, type JudgeSentinelOptions, OutcomeFilter, OutcomeMetricSpec, type OutcomeReduction, OutcomeStore, OutcomeStoreError, OwnerVerdict, type PositionalBiasResult, type ProbabilityPolicyAuditInput, type ProbabilityPolicyAuditReport, RubricOutcomeExclusion, RubricOutcomePair, RubricPredictiveValidityInput, RubricPredictiveValidityReport, RubricRanking, type SelfPreferenceResult, type SentinelMetricName, type SentinelMetrics, type SentinelReport, type SentinelSetOptions, type SentinelSnapshot, type SentinelStore, type SentinelThresholds, type SentinelTrend, type SnapshotMeta, type VerbosityBiasResult, addCalibrationVerdicts, assertJudgeMayGate, calibrateJudge, calibrateJudgeContinuous, continuousAgreement, evalHealthStamp, fileSentinelStore, judgeGateDecision, judgeSentinelReport, measureJudgeAgreement, positionalBias, registerCalibrationSet, rubricPredictiveValidity, selfPreference, snapshotFromAgreement, snapshotFromCalibration, snapshotFromJudgeAgreement, snapshotFromSentinelSet, validateSentinelSnapshot, verbosityBias };
|
|
639
|
-
//# sourceMappingURL=index.d.ts.map
|
|
2
|
+
import { $ as SnapshotMeta, A as JudgeGateInput, At as CalibrationPair, B as measureJudgeAgreement, Bt as CorrelationStudyOptions, C as CalibrationMerge, Ct as planEvaluatorAudit, D as JudgeConfusion, Dt as clusterBootstrapMean, E as JudgeCalibrationSet, Et as ClusteredObservation, F as JudgeRunMeta, Ft as calibrationCurve, G as SentinelMetricName, H as snapshotFromJudgeAgreement, Ht as EvalMetricSpec, I as OwnerVerdict, It as calibrationFromPairs, J as SentinelSetOptions, K as SentinelMetrics, L as addCalibrationVerdicts, Lt as multiclassBrierScore, M as JudgeGateRefusedError, Mt as CategoricalForecast, N as JudgeGateStatus, Nt as OrdinalForecast, O as JudgeExampleAgreement, Ot as CalibrationBin, P as JudgeRun, Pt as brierScore, Q as SentinelTrend, R as assertJudgeMayGate, Rt as rankedProbabilityScore, S as CalibrationExample, St as evaluatorAuditObservationSchema, T as JudgeAgreement, Tt as ClusterBootstrapResult, U as EvalHealthStamp, Ut as OutcomePair, V as registerCalibrationSet, Vt as CorrelationStudyResult, W as JudgeSentinelOptions, Wt as correlationStudy, X as SentinelStore, Y as SentinelSnapshot, Z as SentinelThresholds, _ as catchRate, _t as ProbabilityPolicyAuditInput, a as PerturbedField, at as snapshotFromSentinelSet, b as plantByPerturbation, bt as auditProbabilityPolicy, c as PlantEvidence, d as PlantKindCounts, dt as EvaluatorAdmissionReport, et as evalHealthStamp, f as PlantManifest, ft as EvaluatorAuditInput, g as UnseededRejection, gt as EvaluatorErrorRate, h as SeededGradingSet, ht as EvaluatorAuditPlanInput, i as PerturbationKind, it as snapshotFromCalibration, j as JudgeGatePolicy, jt as CalibrationReport, k as JudgeGateDecision, kt as CalibrationOptions, l as PlantExpectation, m as SeedPlantsOptions, mt as EvaluatorAuditPlan, n as CatchRateStatus, nt as judgeSentinelReport, o as PerturbedPlant, ot as validateSentinelSnapshot, p as PlantOutcome, pt as EvaluatorAuditObservation, q as SentinelReport, r as EvidencePerturbation, rt as snapshotFromAgreement, s as Plant, t as CatchRateReport, tt as fileSentinelStore, u as PlantKind, ut as EvaluatorAdmissionPolicy, v as definePlant, vt as ProbabilityPolicyAuditReport, w as DEFAULT_JUDGE_GATE_POLICY, wt as ClusterBootstrapOptions, x as seedPlants, xt as evaluatorAdmissionPolicySchema, y as perturbEvidence, yt as auditEvaluator, z as judgeGateDecision, zt as CorrelationResult } from "../index-DWd1gUwR.js";
|
|
3
|
+
import { a as RubricPredictiveValidityReport, c as CorrelationInterval, d as FileSystemOutcomeStore, f as FileSystemOutcomeStoreOptions, g as OutcomeStoreError, h as OutcomeStore, i as RubricPredictiveValidityInput, l as OutcomeReduction, m as OutcomeFilter, n as RubricOutcomeExclusion, o as RubricRanking, p as InMemoryOutcomeStore, r as RubricOutcomePair, s as rubricPredictiveValidity, t as OutcomeMetricSpec, u as DeploymentOutcome } from "../rubric-predictive-validity-Cd5SCtAf.js";
|
|
4
|
+
export { CalibrationBin, CalibrationExample, CalibrationMerge, CalibrationOptions, CalibrationPair, CalibrationReport, type CalibrationResult, type CandidateScore, CatchRateReport, CatchRateStatus, CategoricalForecast, ClusterBootstrapOptions, ClusterBootstrapResult, ClusteredObservation, type ContinuousAgreement, type ContinuousAgreementOptions, type ContinuousCalibrationResult, type CorrelationInterval, CorrelationResult, CorrelationStudyOptions, CorrelationStudyResult, DEFAULT_JUDGE_GATE_POLICY, DeploymentOutcome, type EvalHealthStamp, EvalMetricSpec, type EvaluatorAdmissionPolicy, type EvaluatorAdmissionReport, type EvaluatorAuditInput, type EvaluatorAuditObservation, type EvaluatorAuditPlan, type EvaluatorAuditPlanInput, type EvaluatorErrorRate, EvidencePerturbation, FileSystemOutcomeStore, FileSystemOutcomeStoreOptions, type GoldenItem, InMemoryOutcomeStore, JudgeAgreement, JudgeCalibrationSet, JudgeConfusion, JudgeExampleAgreement, JudgeGateDecision, JudgeGateInput, JudgeGatePolicy, JudgeGateRefusedError, JudgeGateStatus, JudgeRun, JudgeRunMeta, type JudgeSentinelOptions, OrdinalForecast, OutcomeFilter, OutcomeMetricSpec, OutcomePair, type OutcomeReduction, OutcomeStore, OutcomeStoreError, OwnerVerdict, PerturbationKind, PerturbedField, PerturbedPlant, Plant, PlantEvidence, PlantExpectation, PlantKind, PlantKindCounts, PlantManifest, PlantOutcome, type PositionalBiasResult, type ProbabilityPolicyAuditInput, type ProbabilityPolicyAuditReport, RubricOutcomeExclusion, RubricOutcomePair, RubricPredictiveValidityInput, RubricPredictiveValidityReport, RubricRanking, SeedPlantsOptions, SeededGradingSet, type SelfPreferenceResult, type SentinelMetricName, type SentinelMetrics, type SentinelReport, type SentinelSetOptions, type SentinelSnapshot, type SentinelStore, type SentinelThresholds, type SentinelTrend, type SnapshotMeta, UnseededRejection, type VerbosityBiasResult, addCalibrationVerdicts, assertJudgeMayGate, auditEvaluator, auditProbabilityPolicy, brierScore, calibrateJudge, calibrateJudgeContinuous, calibrationCurve, calibrationFromPairs, catchRate, clusterBootstrapMean, continuousAgreement, correlationStudy, definePlant, evalHealthStamp, evaluatorAdmissionPolicySchema, evaluatorAuditObservationSchema, fileSentinelStore, judgeGateDecision, judgeSentinelReport, measureJudgeAgreement, multiclassBrierScore, perturbEvidence, planEvaluatorAudit, plantByPerturbation, positionalBias, rankedProbabilityScore, registerCalibrationSet, rubricPredictiveValidity, seedPlants, selfPreference, snapshotFromAgreement, snapshotFromCalibration, snapshotFromJudgeAgreement, snapshotFromSentinelSet, validateSentinelSnapshot, verbosityBias };
|