@agenticprimitives/evaluation 0.0.0-alpha.4 → 0.0.0-alpha.5
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/dist/act.d.ts +97 -0
- package/dist/act.d.ts.map +1 -0
- package/dist/act.js +115 -0
- package/dist/act.js.map +1 -0
- package/dist/canonical.d.ts +2 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +4 -0
- package/dist/canonical.js.map +1 -0
- package/dist/capture.d.ts +90 -0
- package/dist/capture.d.ts.map +1 -0
- package/dist/capture.js +195 -0
- package/dist/capture.js.map +1 -0
- package/dist/compare-runner.d.ts +204 -0
- package/dist/compare-runner.d.ts.map +1 -0
- package/dist/compare-runner.js +313 -0
- package/dist/compare-runner.js.map +1 -0
- package/dist/conformal.d.ts +113 -0
- package/dist/conformal.d.ts.map +1 -0
- package/dist/conformal.js +113 -0
- package/dist/conformal.js.map +1 -0
- package/dist/experiment.d.ts +218 -0
- package/dist/experiment.d.ts.map +1 -0
- package/dist/experiment.js +196 -0
- package/dist/experiment.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/ledger.d.ts +128 -0
- package/dist/ledger.d.ts.map +1 -0
- package/dist/ledger.js +146 -0
- package/dist/ledger.js.map +1 -0
- package/dist/measure.d.ts +63 -0
- package/dist/measure.d.ts.map +1 -0
- package/dist/measure.js +95 -0
- package/dist/measure.js.map +1 -0
- package/dist/replay.d.ts +50 -0
- package/dist/replay.d.ts.map +1 -0
- package/dist/replay.js +61 -0
- package/dist/replay.js.map +1 -0
- package/dist/report.d.ts +189 -0
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +282 -0
- package/dist/report.js.map +1 -0
- package/dist/rollup.d.ts +64 -0
- package/dist/rollup.d.ts.map +1 -0
- package/dist/rollup.js +53 -0
- package/dist/rollup.js.map +1 -0
- package/dist/selection-gates.d.ts +283 -0
- package/dist/selection-gates.d.ts.map +1 -0
- package/dist/selection-gates.js +331 -0
- package/dist/selection-gates.js.map +1 -0
- package/dist/selection-score.d.ts +285 -0
- package/dist/selection-score.d.ts.map +1 -0
- package/dist/selection-score.js +392 -0
- package/dist/selection-score.js.map +1 -0
- package/dist/selection.d.ts +83 -0
- package/dist/selection.d.ts.map +1 -0
- package/dist/selection.js +86 -0
- package/dist/selection.js.map +1 -0
- package/dist/stats.d.ts +62 -0
- package/dist/stats.d.ts.map +1 -0
- package/dist/stats.js +279 -0
- package/dist/stats.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { ExperimentRecordV1, ExperimentRunV1 } from './experiment.js';
|
|
2
|
+
import type { SelectionCriterionV1 } from './selection.js';
|
|
3
|
+
import type { RunSelectionFactsV1 } from './selection-gates.js';
|
|
4
|
+
export interface HarnessCalibrationFns {
|
|
5
|
+
calibrate: (dist: Record<string, number>, temperature: number) => Record<string, number>;
|
|
6
|
+
setOf: (dist: Record<string, number>, acceptance: {
|
|
7
|
+
temperature: number;
|
|
8
|
+
qhat: number;
|
|
9
|
+
}) => {
|
|
10
|
+
set: string[];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface ConformalMapV1 {
|
|
14
|
+
type: 'ap.selection-conformal-map.v1';
|
|
15
|
+
/** The binding it was fitted for — a map is valid for this binding only. */
|
|
16
|
+
binding: {
|
|
17
|
+
judge: string;
|
|
18
|
+
provider?: string;
|
|
19
|
+
variant: string;
|
|
20
|
+
};
|
|
21
|
+
method: 'conformal';
|
|
22
|
+
alpha: number;
|
|
23
|
+
temperature: number;
|
|
24
|
+
qhat: number;
|
|
25
|
+
/** Labelled runs fitted on, and the experiments they came from. */
|
|
26
|
+
n: number;
|
|
27
|
+
fittedOn: string[];
|
|
28
|
+
fittedAt: string;
|
|
29
|
+
mapDigest: string;
|
|
30
|
+
}
|
|
31
|
+
type Run = ExperimentRunV1 & {
|
|
32
|
+
selection?: RunSelectionFactsV1;
|
|
33
|
+
};
|
|
34
|
+
interface Labelled {
|
|
35
|
+
dist: Record<string, number>;
|
|
36
|
+
gold: string;
|
|
37
|
+
intentId: string;
|
|
38
|
+
variant: string;
|
|
39
|
+
}
|
|
40
|
+
/** The labelled runs: a recorded distribution and a gold outcome in the distribution's vocabulary (tool id or `none`). */
|
|
41
|
+
export declare function labelledRuns(runs: readonly Run[], criterion: Pick<SelectionCriterionV1, 'cases'>, toolToSkill: Record<string, string>): Labelled[];
|
|
42
|
+
/** The temperature minimising mean negative log-likelihood of the gold outcome (a grid, deterministic). */
|
|
43
|
+
export declare function fitTemperature(data: readonly Labelled[], fns: Pick<HarnessCalibrationFns, 'calibrate'>): number;
|
|
44
|
+
/** q̂ at level alpha: the ⌈(n+1)(1−α)⌉-th smallest score (1 when that exceeds n — the set is then every outcome). */
|
|
45
|
+
export declare function conformalQuantile(scores: readonly number[], alpha: number): number;
|
|
46
|
+
export declare function fitConformalMap(input: {
|
|
47
|
+
experiments: ReadonlyArray<Pick<ExperimentRecordV1, 'runs'> & {
|
|
48
|
+
plan: {
|
|
49
|
+
id: string;
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
variant: string;
|
|
53
|
+
judge: string;
|
|
54
|
+
provider?: string;
|
|
55
|
+
criterion: Pick<SelectionCriterionV1, 'cases'>;
|
|
56
|
+
toolToSkill: Record<string, string>;
|
|
57
|
+
alpha: number;
|
|
58
|
+
fns: HarnessCalibrationFns;
|
|
59
|
+
now?: string;
|
|
60
|
+
}): Promise<ConformalMapV1>;
|
|
61
|
+
export interface ConformalReportV1 {
|
|
62
|
+
gate: 'conformal-coverage';
|
|
63
|
+
status: 'PASS' | 'FAIL' | 'INCOMPLETE';
|
|
64
|
+
n: number;
|
|
65
|
+
target: number;
|
|
66
|
+
coverage: number | null;
|
|
67
|
+
meanSetSize: number | null;
|
|
68
|
+
singletonRate: number | null;
|
|
69
|
+
singletonAccuracy: number | null;
|
|
70
|
+
emptyRate: number | null;
|
|
71
|
+
sizes: Record<string, number>;
|
|
72
|
+
uncovered: Array<{
|
|
73
|
+
intentId: string;
|
|
74
|
+
variant: string;
|
|
75
|
+
gold: string;
|
|
76
|
+
set: string[];
|
|
77
|
+
}>;
|
|
78
|
+
mapDigest: string;
|
|
79
|
+
tolerance: number;
|
|
80
|
+
reason: string;
|
|
81
|
+
}
|
|
82
|
+
/** Coverage on runs the map was NOT fitted on: the share whose prediction set holds the gold outcome, through the harness's
|
|
83
|
+
* own `setOf`. PASS when coverage ≥ 1 − α − tolerance. Coverage well ABOVE the target is reported, not failed: a sharp,
|
|
84
|
+
* accurate judge makes a conservative set, and the singleton rate says how often a decision was actually made. */
|
|
85
|
+
export declare function conformalCoverageOf(input: {
|
|
86
|
+
experiment: Pick<ExperimentRecordV1, 'runs'>;
|
|
87
|
+
criterion: Pick<SelectionCriterionV1, 'cases'>;
|
|
88
|
+
toolToSkill: Record<string, string>;
|
|
89
|
+
map: ConformalMapV1;
|
|
90
|
+
fns: Pick<HarnessCalibrationFns, 'setOf'>;
|
|
91
|
+
tolerance?: number;
|
|
92
|
+
minRuns?: number;
|
|
93
|
+
}): ConformalReportV1;
|
|
94
|
+
export interface RiskCoveragePointV1 {
|
|
95
|
+
coverage: number;
|
|
96
|
+
risk: number;
|
|
97
|
+
threshold: number;
|
|
98
|
+
}
|
|
99
|
+
export interface RiskCoverageV1 {
|
|
100
|
+
n: number;
|
|
101
|
+
points: RiskCoveragePointV1[];
|
|
102
|
+
aurc: number | null;
|
|
103
|
+
}
|
|
104
|
+
/** Selective prediction: sort runs by the judge's top (folded) probability; answering only the most confident k, what is
|
|
105
|
+
* the error rate among those answered? `aurc` is the mean risk over coverage (lower is better). */
|
|
106
|
+
export declare function riskCoverageOf(input: {
|
|
107
|
+
runs: readonly Run[];
|
|
108
|
+
criterion: Pick<SelectionCriterionV1, 'cases'>;
|
|
109
|
+
toolToSkill: Record<string, string>;
|
|
110
|
+
fold?: (d: Record<string, number>) => Record<string, number>;
|
|
111
|
+
}): RiskCoverageV1;
|
|
112
|
+
export {};
|
|
113
|
+
//# sourceMappingURL=conformal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conformal.d.ts","sourceRoot":"","sources":["../src/conformal.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzF,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK;QAAE,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAC/G;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,+BAA+B,CAAC;IACtC,4EAA4E;IAC5E,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/D,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,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S;AAID,MAAM,WAAW,mBAAmB;IAAG,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE;AAC1F,MAAM,WAAW,cAAc;IAAG,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;AAEjG;oGACoG;AACpG,wBAAgB,cAAc,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,cAAc,CAYjO"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { canonicalJson } from './canonical.js';
|
|
2
|
+
/** The labelled runs: a recorded distribution and a gold outcome in the distribution's vocabulary (tool id or `none`). */
|
|
3
|
+
export function labelledRuns(runs, criterion, toolToSkill) {
|
|
4
|
+
const skillToTool = Object.fromEntries(Object.entries(toolToSkill).map(([t, s]) => [s, t]));
|
|
5
|
+
const out = [];
|
|
6
|
+
for (const r of runs) {
|
|
7
|
+
const d = r.selection?.distribution;
|
|
8
|
+
const g = criterion.cases[r.intentId];
|
|
9
|
+
if (!d || !Object.keys(d).length || !g)
|
|
10
|
+
continue;
|
|
11
|
+
out.push({ dist: d, gold: g.expected ? skillToTool[g.expected] ?? g.expected : 'none', intentId: r.intentId, variant: r.variant });
|
|
12
|
+
}
|
|
13
|
+
return out;
|
|
14
|
+
}
|
|
15
|
+
/** The temperature minimising mean negative log-likelihood of the gold outcome (a grid, deterministic). */
|
|
16
|
+
export function fitTemperature(data, fns) {
|
|
17
|
+
const grid = [];
|
|
18
|
+
for (let t = 0.25; t <= 4.0001; t += 0.05)
|
|
19
|
+
grid.push(Number(t.toFixed(2)));
|
|
20
|
+
let best = 1, bestNll = Infinity;
|
|
21
|
+
for (const t of grid) {
|
|
22
|
+
const nll = data.reduce((s, x) => s - Math.log(Math.max(fns.calibrate(x.dist, t)[x.gold] ?? 0, 1e-6)), 0) / Math.max(1, data.length);
|
|
23
|
+
if (nll < bestNll - 1e-12) {
|
|
24
|
+
bestNll = nll;
|
|
25
|
+
best = t;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return best;
|
|
29
|
+
}
|
|
30
|
+
/** q̂ at level alpha: the ⌈(n+1)(1−α)⌉-th smallest score (1 when that exceeds n — the set is then every outcome). */
|
|
31
|
+
export function conformalQuantile(scores, alpha) {
|
|
32
|
+
const s = [...scores].sort((a, b) => a - b);
|
|
33
|
+
const k = Math.ceil((s.length + 1) * (1 - alpha));
|
|
34
|
+
return k > s.length ? 1 : s[k - 1];
|
|
35
|
+
}
|
|
36
|
+
const sha256 = async (text) => {
|
|
37
|
+
const b = new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(text)));
|
|
38
|
+
return `sha256:${Array.from(b, (x) => x.toString(16).padStart(2, '0')).join('')}`;
|
|
39
|
+
};
|
|
40
|
+
export async function fitConformalMap(input) {
|
|
41
|
+
const runs = input.experiments.flatMap((e) => e.runs.filter((r) => r.variant === input.variant));
|
|
42
|
+
const data = labelledRuns(runs, input.criterion, input.toolToSkill);
|
|
43
|
+
if (data.length < 20)
|
|
44
|
+
throw new Error(`${data.length} labelled runs for ${input.variant} — a calibration map needs at least 20`);
|
|
45
|
+
const temperature = fitTemperature(data, input.fns);
|
|
46
|
+
const scores = data.map((x) => 1 - (input.fns.calibrate(x.dist, temperature)[x.gold] ?? 0));
|
|
47
|
+
const qhat = Number(conformalQuantile(scores, input.alpha).toFixed(6));
|
|
48
|
+
const body = { type: 'ap.selection-conformal-map.v1', binding: { judge: input.judge, ...(input.provider ? { provider: input.provider } : {}), variant: input.variant }, method: 'conformal',
|
|
49
|
+
alpha: input.alpha, temperature, qhat, n: data.length, fittedOn: input.experiments.map((e) => e.plan.id).sort(), fittedAt: input.now ?? new Date().toISOString() };
|
|
50
|
+
const { fittedAt: _t, ...stable } = body;
|
|
51
|
+
return { ...body, mapDigest: await sha256(canonicalJson(stable)) };
|
|
52
|
+
}
|
|
53
|
+
/** Coverage on runs the map was NOT fitted on: the share whose prediction set holds the gold outcome, through the harness's
|
|
54
|
+
* own `setOf`. PASS when coverage ≥ 1 − α − tolerance. Coverage well ABOVE the target is reported, not failed: a sharp,
|
|
55
|
+
* accurate judge makes a conservative set, and the singleton rate says how often a decision was actually made. */
|
|
56
|
+
export function conformalCoverageOf(input) {
|
|
57
|
+
const tol = input.tolerance ?? 0.03;
|
|
58
|
+
const min = input.minRuns ?? 20;
|
|
59
|
+
const target = 1 - input.map.alpha;
|
|
60
|
+
const data = labelledRuns(input.experiment.runs, input.criterion, input.toolToSkill);
|
|
61
|
+
let covered = 0, sizeSum = 0, singles = 0, singlesRight = 0, empty = 0;
|
|
62
|
+
const sizes = {};
|
|
63
|
+
const uncovered = [];
|
|
64
|
+
for (const x of data) {
|
|
65
|
+
const { set } = input.fns.setOf(x.dist, input.map);
|
|
66
|
+
sizes[String(set.length)] = (sizes[String(set.length)] ?? 0) + 1;
|
|
67
|
+
sizeSum += set.length;
|
|
68
|
+
if (set.length === 0)
|
|
69
|
+
empty++;
|
|
70
|
+
if (set.length === 1) {
|
|
71
|
+
singles++;
|
|
72
|
+
if (set[0] === x.gold)
|
|
73
|
+
singlesRight++;
|
|
74
|
+
}
|
|
75
|
+
if (set.includes(x.gold))
|
|
76
|
+
covered++;
|
|
77
|
+
else
|
|
78
|
+
uncovered.push({ intentId: x.intentId, variant: x.variant, gold: x.gold, set });
|
|
79
|
+
}
|
|
80
|
+
const n = data.length;
|
|
81
|
+
const coverage = n ? covered / n : null;
|
|
82
|
+
let status, reason;
|
|
83
|
+
if (n < min) {
|
|
84
|
+
status = 'INCOMPLETE';
|
|
85
|
+
reason = `${n} labelled runs — coverage needs at least ${min}`;
|
|
86
|
+
}
|
|
87
|
+
else if (coverage < target - tol) {
|
|
88
|
+
status = 'FAIL';
|
|
89
|
+
reason = `coverage ${coverage.toFixed(3)} < ${target.toFixed(2)} − ${tol} (map ${input.map.mapDigest.slice(0, 19)}…)`;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
status = 'PASS';
|
|
93
|
+
reason = `coverage ${coverage.toFixed(3)} ≥ ${target.toFixed(2)} − ${tol} over ${n} runs; singletons ${(singles / n * 100).toFixed(0)}%, right ${singles ? (singlesRight / singles * 100).toFixed(1) : '–'}%`;
|
|
94
|
+
}
|
|
95
|
+
return { gate: 'conformal-coverage', status, n, target, coverage, meanSetSize: n ? sizeSum / n : null, singletonRate: n ? singles / n : null, singletonAccuracy: singles ? singlesRight / singles : null, emptyRate: n ? empty / n : null, sizes, uncovered, mapDigest: input.map.mapDigest, tolerance: tol, reason };
|
|
96
|
+
}
|
|
97
|
+
/** Selective prediction: sort runs by the judge's top (folded) probability; answering only the most confident k, what is
|
|
98
|
+
* the error rate among those answered? `aurc` is the mean risk over coverage (lower is better). */
|
|
99
|
+
export function riskCoverageOf(input) {
|
|
100
|
+
const fold = input.fold ?? ((d) => d);
|
|
101
|
+
const rows = labelledRuns(input.runs, input.criterion, input.toolToSkill).map((x) => {
|
|
102
|
+
const f = fold(x.dist);
|
|
103
|
+
const [top, p] = Object.entries(f).sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))[0];
|
|
104
|
+
return { p, right: top === x.gold };
|
|
105
|
+
}).sort((a, b) => b.p - a.p);
|
|
106
|
+
const n = rows.length;
|
|
107
|
+
const points = [];
|
|
108
|
+
let wrong = 0;
|
|
109
|
+
rows.forEach((r, i) => { if (!r.right)
|
|
110
|
+
wrong++; points.push({ coverage: (i + 1) / n, risk: wrong / (i + 1), threshold: r.p }); });
|
|
111
|
+
return { n, points, aurc: n ? points.reduce((s, x) => s + x.risk, 0) / n : null };
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=conformal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conformal.js","sourceRoot":"","sources":["../src/conformal.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAyB/C,0HAA0H;AAC1H,MAAM,UAAU,YAAY,CAAC,IAAoB,EAAE,SAA8C,EAAE,WAAmC;IACpI,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5F,MAAM,GAAG,GAAe,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,YAAY,CAAC;QAAC,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC3E,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC;YAAE,SAAS;QACjD,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACrI,CAAC;IACD,OAAO,GAAG,C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AAC;QAC/F,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;IACtB,MAAM,MAAM,GAA0B,EAAE,CAAC;IACzC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK;QAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClI,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import type { SelectionVerdictV1 } from './selection.js';
|
|
2
|
+
import type { SelectionScoreV1, SelectionVerdictReportV1, SelectionComparisonV1, SelectionThresholdsV1, SelectionRowV1 } from './selection-score.js';
|
|
3
|
+
import type { CaptureLevelV1 } from './capture.js';
|
|
4
|
+
/** What a run may be asked to differ in — the knob `/harness/ask` accepts on a development estate (A4). Every field
|
|
5
|
+
* is one COMPONENT of the variant; a request the estate does not know is refused, never ignored. */
|
|
6
|
+
export interface VariantRequestV1 {
|
|
7
|
+
/** model (the deployment's planner) | rule-based. */
|
|
8
|
+
plannerKind?: 'model' | 'rule-based';
|
|
9
|
+
/** How instruction skills are selected: `model` over the descriptions, `declared` by the contracts' utterances (holds). */
|
|
10
|
+
selection?: 'model' | 'declared' | 'ontology' | 'judgment' | 'ontology+judgment' | 'propose+judgment' | 'ontology-first' | 'framed-judgment' | 'outcome' | 'outcome-selective';
|
|
11
|
+
/** A provider the estate offers (`groq`, `anthropic`, …) — the one every role runs on unless a role names its own. */
|
|
12
|
+
provider?: string;
|
|
13
|
+
/** PER-AREA PROVIDERS (2026-10-01). A comparison may put a different provider on each of the three model roles —
|
|
14
|
+
* the SELECTOR (the planner and the selection judge), the ANSWER (an instruction skill's answer, the pairwise's
|
|
15
|
+
* second answer) and the JUDGE (quality, outcome and pairwise judges) — so "answered with Gemini, judged with Claude"
|
|
16
|
+
* is one variant and the confound it carries is named. Each falls back to `provider`, then the deployment default. */
|
|
17
|
+
selectionProvider?: string;
|
|
18
|
+
answerProvider?: string;
|
|
19
|
+
judgeProvider?: string;
|
|
20
|
+
/** Harness-capability toggles by notation (`retrieval/kb` → off | tool | playbook). */
|
|
21
|
+
toggles?: Record<string, string>;
|
|
22
|
+
/** The playbook this run must run under, by definition digest — refused when the agent's playbook differs. */
|
|
23
|
+
playbook?: string;
|
|
24
|
+
/** The seeded records the run begins from (a comparison's fixture). */
|
|
25
|
+
startingState?: {
|
|
26
|
+
domain: string;
|
|
27
|
+
scenarioId: string;
|
|
28
|
+
digest: string;
|
|
29
|
+
};
|
|
30
|
+
/** Spec 416 W3 — acceptance by a fitted conformal map (inline, cited by digest). */
|
|
31
|
+
acceptance?: {
|
|
32
|
+
method: 'conformal';
|
|
33
|
+
alpha: number;
|
|
34
|
+
temperature: number;
|
|
35
|
+
qhat: number;
|
|
36
|
+
mapDigest: string;
|
|
37
|
+
};
|
|
38
|
+
/** Spec 416 — the judge's profile (`fast`: one call, one question, the provider's light model). */
|
|
39
|
+
judgeProfile?: 'thorough' | 'fast' | 'logprob';
|
|
40
|
+
/** Spec 416 §4h — a seeded asker context (set per run by the runner from an intent's starting state). */
|
|
41
|
+
askerContext?: {
|
|
42
|
+
digest: string;
|
|
43
|
+
recentSkills?: Array<{
|
|
44
|
+
id: string;
|
|
45
|
+
times: number;
|
|
46
|
+
}>;
|
|
47
|
+
memoryTags?: string[];
|
|
48
|
+
heldClasses?: string[];
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export declare const variantRequestDigest: (v: VariantRequestV1) => Promise<`sha256:${string}`>;
|
|
52
|
+
export declare const thresholdsDigest: (t: SelectionThresholdsV1) => Promise<`sha256:${string}`>;
|
|
53
|
+
/** The components two variant requests differ in. One ⇒ a clean comparison; more ⇒ confounded (spec 414 §7). */
|
|
54
|
+
export declare function confoundsOf(a: VariantRequestV1, b: VariantRequestV1): string[];
|
|
55
|
+
export interface ExperimentPlanV1 {
|
|
56
|
+
type: 'ap.experiment-plan.v1';
|
|
57
|
+
id: string;
|
|
58
|
+
replaySetDigest: string;
|
|
59
|
+
criterionDigest: string;
|
|
60
|
+
split: 'development' | 'held-out' | 'all';
|
|
61
|
+
repeats: number;
|
|
62
|
+
variants: Record<string, VariantRequestV1>;
|
|
63
|
+
thresholds: SelectionThresholdsV1;
|
|
64
|
+
/** Skill-selection observation policy. */
|
|
65
|
+
policy?: 'primary' | 'any-fire';
|
|
66
|
+
registeredAt: string;
|
|
67
|
+
}
|
|
68
|
+
/** The plan's identity: its COMPONENTS — set, criterion, split, repeats, variants, thresholds, policy. The moment of
|
|
69
|
+
* registration is not one of them (the same plan registered twice is the same plan; a changed component is a new plan). */
|
|
70
|
+
export declare const experimentPlanDigest: (p: ExperimentPlanV1) => Promise<`sha256:${string}`>;
|
|
71
|
+
export declare function validateExperimentPlan(raw: unknown): {
|
|
72
|
+
ok: true;
|
|
73
|
+
plan: ExperimentPlanV1;
|
|
74
|
+
} | {
|
|
75
|
+
ok: false;
|
|
76
|
+
errors: string[];
|
|
77
|
+
};
|
|
78
|
+
export declare function experimentPlan(input: Omit<ExperimentPlanV1, 'type' | 'thresholds' | 'registeredAt'> & {
|
|
79
|
+
thresholds?: SelectionThresholdsV1;
|
|
80
|
+
registeredAt?: string;
|
|
81
|
+
}): ExperimentPlanV1;
|
|
82
|
+
/** One dispatched run, as the record keeps it. */
|
|
83
|
+
export interface ExperimentRunV1 {
|
|
84
|
+
intentId: string;
|
|
85
|
+
variant: string;
|
|
86
|
+
repeat: number;
|
|
87
|
+
/** The run reference (pseudonymised in the eval store). */
|
|
88
|
+
runRef: string | null;
|
|
89
|
+
status: 'ok' | 'failed' | 'unreadable';
|
|
90
|
+
/** What the trace said was selected (canonical skill ids after mapping; tool ids when unmapped). */
|
|
91
|
+
selected: string[];
|
|
92
|
+
evidence: 'stamped' | 'inferred' | 'none';
|
|
93
|
+
/** The variant the run ACTUALLY ran under, from its trace — a mismatch with the request is a finding. */
|
|
94
|
+
ranUnder?: {
|
|
95
|
+
variantDigest?: string;
|
|
96
|
+
plannerKind?: string;
|
|
97
|
+
toggles?: string[];
|
|
98
|
+
} | null;
|
|
99
|
+
/** WHICH MODEL CARRIED EACH ROLE, from the trace's ModelInvocation activities (2026-10-01): a run that names no provider
|
|
100
|
+
* goes to the deployment's default, and the variant digest does not change when the provider does — so without this
|
|
101
|
+
* a record cannot say whether it ran on Gemini or Claude. One row per (role, provider, model) with the call count. */
|
|
102
|
+
models?: Array<{
|
|
103
|
+
role: string;
|
|
104
|
+
provider: string;
|
|
105
|
+
model: string;
|
|
106
|
+
calls: number;
|
|
107
|
+
}>;
|
|
108
|
+
verdict?: SelectionVerdictV1;
|
|
109
|
+
/** The level the run was exported at, or null when the firewall refused (the reason is counted on the record). */
|
|
110
|
+
captureLevel: CaptureLevelV1 | null;
|
|
111
|
+
/** What the run's model calls used, as providers REPORTED it: the selection (the model planner's or the judge's calls)
|
|
112
|
+
* and the whole run; `unreported` counts calls that reported nothing (so a total is never read as complete when it
|
|
113
|
+
* is not). Numbers only. */
|
|
114
|
+
tokens?: RunTokensV1;
|
|
115
|
+
/** Milliseconds the harness spent CHOOSING (the planner's call or the selection arm), apart from the whole ask. */
|
|
116
|
+
selectionMs?: number;
|
|
117
|
+
/** Milliseconds until the reply arrived (`ms` also counts reading the run back for judging). */
|
|
118
|
+
askMs?: number;
|
|
119
|
+
/** Milliseconds per runtime stage of the ask (stage names and numbers only). */
|
|
120
|
+
stages?: Record<string, number>;
|
|
121
|
+
/** Spec 416 §4h — the answer's quality by the rubric (P(true) per question and their mean); numbers only. */
|
|
122
|
+
quality?: {
|
|
123
|
+
score: number;
|
|
124
|
+
scores: Record<string, number>;
|
|
125
|
+
};
|
|
126
|
+
/** Spec 416 §4h — the two answers judged side by side: probability per answer id (and `tie`). */
|
|
127
|
+
pairwise?: Record<string, number>;
|
|
128
|
+
/** Spec 418 A2 — the outcome check: did the answer deliver each class the plan was for (mean P, and per class). */
|
|
129
|
+
outcome?: {
|
|
130
|
+
score: number;
|
|
131
|
+
classes: Record<string, number>;
|
|
132
|
+
};
|
|
133
|
+
/** Spec 418 §12 — the act laboratory: did the harness reach THE act asked for (capability, parties, amount, whose
|
|
134
|
+
* authority) and leave its receipt — every check by name, booleans only. */
|
|
135
|
+
act?: import('./act.js').ActVerdictV1;
|
|
136
|
+
ms?: number;
|
|
137
|
+
error?: string;
|
|
138
|
+
/** Spec 415 A4 — what the selection arm decided (its grounding, survivors, distribution) — what the gates read. */
|
|
139
|
+
selection?: import('./selection-gates.js').RunSelectionFactsV1;
|
|
140
|
+
}
|
|
141
|
+
export interface ExperimentRecordV1 {
|
|
142
|
+
type: 'ap.experiment.v1';
|
|
143
|
+
id: string;
|
|
144
|
+
planDigest: string;
|
|
145
|
+
plan: ExperimentPlanV1;
|
|
146
|
+
startedAt: string;
|
|
147
|
+
finishedAt: string;
|
|
148
|
+
runs: ExperimentRunV1[];
|
|
149
|
+
/** `capture.refused.<reason>=<n>` */
|
|
150
|
+
refused: string[];
|
|
151
|
+
scores: Record<string, SelectionScoreV1>;
|
|
152
|
+
verdicts: Record<string, SelectionVerdictReportV1>;
|
|
153
|
+
comparisons: Array<{
|
|
154
|
+
a: string;
|
|
155
|
+
b: string;
|
|
156
|
+
confounds: string[];
|
|
157
|
+
confounded: boolean;
|
|
158
|
+
comparison: SelectionComparisonV1 | null;
|
|
159
|
+
error?: string;
|
|
160
|
+
}>;
|
|
161
|
+
}
|
|
162
|
+
/** The scorer's rows for one variant: the first repeat is Stage 1, every later repeat a Stage-2 trial. A run whose
|
|
163
|
+
* trace could not be read is a row with `readActivity: false` (undetected — never a miss). */
|
|
164
|
+
export declare function selectionRowsOf(runs: readonly ExperimentRunV1[], variant: string): SelectionRowV1[];
|
|
165
|
+
/** The plan as JSON-LD (`apeval:ExperimentPlan`, a p-plan:Plan): digests only. */
|
|
166
|
+
export declare function experimentPlanToJsonLd(plan: ExperimentPlanV1, opts: {
|
|
167
|
+
context: Record<string, unknown> | string;
|
|
168
|
+
}): Promise<Record<string, unknown>>;
|
|
169
|
+
/** The experiment as JSON-LD (`apeval:Experiment`, a prov:Activity that used the plan and every run's bundle). */
|
|
170
|
+
export declare function experimentToJsonLd(rec: ExperimentRecordV1, opts: {
|
|
171
|
+
context: Record<string, unknown> | string;
|
|
172
|
+
runIri: (runRef: string) => string;
|
|
173
|
+
}): Record<string, unknown>;
|
|
174
|
+
export interface RunTokensV1 {
|
|
175
|
+
selectionIn: number;
|
|
176
|
+
selectionOut: number;
|
|
177
|
+
totalIn: number;
|
|
178
|
+
totalOut: number;
|
|
179
|
+
calls: number;
|
|
180
|
+
unreported: number; /** Input served from the provider's prompt cache, where it said so. */
|
|
181
|
+
cachedIn?: number; /** Steps the plan had (a turn's work, apart from model calls). */
|
|
182
|
+
planSteps?: number;
|
|
183
|
+
}
|
|
184
|
+
/** A run's reported usage from its planner trace: the planner and judge calls are SELECTION; everything is TOTAL. */
|
|
185
|
+
export declare function runTokensOf(trace: unknown): RunTokensV1 | undefined;
|
|
186
|
+
export interface ScorecardRowV1 {
|
|
187
|
+
experiment: string;
|
|
188
|
+
variant: string;
|
|
189
|
+
runs: number;
|
|
190
|
+
right: number;
|
|
191
|
+
positives: number;
|
|
192
|
+
rightOnPositives: number;
|
|
193
|
+
negatives: number;
|
|
194
|
+
declined: number;
|
|
195
|
+
askP50: number | null;
|
|
196
|
+
askP90: number | null;
|
|
197
|
+
pickP50: number | null;
|
|
198
|
+
selectionIn: number | null;
|
|
199
|
+
selectionOut: number | null;
|
|
200
|
+
totalIn: number | null;
|
|
201
|
+
totalOut: number | null;
|
|
202
|
+
cachedIn: number | null;
|
|
203
|
+
modelCalls: number | null;
|
|
204
|
+
planSteps: number | null;
|
|
205
|
+
unreported: number;
|
|
206
|
+
/** Median milliseconds per runtime stage, for stages present in at least half the runs, slowest first. */
|
|
207
|
+
stagesP50: Record<string, number>;
|
|
208
|
+
/** Spec 416 §4h — mean answer quality over the runs that were scored, and how many were. */
|
|
209
|
+
quality: number | null;
|
|
210
|
+
qualityRuns: number;
|
|
211
|
+
/** Mean side-by-side preference over the runs that were compared (`default` · `light` · `tie`). */
|
|
212
|
+
preference: Record<string, number> | null;
|
|
213
|
+
preferenceRuns: number;
|
|
214
|
+
}
|
|
215
|
+
export declare function scorecardOf(experiments: ReadonlyArray<Pick<ExperimentRecordV1, 'id' | 'runs'>>, criteria: Record<string, {
|
|
216
|
+
expected: string | null;
|
|
217
|
+
}>): ScorecardRowV1[];
|
|
218
|
+
//# sourceMappingURL=experiment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experiment.d.ts","sourceRoot":"","sources":["../src/experiment.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,cAAc,EAAE,M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