@2kw/ai 7.4.0-dev.5 → 7.4.0-dev.6
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/commands/experiments.js +12 -3
- package/package.json +1 -1
|
@@ -17,13 +17,22 @@ function formatComparisonCell(result) {
|
|
|
17
17
|
const scores = result.scores ?? [];
|
|
18
18
|
if (scores.length > 0) {
|
|
19
19
|
// A SKIP carries a placeholder 0.0 that is not a rating, and a comment-only
|
|
20
|
-
// score
|
|
21
|
-
|
|
20
|
+
// score rates nothing; neither is picked (#693). Of the rest, one score per
|
|
21
|
+
// evaluator, as the console's pickCellScore: HUMAN, then LLM_JUDGE, then the
|
|
22
|
+
// first, so an override replaces the score it supersedes (#1410).
|
|
23
|
+
const byEvaluator = new Map();
|
|
24
|
+
for (const s of scores) {
|
|
25
|
+
if (s.label === "SKIP" || (s.score == null && !s.label))
|
|
26
|
+
continue;
|
|
27
|
+
byEvaluator.set(s.evaluatorId, [...(byEvaluator.get(s.evaluatorId) ?? []), s]);
|
|
28
|
+
}
|
|
29
|
+
const picked = [...byEvaluator.values()].map((group) => group.find((s) => s.source === "HUMAN") ?? group.find((s) => s.source === "LLM_JUDGE") ?? group[0]);
|
|
30
|
+
const rated = picked.filter((s) => s.score != null);
|
|
22
31
|
if (rated.length > 0) {
|
|
23
32
|
return (rated.reduce((sum, s) => sum + s.score, 0) / rated.length).toFixed(2);
|
|
24
33
|
}
|
|
25
34
|
// A label-only verdict (#1163) has no number; show its label, as the console does.
|
|
26
|
-
const verdict =
|
|
35
|
+
const verdict = picked[0];
|
|
27
36
|
if (verdict)
|
|
28
37
|
return String(verdict.label);
|
|
29
38
|
if (scores.every((s) => s.label === "SKIP"))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2kw/ai",
|
|
3
|
-
"version": "7.4.0-dev.
|
|
3
|
+
"version": "7.4.0-dev.6",
|
|
4
4
|
"description": "CLI for 2kw.ai — schema-driven document extraction, an OpenAI-compatible EU LLM gateway, transcription, prompts, datasets, and experiments from your terminal or agentic workflows. Ships as 2kw, backbone, and bb.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|