jev-recipes 0.7.0 → 0.8.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/README.md +5 -1
- package/dist/catalog/generated/details/callback-responsibility.json +45 -0
- package/dist/catalog/generated/details/contact-opt-out.json +45 -0
- package/dist/catalog/generated/details/followup-timing.json +45 -0
- package/dist/catalog/generated/details/game-action.json +8 -109
- package/dist/catalog/generated/loaders.js +3 -0
- package/dist/catalog/generated/metadata.js +78 -0
- package/dist/catalog/generated/names.d.ts +1 -1
- package/dist/catalog/generated/names.js +3 -0
- package/dist/catalog/schema.d.ts +3 -0
- package/dist/cli/evaluation.d.ts +1 -0
- package/dist/cli/evaluation.js +82 -0
- package/dist/cli/index.js +13 -0
- package/dist/cli/schema.d.ts +9 -0
- package/dist/evaluation/archive.d.ts +501 -0
- package/dist/evaluation/archive.js +276 -0
- package/dist/evaluation/dataset.d.ts +12 -0
- package/dist/evaluation/dataset.js +162 -0
- package/dist/evaluation/decisions.d.ts +10 -0
- package/dist/evaluation/decisions.js +87 -0
- package/dist/evaluation/engine.d.ts +50 -0
- package/dist/evaluation/engine.js +130 -0
- package/dist/evaluation/index.d.ts +5 -0
- package/dist/evaluation/index.js +3 -0
- package/dist/evaluation/report.d.ts +186 -0
- package/dist/evaluation/report.js +177 -0
- package/dist/evaluation/schema.d.ts +82 -0
- package/dist/evaluation/schema.js +50 -0
- package/dist/recipes/callback-responsibility/demo.json +25 -0
- package/dist/recipes/callback-responsibility/index.d.ts +5 -0
- package/dist/recipes/callback-responsibility/index.js +17 -0
- package/dist/recipes/callback-responsibility/schema.d.ts +42 -0
- package/dist/recipes/callback-responsibility/schema.js +20 -0
- package/dist/recipes/checkers-move/schema.d.ts +1 -1
- package/dist/recipes/choose-action/schema.d.ts +1 -1
- package/dist/recipes/contact-opt-out/demo.json +24 -0
- package/dist/recipes/contact-opt-out/index.d.ts +5 -0
- package/dist/recipes/contact-opt-out/index.js +17 -0
- package/dist/recipes/contact-opt-out/schema.d.ts +42 -0
- package/dist/recipes/contact-opt-out/schema.js +20 -0
- package/dist/recipes/correction-target/schema.d.ts +1 -1
- package/dist/recipes/exercise-select/schema.d.ts +1 -1
- package/dist/recipes/failure-kind/schema.d.ts +1 -1
- package/dist/recipes/field-select/schema.d.ts +1 -1
- package/dist/recipes/finger-actions/schema.d.ts +1 -1
- package/dist/recipes/followup-link/schema.d.ts +1 -1
- package/dist/recipes/followup-timing/demo.json +25 -0
- package/dist/recipes/followup-timing/index.d.ts +5 -0
- package/dist/recipes/followup-timing/index.js +18 -0
- package/dist/recipes/followup-timing/schema.d.ts +45 -0
- package/dist/recipes/followup-timing/schema.js +21 -0
- package/dist/recipes/game-action/schema.d.ts +6 -6
- package/dist/recipes/game-action/schema.js +11 -6
- package/dist/recipes/handoff/schema.d.ts +3 -3
- package/dist/recipes/incident-match/schema.d.ts +1 -1
- package/dist/recipes/model-route/schema.d.ts +1 -1
- package/dist/recipes/next-chord/schema.d.ts +1 -1
- package/dist/recipes/next-duration/schema.d.ts +1 -1
- package/dist/recipes/next-note/schema.d.ts +1 -1
- package/dist/recipes/objection-kind/schema.d.ts +3 -3
- package/dist/recipes/reference-resolve/schema.d.ts +1 -1
- package/dist/recipes/reply-template-match/schema.d.ts +1 -1
- package/dist/recipes/route/schema.d.ts +2 -2
- package/dist/recipes/route/schema.js +3 -3
- package/dist/recipes/route-many/schema.d.ts +3 -3
- package/dist/recipes/route-many/schema.js +3 -3
- package/dist/recipes/style-kind/schema.d.ts +3 -3
- package/dist/src/answers.d.ts +1 -1
- package/dist/src/answers.js +6 -2
- package/dist/src/data.d.ts +6 -0
- package/dist/src/data.js +41 -0
- package/dist/src/decisions.d.ts +1 -1
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +3 -0
- package/dist/src/schema.d.ts +4 -4
- package/dist/src/schema.js +4 -3
- package/package.json +23 -2
package/dist/cli/schema.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
28
28
|
"bug-report-completeness": "bug-report-completeness";
|
|
29
29
|
"buying-intent": "buying-intent";
|
|
30
30
|
"cache-match": "cache-match";
|
|
31
|
+
"callback-responsibility": "callback-responsibility";
|
|
31
32
|
"cancellation-check": "cancellation-check";
|
|
32
33
|
"care-urgency-wording": "care-urgency-wording";
|
|
33
34
|
"category-fit": "category-fit";
|
|
@@ -55,6 +56,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
55
56
|
"consent-request": "consent-request";
|
|
56
57
|
"consent-scope-fit": "consent-scope-fit";
|
|
57
58
|
"constraint-strength": "constraint-strength";
|
|
59
|
+
"contact-opt-out": "contact-opt-out";
|
|
58
60
|
"content-facets": "content-facets";
|
|
59
61
|
"content-freshness-signal": "content-freshness-signal";
|
|
60
62
|
"context-prune": "context-prune";
|
|
@@ -95,6 +97,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
95
97
|
"financial-advice-signal": "financial-advice-signal";
|
|
96
98
|
"finger-actions": "finger-actions";
|
|
97
99
|
"followup-link": "followup-link";
|
|
100
|
+
"followup-timing": "followup-timing";
|
|
98
101
|
"forecast-confidence-wording": "forecast-confidence-wording";
|
|
99
102
|
"format-fit": "format-fit";
|
|
100
103
|
"freshness-needed": "freshness-needed";
|
|
@@ -275,6 +278,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
275
278
|
"bug-report-completeness": "bug-report-completeness";
|
|
276
279
|
"buying-intent": "buying-intent";
|
|
277
280
|
"cache-match": "cache-match";
|
|
281
|
+
"callback-responsibility": "callback-responsibility";
|
|
278
282
|
"cancellation-check": "cancellation-check";
|
|
279
283
|
"care-urgency-wording": "care-urgency-wording";
|
|
280
284
|
"category-fit": "category-fit";
|
|
@@ -302,6 +306,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
302
306
|
"consent-request": "consent-request";
|
|
303
307
|
"consent-scope-fit": "consent-scope-fit";
|
|
304
308
|
"constraint-strength": "constraint-strength";
|
|
309
|
+
"contact-opt-out": "contact-opt-out";
|
|
305
310
|
"content-facets": "content-facets";
|
|
306
311
|
"content-freshness-signal": "content-freshness-signal";
|
|
307
312
|
"context-prune": "context-prune";
|
|
@@ -342,6 +347,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
342
347
|
"financial-advice-signal": "financial-advice-signal";
|
|
343
348
|
"finger-actions": "finger-actions";
|
|
344
349
|
"followup-link": "followup-link";
|
|
350
|
+
"followup-timing": "followup-timing";
|
|
345
351
|
"forecast-confidence-wording": "forecast-confidence-wording";
|
|
346
352
|
"format-fit": "format-fit";
|
|
347
353
|
"freshness-needed": "freshness-needed";
|
|
@@ -519,6 +525,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
519
525
|
"bug-report-completeness": "bug-report-completeness";
|
|
520
526
|
"buying-intent": "buying-intent";
|
|
521
527
|
"cache-match": "cache-match";
|
|
528
|
+
"callback-responsibility": "callback-responsibility";
|
|
522
529
|
"cancellation-check": "cancellation-check";
|
|
523
530
|
"care-urgency-wording": "care-urgency-wording";
|
|
524
531
|
"category-fit": "category-fit";
|
|
@@ -546,6 +553,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
546
553
|
"consent-request": "consent-request";
|
|
547
554
|
"consent-scope-fit": "consent-scope-fit";
|
|
548
555
|
"constraint-strength": "constraint-strength";
|
|
556
|
+
"contact-opt-out": "contact-opt-out";
|
|
549
557
|
"content-facets": "content-facets";
|
|
550
558
|
"content-freshness-signal": "content-freshness-signal";
|
|
551
559
|
"context-prune": "context-prune";
|
|
@@ -586,6 +594,7 @@ export declare const commandArgumentsSchema: z.ZodUnion<readonly [z.ZodTuple<[z.
|
|
|
586
594
|
"financial-advice-signal": "financial-advice-signal";
|
|
587
595
|
"finger-actions": "finger-actions";
|
|
588
596
|
"followup-link": "followup-link";
|
|
597
|
+
"followup-timing": "followup-timing";
|
|
589
598
|
"forecast-confidence-wording": "forecast-confidence-wording";
|
|
590
599
|
"format-fit": "format-fit";
|
|
591
600
|
"freshness-needed": "freshness-needed";
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { DecisionClient } from '../src/schema.js';
|
|
3
|
+
import type { EvaluationRow } from './engine.js';
|
|
4
|
+
import { buildReport } from './report.js';
|
|
5
|
+
import type { EvaluationOptions, EvaluationPolicy } from './schema.js';
|
|
6
|
+
declare const archiveSchema: z.ZodObject<{
|
|
7
|
+
format: z.ZodLiteral<1>;
|
|
8
|
+
runId: z.ZodString;
|
|
9
|
+
createdAt: z.ZodISODateTime;
|
|
10
|
+
mode: z.ZodEnum<{
|
|
11
|
+
live: "live";
|
|
12
|
+
fixture: "fixture";
|
|
13
|
+
replay: "replay";
|
|
14
|
+
}>;
|
|
15
|
+
packageVersion: z.ZodString;
|
|
16
|
+
recipe: z.ZodString;
|
|
17
|
+
recipeFingerprint: z.ZodString;
|
|
18
|
+
datasetFingerprint: z.ZodString;
|
|
19
|
+
inputFingerprint: z.ZodString;
|
|
20
|
+
answerKeyFingerprint: z.ZodString;
|
|
21
|
+
split: z.ZodEnum<{
|
|
22
|
+
development: "development";
|
|
23
|
+
"held-out": "held-out";
|
|
24
|
+
}>;
|
|
25
|
+
requestedModel: z.ZodString;
|
|
26
|
+
policy: z.ZodObject<{
|
|
27
|
+
minConfidence: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
selectedOn: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
runId: z.ZodString;
|
|
30
|
+
datasetFingerprint: z.ZodString;
|
|
31
|
+
recipeFingerprint: z.ZodString;
|
|
32
|
+
model: z.ZodString;
|
|
33
|
+
split: z.ZodLiteral<"development">;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
price: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
model: z.ZodString;
|
|
38
|
+
inputPerMillion: z.ZodNumber;
|
|
39
|
+
outputPerMillion: z.ZodNumber;
|
|
40
|
+
currency: z.ZodLiteral<"USD">;
|
|
41
|
+
date: z.ZodISODate;
|
|
42
|
+
source: z.ZodString;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
cases: z.ZodArray<z.ZodObject<{
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
input: z.ZodNonOptional<z.ZodUnknown & z.ZodType<Record<string, import("../src/data.js").JsonValue>, unknown, z.core.$ZodTypeInternals<Record<string, import("../src/data.js").JsonValue>, unknown>>>;
|
|
47
|
+
expected: z.ZodNonOptional<z.ZodUnknown & z.ZodType<Record<string, import("../src/data.js").JsonValue>, unknown, z.core.$ZodTypeInternals<Record<string, import("../src/data.js").JsonValue>, unknown>>>;
|
|
48
|
+
rationale: z.ZodString;
|
|
49
|
+
family: z.ZodOptional<z.ZodString>;
|
|
50
|
+
split: z.ZodDefault<z.ZodEnum<{
|
|
51
|
+
development: "development";
|
|
52
|
+
"held-out": "held-out";
|
|
53
|
+
}>>;
|
|
54
|
+
provenance: z.ZodDefault<z.ZodObject<{
|
|
55
|
+
method: z.ZodEnum<{
|
|
56
|
+
"author-synthetic": "author-synthetic";
|
|
57
|
+
"human-reviewed": "human-reviewed";
|
|
58
|
+
"public-dataset": "public-dataset";
|
|
59
|
+
unspecified: "unspecified";
|
|
60
|
+
}>;
|
|
61
|
+
source: z.ZodString;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
contested: z.ZodDefault<z.ZodBoolean>;
|
|
64
|
+
adversarial: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
67
|
+
id: z.ZodString;
|
|
68
|
+
expected: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
69
|
+
contested: z.ZodBoolean;
|
|
70
|
+
adversarial: z.ZodBoolean;
|
|
71
|
+
actual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
72
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
73
|
+
error: z.ZodOptional<z.ZodString>;
|
|
74
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
model: z.ZodOptional<z.ZodString>;
|
|
76
|
+
correct: z.ZodBoolean;
|
|
77
|
+
ready: z.ZodBoolean;
|
|
78
|
+
durationMs: z.ZodNumber;
|
|
79
|
+
decisions: z.ZodArray<z.ZodObject<{
|
|
80
|
+
minConfidence: z.ZodNumber;
|
|
81
|
+
ready: z.ZodBoolean;
|
|
82
|
+
correct: z.ZodBoolean;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
exchanges: z.ZodArray<z.ZodObject<{
|
|
85
|
+
request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
86
|
+
response: z.ZodOptional<z.ZodUnknown>;
|
|
87
|
+
error: z.ZodOptional<z.ZodString>;
|
|
88
|
+
durationMs: z.ZodNumber;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
}, z.core.$loose>>;
|
|
91
|
+
thresholds: z.ZodArray<z.ZodNumber>;
|
|
92
|
+
sourceRun: z.ZodOptional<z.ZodString>;
|
|
93
|
+
report: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export interface EvaluationRun extends Omit<z.infer<typeof archiveSchema>, 'rows' | 'report'> {
|
|
96
|
+
rows: EvaluationRow[];
|
|
97
|
+
report: ReturnType<typeof buildReport>;
|
|
98
|
+
}
|
|
99
|
+
export declare function evaluate(name: string, values: unknown[], options?: EvaluationOptions & {
|
|
100
|
+
out?: string;
|
|
101
|
+
client?: DecisionClient;
|
|
102
|
+
mode?: 'live' | 'fixture';
|
|
103
|
+
}): Promise<EvaluationRun>;
|
|
104
|
+
export declare function replay(run: EvaluationRun, policy?: EvaluationPolicy, out?: string): Promise<EvaluationRun>;
|
|
105
|
+
export declare function readRun(directory: string): Promise<EvaluationRun>;
|
|
106
|
+
export declare function freezePolicy(run: EvaluationRun): EvaluationPolicy;
|
|
107
|
+
export declare function compare(baseline: EvaluationRun, candidate: EvaluationRun): {
|
|
108
|
+
recipe: string;
|
|
109
|
+
cases: number;
|
|
110
|
+
split: "development" | "held-out";
|
|
111
|
+
baseline: {
|
|
112
|
+
runId: string;
|
|
113
|
+
packageVersion: string;
|
|
114
|
+
recipeFingerprint: string;
|
|
115
|
+
requestedModel: string;
|
|
116
|
+
models: string[];
|
|
117
|
+
policy: {
|
|
118
|
+
minConfidence?: number | undefined;
|
|
119
|
+
selectedOn?: {
|
|
120
|
+
runId: string;
|
|
121
|
+
datasetFingerprint: string;
|
|
122
|
+
recipeFingerprint: string;
|
|
123
|
+
model: string;
|
|
124
|
+
split: "development";
|
|
125
|
+
} | undefined;
|
|
126
|
+
};
|
|
127
|
+
mode: "live" | "fixture" | "replay";
|
|
128
|
+
report: {
|
|
129
|
+
contestedAccuracy: number | null;
|
|
130
|
+
adversarialAccuracy: number | null;
|
|
131
|
+
calibration: {
|
|
132
|
+
confidence: string;
|
|
133
|
+
cases: number;
|
|
134
|
+
accuracy: number | null;
|
|
135
|
+
}[];
|
|
136
|
+
thresholdEvaluation: string;
|
|
137
|
+
thresholds: {
|
|
138
|
+
minConfidence: number;
|
|
139
|
+
deferRate: number | null;
|
|
140
|
+
readyAccuracy: number | null;
|
|
141
|
+
readyCases: number;
|
|
142
|
+
reviewCases: number;
|
|
143
|
+
failedCases: number;
|
|
144
|
+
readyAccuracyInterval95: [number, number] | null;
|
|
145
|
+
}[];
|
|
146
|
+
suggestedMinConfidence: number | null;
|
|
147
|
+
latencyMs: {
|
|
148
|
+
p50: number | null;
|
|
149
|
+
p95: number | null;
|
|
150
|
+
totalCaseTime: number;
|
|
151
|
+
};
|
|
152
|
+
usage: {
|
|
153
|
+
requests: number;
|
|
154
|
+
input_tokens: number;
|
|
155
|
+
output_tokens: number;
|
|
156
|
+
unknownResponses: number;
|
|
157
|
+
failedRequests: number;
|
|
158
|
+
models: string[];
|
|
159
|
+
};
|
|
160
|
+
cost: {
|
|
161
|
+
estimated: number;
|
|
162
|
+
model: string;
|
|
163
|
+
inputPerMillion: number;
|
|
164
|
+
outputPerMillion: number;
|
|
165
|
+
currency: "USD";
|
|
166
|
+
date: string;
|
|
167
|
+
source: string;
|
|
168
|
+
} | null;
|
|
169
|
+
confusion: {
|
|
170
|
+
[k: string]: {
|
|
171
|
+
total: number;
|
|
172
|
+
correct: number;
|
|
173
|
+
misses: Record<string, number>;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
failures: ({
|
|
177
|
+
adversarial?: true;
|
|
178
|
+
contested?: true;
|
|
179
|
+
confidence?: number;
|
|
180
|
+
actual: Record<string, unknown> | undefined;
|
|
181
|
+
id: string;
|
|
182
|
+
expected: Record<string, unknown>;
|
|
183
|
+
} | {
|
|
184
|
+
adversarial?: true;
|
|
185
|
+
contested?: true;
|
|
186
|
+
confidence?: number;
|
|
187
|
+
error: string;
|
|
188
|
+
id: string;
|
|
189
|
+
expected: Record<string, unknown>;
|
|
190
|
+
})[];
|
|
191
|
+
items?: never;
|
|
192
|
+
correctItems?: never;
|
|
193
|
+
itemAccuracy?: never;
|
|
194
|
+
recipe: string;
|
|
195
|
+
model: string;
|
|
196
|
+
models: string[];
|
|
197
|
+
cases: number;
|
|
198
|
+
completed: number;
|
|
199
|
+
failed: number;
|
|
200
|
+
correct: number;
|
|
201
|
+
wrong: number;
|
|
202
|
+
ready: number;
|
|
203
|
+
review: number;
|
|
204
|
+
accuracy: number | null;
|
|
205
|
+
completedAccuracy: number | null;
|
|
206
|
+
accuracyInterval95: [number, number] | null;
|
|
207
|
+
readyAccuracy: number | null;
|
|
208
|
+
readyAccuracyInterval95: [number, number] | null;
|
|
209
|
+
reviewRate: number | null;
|
|
210
|
+
evidence?: import("./report.js").ReportEvidence;
|
|
211
|
+
} | {
|
|
212
|
+
contestedAccuracy: number | null;
|
|
213
|
+
adversarialAccuracy: number | null;
|
|
214
|
+
calibration: {
|
|
215
|
+
confidence: string;
|
|
216
|
+
cases: number;
|
|
217
|
+
accuracy: number | null;
|
|
218
|
+
}[];
|
|
219
|
+
thresholdEvaluation: string;
|
|
220
|
+
thresholds: {
|
|
221
|
+
minConfidence: number;
|
|
222
|
+
deferRate: number | null;
|
|
223
|
+
readyAccuracy: number | null;
|
|
224
|
+
readyCases: number;
|
|
225
|
+
reviewCases: number;
|
|
226
|
+
failedCases: number;
|
|
227
|
+
readyAccuracyInterval95: [number, number] | null;
|
|
228
|
+
}[];
|
|
229
|
+
suggestedMinConfidence: number | null;
|
|
230
|
+
latencyMs: {
|
|
231
|
+
p50: number | null;
|
|
232
|
+
p95: number | null;
|
|
233
|
+
totalCaseTime: number;
|
|
234
|
+
};
|
|
235
|
+
usage: {
|
|
236
|
+
requests: number;
|
|
237
|
+
input_tokens: number;
|
|
238
|
+
output_tokens: number;
|
|
239
|
+
unknownResponses: number;
|
|
240
|
+
failedRequests: number;
|
|
241
|
+
models: string[];
|
|
242
|
+
};
|
|
243
|
+
cost: {
|
|
244
|
+
estimated: number;
|
|
245
|
+
model: string;
|
|
246
|
+
inputPerMillion: number;
|
|
247
|
+
outputPerMillion: number;
|
|
248
|
+
currency: "USD";
|
|
249
|
+
date: string;
|
|
250
|
+
source: string;
|
|
251
|
+
} | null;
|
|
252
|
+
confusion: {
|
|
253
|
+
[k: string]: {
|
|
254
|
+
total: number;
|
|
255
|
+
correct: number;
|
|
256
|
+
misses: Record<string, number>;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
failures: ({
|
|
260
|
+
adversarial?: true;
|
|
261
|
+
contested?: true;
|
|
262
|
+
confidence?: number;
|
|
263
|
+
actual: Record<string, unknown> | undefined;
|
|
264
|
+
id: string;
|
|
265
|
+
expected: Record<string, unknown>;
|
|
266
|
+
} | {
|
|
267
|
+
adversarial?: true;
|
|
268
|
+
contested?: true;
|
|
269
|
+
confidence?: number;
|
|
270
|
+
error: string;
|
|
271
|
+
id: string;
|
|
272
|
+
expected: Record<string, unknown>;
|
|
273
|
+
})[];
|
|
274
|
+
items: number;
|
|
275
|
+
correctItems: number;
|
|
276
|
+
itemAccuracy: number;
|
|
277
|
+
recipe: string;
|
|
278
|
+
model: string;
|
|
279
|
+
models: string[];
|
|
280
|
+
cases: number;
|
|
281
|
+
completed: number;
|
|
282
|
+
failed: number;
|
|
283
|
+
correct: number;
|
|
284
|
+
wrong: number;
|
|
285
|
+
ready: number;
|
|
286
|
+
review: number;
|
|
287
|
+
accuracy: number | null;
|
|
288
|
+
completedAccuracy: number | null;
|
|
289
|
+
accuracyInterval95: [number, number] | null;
|
|
290
|
+
readyAccuracy: number | null;
|
|
291
|
+
readyAccuracyInterval95: [number, number] | null;
|
|
292
|
+
reviewRate: number | null;
|
|
293
|
+
evidence?: import("./report.js").ReportEvidence;
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
candidate: {
|
|
297
|
+
runId: string;
|
|
298
|
+
packageVersion: string;
|
|
299
|
+
recipeFingerprint: string;
|
|
300
|
+
requestedModel: string;
|
|
301
|
+
models: string[];
|
|
302
|
+
policy: {
|
|
303
|
+
minConfidence?: number | undefined;
|
|
304
|
+
selectedOn?: {
|
|
305
|
+
runId: string;
|
|
306
|
+
datasetFingerprint: string;
|
|
307
|
+
recipeFingerprint: string;
|
|
308
|
+
model: string;
|
|
309
|
+
split: "development";
|
|
310
|
+
} | undefined;
|
|
311
|
+
};
|
|
312
|
+
mode: "live" | "fixture" | "replay";
|
|
313
|
+
report: {
|
|
314
|
+
contestedAccuracy: number | null;
|
|
315
|
+
adversarialAccuracy: number | null;
|
|
316
|
+
calibration: {
|
|
317
|
+
confidence: string;
|
|
318
|
+
cases: number;
|
|
319
|
+
accuracy: number | null;
|
|
320
|
+
}[];
|
|
321
|
+
thresholdEvaluation: string;
|
|
322
|
+
thresholds: {
|
|
323
|
+
minConfidence: number;
|
|
324
|
+
deferRate: number | null;
|
|
325
|
+
readyAccuracy: number | null;
|
|
326
|
+
readyCases: number;
|
|
327
|
+
reviewCases: number;
|
|
328
|
+
failedCases: number;
|
|
329
|
+
readyAccuracyInterval95: [number, number] | null;
|
|
330
|
+
}[];
|
|
331
|
+
suggestedMinConfidence: number | null;
|
|
332
|
+
latencyMs: {
|
|
333
|
+
p50: number | null;
|
|
334
|
+
p95: number | null;
|
|
335
|
+
totalCaseTime: number;
|
|
336
|
+
};
|
|
337
|
+
usage: {
|
|
338
|
+
requests: number;
|
|
339
|
+
input_tokens: number;
|
|
340
|
+
output_tokens: number;
|
|
341
|
+
unknownResponses: number;
|
|
342
|
+
failedRequests: number;
|
|
343
|
+
models: string[];
|
|
344
|
+
};
|
|
345
|
+
cost: {
|
|
346
|
+
estimated: number;
|
|
347
|
+
model: string;
|
|
348
|
+
inputPerMillion: number;
|
|
349
|
+
outputPerMillion: number;
|
|
350
|
+
currency: "USD";
|
|
351
|
+
date: string;
|
|
352
|
+
source: string;
|
|
353
|
+
} | null;
|
|
354
|
+
confusion: {
|
|
355
|
+
[k: string]: {
|
|
356
|
+
total: number;
|
|
357
|
+
correct: number;
|
|
358
|
+
misses: Record<string, number>;
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
failures: ({
|
|
362
|
+
adversarial?: true;
|
|
363
|
+
contested?: true;
|
|
364
|
+
confidence?: number;
|
|
365
|
+
actual: Record<string, unknown> | undefined;
|
|
366
|
+
id: string;
|
|
367
|
+
expected: Record<string, unknown>;
|
|
368
|
+
} | {
|
|
369
|
+
adversarial?: true;
|
|
370
|
+
contested?: true;
|
|
371
|
+
confidence?: number;
|
|
372
|
+
error: string;
|
|
373
|
+
id: string;
|
|
374
|
+
expected: Record<string, unknown>;
|
|
375
|
+
})[];
|
|
376
|
+
items?: never;
|
|
377
|
+
correctItems?: never;
|
|
378
|
+
itemAccuracy?: never;
|
|
379
|
+
recipe: string;
|
|
380
|
+
model: string;
|
|
381
|
+
models: string[];
|
|
382
|
+
cases: number;
|
|
383
|
+
completed: number;
|
|
384
|
+
failed: number;
|
|
385
|
+
correct: number;
|
|
386
|
+
wrong: number;
|
|
387
|
+
ready: number;
|
|
388
|
+
review: number;
|
|
389
|
+
accuracy: number | null;
|
|
390
|
+
completedAccuracy: number | null;
|
|
391
|
+
accuracyInterval95: [number, number] | null;
|
|
392
|
+
readyAccuracy: number | null;
|
|
393
|
+
readyAccuracyInterval95: [number, number] | null;
|
|
394
|
+
reviewRate: number | null;
|
|
395
|
+
evidence?: import("./report.js").ReportEvidence;
|
|
396
|
+
} | {
|
|
397
|
+
contestedAccuracy: number | null;
|
|
398
|
+
adversarialAccuracy: number | null;
|
|
399
|
+
calibration: {
|
|
400
|
+
confidence: string;
|
|
401
|
+
cases: number;
|
|
402
|
+
accuracy: number | null;
|
|
403
|
+
}[];
|
|
404
|
+
thresholdEvaluation: string;
|
|
405
|
+
thresholds: {
|
|
406
|
+
minConfidence: number;
|
|
407
|
+
deferRate: number | null;
|
|
408
|
+
readyAccuracy: number | null;
|
|
409
|
+
readyCases: number;
|
|
410
|
+
reviewCases: number;
|
|
411
|
+
failedCases: number;
|
|
412
|
+
readyAccuracyInterval95: [number, number] | null;
|
|
413
|
+
}[];
|
|
414
|
+
suggestedMinConfidence: number | null;
|
|
415
|
+
latencyMs: {
|
|
416
|
+
p50: number | null;
|
|
417
|
+
p95: number | null;
|
|
418
|
+
totalCaseTime: number;
|
|
419
|
+
};
|
|
420
|
+
usage: {
|
|
421
|
+
requests: number;
|
|
422
|
+
input_tokens: number;
|
|
423
|
+
output_tokens: number;
|
|
424
|
+
unknownResponses: number;
|
|
425
|
+
failedRequests: number;
|
|
426
|
+
models: string[];
|
|
427
|
+
};
|
|
428
|
+
cost: {
|
|
429
|
+
estimated: number;
|
|
430
|
+
model: string;
|
|
431
|
+
inputPerMillion: number;
|
|
432
|
+
outputPerMillion: number;
|
|
433
|
+
currency: "USD";
|
|
434
|
+
date: string;
|
|
435
|
+
source: string;
|
|
436
|
+
} | null;
|
|
437
|
+
confusion: {
|
|
438
|
+
[k: string]: {
|
|
439
|
+
total: number;
|
|
440
|
+
correct: number;
|
|
441
|
+
misses: Record<string, number>;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
failures: ({
|
|
445
|
+
adversarial?: true;
|
|
446
|
+
contested?: true;
|
|
447
|
+
confidence?: number;
|
|
448
|
+
actual: Record<string, unknown> | undefined;
|
|
449
|
+
id: string;
|
|
450
|
+
expected: Record<string, unknown>;
|
|
451
|
+
} | {
|
|
452
|
+
adversarial?: true;
|
|
453
|
+
contested?: true;
|
|
454
|
+
confidence?: number;
|
|
455
|
+
error: string;
|
|
456
|
+
id: string;
|
|
457
|
+
expected: Record<string, unknown>;
|
|
458
|
+
})[];
|
|
459
|
+
items: number;
|
|
460
|
+
correctItems: number;
|
|
461
|
+
itemAccuracy: number;
|
|
462
|
+
recipe: string;
|
|
463
|
+
model: string;
|
|
464
|
+
models: string[];
|
|
465
|
+
cases: number;
|
|
466
|
+
completed: number;
|
|
467
|
+
failed: number;
|
|
468
|
+
correct: number;
|
|
469
|
+
wrong: number;
|
|
470
|
+
ready: number;
|
|
471
|
+
review: number;
|
|
472
|
+
accuracy: number | null;
|
|
473
|
+
completedAccuracy: number | null;
|
|
474
|
+
accuracyInterval95: [number, number] | null;
|
|
475
|
+
readyAccuracy: number | null;
|
|
476
|
+
readyAccuracyInterval95: [number, number] | null;
|
|
477
|
+
reviewRate: number | null;
|
|
478
|
+
evidence?: import("./report.js").ReportEvidence;
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
delta: {
|
|
482
|
+
accuracy: number | null;
|
|
483
|
+
readyAccuracy: number | null;
|
|
484
|
+
review: number;
|
|
485
|
+
failed: number;
|
|
486
|
+
};
|
|
487
|
+
changed: {
|
|
488
|
+
id: string;
|
|
489
|
+
before: {
|
|
490
|
+
correct: boolean;
|
|
491
|
+
ready: boolean;
|
|
492
|
+
error: string | undefined;
|
|
493
|
+
};
|
|
494
|
+
after: {
|
|
495
|
+
correct: boolean;
|
|
496
|
+
ready: boolean;
|
|
497
|
+
error: string | undefined;
|
|
498
|
+
};
|
|
499
|
+
}[];
|
|
500
|
+
};
|
|
501
|
+
export {};
|