@memberjunction/testing-engine 6.2.0-edge.1 → 6.2.0-edge.3
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 +4 -1
- package/dist/decision-eval/corpus.d.ts +94 -0
- package/dist/decision-eval/corpus.d.ts.map +1 -0
- package/dist/decision-eval/corpus.js +144 -0
- package/dist/decision-eval/corpus.js.map +1 -0
- package/dist/decision-eval/discovery-baseline.d.ts +62 -0
- package/dist/decision-eval/discovery-baseline.d.ts.map +1 -0
- package/dist/decision-eval/discovery-baseline.js +90 -0
- package/dist/decision-eval/discovery-baseline.js.map +1 -0
- package/dist/decision-eval/discovery-corpus.d.ts +75 -0
- package/dist/decision-eval/discovery-corpus.d.ts.map +1 -0
- package/dist/decision-eval/discovery-corpus.js +110 -0
- package/dist/decision-eval/discovery-corpus.js.map +1 -0
- package/dist/decision-eval/discovery-mapping.d.ts +18 -0
- package/dist/decision-eval/discovery-mapping.d.ts.map +1 -0
- package/dist/decision-eval/discovery-mapping.js +21 -0
- package/dist/decision-eval/discovery-mapping.js.map +1 -0
- package/dist/decision-eval/discovery-metrics.d.ts +339 -0
- package/dist/decision-eval/discovery-metrics.d.ts.map +1 -0
- package/dist/decision-eval/discovery-metrics.js +401 -0
- package/dist/decision-eval/discovery-metrics.js.map +1 -0
- package/dist/decision-eval/discovery-scorecard.d.ts +96 -0
- package/dist/decision-eval/discovery-scorecard.d.ts.map +1 -0
- package/dist/decision-eval/discovery-scorecard.js +351 -0
- package/dist/decision-eval/discovery-scorecard.js.map +1 -0
- package/dist/decision-eval/discovery-suite.d.ts +201 -0
- package/dist/decision-eval/discovery-suite.d.ts.map +1 -0
- package/dist/decision-eval/discovery-suite.js +180 -0
- package/dist/decision-eval/discovery-suite.js.map +1 -0
- package/dist/decision-eval/discovery-types.d.ts +896 -0
- package/dist/decision-eval/discovery-types.d.ts.map +1 -0
- package/dist/decision-eval/discovery-types.js +211 -0
- package/dist/decision-eval/discovery-types.js.map +1 -0
- package/dist/decision-eval/index.d.ts +18 -0
- package/dist/decision-eval/index.d.ts.map +1 -0
- package/dist/decision-eval/index.js +18 -0
- package/dist/decision-eval/index.js.map +1 -0
- package/dist/decision-eval/metrics.d.ts +330 -0
- package/dist/decision-eval/metrics.d.ts.map +1 -0
- package/dist/decision-eval/metrics.js +574 -0
- package/dist/decision-eval/metrics.js.map +1 -0
- package/dist/decision-eval/output-paths.d.ts +119 -0
- package/dist/decision-eval/output-paths.d.ts.map +1 -0
- package/dist/decision-eval/output-paths.js +258 -0
- package/dist/decision-eval/output-paths.js.map +1 -0
- package/dist/decision-eval/point-mapping.d.ts +50 -0
- package/dist/decision-eval/point-mapping.d.ts.map +1 -0
- package/dist/decision-eval/point-mapping.js +83 -0
- package/dist/decision-eval/point-mapping.js.map +1 -0
- package/dist/decision-eval/scorecard.d.ts +190 -0
- package/dist/decision-eval/scorecard.d.ts.map +1 -0
- package/dist/decision-eval/scorecard.js +384 -0
- package/dist/decision-eval/scorecard.js.map +1 -0
- package/dist/decision-eval/suite.d.ts +244 -0
- package/dist/decision-eval/suite.d.ts.map +1 -0
- package/dist/decision-eval/suite.js +238 -0
- package/dist/decision-eval/suite.js.map +1 -0
- package/dist/decision-eval/types.d.ts +993 -0
- package/dist/decision-eval/types.d.ts.map +1 -0
- package/dist/decision-eval/types.js +227 -0
- package/dist/decision-eval/types.js.map +1 -0
- package/dist/drivers/AgentEvalDriver.d.ts +47 -4
- package/dist/drivers/AgentEvalDriver.d.ts.map +1 -1
- package/dist/drivers/AgentEvalDriver.js +180 -24
- package/dist/drivers/AgentEvalDriver.js.map +1 -1
- package/dist/drivers/DecisionEvalDriver.d.ts +297 -0
- package/dist/drivers/DecisionEvalDriver.d.ts.map +1 -0
- package/dist/drivers/DecisionEvalDriver.js +716 -0
- package/dist/drivers/DecisionEvalDriver.js.map +1 -0
- package/dist/drivers/PinnedDecisionRunner.d.ts +24 -0
- package/dist/drivers/PinnedDecisionRunner.d.ts.map +1 -0
- package/dist/drivers/PinnedDecisionRunner.js +24 -0
- package/dist/drivers/PinnedDecisionRunner.js.map +1 -0
- package/dist/drivers/PromptEvalDriver.d.ts.map +1 -1
- package/dist/drivers/PromptEvalDriver.js +11 -10
- package/dist/drivers/PromptEvalDriver.js.map +1 -1
- package/dist/drivers/RubricCalibrationTestDriver.d.ts +40 -0
- package/dist/drivers/RubricCalibrationTestDriver.d.ts.map +1 -0
- package/dist/drivers/RubricCalibrationTestDriver.js +194 -0
- package/dist/drivers/RubricCalibrationTestDriver.js.map +1 -0
- package/dist/drivers/calibration.d.ts +85 -0
- package/dist/drivers/calibration.d.ts.map +1 -0
- package/dist/drivers/calibration.js +191 -0
- package/dist/drivers/calibration.js.map +1 -0
- package/dist/drivers/control-tool-map.d.ts +23 -0
- package/dist/drivers/control-tool-map.d.ts.map +1 -0
- package/dist/drivers/control-tool-map.js +31 -0
- package/dist/drivers/control-tool-map.js.map +1 -0
- package/dist/drivers/index.d.ts +2 -0
- package/dist/drivers/index.d.ts.map +1 -1
- package/dist/drivers/index.js +2 -0
- package/dist/drivers/index.js.map +1 -1
- package/dist/engine/TestEngine.d.ts.map +1 -1
- package/dist/engine/TestEngine.js +14 -4
- package/dist/engine/TestEngine.js.map +1 -1
- package/dist/eval/decision.d.ts +2 -0
- package/dist/eval/decision.d.ts.map +1 -1
- package/dist/eval/decision.js +20 -0
- package/dist/eval/decision.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/oracles/DecisionJudgeOracle.d.ts +97 -0
- package/dist/oracles/DecisionJudgeOracle.d.ts.map +1 -0
- package/dist/oracles/DecisionJudgeOracle.js +230 -0
- package/dist/oracles/DecisionJudgeOracle.js.map +1 -0
- package/dist/oracles/DecisionLabelMatchOracle.d.ts +38 -0
- package/dist/oracles/DecisionLabelMatchOracle.d.ts.map +1 -0
- package/dist/oracles/DecisionLabelMatchOracle.js +96 -0
- package/dist/oracles/DecisionLabelMatchOracle.js.map +1 -0
- package/dist/oracles/DiscoveryLabelMatchOracle.d.ts +39 -0
- package/dist/oracles/DiscoveryLabelMatchOracle.d.ts.map +1 -0
- package/dist/oracles/DiscoveryLabelMatchOracle.js +88 -0
- package/dist/oracles/DiscoveryLabelMatchOracle.js.map +1 -0
- package/dist/oracles/LLMJudgeOracle.d.ts +2 -47
- package/dist/oracles/LLMJudgeOracle.d.ts.map +1 -1
- package/dist/oracles/LLMJudgeOracle.js +85 -155
- package/dist/oracles/LLMJudgeOracle.js.map +1 -1
- package/dist/oracles/RubricOracle.d.ts +53 -0
- package/dist/oracles/RubricOracle.d.ts.map +1 -0
- package/dist/oracles/RubricOracle.js +78 -0
- package/dist/oracles/RubricOracle.js.map +1 -0
- package/dist/oracles/TraceValidatorOracle.js +1 -1
- package/dist/oracles/TraceValidatorOracle.js.map +1 -1
- package/dist/oracles/index.d.ts +5 -0
- package/dist/oracles/index.d.ts.map +1 -1
- package/dist/oracles/index.js +5 -0
- package/dist/oracles/index.js.map +1 -1
- package/dist/oracles/inline-rubric.d.ts +25 -0
- package/dist/oracles/inline-rubric.d.ts.map +1 -0
- package/dist/oracles/inline-rubric.js +82 -0
- package/dist/oracles/inline-rubric.js.map +1 -0
- package/dist/oracles/judge-trace.d.ts +76 -0
- package/dist/oracles/judge-trace.d.ts.map +1 -0
- package/dist/oracles/judge-trace.js +125 -0
- package/dist/oracles/judge-trace.js.map +1 -0
- package/dist/oracles/promote-criteria.d.ts +57 -0
- package/dist/oracles/promote-criteria.d.ts.map +1 -0
- package/dist/oracles/promote-criteria.js +104 -0
- package/dist/oracles/promote-criteria.js.map +1 -0
- package/dist/oracles/rubric-resolution.d.ts +76 -0
- package/dist/oracles/rubric-resolution.d.ts.map +1 -0
- package/dist/oracles/rubric-resolution.js +138 -0
- package/dist/oracles/rubric-resolution.js.map +1 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/result-formatter.d.ts +5 -0
- package/dist/utils/result-formatter.d.ts.map +1 -1
- package/dist/utils/result-formatter.js +8 -2
- package/dist/utils/result-formatter.js.map +1 -1
- package/package.json +12 -10
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Turns a Decision Eval suite's `MJ: Test Runs` into a scorecard: one set of metrics
|
|
3
|
+
* per cell, as JSON and as Markdown. Pure: the scorecard rig queries the runs and writes the files.
|
|
4
|
+
*
|
|
5
|
+
* A run's cell is the bracketed part of its test's name (`<point id> [<cell label>]`), its label is
|
|
6
|
+
* the test's expected outcome, and its probability, latency and model are the driver's
|
|
7
|
+
* `ActualOutput` (the probability falls back to the `decision-label-match` oracle's details in
|
|
8
|
+
* `ResultDetails`). The scorecard names cases by ID only, never by text.
|
|
9
|
+
*
|
|
10
|
+
* Two kinds of figure, kept apart:
|
|
11
|
+
* - the accuracy-type metrics score the thread Likelihood alone, on each case's mean over its
|
|
12
|
+
* repeats: what calibration is fitted on, and an upper bound on what routing does;
|
|
13
|
+
* - the routing summary scores production's own verdict per run, end to end: one call, the agent
|
|
14
|
+
* Choice and the thread Likelihood read together at the thresholds and calibration the driver
|
|
15
|
+
* recorded with the run.
|
|
16
|
+
*
|
|
17
|
+
* @module @memberjunction/testing-engine
|
|
18
|
+
*/
|
|
19
|
+
import { type DecisionEvalCellMetrics, type DecisionEvalMetricOptions, type DecisionEvalObservation } from './metrics.js';
|
|
20
|
+
import { type DecisionEvalActualOutput, type DecisionEvalRoutingPolicy } from './types.js';
|
|
21
|
+
/** The continue prior the routing summary weights its two classes at: a chat's usual mix. */
|
|
22
|
+
export declare const DECISION_EVAL_ROUTING_CONTINUE_PRIOR = 0.9;
|
|
23
|
+
/** One `MJ: Test Runs` row, with its prompt run's cost, as the scorecard reads it. */
|
|
24
|
+
export interface DecisionEvalRunRow {
|
|
25
|
+
/** The test's name: `<point id> [<cell label>]`. */
|
|
26
|
+
TestName: string;
|
|
27
|
+
/** The run's status. */
|
|
28
|
+
Status: string;
|
|
29
|
+
/** The run's `ExpectedOutputData` JSON. */
|
|
30
|
+
ExpectedOutputData: string | null;
|
|
31
|
+
/** The run's `ActualOutputData` JSON. */
|
|
32
|
+
ActualOutputData: string | null;
|
|
33
|
+
/** The run's `ResultDetails` JSON: its oracle results. */
|
|
34
|
+
ResultDetails: string | null;
|
|
35
|
+
/** The run's `CostUSD`. */
|
|
36
|
+
CostUSD: number | null;
|
|
37
|
+
/** The linked prompt run's cost (`TotalCost`, else `Cost`), when it has one. */
|
|
38
|
+
PromptRunCost: number | null;
|
|
39
|
+
}
|
|
40
|
+
/** A run's recorded routing verdict, and the policy it was reached under. */
|
|
41
|
+
export interface DecisionEvalRoutingRun {
|
|
42
|
+
Verdict: NonNullable<DecisionEvalActualOutput['RoutingVerdict']>;
|
|
43
|
+
/** The policy, or null when the run recorded none: a verdict from before routing was calibrated. */
|
|
44
|
+
Policy: DecisionEvalRoutingPolicy | null;
|
|
45
|
+
}
|
|
46
|
+
/** A run the scorecard could read, with its cell and what it tells the metrics. */
|
|
47
|
+
export interface DecisionEvalCellObservation {
|
|
48
|
+
Cell: string;
|
|
49
|
+
Observation: DecisionEvalObservation;
|
|
50
|
+
/** Production's routing verdict for the run, or null when it recorded none (no answers). */
|
|
51
|
+
Routing: DecisionEvalRoutingRun | null;
|
|
52
|
+
/** The resolved model that answered, when recorded. */
|
|
53
|
+
ResolvedModel: string | null;
|
|
54
|
+
/** Whether the cell asked for a temperature or seed, and whether it reached the model. */
|
|
55
|
+
SamplingRequested: boolean;
|
|
56
|
+
SamplingApplied: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** A run the scorecard could not read, and why. */
|
|
59
|
+
export interface DecisionEvalUnreadableRun {
|
|
60
|
+
Unreadable: string;
|
|
61
|
+
}
|
|
62
|
+
/** How many of some runs had an outcome. */
|
|
63
|
+
export interface RoutingShare {
|
|
64
|
+
Runs: number;
|
|
65
|
+
Count: number;
|
|
66
|
+
/** Count / Runs, or null with no runs. */
|
|
67
|
+
Rate: number | null;
|
|
68
|
+
}
|
|
69
|
+
/** Production's routing outcomes on one set of runs. */
|
|
70
|
+
export interface RoutingVerdictRates {
|
|
71
|
+
/**
|
|
72
|
+
* `switch` runs that left the thread, to another agent or to someone else. A move to the wrong
|
|
73
|
+
* agent counts: the corpus labels continue or switch, not which agent.
|
|
74
|
+
*/
|
|
75
|
+
SwitchLeft: RoutingShare;
|
|
76
|
+
/** `continue` runs that kept the thread. */
|
|
77
|
+
ContinueKept: RoutingShare;
|
|
78
|
+
/** `ambiguous` runs that kept the thread. Reported apart, not scored. */
|
|
79
|
+
AmbiguousKept: RoutingShare;
|
|
80
|
+
/** The mean of the switch and continue rates, over those defined. */
|
|
81
|
+
BalancedAccuracy: number | null;
|
|
82
|
+
/**
|
|
83
|
+
* Accuracy at a {@link DECISION_EVAL_ROUTING_CONTINUE_PRIOR} continue prior: prior × continue
|
|
84
|
+
* kept + (1 − prior) × switch left. Always-continue scores the prior.
|
|
85
|
+
*/
|
|
86
|
+
AccuracyAtContinuePrior: number | null;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Production's routing verdict, end to end, per run: one call each, the agent Choice and the thread
|
|
90
|
+
* Likelihood read together at the thresholds and calibration the driver recorded with the run.
|
|
91
|
+
* Usable runs only (a failed-over run in a cell that forbade it is left out), and only verdicts
|
|
92
|
+
* recorded with their policy: an older verdict used raw thresholds.
|
|
93
|
+
*/
|
|
94
|
+
export interface RoutingVerdictSummary {
|
|
95
|
+
/** Usable runs whose verdict was recorded with its policy: the runs scored. */
|
|
96
|
+
Runs: number;
|
|
97
|
+
/** Usable runs whose verdict was recorded without a policy (before routing was calibrated): not scored. */
|
|
98
|
+
UnscoredRuns: number;
|
|
99
|
+
/** Each policy the scored verdicts were reached under, described, with its run count. */
|
|
100
|
+
Policies: Record<string, number>;
|
|
101
|
+
/** Scored runs whose in-process latency passed their policy's timeout. */
|
|
102
|
+
OverTimeoutRuns: number;
|
|
103
|
+
/** The verdicts as answered. */
|
|
104
|
+
AsAnswered: RoutingVerdictRates;
|
|
105
|
+
/**
|
|
106
|
+
* The same, with a run over its timeout counted as kept, as production keeps it. The latency is
|
|
107
|
+
* in-process, without the network, so this too is an upper bound on what the chat does.
|
|
108
|
+
*/
|
|
109
|
+
WithinTimeout: RoutingVerdictRates;
|
|
110
|
+
}
|
|
111
|
+
/** One cell's scorecard entry. */
|
|
112
|
+
export interface DecisionEvalScorecardCell {
|
|
113
|
+
Cell: string;
|
|
114
|
+
Metrics: DecisionEvalCellMetrics;
|
|
115
|
+
/** Production's routing verdict, end to end, per run. */
|
|
116
|
+
Routing: RoutingVerdictSummary;
|
|
117
|
+
/** How many runs each resolved model answered. */
|
|
118
|
+
ResolvedModels: Record<string, number>;
|
|
119
|
+
SamplingRequested: boolean;
|
|
120
|
+
SamplingApplied: boolean;
|
|
121
|
+
}
|
|
122
|
+
/** The whole scorecard. */
|
|
123
|
+
export interface DecisionEvalScorecard {
|
|
124
|
+
Suite: string;
|
|
125
|
+
Since: string | null;
|
|
126
|
+
Until: string | null;
|
|
127
|
+
GeneratedAt: string;
|
|
128
|
+
Seed: number;
|
|
129
|
+
BootstrapResamples: number;
|
|
130
|
+
CalibrationFolds: number;
|
|
131
|
+
Runs: number;
|
|
132
|
+
UnreadableRuns: number;
|
|
133
|
+
UnreadableReasons: Record<string, number>;
|
|
134
|
+
Cells: DecisionEvalScorecardCell[];
|
|
135
|
+
}
|
|
136
|
+
/** What the scorecard is built with. */
|
|
137
|
+
export interface DecisionEvalScorecardOptions extends DecisionEvalMetricOptions {
|
|
138
|
+
Suite: string;
|
|
139
|
+
Since?: string | null;
|
|
140
|
+
Until?: string | null;
|
|
141
|
+
/** Defaults to now. */
|
|
142
|
+
GeneratedAt?: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* A test name's point ID and cell label, or null when it isn't `<point id> [<cell label>]`.
|
|
146
|
+
*
|
|
147
|
+
* @param name The test's name.
|
|
148
|
+
*/
|
|
149
|
+
export declare function SplitDecisionEvalTestName(name: string): {
|
|
150
|
+
CaseId: string;
|
|
151
|
+
Cell: string;
|
|
152
|
+
} | null;
|
|
153
|
+
/**
|
|
154
|
+
* Reads one run. A run still in progress, or one whose name or expected outcome can't be read, is
|
|
155
|
+
* unreadable. A run with no readable `ActualOutput` is an observation with no probability.
|
|
156
|
+
*
|
|
157
|
+
* @param row The run.
|
|
158
|
+
*/
|
|
159
|
+
export declare function ReadDecisionEvalRun(row: DecisionEvalRunRow): DecisionEvalCellObservation | DecisionEvalUnreadableRun;
|
|
160
|
+
/**
|
|
161
|
+
* Builds the scorecard: reads every run, groups the readable ones by cell (sorted by label), and
|
|
162
|
+
* computes each cell's metrics. The runs may come in any order: the same runs give the same
|
|
163
|
+
* scorecard.
|
|
164
|
+
*
|
|
165
|
+
* @param rows The suite's runs.
|
|
166
|
+
* @param options The suite's name, the window, and the metric options.
|
|
167
|
+
*/
|
|
168
|
+
export declare function BuildDecisionEvalScorecard(rows: readonly DecisionEvalRunRow[], options: DecisionEvalScorecardOptions): DecisionEvalScorecard;
|
|
169
|
+
/**
|
|
170
|
+
* Production's routing verdicts in a cell, per run: how often a switch left the thread and a
|
|
171
|
+
* continuation kept it, as answered and within the timeout. See {@link RoutingVerdictSummary}.
|
|
172
|
+
*
|
|
173
|
+
* @param observations The cell's runs.
|
|
174
|
+
*/
|
|
175
|
+
export declare function SummarizeRoutingVerdicts(observations: readonly DecisionEvalCellObservation[]): RoutingVerdictSummary;
|
|
176
|
+
/**
|
|
177
|
+
* A routing policy in words: `confidence ≥ 0.7, timeout 350 ms, Likelihood calibrated (A 1.7757,
|
|
178
|
+
* B -3.3506)`, or `…, no calibration for the answering model (keeps continuity)`.
|
|
179
|
+
*
|
|
180
|
+
* @param policy The policy.
|
|
181
|
+
*/
|
|
182
|
+
export declare function DescribeRoutingPolicy(policy: DecisionEvalRoutingPolicy): string;
|
|
183
|
+
/**
|
|
184
|
+
* The scorecard as Markdown: a summary table, the calibrated table, production's routing verdicts,
|
|
185
|
+
* then each cell's reliability table, operating points and least repeatable cases (by ID).
|
|
186
|
+
*
|
|
187
|
+
* @param scorecard The scorecard.
|
|
188
|
+
*/
|
|
189
|
+
export declare function RenderDecisionEvalScorecard(scorecard: DecisionEvalScorecard): string;
|
|
190
|
+
//# sourceMappingURL=scorecard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scorecard.d.ts","sourceRoot":"","sources":["../../src/decision-eval/scorecard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAKH,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAE/B,MAAM,WAAW,CAAC;AAEnB,OAAO,EAIH,KAAK,wBAAwB,EAE7B,KAAK,yBAAyB,EACjC,MAAM,SAAS,CAAC;AAKjB,6FAA6F;AAC7F,eAAO,MAAM,oCAAoC,MAAM,CAAC;AAExD,sFAAsF;AACtF,MAAM,WAAW,kBAAkB;IAC/B,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,0DAA0D;IAC1D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,2BAA2B;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,gFAAgF;IAChF,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,6EAA6E;AAC7E,MAAM,WAAW,sBAAsB;IACnC,OAAO,EAAE,WAAW,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACjE,oGAAoG;IACpG,MAAM,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAC5C;AAED,mFAAmF;AACnF,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S,kBAAkB,EAAE,EAAE,OAAO,EAAE,4BAA4B,GAAG,qBAAqB,CAwB5I;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,SAAS,2BAA2B,EAAE,GAAG,qBAAqB,CAqBpH;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,yBAAyB,GAAG,MAAM,CAK/E;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,qBAAqB,GAAG,MAAM,CAQpF"}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Turns a Decision Eval suite's `MJ: Test Runs` into a scorecard: one set of metrics
|
|
3
|
+
* per cell, as JSON and as Markdown. Pure: the scorecard rig queries the runs and writes the files.
|
|
4
|
+
*
|
|
5
|
+
* A run's cell is the bracketed part of its test's name (`<point id> [<cell label>]`), its label is
|
|
6
|
+
* the test's expected outcome, and its probability, latency and model are the driver's
|
|
7
|
+
* `ActualOutput` (the probability falls back to the `decision-label-match` oracle's details in
|
|
8
|
+
* `ResultDetails`). The scorecard names cases by ID only, never by text.
|
|
9
|
+
*
|
|
10
|
+
* Two kinds of figure, kept apart:
|
|
11
|
+
* - the accuracy-type metrics score the thread Likelihood alone, on each case's mean over its
|
|
12
|
+
* repeats: what calibration is fitted on, and an upper bound on what routing does;
|
|
13
|
+
* - the routing summary scores production's own verdict per run, end to end: one call, the agent
|
|
14
|
+
* Choice and the thread Likelihood read together at the thresholds and calibration the driver
|
|
15
|
+
* recorded with the run.
|
|
16
|
+
*
|
|
17
|
+
* @module @memberjunction/testing-engine
|
|
18
|
+
*/
|
|
19
|
+
import { ComputeCellMetrics, DECISION_EVAL_BOOTSTRAP_RESAMPLES, DECISION_EVAL_CALIBRATION_FOLDS, DECISION_EVAL_SEED } from './metrics.js';
|
|
20
|
+
import { z } from 'zod';
|
|
21
|
+
import { DecisionEvalActualOutputSchema, DecisionEvalExpectedSchema, DecisionLabelMatchDetailsSchema } from './types.js';
|
|
22
|
+
/** The oracle results in a run's `ResultDetails`, as far as the scorecard reads them. */
|
|
23
|
+
const OracleResultsSchema = z.array(z.object({ oracleType: z.string(), details: z.unknown().optional() }));
|
|
24
|
+
/** The continue prior the routing summary weights its two classes at: a chat's usual mix. */
|
|
25
|
+
export const DECISION_EVAL_ROUTING_CONTINUE_PRIOR = 0.9;
|
|
26
|
+
/**
|
|
27
|
+
* A test name's point ID and cell label, or null when it isn't `<point id> [<cell label>]`.
|
|
28
|
+
*
|
|
29
|
+
* @param name The test's name.
|
|
30
|
+
*/
|
|
31
|
+
export function SplitDecisionEvalTestName(name) {
|
|
32
|
+
const match = /^(.*) \[([^[\]]*)\]$/.exec(name);
|
|
33
|
+
return match ? { CaseId: match[1], Cell: match[2] } : null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Reads one run. A run still in progress, or one whose name or expected outcome can't be read, is
|
|
37
|
+
* unreadable. A run with no readable `ActualOutput` is an observation with no probability.
|
|
38
|
+
*
|
|
39
|
+
* @param row The run.
|
|
40
|
+
*/
|
|
41
|
+
export function ReadDecisionEvalRun(row) {
|
|
42
|
+
if (row.Status === 'Running' || row.Status === 'Pending') {
|
|
43
|
+
return { Unreadable: 'still running' };
|
|
44
|
+
}
|
|
45
|
+
const name = SplitDecisionEvalTestName(row.TestName);
|
|
46
|
+
if (!name) {
|
|
47
|
+
return { Unreadable: 'test name has no [cell]' };
|
|
48
|
+
}
|
|
49
|
+
const expected = parseJson(row.ExpectedOutputData, DecisionEvalExpectedSchema);
|
|
50
|
+
if (!expected) {
|
|
51
|
+
return { Unreadable: 'no readable expected outcome' };
|
|
52
|
+
}
|
|
53
|
+
return toObservation(name.CaseId, name.Cell, expected, parseJson(row.ActualOutputData, DecisionEvalActualOutputSchema), row);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Builds the scorecard: reads every run, groups the readable ones by cell (sorted by label), and
|
|
57
|
+
* computes each cell's metrics. The runs may come in any order: the same runs give the same
|
|
58
|
+
* scorecard.
|
|
59
|
+
*
|
|
60
|
+
* @param rows The suite's runs.
|
|
61
|
+
* @param options The suite's name, the window, and the metric options.
|
|
62
|
+
*/
|
|
63
|
+
export function BuildDecisionEvalScorecard(rows, options) {
|
|
64
|
+
const byCell = new Map();
|
|
65
|
+
const unreadable = {};
|
|
66
|
+
for (const row of rows) {
|
|
67
|
+
const read = ReadDecisionEvalRun(row);
|
|
68
|
+
if ('Unreadable' in read) {
|
|
69
|
+
unreadable[read.Unreadable] = (unreadable[read.Unreadable] ?? 0) + 1;
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
byCell.set(read.Cell, [...(byCell.get(read.Cell) ?? []), read]);
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
Suite: options.Suite,
|
|
76
|
+
Since: options.Since ?? null,
|
|
77
|
+
Until: options.Until ?? null,
|
|
78
|
+
GeneratedAt: options.GeneratedAt ?? new Date().toISOString(),
|
|
79
|
+
Seed: options.Seed ?? DECISION_EVAL_SEED,
|
|
80
|
+
BootstrapResamples: options.BootstrapResamples ?? DECISION_EVAL_BOOTSTRAP_RESAMPLES,
|
|
81
|
+
CalibrationFolds: options.CalibrationFolds ?? DECISION_EVAL_CALIBRATION_FOLDS,
|
|
82
|
+
Runs: rows.length,
|
|
83
|
+
UnreadableRuns: Object.values(unreadable).reduce((sum, n) => sum + n, 0),
|
|
84
|
+
UnreadableReasons: sortedByKey(unreadable),
|
|
85
|
+
Cells: [...byCell.keys()].sort().map(cell => scorecardCell(cell, byCell.get(cell) ?? [], options))
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Production's routing verdicts in a cell, per run: how often a switch left the thread and a
|
|
90
|
+
* continuation kept it, as answered and within the timeout. See {@link RoutingVerdictSummary}.
|
|
91
|
+
*
|
|
92
|
+
* @param observations The cell's runs.
|
|
93
|
+
*/
|
|
94
|
+
export function SummarizeRoutingVerdicts(observations) {
|
|
95
|
+
const usable = observations.filter(o => o.Routing !== null && !(o.Observation.FailedOver && !o.Observation.FailoverAllowed));
|
|
96
|
+
const scored = usable.flatMap(o => (o.Routing?.Policy ? [{
|
|
97
|
+
Label: o.Observation.Label,
|
|
98
|
+
Left: o.Routing.Verdict !== 'KeptContinuity',
|
|
99
|
+
Policy: o.Routing.Policy,
|
|
100
|
+
OverTimeout: o.Observation.LatencyMs !== null && o.Observation.LatencyMs > o.Routing.Policy.TimeoutMs
|
|
101
|
+
}] : []));
|
|
102
|
+
const policies = {};
|
|
103
|
+
for (const run of scored) {
|
|
104
|
+
const described = DescribeRoutingPolicy(run.Policy);
|
|
105
|
+
policies[described] = (policies[described] ?? 0) + 1;
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
Runs: scored.length,
|
|
109
|
+
UnscoredRuns: usable.length - scored.length,
|
|
110
|
+
Policies: sortedByKey(policies),
|
|
111
|
+
OverTimeoutRuns: scored.filter(run => run.OverTimeout).length,
|
|
112
|
+
AsAnswered: routingRates(scored),
|
|
113
|
+
WithinTimeout: routingRates(scored.map(run => ({ Label: run.Label, Left: run.Left && !run.OverTimeout })))
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* A routing policy in words: `confidence ≥ 0.7, timeout 350 ms, Likelihood calibrated (A 1.7757,
|
|
118
|
+
* B -3.3506)`, or `…, no calibration for the answering model (keeps continuity)`.
|
|
119
|
+
*
|
|
120
|
+
* @param policy The policy.
|
|
121
|
+
*/
|
|
122
|
+
export function DescribeRoutingPolicy(policy) {
|
|
123
|
+
const calibration = policy.Calibration
|
|
124
|
+
? `Likelihood calibrated (A ${policy.Calibration.A}, B ${policy.Calibration.B})`
|
|
125
|
+
: 'no calibration for the answering model (keeps continuity)';
|
|
126
|
+
return `confidence ≥ ${policy.MinConfidence}, timeout ${policy.TimeoutMs} ms, ${calibration}`;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The scorecard as Markdown: a summary table, the calibrated table, production's routing verdicts,
|
|
130
|
+
* then each cell's reliability table, operating points and least repeatable cases (by ID).
|
|
131
|
+
*
|
|
132
|
+
* @param scorecard The scorecard.
|
|
133
|
+
*/
|
|
134
|
+
export function RenderDecisionEvalScorecard(scorecard) {
|
|
135
|
+
return [
|
|
136
|
+
...renderHeader(scorecard),
|
|
137
|
+
...renderSummary(scorecard.Cells),
|
|
138
|
+
...renderCalibratedSummary(scorecard.Cells),
|
|
139
|
+
...renderRoutingSummary(scorecard.Cells),
|
|
140
|
+
...scorecard.Cells.flatMap(renderCellDetail)
|
|
141
|
+
].join('\n');
|
|
142
|
+
}
|
|
143
|
+
/** Parses a JSON column against a schema, or null. */
|
|
144
|
+
function parseJson(text, schema) {
|
|
145
|
+
if (!text) {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
try {
|
|
149
|
+
const result = schema.safeParse(JSON.parse(text));
|
|
150
|
+
return result.success ? result.data : null;
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/** A readable run as an observation. */
|
|
157
|
+
function toObservation(caseId, cell, expected, actual, row) {
|
|
158
|
+
const sampling = actual?.Sampling;
|
|
159
|
+
return {
|
|
160
|
+
Cell: cell,
|
|
161
|
+
Routing: actual?.RoutingVerdict ? { Verdict: actual.RoutingVerdict, Policy: actual.RoutingPolicy ?? null } : null,
|
|
162
|
+
Observation: {
|
|
163
|
+
CaseId: caseId,
|
|
164
|
+
Label: expected.label,
|
|
165
|
+
Probability: actual?.ContinuesProbability ?? oracleProbability(row.ResultDetails),
|
|
166
|
+
LatencyMs: actual?.LatencyMs ?? null,
|
|
167
|
+
CostUSD: row.PromptRunCost ?? actual?.CostUSD ?? row.CostUSD,
|
|
168
|
+
FailedOver: actual?.Model.FailedOver ?? false,
|
|
169
|
+
FailoverAllowed: actual?.Model.FailoverAllowed ?? true
|
|
170
|
+
},
|
|
171
|
+
ResolvedModel: actual?.Model.ResolvedModel ?? actual?.Model.AnsweredModelName ?? null,
|
|
172
|
+
SamplingRequested: sampling ? sampling.RequestedTemperature !== null || sampling.RequestedSeed !== null : false,
|
|
173
|
+
SamplingApplied: sampling?.Applied ?? false
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
/** The `decision-label-match` oracle's probability from a run's `ResultDetails`, or null. */
|
|
177
|
+
function oracleProbability(resultDetails) {
|
|
178
|
+
const results = parseJson(resultDetails, OracleResultsSchema);
|
|
179
|
+
const details = results?.find(r => r.oracleType === 'decision-label-match')?.details;
|
|
180
|
+
const parsed = DecisionLabelMatchDetailsSchema.safeParse(details);
|
|
181
|
+
return parsed.success ? parsed.data.probability : null;
|
|
182
|
+
}
|
|
183
|
+
/** One cell's entry. */
|
|
184
|
+
function scorecardCell(cell, observations, options) {
|
|
185
|
+
const resolved = {};
|
|
186
|
+
for (const o of observations) {
|
|
187
|
+
if (o.ResolvedModel) {
|
|
188
|
+
resolved[o.ResolvedModel] = (resolved[o.ResolvedModel] ?? 0) + 1;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
Cell: cell,
|
|
193
|
+
Metrics: ComputeCellMetrics(observations.map(o => o.Observation), options),
|
|
194
|
+
Routing: SummarizeRoutingVerdicts(observations),
|
|
195
|
+
ResolvedModels: sortedByKey(resolved),
|
|
196
|
+
SamplingRequested: observations.some(o => o.SamplingRequested),
|
|
197
|
+
SamplingApplied: observations.some(o => o.SamplingApplied)
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
/** The routing rates of some runs. */
|
|
201
|
+
function routingRates(outcomes) {
|
|
202
|
+
const switchLeft = share(outcomes.filter(o => o.Label === 'switch'), o => o.Left);
|
|
203
|
+
const continueKept = share(outcomes.filter(o => o.Label === 'continue'), o => !o.Left);
|
|
204
|
+
const rates = [switchLeft.Rate, continueKept.Rate].filter((r) => r !== null);
|
|
205
|
+
const prior = DECISION_EVAL_ROUTING_CONTINUE_PRIOR;
|
|
206
|
+
return {
|
|
207
|
+
SwitchLeft: switchLeft,
|
|
208
|
+
ContinueKept: continueKept,
|
|
209
|
+
AmbiguousKept: share(outcomes.filter(o => o.Label === 'ambiguous'), o => !o.Left),
|
|
210
|
+
BalancedAccuracy: rates.length === 0 ? null : rates.reduce((sum, r) => sum + r, 0) / rates.length,
|
|
211
|
+
AccuracyAtContinuePrior: switchLeft.Rate === null || continueKept.Rate === null
|
|
212
|
+
? null
|
|
213
|
+
: prior * continueKept.Rate + (1 - prior) * switchLeft.Rate
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
/** How many of the runs meet the test. */
|
|
217
|
+
function share(outcomes, test) {
|
|
218
|
+
const count = outcomes.filter(test).length;
|
|
219
|
+
return { Runs: outcomes.length, Count: count, Rate: outcomes.length === 0 ? null : count / outcomes.length };
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The same counts with their keys in ordinal order, so the JSON and the Markdown list them the
|
|
223
|
+
* same way whatever order the runs were read in.
|
|
224
|
+
*/
|
|
225
|
+
function sortedByKey(counts) {
|
|
226
|
+
return Object.fromEntries(Object.entries(counts).sort(([x], [y]) => (x < y ? -1 : x > y ? 1 : 0)));
|
|
227
|
+
}
|
|
228
|
+
/** A number to a fixed number of places, or an em dash. */
|
|
229
|
+
function num(value, places = 3) {
|
|
230
|
+
return value === null || value === undefined ? '—' : value.toFixed(places);
|
|
231
|
+
}
|
|
232
|
+
/** A value with its interval. */
|
|
233
|
+
function withInterval(value, interval) {
|
|
234
|
+
return interval ? `${num(value)} [${num(interval.Lower)}, ${num(interval.Upper)}]` : num(value);
|
|
235
|
+
}
|
|
236
|
+
/** A Markdown table row. */
|
|
237
|
+
function row(cells) {
|
|
238
|
+
return `| ${cells.join(' | ')} |`;
|
|
239
|
+
}
|
|
240
|
+
/** A Markdown table header and its rule. */
|
|
241
|
+
function header(cells) {
|
|
242
|
+
return [row(cells), row(cells.map(() => '---'))];
|
|
243
|
+
}
|
|
244
|
+
/** The title and the run-level facts. */
|
|
245
|
+
function renderHeader(scorecard) {
|
|
246
|
+
const window = [scorecard.Since ? `since ${scorecard.Since}` : null, scorecard.Until ? `until ${scorecard.Until}` : null]
|
|
247
|
+
.filter((part) => part !== null).join(', ') || 'all runs';
|
|
248
|
+
const reasons = Object.entries(scorecard.UnreadableReasons).map(([reason, n]) => `${reason} ×${n}`).join(', ');
|
|
249
|
+
return [
|
|
250
|
+
`# Decision Eval scorecard: ${scorecard.Suite}`,
|
|
251
|
+
'',
|
|
252
|
+
`Generated ${scorecard.GeneratedAt}. Window: ${window}. ${scorecard.Runs} run(s); `
|
|
253
|
+
+ `${scorecard.UnreadableRuns} unreadable${reasons ? ` (${reasons})` : ''}.`,
|
|
254
|
+
'',
|
|
255
|
+
`Accuracy-type metrics use each case's mean probability over its usable repeats, on \`continue\`/\`switch\` labels. `
|
|
256
|
+
+ 'They score the thread Likelihood alone: an upper bound on what routing does, which the production-verdict table scores end to end. '
|
|
257
|
+
+ `95% intervals: percentile bootstrap, ${scorecard.BootstrapResamples} resamples, seed ${scorecard.Seed}. `
|
|
258
|
+
+ `Calibration: Platt scaling on logit(p), ${scorecard.CalibrationFolds}-fold out of fold. `
|
|
259
|
+
+ 'Signal value = accuracy × mean verdict agreement.',
|
|
260
|
+
''
|
|
261
|
+
];
|
|
262
|
+
}
|
|
263
|
+
/** The raw summary table. */
|
|
264
|
+
function renderSummary(cells) {
|
|
265
|
+
return [
|
|
266
|
+
'## Summary (raw probabilities)',
|
|
267
|
+
'',
|
|
268
|
+
...header(['Cell', 'n', 'Accuracy [95% CI]', 'Balanced acc. [95% CI]', 'AUC', 'Brier', 'ECE', 'Switch recall',
|
|
269
|
+
'Verdict agreement', 'Mean SD', 'Signal value', 'p50 ms', 'p95 ms', '$ / 1k', 'Failovers', 'Ambiguous kept']),
|
|
270
|
+
...cells.map(({ Cell, Metrics: m }) => row([
|
|
271
|
+
Cell, String(m.Raw.N), withInterval(m.Raw.Accuracy, m.Raw.AccuracyCI),
|
|
272
|
+
withInterval(m.Raw.BalancedAccuracy, m.Raw.BalancedAccuracyCI), num(m.Raw.RocAuc), num(m.Raw.Brier),
|
|
273
|
+
num(m.Raw.Calibration.ECE), num(m.Raw.SwitchRecall), num(m.Repeatability.MeanVerdictAgreement),
|
|
274
|
+
num(m.Repeatability.MeanStdDev), num(m.SignalValue), num(m.Latency.P50, 0), num(m.Latency.P95, 0),
|
|
275
|
+
num(m.Cost.CostPer1kUSD, 4), `${m.Counts.FailoverRuns} (${m.Counts.ExcludedFailoverRuns} excluded)`,
|
|
276
|
+
`${m.Ambiguous.KeptWithPreviousAgent}/${m.Ambiguous.Cases} (${num(m.Ambiguous.Rate)})`
|
|
277
|
+
])),
|
|
278
|
+
''
|
|
279
|
+
];
|
|
280
|
+
}
|
|
281
|
+
/** The calibrated summary table, with the Platt parameters fitted on all the data. */
|
|
282
|
+
function renderCalibratedSummary(cells) {
|
|
283
|
+
const calibratedRow = (cell, c, m) => row([
|
|
284
|
+
cell, withInterval(c?.Accuracy ?? null, c?.AccuracyCI ?? null), withInterval(c?.BalancedAccuracy ?? null, c?.BalancedAccuracyCI ?? null),
|
|
285
|
+
num(c?.RocAuc), num(c?.Brier), num(c?.Calibration.ECE), num(c?.SwitchRecall), num(m.Platt?.A, 4), num(m.Platt?.B, 4)
|
|
286
|
+
]);
|
|
287
|
+
return [
|
|
288
|
+
'## Calibrated (out-of-fold Platt)',
|
|
289
|
+
'',
|
|
290
|
+
...header(['Cell', 'Accuracy [95% CI]', 'Balanced acc. [95% CI]', 'AUC', 'Brier', 'ECE', 'Switch recall', 'Platt A (all data)', 'Platt B (all data)']),
|
|
291
|
+
...cells.map(({ Cell, Metrics }) => calibratedRow(Cell, Metrics.Calibrated, Metrics)),
|
|
292
|
+
''
|
|
293
|
+
];
|
|
294
|
+
}
|
|
295
|
+
/** A share as `0.750 (3/4)`, or an em dash with no runs. */
|
|
296
|
+
function shareText(value) {
|
|
297
|
+
return value.Rate === null ? '—' : `${num(value.Rate)} (${value.Count}/${value.Runs})`;
|
|
298
|
+
}
|
|
299
|
+
/** Production's routing verdicts, per cell. */
|
|
300
|
+
function renderRoutingSummary(cells) {
|
|
301
|
+
const prior = `${Math.round(DECISION_EVAL_ROUTING_CONTINUE_PRIOR * 100)}%`;
|
|
302
|
+
return [
|
|
303
|
+
'## Production routing verdict (end to end, per run)',
|
|
304
|
+
'',
|
|
305
|
+
'Each run is one call, read as production reads it: the agent Choice and the thread Likelihood together, at the '
|
|
306
|
+
+ 'confidence bar and calibration recorded with the run. A switch that left the thread counts whichever agent it went to: '
|
|
307
|
+
+ 'the corpus labels continue or switch, not which agent. "In time" also keeps continuity for a run whose in-process latency '
|
|
308
|
+
+ 'passed the routing timeout; that latency leaves out the network, so it is still an upper bound on the chat. '
|
|
309
|
+
+ `Accuracy at a ${prior} continue prior weights the classes as a chat sees them; always-continue scores ${prior}. `
|
|
310
|
+
+ 'Runs that recorded no policy predate calibration, and are not scored.',
|
|
311
|
+
'',
|
|
312
|
+
...header(['Cell', 'Runs', 'Switch left', 'Continue kept', 'Ambiguous kept', 'Balanced', `Acc. at ${prior} continue`,
|
|
313
|
+
'Over timeout', 'Switch left (in time)', 'Continue kept (in time)', `Acc. at ${prior} (in time)`, 'Not scored (no policy)']),
|
|
314
|
+
...cells.map(({ Cell, Routing: r }) => row([
|
|
315
|
+
Cell, String(r.Runs), shareText(r.AsAnswered.SwitchLeft), shareText(r.AsAnswered.ContinueKept), shareText(r.AsAnswered.AmbiguousKept),
|
|
316
|
+
num(r.AsAnswered.BalancedAccuracy), num(r.AsAnswered.AccuracyAtContinuePrior), String(r.OverTimeoutRuns),
|
|
317
|
+
shareText(r.WithinTimeout.SwitchLeft), shareText(r.WithinTimeout.ContinueKept), num(r.WithinTimeout.AccuracyAtContinuePrior),
|
|
318
|
+
String(r.UnscoredRuns)
|
|
319
|
+
])),
|
|
320
|
+
''
|
|
321
|
+
];
|
|
322
|
+
}
|
|
323
|
+
/** One cell's detail: runs, models, reliability, operating points and least repeatable cases. */
|
|
324
|
+
function renderCellDetail(cell) {
|
|
325
|
+
const m = cell.Metrics;
|
|
326
|
+
const models = Object.entries(cell.ResolvedModels).map(([model, n]) => `${model} ×${n}`).join(', ') || 'not recorded';
|
|
327
|
+
const policies = Object.entries(cell.Routing.Policies).map(([policy, n]) => `${policy} ×${n}`).join('; ') || 'none recorded';
|
|
328
|
+
return [
|
|
329
|
+
`## ${cell.Cell}`,
|
|
330
|
+
'',
|
|
331
|
+
`Runs ${m.Counts.Runs}: ${m.Counts.UsableRuns} usable, ${m.Counts.NoProbabilityRuns} without a probability, `
|
|
332
|
+
+ `${m.Counts.FailoverRuns} answered by another model (${m.Counts.ExcludedFailoverRuns} excluded). `
|
|
333
|
+
+ `Scored cases ${m.Raw.N}; repeatability over ${m.Repeatability.Cases} case(s). Answered by: ${models}. `
|
|
334
|
+
+ `Sampling: ${cell.SamplingRequested ? (cell.SamplingApplied ? 'requested and applied' : 'requested, NOT applied') : 'not requested'}. `
|
|
335
|
+
+ `Routing policies: ${policies}.`,
|
|
336
|
+
'',
|
|
337
|
+
...renderReliability(m),
|
|
338
|
+
...renderOperatingPoints(m),
|
|
339
|
+
...renderWorstCases(m)
|
|
340
|
+
];
|
|
341
|
+
}
|
|
342
|
+
/** The reliability table, raw beside calibrated. */
|
|
343
|
+
function renderReliability(m) {
|
|
344
|
+
return [
|
|
345
|
+
'### Reliability (10 equal-width bins)',
|
|
346
|
+
'',
|
|
347
|
+
...header(['Bin', 'Raw count', 'Raw mean predicted', 'Raw observed', 'Cal. count', 'Cal. mean predicted', 'Cal. observed']),
|
|
348
|
+
...m.Raw.Calibration.Bins.map((bin, i) => {
|
|
349
|
+
const cal = m.Calibrated?.Calibration.Bins[i];
|
|
350
|
+
return row([`${num(bin.Lower, 1)}–${num(bin.Upper, 1)}`, String(bin.Count), num(bin.MeanPredicted), num(bin.ObservedRate),
|
|
351
|
+
cal ? String(cal.Count) : '—', num(cal?.MeanPredicted), num(cal?.ObservedRate)]);
|
|
352
|
+
}),
|
|
353
|
+
''
|
|
354
|
+
];
|
|
355
|
+
}
|
|
356
|
+
/** The operating-point table, raw beside calibrated. */
|
|
357
|
+
function renderOperatingPoints(m) {
|
|
358
|
+
return [
|
|
359
|
+
'### Operating points (continue at or above the threshold)',
|
|
360
|
+
'',
|
|
361
|
+
...header(['Threshold', 'Raw continue P', 'Raw continue R', 'Raw switch P', 'Raw switch R',
|
|
362
|
+
'Cal. continue P', 'Cal. continue R', 'Cal. switch P', 'Cal. switch R']),
|
|
363
|
+
...m.Raw.OperatingPoints.map((point, i) => {
|
|
364
|
+
const cal = m.Calibrated?.OperatingPoints[i];
|
|
365
|
+
return row([num(point.Threshold, 2), num(point.ContinuePrecision), num(point.ContinueRecall), num(point.SwitchPrecision),
|
|
366
|
+
num(point.SwitchRecall), num(cal?.ContinuePrecision), num(cal?.ContinueRecall), num(cal?.SwitchPrecision), num(cal?.SwitchRecall)]);
|
|
367
|
+
}),
|
|
368
|
+
''
|
|
369
|
+
];
|
|
370
|
+
}
|
|
371
|
+
/** The least repeatable cases, by ID. */
|
|
372
|
+
function renderWorstCases(m) {
|
|
373
|
+
if (m.Repeatability.Worst.length === 0) {
|
|
374
|
+
return ['No case has two usable repeats.', ''];
|
|
375
|
+
}
|
|
376
|
+
return [
|
|
377
|
+
'### Least repeatable cases (IDs only)',
|
|
378
|
+
'',
|
|
379
|
+
...header(['Case ID', 'Repeats', 'Verdict agreement', 'SD']),
|
|
380
|
+
...m.Repeatability.Worst.map(c => row([c.CaseId, String(c.Repeats), num(c.VerdictAgreement), num(c.StdDev)])),
|
|
381
|
+
''
|
|
382
|
+
];
|
|
383
|
+
}
|
|
384
|
+
//# sourceMappingURL=scorecard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scorecard.js","sourceRoot":"","sources":["../../src/decision-eval/scorecard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiB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