@crowandraven/evalkeeper 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/ai-sdk/decide.d.ts +35 -0
- package/dist/ai-sdk/decide.js +36 -0
- package/dist/ai-sdk/decide.js.map +1 -0
- package/dist/ai-sdk/hash.d.ts +50 -0
- package/dist/ai-sdk/hash.js +59 -0
- package/dist/ai-sdk/hash.js.map +1 -0
- package/dist/ai-sdk/index.d.ts +15 -0
- package/dist/ai-sdk/index.js +16 -0
- package/dist/ai-sdk/index.js.map +1 -0
- package/dist/ai-sdk/judge.d.ts +69 -0
- package/dist/ai-sdk/judge.js +105 -0
- package/dist/ai-sdk/judge.js.map +1 -0
- package/dist/ai-sdk/usage.d.ts +18 -0
- package/dist/ai-sdk/usage.js +19 -0
- package/dist/ai-sdk/usage.js.map +1 -0
- package/dist/board.d.ts +5 -0
- package/dist/cli/addPages.d.ts +6 -1
- package/dist/cli/addPages.js +14 -8
- package/dist/cli/addPages.js.map +1 -1
- package/dist/cli/main.d.ts +19 -5
- package/dist/cli/main.js +100 -4
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/migration.d.ts +95 -0
- package/dist/cli/migration.js +247 -0
- package/dist/cli/migration.js.map +1 -0
- package/dist/feedback.d.ts +1 -1
- package/dist/glossary.d.ts +8 -1
- package/dist/glossary.js +8 -1
- package/dist/glossary.js.map +1 -1
- package/dist/inInstructions.d.ts +1 -1
- package/dist/inInstructions.js +1 -1
- package/dist/next/RefreshWhile.d.ts +11 -0
- package/dist/next/RefreshWhile.js +28 -0
- package/dist/next/RefreshWhile.js.map +1 -0
- package/dist/next/actions.d.ts +14 -0
- package/dist/next/actions.js +332 -0
- package/dist/next/actions.js.map +1 -0
- package/dist/next/components.d.ts +9 -0
- package/dist/next/components.js +27 -0
- package/dist/next/components.js.map +1 -0
- package/dist/next/cron.d.ts +9 -0
- package/dist/next/cron.js +17 -0
- package/dist/next/cron.js.map +1 -0
- package/dist/next/index.d.ts +15 -0
- package/dist/next/index.js +16 -0
- package/dist/next/index.js.map +1 -0
- package/dist/next/pages.d.ts +70 -0
- package/dist/next/pages.js +77 -0
- package/dist/next/pages.js.map +1 -0
- package/dist/next/route.d.ts +19 -0
- package/dist/next/route.js +31 -0
- package/dist/next/route.js.map +1 -0
- package/dist/next/weekly.d.ts +20 -0
- package/dist/next/weekly.js +55 -0
- package/dist/next/weekly.js.map +1 -0
- package/dist/next/wiring.d.ts +19 -0
- package/dist/next/wiring.js +2 -0
- package/dist/next/wiring.js.map +1 -0
- package/dist/prisma/contracts.d.ts +74 -0
- package/dist/prisma/contracts.js +178 -0
- package/dist/prisma/contracts.js.map +1 -0
- package/dist/prisma/index.d.ts +423 -0
- package/dist/prisma/index.js +622 -0
- package/dist/prisma/index.js.map +1 -0
- package/dist/prisma/mapping.d.ts +63 -0
- package/dist/prisma/mapping.js +111 -0
- package/dist/prisma/mapping.js.map +1 -0
- package/dist/prisma/moveIn.d.ts +106 -0
- package/dist/prisma/moveIn.js +299 -0
- package/dist/prisma/moveIn.js.map +1 -0
- package/dist/prune.d.ts +45 -0
- package/dist/prune.js +32 -0
- package/dist/prune.js.map +1 -1
- package/dist/react/AddCase.d.ts +10 -0
- package/dist/react/AddCase.js +19 -0
- package/dist/react/AddCase.js.map +1 -0
- package/dist/react/AnswerKey.d.ts +22 -0
- package/dist/react/AnswerKey.js +83 -0
- package/dist/react/AnswerKey.js.map +1 -0
- package/dist/react/CaseMenu.d.ts +17 -0
- package/dist/react/CaseMenu.js +41 -0
- package/dist/react/CaseMenu.js.map +1 -0
- package/dist/react/CompareView.d.ts +14 -0
- package/dist/react/CompareView.js +51 -0
- package/dist/react/CompareView.js.map +1 -0
- package/dist/react/ConfirmAnswer.d.ts +13 -0
- package/dist/react/ConfirmAnswer.js +27 -0
- package/dist/react/ConfirmAnswer.js.map +1 -0
- package/dist/react/DisagreementChip.d.ts +10 -0
- package/dist/react/DisagreementChip.js +21 -0
- package/dist/react/DisagreementChip.js.map +1 -0
- package/dist/react/FeedbackView.d.ts +10 -0
- package/dist/react/FeedbackView.js +26 -0
- package/dist/react/FeedbackView.js.map +1 -0
- package/dist/react/Fields.d.ts +32 -0
- package/dist/react/Fields.js +33 -0
- package/dist/react/Fields.js.map +1 -0
- package/dist/react/HubSections.d.ts +78 -0
- package/dist/react/HubSections.js +124 -0
- package/dist/react/HubSections.js.map +1 -0
- package/dist/react/ModelMenu.d.ts +16 -0
- package/dist/react/ModelMenu.js +38 -0
- package/dist/react/ModelMenu.js.map +1 -0
- package/dist/react/RateView.d.ts +18 -0
- package/dist/react/RateView.js +30 -0
- package/dist/react/RateView.js.map +1 -0
- package/dist/react/ReadableOutput.d.ts +3 -0
- package/dist/react/ReadableOutput.js +50 -0
- package/dist/react/ReadableOutput.js.map +1 -0
- package/dist/react/RollBack.d.ts +17 -0
- package/dist/react/RollBack.js +26 -0
- package/dist/react/RollBack.js.map +1 -0
- package/dist/react/RunView.d.ts +9 -0
- package/dist/react/RunView.js +41 -0
- package/dist/react/RunView.js.map +1 -0
- package/dist/react/SettingsHistory.d.ts +33 -0
- package/dist/react/SettingsHistory.js +79 -0
- package/dist/react/SettingsHistory.js.map +1 -0
- package/dist/react/SideBySideView.d.ts +14 -0
- package/dist/react/SideBySideView.js +67 -0
- package/dist/react/SideBySideView.js.map +1 -0
- package/dist/react/SuiteSections.d.ts +111 -0
- package/dist/react/SuiteSections.js +224 -0
- package/dist/react/SuiteSections.js.map +1 -0
- package/dist/react/Tabs.d.ts +15 -0
- package/dist/react/Tabs.js +18 -0
- package/dist/react/Tabs.js.map +1 -0
- package/dist/react/Thumbs.d.ts +13 -0
- package/dist/react/Thumbs.js +54 -0
- package/dist/react/Thumbs.js.map +1 -0
- package/dist/react/WeeklyCheck.d.ts +11 -0
- package/dist/react/WeeklyCheck.js +19 -0
- package/dist/react/WeeklyCheck.js.map +1 -0
- package/dist/react/app.d.ts +118 -0
- package/dist/react/app.js +87 -0
- package/dist/react/app.js.map +1 -0
- package/dist/react/format.d.ts +27 -0
- package/dist/react/format.js +38 -0
- package/dist/react/format.js.map +1 -0
- package/dist/react/index.d.ts +31 -0
- package/dist/react/index.js +32 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/pieces.d.ts +191 -0
- package/dist/react/pieces.js +191 -0
- package/dist/react/pieces.js.map +1 -0
- package/dist/readCheck.d.ts +1 -1
- package/dist/runner.d.ts +62 -2
- package/dist/runner.js +123 -3
- package/dist/runner.js.map +1 -1
- package/dist/settings.d.ts +1 -1
- package/dist/store.d.ts +1 -1
- package/dist/suggest.d.ts +1 -1
- package/dist/suggest.js +7 -7
- package/dist/suggest.js.map +1 -1
- package/dist/suiteContract.d.ts +3 -3
- package/dist/suiteContract.js +20 -16
- package/dist/suiteContract.js.map +1 -1
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +1 -1
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +56 -6
- package/schema/evalkeeper.prisma +196 -0
- package/src/ai-sdk/decide.ts +57 -0
- package/src/ai-sdk/hash.ts +74 -0
- package/src/ai-sdk/index.ts +15 -0
- package/src/ai-sdk/judge.ts +163 -0
- package/src/ai-sdk/usage.ts +31 -0
- package/src/board.ts +5 -0
- package/src/cli/addPages.ts +15 -7
- package/src/cli/main.ts +135 -9
- package/src/cli/migration.ts +349 -0
- package/src/feedback.ts +1 -1
- package/src/glossary.ts +16 -2
- package/src/inInstructions.ts +1 -1
- package/{templates/components/evalkeeper → src/next}/RefreshWhile.tsx +2 -2
- package/src/next/actions.ts +389 -0
- package/src/next/components.ts +31 -0
- package/{templates/lib/evalkeeper/cronAuth.ts → src/next/cron.ts} +3 -0
- package/src/next/index.ts +15 -0
- package/src/next/pages.tsx +106 -0
- package/src/next/route.ts +35 -0
- package/src/next/weekly.ts +70 -0
- package/src/next/wiring.ts +18 -0
- package/src/prisma/contracts.ts +249 -0
- package/src/prisma/index.ts +1169 -0
- package/src/prisma/mapping.ts +147 -0
- package/src/prisma/moveIn.ts +502 -0
- package/src/prune.ts +77 -0
- package/{templates/components/evalkeeper → src/react}/AddCase.tsx +6 -6
- package/{templates/components/evalkeeper → src/react}/AnswerKey.tsx +92 -61
- package/{templates/components/evalkeeper → src/react}/CaseMenu.tsx +9 -8
- package/src/react/CompareView.tsx +270 -0
- package/{templates/components/evalkeeper → src/react}/ConfirmAnswer.tsx +6 -3
- package/{templates/components/evalkeeper → src/react}/DisagreementChip.tsx +2 -3
- package/src/react/FeedbackView.tsx +230 -0
- package/{templates/components/evalkeeper → src/react}/Fields.tsx +6 -6
- package/src/react/HubSections.tsx +446 -0
- package/src/react/ModelMenu.tsx +89 -0
- package/src/react/RateView.tsx +143 -0
- package/{templates/components/evalkeeper → src/react}/ReadableOutput.tsx +1 -1
- package/{templates/components/evalkeeper → src/react}/RollBack.tsx +9 -10
- package/src/react/RunView.tsx +151 -0
- package/{templates/components/evalkeeper → src/react}/SettingsHistory.tsx +16 -9
- package/src/react/SideBySideView.tsx +307 -0
- package/src/react/SuiteSections.tsx +925 -0
- package/src/react/Tabs.tsx +61 -0
- package/{templates/components/evalkeeper → src/react}/Thumbs.tsx +7 -6
- package/{templates/components/evalkeeper → src/react}/WeeklyCheck.tsx +31 -20
- package/src/react/app.ts +173 -0
- package/src/react/format.ts +45 -0
- package/src/react/index.ts +31 -0
- package/src/react/pieces.tsx +412 -0
- package/src/readCheck.ts +1 -1
- package/src/runner.ts +167 -3
- package/src/settings.ts +1 -1
- package/src/store.ts +1 -1
- package/src/suggest.ts +7 -7
- package/src/suiteContract.ts +35 -28
- package/src/testing.ts +2 -2
- package/src/types.ts +2 -2
- package/starter/index.ts +22 -8
- package/templates/app/api/cron/evals-weekly/route.ts +5 -15
- package/templates/app/evals/[suite]/compare/page.tsx +6 -383
- package/templates/app/evals/[suite]/page.tsx +7 -685
- package/templates/app/evals/[suite]/rate/page.tsx +6 -151
- package/templates/app/evals/[suite]/runs/[runId]/page.tsx +6 -174
- package/templates/app/evals/[suite]/side-by-side/page.tsx +6 -318
- package/templates/app/evals/feedback/page.tsx +6 -227
- package/templates/app/evals/layout.tsx +10 -0
- package/templates/app/evals/page.tsx +7 -397
- package/templates/lib/evalkeeper/actions.ts +34 -317
- package/templates/lib/evalkeeper/appComponents.tsx +21 -0
- package/templates/lib/evalkeeper/evals.ts +14 -0
- package/templates/lib/evalkeeper/paths.ts +2 -7
- package/templates/components/evalkeeper/Submit.tsx +0 -67
- package/templates/components/evalkeeper/Tip.tsx +0 -98
- package/templates/components/evalkeeper/ui.tsx +0 -105
- package/templates/lib/evalkeeper/time.ts +0 -4
- package/templates/lib/evalkeeper/weekly.ts +0 -74
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type HistoryEntry, type Settings } from "../index.js";
|
|
2
|
+
import { type EvalAppConfig } from "./app.js";
|
|
3
|
+
/**
|
|
4
|
+
* A feature's settings history: every switch, newest first, with what
|
|
5
|
+
* changed, who, why, and the evidence; any earlier version can be made
|
|
6
|
+
* live again, with a reason.
|
|
7
|
+
*/
|
|
8
|
+
export declare function SettingsHistory({ app, suite, entries, liveId, label, defaults, }: {
|
|
9
|
+
/** Your screens' configuration. */
|
|
10
|
+
app: EvalAppConfig;
|
|
11
|
+
suite: string;
|
|
12
|
+
entries: HistoryEntry[];
|
|
13
|
+
liveId: string | null;
|
|
14
|
+
label: (model: string) => string;
|
|
15
|
+
/** The settings in code, shown as v1 until the first change. */
|
|
16
|
+
defaults: Settings;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* The versions in a settings history, newest first, each with a rollback
|
|
20
|
+
* unless it's live. For a page's history section or a card's history toggle.
|
|
21
|
+
*/
|
|
22
|
+
export declare function HistoryEntries({ app, suite, entries, liveId, label, defaults, plain, }: {
|
|
23
|
+
/** Your screens' configuration. */
|
|
24
|
+
app: EvalAppConfig;
|
|
25
|
+
suite: string;
|
|
26
|
+
entries: HistoryEntry[];
|
|
27
|
+
liveId: string | null;
|
|
28
|
+
label: (model: string) => string;
|
|
29
|
+
/** The settings in code, shown as v1 until the first change. */
|
|
30
|
+
defaults: Settings;
|
|
31
|
+
/** No tint behind each version, for a list already on a tint. */
|
|
32
|
+
plain?: boolean;
|
|
33
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { momentOf, LINK } from "./format.js";
|
|
3
|
+
import { GLOSSARY, describeChange, } from "../index.js";
|
|
4
|
+
import { RollBack } from "./RollBack.js";
|
|
5
|
+
import { Link, Chip, InfoTip, Tip } from "./pieces.js";
|
|
6
|
+
import { evalsPath } from "./app.js";
|
|
7
|
+
const KIND = {
|
|
8
|
+
CHANGE: {
|
|
9
|
+
text: "Changed",
|
|
10
|
+
tone: "neutral",
|
|
11
|
+
help: "A person changed a setting.",
|
|
12
|
+
},
|
|
13
|
+
PROMOTE: {
|
|
14
|
+
text: "Promoted",
|
|
15
|
+
tone: "live",
|
|
16
|
+
help: "Made live or the fallback from a test, with the test as evidence.",
|
|
17
|
+
},
|
|
18
|
+
ROLLBACK: {
|
|
19
|
+
text: "Rolled back",
|
|
20
|
+
tone: "warn",
|
|
21
|
+
help: "An earlier version made live again.",
|
|
22
|
+
},
|
|
23
|
+
DEPLOY: {
|
|
24
|
+
text: "New instructions",
|
|
25
|
+
tone: "fallback",
|
|
26
|
+
help: GLOSSARY.newInstructions,
|
|
27
|
+
},
|
|
28
|
+
OUTSIDE: {
|
|
29
|
+
text: "Changed outside",
|
|
30
|
+
tone: "warn",
|
|
31
|
+
help: GLOSSARY.changedOutside,
|
|
32
|
+
},
|
|
33
|
+
INSTRUCTIONS: {
|
|
34
|
+
text: "Instructions edited",
|
|
35
|
+
tone: "fallback",
|
|
36
|
+
help: GLOSSARY.instructionsEdited,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* A feature's settings history: every switch, newest first, with what
|
|
41
|
+
* changed, who, why, and the evidence; any earlier version can be made
|
|
42
|
+
* live again, with a reason.
|
|
43
|
+
*/
|
|
44
|
+
export function SettingsHistory({ app, suite, entries, liveId, label, defaults, }) {
|
|
45
|
+
return (_jsxs("section", { className: "space-y-3", "aria-labelledby": "history", children: [_jsxs("h2", { id: "history", className: "text-lg font-semibold", children: ["Versions", _jsx(InfoTip, { term: "versions" })] }), _jsx(HistoryEntries, { app: app, suite: suite, entries: entries, liveId: liveId, label: label, defaults: defaults })] }));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The versions in a settings history, newest first, each with a rollback
|
|
49
|
+
* unless it's live. For a page's history section or a card's history toggle.
|
|
50
|
+
*/
|
|
51
|
+
export function HistoryEntries({ app, suite, entries, liveId, label, defaults, plain = false, }) {
|
|
52
|
+
const box = `space-y-2 text-sm ${plain ? "py-2" : "rounded-md border border-line bg-card p-3"}`;
|
|
53
|
+
if (entries.length === 0)
|
|
54
|
+
return (_jsxs("article", { "aria-label": "Version 1: Defaults", className: box, children: [_jsxs("span", { className: "flex flex-wrap items-center gap-2", children: [_jsx("span", { className: "font-medium", children: "v1" }), _jsx(Chip, { tone: "neutral", children: "Defaults" }), _jsx(Chip, { tone: "live", children: "Live now" })] }), _jsxs("p", { children: [label(defaults.model), " live", defaults.fallbackModel
|
|
55
|
+
? ` · fallback ${label(defaults.fallbackModel)}`
|
|
56
|
+
: " · no fallback"] }), _jsx("p", { className: "readable text-muted", children: "The settings in code. The first change records them as v1, so there's always something to roll back to." })] }));
|
|
57
|
+
return (_jsx("div", { className: "space-y-2", children: entries.map((e) => {
|
|
58
|
+
const kind = KIND[e.kind];
|
|
59
|
+
const ev = (e.evidence ?? {});
|
|
60
|
+
const testId = ev.runId ?? ev.live ?? null;
|
|
61
|
+
const isLive = e.to.id === liveId;
|
|
62
|
+
// Said outright: "same models" read as the app switching models.
|
|
63
|
+
const unchanged = (v) => `Models unchanged: ${label(v.model)} live${v.fallbackModel ? `, ${label(v.fallbackModel)} fallback` : ""}`;
|
|
64
|
+
return (_jsxs("article", { "aria-label": `Version ${e.to.number}: ${kind.text}`, className: box, children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsxs("span", { className: "flex flex-wrap items-center gap-2", children: [_jsxs("span", { className: "font-medium", children: ["v", e.to.number] }), _jsx(Tip, { text: kind.help, id: `kind-${e.id}`, children: _jsx(Chip, { tone: kind.tone, children: kind.text }) }), isLive && _jsx(Chip, { tone: "live", children: "Live now" })] }), _jsxs("span", { className: "text-xs text-muted", children: [e.by ??
|
|
65
|
+
(e.kind === "OUTSIDE"
|
|
66
|
+
? "Found by the system"
|
|
67
|
+
: "System"), " ", "\u00B7 ", momentOf(e.createdAt)] })] }), _jsx("ul", { className: "readable list-disc pl-5", children: (e.kind === "ROLLBACK"
|
|
68
|
+
? [`Back to v${e.to.number}: ${label(e.to.model)} live`]
|
|
69
|
+
: e.kind === "DEPLOY"
|
|
70
|
+
? [unchanged(e.to), "The instructions in code changed"]
|
|
71
|
+
: e.kind === "INSTRUCTIONS"
|
|
72
|
+
? [
|
|
73
|
+
unchanged(e.to),
|
|
74
|
+
"The instructions were edited at runtime",
|
|
75
|
+
]
|
|
76
|
+
: describeChange(e.from, e.to, label)).map((line) => (_jsx("li", { children: line }, line))) }), e.reason && _jsx("p", { className: "readable text-muted", children: e.reason }), _jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [testId && (_jsx(Link, { href: evalsPath(app, suite, "runs", testId), className: `text-xs ${LINK}`, children: "The test behind it" })), !isLive && (_jsx(RollBack, { action: app.actions.rollBackSettings, suite: suite, versionId: e.to.id, number: e.to.number, kind: e.kind }))] })] }, e.id));
|
|
77
|
+
}) }));
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=SettingsHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsHistory.js","sourceRoot":"","sources":["../../src/react/SettingsHistory.tsx"],"names":[],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
import { type EvalAppConfig } from "./app.js";
|
|
2
|
+
/**
|
|
3
|
+
* Two tests' answers to one case, side by side with the expected answer
|
|
4
|
+
* and what each check found, and previous and next through the cases the
|
|
5
|
+
* two graded differently. `a` is the test in place, `b` the challenger,
|
|
6
|
+
* and `case` the case (the first disagreement when left out).
|
|
7
|
+
*/
|
|
8
|
+
/** Two tests' answers to the cases they graded differently, side by side. Null when it doesn't exist. */
|
|
9
|
+
export declare function SideBySideView({ app, suite: key, search, }: {
|
|
10
|
+
/** Your screens' configuration. */
|
|
11
|
+
app: EvalAppConfig;
|
|
12
|
+
suite: string;
|
|
13
|
+
search: Record<string, string | string[] | undefined>;
|
|
14
|
+
}): Promise<import("react").JSX.Element | null>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { evalsPath } from "./app.js";
|
|
3
|
+
import { Link } from "./pieces.js";
|
|
4
|
+
import { ArrowLeft, ArrowRight, Check, Minus, X } from "lucide-react";
|
|
5
|
+
import { aroundCase, } from "../index.js";
|
|
6
|
+
import { DisagreementChip } from "./DisagreementChip.js";
|
|
7
|
+
import { FieldValues } from "./Fields.js";
|
|
8
|
+
import { ReadableOutput } from "./ReadableOutput.js";
|
|
9
|
+
import { BackLink, Card, InfoTip, Tip } from "./pieces.js";
|
|
10
|
+
import { pct } from "./format.js";
|
|
11
|
+
/** A search parameter as one string, or null when it's missing or repeated. */
|
|
12
|
+
const one = (v) => typeof v === "string" && v ? v : null;
|
|
13
|
+
/**
|
|
14
|
+
* Two tests' answers to one case, side by side with the expected answer
|
|
15
|
+
* and what each check found, and previous and next through the cases the
|
|
16
|
+
* two graded differently. `a` is the test in place, `b` the challenger,
|
|
17
|
+
* and `case` the case (the first disagreement when left out).
|
|
18
|
+
*/
|
|
19
|
+
/** Two tests' answers to the cases they graded differently, side by side. Null when it doesn't exist. */
|
|
20
|
+
export async function SideBySideView({ app, suite: key, search, }) {
|
|
21
|
+
const sp = search;
|
|
22
|
+
const a = one(sp.a);
|
|
23
|
+
const b = one(sp.b);
|
|
24
|
+
if (!a || !b)
|
|
25
|
+
return null;
|
|
26
|
+
const result = await app.runner.compare(key, a, b);
|
|
27
|
+
if (!result)
|
|
28
|
+
return null;
|
|
29
|
+
const { suite, disagreements } = result;
|
|
30
|
+
const caseId = one(sp.case) ?? disagreements[0]?.caseId ?? null;
|
|
31
|
+
const compareHref = `${evalsPath(app, key, "compare")}?${new URLSearchParams({ a, b })}`;
|
|
32
|
+
const back = _jsx(BackLink, { href: compareHref, children: "Compare" });
|
|
33
|
+
if (!caseId)
|
|
34
|
+
return (_jsxs("div", { className: "space-y-4", children: [back, _jsx("h1", { className: "text-2xl font-semibold", children: "Side by side" }), _jsx("p", { className: "readable text-muted", children: "The two tests graded every shared case alike: there's nothing to read side by side." })] }));
|
|
35
|
+
const [cases, outA, outB] = await Promise.all([
|
|
36
|
+
app.store.listCases(key, { includeRetired: true }),
|
|
37
|
+
app.store.listOutputs(a),
|
|
38
|
+
app.store.listOutputs(b),
|
|
39
|
+
]);
|
|
40
|
+
const c = cases.find((x) => x.id === caseId);
|
|
41
|
+
if (!c)
|
|
42
|
+
return null;
|
|
43
|
+
const input = suite.input.parse(c.input);
|
|
44
|
+
const expected = c.labels.find((l) => l.status === "CONFIRMED") ??
|
|
45
|
+
c.labels.find((l) => l.status === "PROVISIONAL");
|
|
46
|
+
const here = aroundCase(disagreements, caseId);
|
|
47
|
+
const d = disagreements[here.index];
|
|
48
|
+
const to = (id) => `${evalsPath(app, key, "side-by-side")}?${new URLSearchParams({ a, b, case: id })}`;
|
|
49
|
+
const byRepeat = (os) => os.filter((o) => o.caseId === caseId).sort((x, y) => x.repeat - y.repeat);
|
|
50
|
+
return (_jsxs("div", { className: "space-y-6", children: [back, _jsxs("div", { className: "space-y-2", children: [_jsxs("p", { className: "text-sm text-muted", children: ["Side by side", _jsx(InfoTip, { term: "sideBySide" }), " · ", suite.label] }), _jsx("h1", { className: "text-2xl font-semibold", children: suite.title(input) }), _jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [_jsx("span", { className: "flex items-center gap-2 text-sm text-muted", children: d ? (_jsxs(_Fragment, { children: [_jsx(DisagreementChip, { kind: d.kind, id: "kind" }), _jsx(Tip, { term: "disagreements", id: "position", children: _jsxs("span", { children: [here.index + 1, " of ", disagreements.length, " where they differ"] }) })] })) : (_jsx("span", { children: "Both tests graded this case alike." })) }), _jsxs("nav", { "aria-label": "Cases where they differ", className: "flex gap-2", children: [here.previous ? (_jsx(StepLink, { href: to(here.previous), dir: "previous" })) : (_jsx(StepLink, { dir: "previous" })), here.next ? (_jsx(StepLink, { href: to(here.next), dir: "next" })) : (_jsx(StepLink, { dir: "next" }))] })] })] }), _jsxs(Card, { className: "grid gap-5 text-sm md:grid-cols-2", children: [_jsxs("section", { className: "min-w-0 space-y-2", children: [_jsx("h2", { className: "text-xs font-semibold uppercase tracking-wide text-muted", children: "Input" }), suite.describe ? (_jsx("pre", { className: "readable text-xs whitespace-pre-wrap", children: suite.describe(input) })) : suite.fields ? (_jsx(FieldValues, { fields: suite.fields.input, values: c.input, prefix: "in-" })) : (_jsx("pre", { className: "readable text-xs whitespace-pre-wrap", children: JSON.stringify(c.input, null, 2) }))] }), _jsxs("section", { className: "min-w-0 space-y-2", children: [_jsxs("h2", { className: "text-xs font-semibold uppercase tracking-wide text-muted", children: ["Expected answer", _jsx(InfoTip, { term: "expectedAnswer" })] }), !expected ? (_jsx("p", { className: "readable text-muted", children: "No answer in use." })) : suite.fields ? (_jsx(FieldValues, { fields: suite.fields.label, values: expected.value, prefix: "expected-" })) : (_jsx("pre", { className: "readable whitespace-pre-wrap text-xs", children: JSON.stringify(expected.value, null, 2) }))] })] }), _jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [_jsx(Side, { app: app, side: "inPlace", run: result.a, outputs: byRepeat(outA), suite: suite, score: d?.champion ?? null, runHref: evalsPath(app, key, "runs", a) }), _jsx(Side, { app: app, side: "challenger", run: result.b, outputs: byRepeat(outB), suite: suite, score: d?.challenger ?? null, runHref: evalsPath(app, key, "runs", b) })] })] }));
|
|
51
|
+
}
|
|
52
|
+
/** A link to the previous or next disagreement, or a dimmed one at either end. */
|
|
53
|
+
function StepLink({ href, dir }) {
|
|
54
|
+
const label = dir === "previous" ? "Previous" : "Next";
|
|
55
|
+
const body = dir === "previous" ? (_jsxs(_Fragment, { children: [_jsx(ArrowLeft, { "aria-hidden": true, className: "h-4 w-4" }), label] })) : (_jsxs(_Fragment, { children: [label, _jsx(ArrowRight, { "aria-hidden": true, className: "h-4 w-4" })] }));
|
|
56
|
+
const cls = "inline-flex items-center gap-1 rounded-md border border-line px-3 py-1.5 text-sm";
|
|
57
|
+
return href ? (_jsx(Link, { href: href, className: `${cls} hover:bg-tint`, children: body })) : (_jsx("span", { "aria-disabled": "true", className: `${cls} text-muted opacity-60`, children: body }));
|
|
58
|
+
}
|
|
59
|
+
/** One test's answers to the case, with what each check found. */
|
|
60
|
+
function Side({ app, side, run, outputs, suite, score, runHref, }) {
|
|
61
|
+
const label = (k) => suite.checks.find((x) => x.key === k)?.label ?? k;
|
|
62
|
+
return (_jsxs(Card, { className: "space-y-4 text-sm", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted", children: [side === "inPlace" ? "In place" : "Challenger", _jsx(InfoTip, { term: side, id: `${side}-side` })] }), _jsx("h2", { className: "text-lg font-semibold", children: _jsx(Link, { href: runHref, className: "hover:underline", children: app.models[run.model]?.label ?? run.model }) }), score !== null && (_jsx(Tip, { term: "caseScore", id: `${side}-score`, children: _jsxs("span", { className: "text-muted", children: ["Scored ", pct(score), " on this case"] }) }))] }), outputs.length === 0 && (_jsx("p", { className: "readable text-muted", children: "This test has no answer here." })), outputs.map((o) => {
|
|
63
|
+
const checks = o.scores ?? [];
|
|
64
|
+
return (_jsxs("section", { className: "space-y-3 rounded-md bg-tint p-3", children: [outputs.length > 1 && (_jsxs("p", { className: "text-xs text-muted", children: ["Repeat ", o.repeat + 1] })), o.error ? (_jsxs("p", { className: "readable text-bad", children: ["No answer: ", o.error] })) : suite.fields && suite.labelFromOutput ? (_jsx(FieldValues, { fields: suite.fields.label, values: suite.labelFromOutput(o.output), prefix: `${side}-${o.repeat}-` })) : (_jsx(ReadableOutput, { value: o.output })), checks.length > 0 && (_jsx("ul", { className: "space-y-1", children: checks.map((x) => (_jsxs("li", { className: "flex items-start gap-1.5", children: [x.pass === null ? (_jsx(Minus, { "aria-label": "Doesn't apply", className: "mt-0.5 h-4 w-4 shrink-0 text-muted" })) : x.pass ? (_jsx(Check, { "aria-label": "Passed", className: "mt-0.5 h-4 w-4 shrink-0 text-good" })) : (_jsx(X, { "aria-label": "Failed", className: "mt-0.5 h-4 w-4 shrink-0 text-warn" })), _jsxs("span", { className: "readable", children: [label(x.key), x.note && _jsxs("span", { className: "text-muted", children: [": ", x.note] })] })] }, x.key))) }))] }, o.id));
|
|
65
|
+
})] }));
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=SideBySideView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SideBySideView.js","sourceRoot":"","sources":["../../src/react/SideBySideView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAsB,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,UAAU,GAKX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,I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C,CAAC,CAAC,CACX,KAAC,KAAK,kBACO,QAAQ,EACnB,SAAS,EAAC,mCAAmC,GAC7C,CACH,CAAC,CAAC,CAAC,CACF,KAAC,CAAC,kBACW,QAAQ,EACnB,SAAS,EAAC,mCAAmC,GAC7C,CACH,EACD,gBAAM,SAAS,EAAC,UAAU,aACvB,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,EACZ,CAAC,CAAC,IAAI,IAAI,gBAAM,SAAS,EAAC,YAAY,mBAAI,CAAC,CAAC,IAAI,IAAQ,IACpD,KApBA,CAAC,CAAC,GAAG,CAqBT,CACN,CAAC,GACC,CACN,KA1CW,CAAC,CAAC,EAAE,CA2CR,CACX,CAAC;YACJ,CAAC,CAAC,IACG,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { type EvalAppConfig } from "./app.js";
|
|
2
|
+
/**
|
|
3
|
+
* Everything a suite's page shows, loaded together: on a remote database
|
|
4
|
+
* each read waits on round trips, so one after the other multiplies the
|
|
5
|
+
* wait. Null for a suite that doesn't exist. Sections read from this, so a
|
|
6
|
+
* page that arranges them its own way loads the same data once.
|
|
7
|
+
*
|
|
8
|
+
* @param key - The suite's key.
|
|
9
|
+
*/
|
|
10
|
+
export declare function loadSuitePage(app: EvalAppConfig, key: string): Promise<{
|
|
11
|
+
app: EvalAppConfig;
|
|
12
|
+
key: string;
|
|
13
|
+
operation: string;
|
|
14
|
+
b: {
|
|
15
|
+
suite: import("../types.js").AnySuite;
|
|
16
|
+
route: import("../runner.js").Route;
|
|
17
|
+
cases: number;
|
|
18
|
+
caseResults: Record<string, {
|
|
19
|
+
passed: number;
|
|
20
|
+
models: number;
|
|
21
|
+
}>;
|
|
22
|
+
provisional: number;
|
|
23
|
+
rows: import("../board.js").BoardRow[];
|
|
24
|
+
liveRunId: string | null;
|
|
25
|
+
};
|
|
26
|
+
suite: import("../types.js").AnySuite;
|
|
27
|
+
rows: import("../board.js").BoardRow[];
|
|
28
|
+
attackBoards: {
|
|
29
|
+
suite: import("../types.js").AnySuite;
|
|
30
|
+
route: import("../runner.js").Route;
|
|
31
|
+
cases: number;
|
|
32
|
+
caseResults: Record<string, {
|
|
33
|
+
passed: number;
|
|
34
|
+
models: number;
|
|
35
|
+
}>;
|
|
36
|
+
provisional: number;
|
|
37
|
+
rows: import("../board.js").BoardRow[];
|
|
38
|
+
liveRunId: string | null;
|
|
39
|
+
}[];
|
|
40
|
+
attacks: import("../suggest.js").AttackResults[];
|
|
41
|
+
history: import("../settings.js").HistoryEntry[];
|
|
42
|
+
liveSettings: {
|
|
43
|
+
settings: import("../settings.js").Settings;
|
|
44
|
+
version: import("../settings.js").SettingsVersion | null;
|
|
45
|
+
};
|
|
46
|
+
inInstructions: import("../inInstructions.js").CaseInInstructions[];
|
|
47
|
+
s: import("../suggest.js").Suggestion<import("../board.js").BoardRow> | null;
|
|
48
|
+
choosesHere: boolean;
|
|
49
|
+
testing: boolean;
|
|
50
|
+
estimates: Map<string, {
|
|
51
|
+
cases: number;
|
|
52
|
+
answers: number;
|
|
53
|
+
reused: number;
|
|
54
|
+
costUsd: number | null;
|
|
55
|
+
}>;
|
|
56
|
+
showAttacks: boolean;
|
|
57
|
+
live: import("../board.js").BoardRow | undefined;
|
|
58
|
+
health: import("../prune.js").AnswerKeyHealth<import("../store.js").CaseRecord>;
|
|
59
|
+
} | null>;
|
|
60
|
+
/** What `loadSuitePage` returns, for sections and custom pages. */
|
|
61
|
+
export type SuitePageData = NonNullable<Awaited<ReturnType<typeof loadSuitePage>>>;
|
|
62
|
+
/** The suite's name, what it tests, and its priority. */
|
|
63
|
+
export declare function SuiteHeader({ data }: {
|
|
64
|
+
data: SuitePageData;
|
|
65
|
+
}): import("react").JSX.Element;
|
|
66
|
+
/** On an injection suite: models are chosen on its base suite, with a link there. */
|
|
67
|
+
export declare function ChosenOnBase({ data }: {
|
|
68
|
+
data: SuitePageData;
|
|
69
|
+
}): import("react").JSX.Element;
|
|
70
|
+
/** Which models to make live and the fallback, and why; shown when nothing would change too. */
|
|
71
|
+
export declare function SuggestionCard({ data }: {
|
|
72
|
+
data: SuitePageData;
|
|
73
|
+
}): import("react").JSX.Element;
|
|
74
|
+
/** Cases whose words appear in the feature's instructions. */
|
|
75
|
+
export declare function CasesInInstructions({ data }: {
|
|
76
|
+
data: SuitePageData;
|
|
77
|
+
}): import("react").JSX.Element;
|
|
78
|
+
/** Every model the feature can use: its latest test, how it compares with live, under attack, and buttons to test it or choose it. */
|
|
79
|
+
export declare function ModelTable({ data }: {
|
|
80
|
+
data: SuitePageData;
|
|
81
|
+
}): import("react").JSX.Element;
|
|
82
|
+
/** The feature's settings history, with rollback; not on an injection suite. */
|
|
83
|
+
export declare function Versions({ data }: {
|
|
84
|
+
data: SuitePageData;
|
|
85
|
+
}): import("react").JSX.Element;
|
|
86
|
+
/** Each check: what it checks, its severity and bar, and how the live model does. */
|
|
87
|
+
export declare function ChecksSection({ data }: {
|
|
88
|
+
data: SuitePageData;
|
|
89
|
+
}): import("react").JSX.Element;
|
|
90
|
+
/** The answer key: the cases in use and their answers, with ways to add and rate them. */
|
|
91
|
+
export declare function AnswerKeySection({ data }: {
|
|
92
|
+
data: SuitePageData;
|
|
93
|
+
}): import("react").JSX.Element;
|
|
94
|
+
/**
|
|
95
|
+
* Keeping the answer key useful: easy cases to retire (a floor stays),
|
|
96
|
+
* cases models split on and near-duplicates to check, old drafts, and
|
|
97
|
+
* tags with a single case. Shows only what needs a look, and nothing on
|
|
98
|
+
* an injection suite, whose cases are made from its base suite's.
|
|
99
|
+
*/
|
|
100
|
+
export declare function AnswerKeyHealthSection({ data }: {
|
|
101
|
+
data: SuitePageData;
|
|
102
|
+
}): import("react").JSX.Element | null;
|
|
103
|
+
/**
|
|
104
|
+
* A suite's page as Evalkeeper arranges it, or null for a suite you don't
|
|
105
|
+
* have. A page of your own loads the same data (`loadSuitePage`) and
|
|
106
|
+
* arranges these sections another way.
|
|
107
|
+
*/
|
|
108
|
+
export declare function SuitePage({ app, suite, }: {
|
|
109
|
+
app: EvalAppConfig;
|
|
110
|
+
suite: string;
|
|
111
|
+
}): Promise<import("react").JSX.Element | null>;
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { FAVOR_TEXT, answerKeyHealth, attacksFrom, checkBar, isInjectionSuite, meanCalibrationError, money, probabilityQuality, perAnswer, retiresLabel, seconds, seriousMistakes, suggest, } from "../index.js";
|
|
3
|
+
import { AnswerKey } from "./AnswerKey.js";
|
|
4
|
+
import { ModelMenu } from "./ModelMenu.js";
|
|
5
|
+
import { Tabs } from "./Tabs.js";
|
|
6
|
+
import { Link, BackLink, Card, RefreshWhile, Chip, IconSubmit, InfoTip, Score, Spinner, Submit, Tip, } from "./pieces.js";
|
|
7
|
+
import { pct, LINK } from "./format.js";
|
|
8
|
+
import { RotateCw } from "lucide-react";
|
|
9
|
+
import { evalsPath, attacksResisted } from "./app.js";
|
|
10
|
+
import { SettingsHistory } from "./SettingsHistory.js";
|
|
11
|
+
/**
|
|
12
|
+
* Everything a suite's page shows, loaded together: on a remote database
|
|
13
|
+
* each read waits on round trips, so one after the other multiplies the
|
|
14
|
+
* wait. Null for a suite that doesn't exist. Sections read from this, so a
|
|
15
|
+
* page that arranges them its own way loads the same data once.
|
|
16
|
+
*
|
|
17
|
+
* @param key - The suite's key.
|
|
18
|
+
*/
|
|
19
|
+
export async function loadSuitePage(app, key) {
|
|
20
|
+
const operation = app.suiteByKey[key]?.operation;
|
|
21
|
+
if (!operation)
|
|
22
|
+
return null;
|
|
23
|
+
const [b, attackBoards, [history, liveSettings], inInstructions, cases] = await Promise.all([
|
|
24
|
+
app.runner.board(key),
|
|
25
|
+
// Injection suites that attack this feature: their results count here.
|
|
26
|
+
app.runner.attackBoards(key),
|
|
27
|
+
// Records a deploy if the instructions changed under the live
|
|
28
|
+
// settings, before reading them.
|
|
29
|
+
app.settings
|
|
30
|
+
.syncPrompt(operation)
|
|
31
|
+
.then(() => Promise.all([
|
|
32
|
+
app.settings.history(operation),
|
|
33
|
+
app.settings.current(operation),
|
|
34
|
+
])),
|
|
35
|
+
app.runner.casesInInstructions(key),
|
|
36
|
+
app.store.listCases(key),
|
|
37
|
+
]);
|
|
38
|
+
const { suite, rows } = b;
|
|
39
|
+
const attacks = attacksFrom(attackBoards);
|
|
40
|
+
// An injection suite's models are chosen on its base suite's page.
|
|
41
|
+
const choosesHere = !isInjectionSuite(suite);
|
|
42
|
+
const s = choosesHere
|
|
43
|
+
? suggest(rows, suite.checks, suite.priority, app.models, { attacks })
|
|
44
|
+
: null;
|
|
45
|
+
const testing = rows.some((r) => r.testing) ||
|
|
46
|
+
attackBoards.some((a) => a.rows.some((r) => r.testing));
|
|
47
|
+
// What testing each model would cost now, attack cases included,
|
|
48
|
+
// counting answers it would reuse.
|
|
49
|
+
const estimates = new Map(await Promise.all(rows.map(async (r) => [
|
|
50
|
+
r.key,
|
|
51
|
+
await app.runner.estimateTest(key, r.model, "ALL", 1, {
|
|
52
|
+
reasoningEffort: r.effort,
|
|
53
|
+
}),
|
|
54
|
+
])));
|
|
55
|
+
// Results under attack show once the feature has attack cases: a test
|
|
56
|
+
// makes them from its confirmed answers.
|
|
57
|
+
const showAttacks = attackBoards.some((a) => a.cases > 0);
|
|
58
|
+
const live = rows.find((r) => r.live);
|
|
59
|
+
// What would keep the answer key useful, from the same tests.
|
|
60
|
+
const health = answerKeyHealth(cases, b.caseResults);
|
|
61
|
+
return {
|
|
62
|
+
app,
|
|
63
|
+
key,
|
|
64
|
+
operation,
|
|
65
|
+
b,
|
|
66
|
+
suite,
|
|
67
|
+
rows,
|
|
68
|
+
attackBoards,
|
|
69
|
+
attacks,
|
|
70
|
+
history,
|
|
71
|
+
liveSettings,
|
|
72
|
+
inInstructions,
|
|
73
|
+
s,
|
|
74
|
+
choosesHere,
|
|
75
|
+
testing,
|
|
76
|
+
estimates,
|
|
77
|
+
showAttacks,
|
|
78
|
+
live,
|
|
79
|
+
health,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/** A share as a whole percent, or a dash when there's nothing to show. */
|
|
83
|
+
const asPct = (x) => (x === null ? "—" : pct(x));
|
|
84
|
+
const VS = {
|
|
85
|
+
BETTER: "More accurate",
|
|
86
|
+
SAME: "About as accurate",
|
|
87
|
+
WORSE: "Less accurate",
|
|
88
|
+
TOO_FEW: "Too few cases to tell",
|
|
89
|
+
};
|
|
90
|
+
/** The suite's name, what it tests, and its priority. */
|
|
91
|
+
export function SuiteHeader({ data }) {
|
|
92
|
+
const { app, suite } = data;
|
|
93
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: "space-y-2", children: [_jsx(BackLink, { href: app.basePath, children: "Evals" }), _jsx("h1", { className: "text-2xl font-semibold", children: suite.label }), _jsx("p", { className: "readable text-muted", children: suite.description }), _jsxs("p", { className: "readable text-sm text-muted", children: ["Priority: ", FAVOR_TEXT[suite.priority.favor], ".", _jsx(InfoTip, { term: "priority" })] })] }) }));
|
|
94
|
+
}
|
|
95
|
+
/** On an injection suite: models are chosen on its base suite, with a link there. */
|
|
96
|
+
export function ChosenOnBase({ data }) {
|
|
97
|
+
const { app, suite } = data;
|
|
98
|
+
return (_jsx(_Fragment, { children: isInjectionSuite(suite) && (_jsxs(Card, { className: "space-y-2", children: [_jsxs("h2", { className: "font-semibold", children: ["Models are chosen on ", suite.base.label, _jsx(InfoTip, { term: "attackResults" })] }), _jsxs("p", { className: "readable text-sm text-muted", children: ["This suite tests the same feature as ", suite.base.label, ", so one choice of model serves both. Its results show there as Attacks resisted, and the suggestion there never picks a model with more serious mistakes on them than live."] }), _jsxs(Link, { href: evalsPath(app, suite.base.key), className: `inline-block text-sm ${LINK}`, children: ["Choose models on ", suite.base.label] })] })) }));
|
|
99
|
+
}
|
|
100
|
+
/** Which models to make live and the fallback, and why; shown when nothing would change too. */
|
|
101
|
+
export function SuggestionCard({ data }) {
|
|
102
|
+
const { app, key, s } = data;
|
|
103
|
+
return (_jsx(_Fragment, { children: s && (_jsxs(Card, { className: "space-y-3", children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("h2", { className: "font-semibold", children: [s.same ? "No change suggested" : "Suggested", _jsx(InfoTip, { term: "suggestion" })] }), !s.same &&
|
|
104
|
+
!(s.retestLive && (!s.fallback || s.fallback.fallback)) && (_jsxs("form", { action: app.actions.useSuggestion, children: [_jsx("input", { type: "hidden", name: "suite", value: key }), _jsx(Submit, { children: "Use these" })] }))] }), !s.same && (_jsxs("p", { children: ["Live: ", _jsx("strong", { children: s.live.label }), s.fallback && (_jsxs(_Fragment, { children: [" ", "\u00B7 Fallback: ", _jsx("strong", { children: s.fallback.label })] }))] })), _jsx("ul", { className: "readable list-disc space-y-1 pl-5 text-sm text-muted", children: s.reasons.map((r) => (_jsx("li", { children: r }, r))) })] })) }));
|
|
105
|
+
}
|
|
106
|
+
/** Cases whose words appear in the feature's instructions. */
|
|
107
|
+
export function CasesInInstructions({ data }) {
|
|
108
|
+
const { inInstructions } = data;
|
|
109
|
+
return (_jsx(_Fragment, { children: inInstructions.length > 0 && (_jsxs(Card, { className: "space-y-2", children: [_jsxs("h2", { className: "font-semibold text-warn", children: ["Cases in the instructions", _jsx(InfoTip, { term: "inInstructions" })] }), _jsx("p", { className: "readable text-sm text-muted", children: "These cases' words appear in what the model is told, so a test grades it on answers it was handed. Take the example out of the instructions, or rewrite or retire the case." }), _jsx("ul", { className: "readable list-disc space-y-1 pl-5 text-sm", children: inInstructions.map((c) => (_jsxs("li", { children: [c.title, ": \u201C", c.found, "\u201D"] }, c.caseId))) })] })) }));
|
|
110
|
+
}
|
|
111
|
+
/** Every model the feature can use: its latest test, how it compares with live, under attack, and buttons to test it or choose it. */
|
|
112
|
+
export function ModelTable({ data }) {
|
|
113
|
+
const { app, key, suite, rows, attackBoards, choosesHere, estimates, showAttacks, live, } = data;
|
|
114
|
+
return (_jsx(_Fragment, { children: _jsxs("section", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsx("h2", { className: "text-lg font-semibold", children: "Models" }), _jsx("div", { className: "flex items-center gap-4", children: _jsxs("form", { action: app.actions.testAll, children: [_jsx("input", { type: "hidden", name: "suite", value: key }), _jsx(Submit, { variant: "quiet", children: "Test every model" })] }) })] }), _jsx(Card, { className: "overflow-x-auto p-0 lg:overflow-visible", children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { className: "text-left text-muted", children: _jsxs("tr", { className: "border-b border-line", children: [_jsx("th", { className: "p-3 font-normal", children: "Model" }), _jsx("th", { className: "p-3 font-normal", children: _jsx(Tip, { term: "score", side: "bottom", children: "Score" }) }), _jsx("th", { className: "p-3 font-normal", children: _jsx(Tip, { term: "seriousMistakes", side: "bottom", children: "Serious mistakes" }) }), showAttacks && (_jsx("th", { className: "p-3 font-normal", children: _jsx(Tip, { term: "attacksResisted", side: "bottom", children: "Attacks resisted" }) })), _jsx("th", { className: "p-3 font-normal", children: _jsx(Tip, { term: "time", side: "bottom", align: "end", children: "Time" }) }), suite.decisions && (_jsxs(_Fragment, { children: [_jsx("th", { className: "p-3 font-normal", children: _jsx(Tip, { term: "probabilityQuality", side: "bottom", children: "Probability quality" }) }), _jsx("th", { className: "p-3 font-normal", children: _jsx(Tip, { term: "calibrationError", side: "bottom", align: "end", children: "Calibration error" }) })] })), _jsx("th", { className: "p-3 font-normal", children: _jsx(Tip, { term: "cost", side: "bottom", align: "end", children: "Cost" }) }), _jsx("th", { className: "p-3 font-normal", children: _jsx(Tip, { term: "againstLive", side: "bottom", align: "end", children: "Against live" }) }), _jsx("th", { className: "p-3" })] }) }), _jsx("tbody", { children: rows.map((r) => (_jsxs("tr", { className: "border-b border-line last:border-0", children: [_jsx("td", { className: "p-3", children: _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("span", { className: r.live ? "font-semibold" : "font-medium", children: r.label }), r.live && (_jsx(Tip, { term: "live", side: "bottom", id: `live-${r.key}`, children: _jsx(Chip, { tone: "live", children: "Live" }) })), r.fallback && (_jsx(Tip, { term: "fallback", side: "bottom", id: `fallback-${r.key}`, children: _jsx(Chip, { tone: "fallback", children: "Fallback" }) })), retiresLabel(app.models, r.model) && (_jsx(Tip, { term: "retiring", side: "bottom", id: `retiring-${r.key}`, children: _jsxs(Chip, { tone: "warn", children: ["Retires ", retiresLabel(app.models, r.model)] }) })), suite.decisions && app.models[r.model]?.decisions && (_jsx(Tip, { term: app.models[r.model]?.decisions === "native"
|
|
115
|
+
? "nativeProbabilities"
|
|
116
|
+
: "promptedProbabilities", side: "bottom", id: `decisions-${r.key}`, children: _jsx(Chip, { tone: "neutral", children: app.models[r.model]?.decisions === "native"
|
|
117
|
+
? "Native probabilities"
|
|
118
|
+
: "Prompted" }) })), r.test?.stale && (_jsx(Tip, { term: "outOfDate", side: "bottom", id: `stale-${r.key}`, children: _jsx(Chip, { tone: "neutral", children: "Out of date" }) }))] }) }), _jsx("td", { className: "p-3", children: r.testing ? (_jsx("span", { role: "status", title: "Testing", className: "inline-flex text-accent", children: _jsx(Spinner, {}) })) : r.test ? (_jsx(Link, { href: evalsPath(app, key, "runs", r.test.runId), children: _jsx(Score, { right: r.test.right, total: r.test.total }) })) : (_jsx("span", { className: "text-muted", children: r.failed ?? "Not tested" })) }), _jsx("td", { className: "p-3 tabular-nums", children: r.test ? seriousMistakes(r, suite.checks) : "—" }), showAttacks && (_jsx("td", { className: "p-3", children: _jsx("div", { className: "flex flex-col gap-1", children: attackBoards.map((a) => (_jsx(UnderAttack, { app: app, attackSuite: a.suite.key, attackLabel: a.suite.label, row: a.rows.find((x) => x.key === r.key), resisted: attacksResisted(r.key, [a]) }, a.suite.key))) }) })), _jsx("td", { className: "p-3 tabular-nums", children: r.test ? seconds(r.test.avgMs) : "—" }), suite.decisions && (_jsxs(_Fragment, { children: [_jsx("td", { className: "p-3 tabular-nums", children: asPct(r.test ? probabilityQuality(r.test.measures) : null) }), _jsx("td", { className: "p-3 tabular-nums", children: asPct(r.test ? meanCalibrationError(r.test.measures) : null) })] })), _jsx("td", { className: "p-3 tabular-nums", children: r.test ? perAnswer(r.test.costPerAnswer) : "—" }), _jsx("td", { className: "p-3", children: r.vsLive && live?.test && r.test && !r.live ? (_jsx(Link, { href: `${evalsPath(app, key, "compare")}?${new URLSearchParams({ a: live.test.runId, b: r.test.runId })}`, className: LINK, children: VS[r.vsLive] })) : r.vsLive ? (VS[r.vsLive]) : ("—") }), _jsx("td", { className: "p-3", children: _jsxs("div", { className: "flex flex-col items-end gap-0.5", children: [_jsxs("div", { className: "flex justify-end gap-2", children: [_jsxs("form", { action: app.actions.testModel, children: [_jsx("input", { type: "hidden", name: "suite", value: key }), _jsx("input", { type: "hidden", name: "model", value: r.model }), _jsx(Tip, { control: true, id: `test-${r.key}`, text: r.test
|
|
119
|
+
? "Test this model again on every case in use."
|
|
120
|
+
: "Test this model on every case in use.", side: "bottom", align: "end", children: _jsx(IconSubmit, { label: "Test", icon: _jsx(RotateCw, { "aria-hidden": true, className: "h-4 w-4" }) }) })] }), choosesHere && (_jsx(ModelMenu, { suite: key, model: r.model, label: r.label, makeLive: !r.live && r.canMakeLive
|
|
121
|
+
? app.actions.makeLive
|
|
122
|
+
: null, makeFallback: r.canMakeFallback
|
|
123
|
+
? app.actions.makeFallback
|
|
124
|
+
: null }))] }), _jsx(EstimateNote, { id: r.key, estimate: estimates.get(r.key) }), r.test && !r.test.stale && r.test.failedAnswers > 0 && (_jsxs("span", { className: "text-right text-xs text-muted", children: [r.test.failedAnswers, " ", r.test.failedAnswers === 1 ? "answer" : "answers", " ", "failed on its last test"] }))] }) })] }, r.key))) })] }) })] }) }));
|
|
125
|
+
}
|
|
126
|
+
/** The feature's settings history, with rollback; not on an injection suite. */
|
|
127
|
+
export function Versions({ data }) {
|
|
128
|
+
const { app, key, history, liveSettings, choosesHere } = data;
|
|
129
|
+
return (_jsx(_Fragment, { children: choosesHere && (_jsx(SettingsHistory, { app: app, suite: key, entries: history, liveId: liveSettings.version?.id ?? null, label: (m) => app.models[m]?.label ?? m, defaults: liveSettings.settings })) }));
|
|
130
|
+
}
|
|
131
|
+
/** Each check: what it checks, its severity and bar, and how the live model does. */
|
|
132
|
+
export function ChecksSection({ data }) {
|
|
133
|
+
const { suite, live } = data;
|
|
134
|
+
return (_jsx(_Fragment, { children: _jsxs("section", { className: "space-y-3", children: [_jsxs("h2", { className: "text-lg font-semibold", children: ["Checks", _jsx(InfoTip, { term: "checks" })] }), _jsx("div", { className: "grid gap-3 md:grid-cols-2", children: suite.checks.map((c) => {
|
|
135
|
+
const rate = live?.test?.byCheck[c.key];
|
|
136
|
+
return (_jsxs(Card, { className: "space-y-1", children: [_jsxs("div", { className: "flex justify-between gap-4", children: [_jsx("h3", { className: "font-medium", children: c.label }), _jsx(Tip, { term: c.severity, id: `severity-${c.key}`, children: _jsx(Chip, { tone: c.severity === "serious" ? "serious" : "neutral", children: c.severity }) })] }), _jsx("p", { className: "readable text-sm text-muted", children: c.description }), _jsxs("p", { className: "text-sm", children: [rate && rate.n > 0 && (_jsxs(_Fragment, { children: ["Live:", " ", _jsx("span", { className: rate.passed / rate.n >= checkBar(c)
|
|
137
|
+
? "text-good"
|
|
138
|
+
: "text-warn", children: pct(rate.passed / rate.n) }), " ", "(", rate.passed, "/", rate.n, ") \u00B7", " "] })), _jsx(Tip, { term: "bar", id: `bar-${c.key}`, children: _jsxs("span", { className: "text-muted", children: ["Bar: ", pct(checkBar(c))] }) })] })] }, c.key));
|
|
139
|
+
}) })] }) }));
|
|
140
|
+
}
|
|
141
|
+
/** The answer key: the cases in use and their answers, with ways to add and rate them. */
|
|
142
|
+
export function AnswerKeySection({ data }) {
|
|
143
|
+
const { app, key, b, suite, rows, attackBoards } = data;
|
|
144
|
+
// A feature's attack cases are a tab of its answer key.
|
|
145
|
+
const attacked = attackBoards.filter((a) => a.cases > 0);
|
|
146
|
+
const cases = (_jsx(AnswerKey, { app: app, suite: suite, rows: rows, heading: _jsxs("h2", { className: "text-lg font-semibold", children: ["Answer key (", b.cases, " cases in use)", _jsx(InfoTip, { term: "answerKey" })] }), tools: _jsxs(_Fragment, { children: [suite.caseKind === "imported" &&
|
|
147
|
+
(suite.labelFromForm || app.answerEditors[key]) && (_jsx(Tip, { control: true, term: "rateBlind", side: "bottom", align: "end", children: _jsx(Link, { href: evalsPath(app, key, "rate"), className: "inline-flex items-center rounded-md border border-accent/40 bg-card px-3 py-1.5 text-sm text-accent hover:bg-accent/10", children: "Rate blind" }) })), _jsxs("form", { action: app.actions.rescore, children: [_jsx("input", { type: "hidden", name: "suite", value: key }), _jsx(Tip, { control: true, term: "rescore", side: "bottom", align: "end", children: _jsx(IconSubmit, { label: "Rescore tests", icon: _jsx(RotateCw, { "aria-hidden": true, className: "h-4 w-4" }) }) })] })] }) }));
|
|
148
|
+
return (
|
|
149
|
+
// The weekly check links here to review drafts.
|
|
150
|
+
_jsx("section", { id: "answer-key", className: "scroll-mt-4 space-y-3", children: attacked.length === 0 ? (cases) : (_jsx(Tabs, { label: "The answer key's cases", tabs: [
|
|
151
|
+
{ id: "cases", title: `Cases (${b.cases})`, panel: cases },
|
|
152
|
+
...attacked.map((a) => ({
|
|
153
|
+
id: a.suite.key,
|
|
154
|
+
title: `Attacks (${a.cases})`,
|
|
155
|
+
panel: (_jsx(AnswerKey, { app: app, readOnly: true, suite: a.suite, rows: a.rows, heading: _jsx("p", { className: "readable text-sm text-muted", children: "Each is a confirmed case with an attack planted where untrusted text goes, and keeps that case's answer. A model's Test runs them, and they follow the cases as answers change." }) })),
|
|
156
|
+
})),
|
|
157
|
+
] })) }));
|
|
158
|
+
}
|
|
159
|
+
/** "Free: all 16 reused" or "~$0.03, 4 of 16 reused", under a model's buttons. */
|
|
160
|
+
function EstimateNote({ id, estimate, }) {
|
|
161
|
+
if (!estimate || estimate.answers === 0)
|
|
162
|
+
return null;
|
|
163
|
+
const { answers, reused, costUsd } = estimate;
|
|
164
|
+
const text = reused === answers
|
|
165
|
+
? `Free: all ${answers} reused`
|
|
166
|
+
: `${costUsd === null ? "Cost unknown" : `~${money(costUsd)}`}${reused ? `, ${reused} of ${answers} reused` : ""}`;
|
|
167
|
+
return (_jsx(Tip, { text: "What testing this model costs now. Answers an identical request gave in the last 7 days are reused for free.", id: `estimate-${id}`, side: "bottom", align: "end", children: _jsx("span", { className: "whitespace-nowrap text-xs text-muted", children: text }) }));
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* A model's serious mistakes on one injection suite, linked to that test,
|
|
171
|
+
* or a dash until the model's Test runs the attacks along with its cases.
|
|
172
|
+
* Out of date and failed tests say so: the suggestion counts only
|
|
173
|
+
* current, complete ones.
|
|
174
|
+
*/
|
|
175
|
+
function UnderAttack({ app, attackSuite, attackLabel, row, resisted, }) {
|
|
176
|
+
if (row?.testing)
|
|
177
|
+
return (_jsx("span", { role: "status", title: "Testing", className: "inline-flex text-accent", children: _jsx(Spinner, {}) }));
|
|
178
|
+
if (row?.test)
|
|
179
|
+
return (_jsxs(Link, { href: evalsPath(app, attackSuite, "runs", row.test.runId), title: attackLabel, className: "tabular-nums", children: [resisted ? pct(resisted.resisted / resisted.of) : "—", row.test.stale
|
|
180
|
+
? " · out of date"
|
|
181
|
+
: row.test.failedAnswers
|
|
182
|
+
? " · answers failed"
|
|
183
|
+
: ""] }));
|
|
184
|
+
// Not tested yet: the model's Test runs the attacks with its cases.
|
|
185
|
+
return _jsx("span", { className: "text-muted", children: "\u2014" });
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Keeping the answer key useful: easy cases to retire (a floor stays),
|
|
189
|
+
* cases models split on and near-duplicates to check, old drafts, and
|
|
190
|
+
* tags with a single case. Shows only what needs a look, and nothing on
|
|
191
|
+
* an injection suite, whose cases are made from its base suite's.
|
|
192
|
+
*/
|
|
193
|
+
export function AnswerKeyHealthSection({ data }) {
|
|
194
|
+
const { app, key, suite, health: h, choosesHere } = data;
|
|
195
|
+
const thin = h.tags.filter(([, n]) => n === 1).map(([t]) => t);
|
|
196
|
+
const needs = h.easyToRetire.length ||
|
|
197
|
+
h.split.length ||
|
|
198
|
+
h.duplicates.length ||
|
|
199
|
+
h.staleDrafts.length ||
|
|
200
|
+
thin.length;
|
|
201
|
+
if (!choosesHere || !needs)
|
|
202
|
+
return null;
|
|
203
|
+
const title = (c) => {
|
|
204
|
+
const p = suite.input.safeParse(c.input);
|
|
205
|
+
return p.success ? suite.title(p.data) : "(case)";
|
|
206
|
+
};
|
|
207
|
+
const caseLink = (c) => (_jsx("a", { href: `#case-${c.id}`, className: LINK, children: title(c) }));
|
|
208
|
+
const { retireEasy, retireStaleDrafts } = app.actions;
|
|
209
|
+
const cases = (n) => `${n} ${n === 1 ? "case" : "cases"}`;
|
|
210
|
+
const drafts = (n) => `${n} ${n === 1 ? "draft" : "drafts"}`;
|
|
211
|
+
return (_jsxs("section", { className: "space-y-3", "aria-labelledby": "answer-key-health", children: [_jsxs("h2", { id: "answer-key-health", className: "text-lg font-semibold", children: ["Answer key health", _jsx(InfoTip, { term: "answerKeyHealth" })] }), _jsxs(Card, { className: "space-y-5 text-sm", children: [h.easyToRetire.length > 0 && (_jsxs("div", { className: "readable space-y-2", children: [_jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Easy cases" }), _jsx(InfoTip, { term: "easyCases" }), ": every current model gets", " ", cases(h.easy.length), " fully right, so they no longer tell models apart. Retire ", h.easyToRetire.length, " and keep", " ", h.easy.length - h.easyToRetire.length, " as a floor", _jsx(InfoTip, { term: "easyFloor" }), ", so a test still catches a model that breaks the basics. Recent tests are rescored for free."] }), retireEasy && (_jsxs("form", { action: retireEasy, children: [_jsx("input", { type: "hidden", name: "suite", value: key }), _jsxs(Submit, { variant: "quiet", children: ["Retire ", h.easyToRetire.length, " easy", " ", h.easyToRetire.length === 1 ? "case" : "cases"] })] }))] })), h.split.length > 0 && (_jsxs("div", { className: "readable space-y-1", children: [_jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Split cases" }), _jsx(InfoTip, { term: "splitCases" }), ": models divide about evenly on", " ", cases(h.split.length), ". The answer may be unclear, so check it first."] }), _jsx("ul", { className: "list-disc space-y-0.5 pl-5", children: h.split.map((c) => (_jsx("li", { children: caseLink(c) }, c.id))) })] })), h.duplicates.length > 0 && (_jsxs("div", { className: "readable space-y-1", children: [_jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Near-duplicates" }), _jsx(InfoTip, { term: "nearDuplicates" }), ": these pairs share nearly all their words. Keep the clearer one."] }), _jsx("ul", { className: "list-disc space-y-0.5 pl-5", children: h.duplicates.map(([a, b]) => (_jsxs("li", { children: [caseLink(a), " and ", caseLink(b)] }, `${a.id}-${b.id}`))) })] })), h.staleDrafts.length > 0 && (_jsxs("div", { className: "readable space-y-2", children: [_jsxs("p", { children: [_jsx("span", { className: "font-medium", children: "Old drafts" }), _jsx(InfoTip, { term: "oldDrafts" }), ": ", drafts(h.staleDrafts.length), " ", "nobody reviewed in 30 days. The weekly check retires them on its own."] }), retireStaleDrafts && (_jsxs("form", { action: retireStaleDrafts, children: [_jsx("input", { type: "hidden", name: "suite", value: key }), _jsxs(Submit, { variant: "quiet", children: ["Retire ", h.staleDrafts.length, " old", " ", h.staleDrafts.length === 1 ? "draft" : "drafts", " now"] })] }))] })), thin.length > 0 && (_jsxs("div", { className: "space-y-2", children: [_jsxs("p", { className: "readable", children: [_jsx("span", { className: "font-medium", children: "Coverage" }), _jsx(InfoTip, { term: "tagCoverage" }), ": ", thin.length, " ", thin.length === 1 ? "tag has" : "tags have", " a single case. A new case there tells you the most."] }), _jsx("ul", { className: "flex flex-wrap gap-1.5", children: h.tags.map(([t, n]) => (_jsx("li", { children: _jsxs(Chip, { tone: n === 1 ? "warn" : "neutral", children: [t, " \u00B7 ", n] }) }, t))) })] }))] })] }));
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* A suite's page as Evalkeeper arranges it, or null for a suite you don't
|
|
215
|
+
* have. A page of your own loads the same data (`loadSuitePage`) and
|
|
216
|
+
* arranges these sections another way.
|
|
217
|
+
*/
|
|
218
|
+
export async function SuitePage({ app, suite, }) {
|
|
219
|
+
const data = await loadSuitePage(app, suite);
|
|
220
|
+
if (!data)
|
|
221
|
+
return null;
|
|
222
|
+
return (_jsxs("div", { className: "space-y-8", children: [_jsx(RefreshWhile, { active: data.testing }), _jsx(SuiteHeader, { data: data }), _jsx(ChosenOnBase, { data: data }), _jsx(SuggestionCard, { data: data }), _jsx(CasesInInstructions, { data: data }), _jsx(ModelTable, { data: data }), _jsx(Versions, { data: data }), _jsx(ChecksSection, { data: data }), _jsx(AnswerKeyHealthSection, { data: data }), _jsx(AnswerKeySection, { data: data })] }));
|
|
223
|
+
}
|
|
224
|
+
//# sourceMappingURL=SuiteSections.js.map
|