@crowandraven/evalkeeper 0.11.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/drafts.d.ts +49 -0
  2. package/dist/drafts.js +105 -0
  3. package/dist/drafts.js.map +1 -0
  4. package/dist/glossary.d.ts +6 -2
  5. package/dist/glossary.js +6 -2
  6. package/dist/glossary.js.map +1 -1
  7. package/dist/health.d.ts +35 -2
  8. package/dist/health.js +29 -5
  9. package/dist/health.js.map +1 -1
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.js +2 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/next/actions.js +128 -15
  14. package/dist/next/actions.js.map +1 -1
  15. package/dist/next/wiring.d.ts +6 -0
  16. package/dist/order.d.ts +18 -0
  17. package/dist/order.js +53 -0
  18. package/dist/order.js.map +1 -0
  19. package/dist/prisma/index.d.ts +1 -0
  20. package/dist/prisma/index.js +3 -0
  21. package/dist/prisma/index.js.map +1 -1
  22. package/dist/react/HubSections.d.ts +7 -0
  23. package/dist/react/HubSections.js +22 -8
  24. package/dist/react/HubSections.js.map +1 -1
  25. package/dist/react/ModelMenu.d.ts +18 -4
  26. package/dist/react/ModelMenu.js +12 -7
  27. package/dist/react/ModelMenu.js.map +1 -1
  28. package/dist/react/RateView.js +1 -0
  29. package/dist/react/RateView.js.map +1 -1
  30. package/dist/react/SuiteSections.d.ts +31 -0
  31. package/dist/react/SuiteSections.js +148 -32
  32. package/dist/react/SuiteSections.js.map +1 -1
  33. package/dist/react/app.d.ts +18 -0
  34. package/dist/react/app.js.map +1 -1
  35. package/dist/react/pieces.d.ts +10 -1
  36. package/dist/react/pieces.js +50 -0
  37. package/dist/react/pieces.js.map +1 -1
  38. package/dist/settings.d.ts +14 -0
  39. package/dist/settings.js +24 -2
  40. package/dist/settings.js.map +1 -1
  41. package/dist/testing.d.ts +1 -1
  42. package/dist/testing.js +32 -0
  43. package/dist/testing.js.map +1 -1
  44. package/dist/types.d.ts +33 -0
  45. package/dist/types.js +11 -0
  46. package/dist/types.js.map +1 -1
  47. package/package.json +1 -1
  48. package/schema/evalkeeper.prisma +3 -0
  49. package/src/drafts.ts +123 -0
  50. package/src/glossary.ts +10 -2
  51. package/src/health.ts +53 -6
  52. package/src/index.ts +2 -0
  53. package/src/next/actions.ts +162 -16
  54. package/src/next/wiring.ts +6 -0
  55. package/src/order.ts +64 -0
  56. package/src/prisma/index.ts +5 -0
  57. package/src/react/HubSections.tsx +31 -7
  58. package/src/react/ModelMenu.tsx +33 -7
  59. package/src/react/RateView.tsx +1 -0
  60. package/src/react/SuiteSections.tsx +640 -170
  61. package/src/react/app.ts +15 -0
  62. package/src/react/pieces.tsx +62 -1
  63. package/src/settings.ts +37 -2
  64. package/src/testing.ts +35 -1
  65. package/src/types.ts +37 -0
  66. package/templates/lib/evalkeeper/actions.ts +20 -0
@@ -0,0 +1,49 @@
1
+ import type { CaseRecord, EvalStore } from "./store.js";
2
+ import type { AnySuite } from "./types.js";
3
+ /** Where a case a model drafted on request came from. */
4
+ export declare const MODEL_DRAFT_SOURCE = "MODEL_DRAFT";
5
+ /** What drafting more cases did. */
6
+ export type DraftMoreResult = {
7
+ /** Cases added, each with a PENDING answer. */
8
+ drafted: number;
9
+ /** Drafts that didn't fit the suite's input or answer, and why. */
10
+ rejected: {
11
+ problem: string;
12
+ }[];
13
+ };
14
+ /**
15
+ * Has the suite's `draftMore` write enough new cases to bring the answer
16
+ * key toward its target size, aimed at what it's missing, with an optional
17
+ * focus from the person asking. Each arrives as a DRAFT case with a
18
+ * PENDING answer, split between DEV and TEST like any new case, and counts
19
+ * only once a person confirms it.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const { drafted } = await draftMoreCases({ store, suite, focus: "longer notes" });
24
+ * ```
25
+ */
26
+ export declare function draftMoreCases(opts: {
27
+ store: EvalStore;
28
+ suite: AnySuite;
29
+ /** What to aim the drafts at, in the person's words; null for none. */
30
+ focus: string | null;
31
+ }): Promise<DraftMoreResult>;
32
+ /**
33
+ * Cases in use whose only answer is a draft: what testing with drafts
34
+ * would put to use.
35
+ */
36
+ export declare function draftAnswers(cases: readonly CaseRecord[]): {
37
+ case: CaseRecord;
38
+ label: import("./store.js").LabelRecord;
39
+ }[];
40
+ /**
41
+ * Puts every draft answer to use before review, so a feature can be
42
+ * tested now: each becomes PROVISIONAL (and its case ACTIVE), and every
43
+ * score resting on one says so until a person confirms it. Returns how
44
+ * many answers it put to use.
45
+ */
46
+ export declare function useDraftsProvisionally(opts: {
47
+ store: EvalStore;
48
+ suite: AnySuite;
49
+ }): Promise<number>;
package/dist/drafts.js ADDED
@@ -0,0 +1,105 @@
1
+ import { confirmedLabel } from "./labels.js";
2
+ import { nextSplit } from "./quickSet.js";
3
+ import { draftsToTarget } from "./summary.js";
4
+ /** Where a case a model drafted on request came from. */
5
+ export const MODEL_DRAFT_SOURCE = "MODEL_DRAFT";
6
+ /**
7
+ * Has the suite's `draftMore` write enough new cases to bring the answer
8
+ * key toward its target size, aimed at what it's missing, with an optional
9
+ * focus from the person asking. Each arrives as a DRAFT case with a
10
+ * PENDING answer, split between DEV and TEST like any new case, and counts
11
+ * only once a person confirms it.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const { drafted } = await draftMoreCases({ store, suite, focus: "longer notes" });
16
+ * ```
17
+ */
18
+ export async function draftMoreCases(opts) {
19
+ const { store, suite } = opts;
20
+ const result = { drafted: 0, rejected: [] };
21
+ if (!suite.draftMore)
22
+ return result;
23
+ const all = await store.listCases(suite.key, { includeRetired: true });
24
+ const inUse = all.filter((c) => c.status !== "RETIRED");
25
+ const drafts = await suite.draftMore({
26
+ existing: all.map((c) => ({ input: c.input, tags: c.tags })),
27
+ count: draftsToTarget(inUse.length),
28
+ focus: opts.focus,
29
+ });
30
+ const counts = { DEV: 0, TEST: 0 };
31
+ for (const c of inUse)
32
+ counts[c.split] += 1;
33
+ for (const d of drafts) {
34
+ const input = suite.input.safeParse(d.input);
35
+ if (!input.success) {
36
+ result.rejected.push({
37
+ problem: `input: ${input.error.issues[0]?.message ?? "invalid"}`,
38
+ });
39
+ continue;
40
+ }
41
+ const label = suite.labelValue.safeParse(d.label);
42
+ if (!label.success) {
43
+ result.rejected.push({
44
+ problem: `answer: ${label.error.issues[0]?.message ?? "invalid"}`,
45
+ });
46
+ continue;
47
+ }
48
+ const split = nextSplit(counts);
49
+ counts[split] += 1;
50
+ const data = {
51
+ suite: suite.key,
52
+ input: input.data,
53
+ tags: d.tags,
54
+ split,
55
+ status: "DRAFT",
56
+ source: MODEL_DRAFT_SOURCE,
57
+ sourceRef: null,
58
+ note: d.note || null,
59
+ labels: [
60
+ {
61
+ kind: "EXPECTED",
62
+ status: "PENDING",
63
+ value: label.data,
64
+ raterRole: "MODEL",
65
+ raterId: null,
66
+ note: "Drafted by a model. Confirm it if it's right.",
67
+ },
68
+ ],
69
+ };
70
+ await store.createCase(data);
71
+ result.drafted += 1;
72
+ }
73
+ return result;
74
+ }
75
+ /**
76
+ * Cases in use whose only answer is a draft: what testing with drafts
77
+ * would put to use.
78
+ */
79
+ export function draftAnswers(cases) {
80
+ return cases.flatMap((c) => {
81
+ if (c.status === "RETIRED" || confirmedLabel(c.labels))
82
+ return [];
83
+ const pending = c.labels
84
+ .filter((l) => l.status === "PENDING")
85
+ .sort((a, b) => +b.updatedAt - +a.updatedAt)[0];
86
+ return pending ? [{ case: c, label: pending }] : [];
87
+ });
88
+ }
89
+ /**
90
+ * Puts every draft answer to use before review, so a feature can be
91
+ * tested now: each becomes PROVISIONAL (and its case ACTIVE), and every
92
+ * score resting on one says so until a person confirms it. Returns how
93
+ * many answers it put to use.
94
+ */
95
+ export async function useDraftsProvisionally(opts) {
96
+ const { store, suite } = opts;
97
+ const drafts = draftAnswers(await store.listCases(suite.key));
98
+ for (const d of drafts) {
99
+ await store.setLabelStatus(d.label.id, "PROVISIONAL");
100
+ if (d.case.status === "DRAFT")
101
+ await store.setCaseStatus(d.case.id,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AAC;IAC9D,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,MAAM,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;QACtD,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO;YAC3B,MAAM,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,CAAC"}
@@ -4,9 +4,11 @@
4
4
  * sentence or two a person can read while hovering.
5
5
  */
6
6
  export declare const GLOSSARY: {
7
- readonly score: "How much the model got right on every case in use. With partial credit, parts right of parts expected; otherwise answers with every check passed.";
7
+ readonly score: "Accuracy: how much the model got right on every case in use. With partial credit, parts right of parts expected; otherwise answers with every check passed.";
8
8
  readonly seriousMistakes: "Failed serious checks: mistakes that change what your product does. Models are compared on these first.";
9
- readonly time: "Average seconds per answer, from answers the model actually made (reused answers keep their original time).";
9
+ readonly time: "Speed: average seconds per answer, so lower is faster, from answers the model actually made (reused answers keep their original time).";
10
+ readonly favors: "What the suggestion weighs once accuracy holds. It never suggests a model with more serious mistakes, and only trades accuracy for a clear gain: accuracy alone, or the same accuracy at half the cost or time.";
11
+ readonly attackFailures: "Answers on the attack cases that never came back (an error or a timeout, not a wrong answer). Attacks resisted counts only complete tests: test again.";
10
12
  readonly cost: "Average cost per answer on this model, from your catalog's prices.";
11
13
  readonly againstLive: "A paired comparison with the live model on the same cases: more accurate, about as accurate, less accurate, or too few cases to tell.";
12
14
  readonly live: "The model this feature runs on now.";
@@ -16,6 +18,8 @@ export declare const GLOSSARY: {
16
18
  readonly serious: "A mistake that changes what the product does. Serious checks should pass 95% of the time unless the check sets its own bar.";
17
19
  readonly minor: "A fair difference of judgment. Minor checks should pass 75% of the time unless the check sets its own bar.";
18
20
  readonly bar: "The pass rate this check should reach.";
21
+ readonly reasoningSetting: "Some models think before answering, and how much is a setting. Less is faster and cheaper; more can be more accurate. Each setting you test gets its own row.";
22
+ readonly checkBreakdown: "How often each check passed, for every model with a current test. Serious checks come first; minor ones are fair differences of judgment, so their bar is lower.";
19
23
  readonly confirmed: "A person said this answer is right. Tests grade against it.";
20
24
  readonly provisional: "Put to use before anyone reviewed it. Tests use it, and every score says it rests on unreviewed answers.";
21
25
  readonly pending: "Proposed and not reviewed yet. Tests never grade against it until a person confirms it.";
package/dist/glossary.js CHANGED
@@ -4,9 +4,11 @@
4
4
  * sentence or two a person can read while hovering.
5
5
  */
6
6
  export const GLOSSARY = {
7
- score: "How much the model got right on every case in use. With partial credit, parts right of parts expected; otherwise answers with every check passed.",
7
+ score: "Accuracy: how much the model got right on every case in use. With partial credit, parts right of parts expected; otherwise answers with every check passed.",
8
8
  seriousMistakes: "Failed serious checks: mistakes that change what your product does. Models are compared on these first.",
9
- time: "Average seconds per answer, from answers the model actually made (reused answers keep their original time).",
9
+ time: "Speed: average seconds per answer, so lower is faster, from answers the model actually made (reused answers keep their original time).",
10
+ favors: "What the suggestion weighs once accuracy holds. It never suggests a model with more serious mistakes, and only trades accuracy for a clear gain: accuracy alone, or the same accuracy at half the cost or time.",
11
+ attackFailures: "Answers on the attack cases that never came back (an error or a timeout, not a wrong answer). Attacks resisted counts only complete tests: test again.",
10
12
  cost: "Average cost per answer on this model, from your catalog's prices.",
11
13
  againstLive: "A paired comparison with the live model on the same cases: more accurate, about as accurate, less accurate, or too few cases to tell.",
12
14
  live: "The model this feature runs on now.",
@@ -16,6 +18,8 @@ export const GLOSSARY = {
16
18
  serious: "A mistake that changes what the product does. Serious checks should pass 95% of the time unless the check sets its own bar.",
17
19
  minor: "A fair difference of judgment. Minor checks should pass 75% of the time unless the check sets its own bar.",
18
20
  bar: "The pass rate this check should reach.",
21
+ reasoningSetting: "Some models think before answering, and how much is a setting. Less is faster and cheaper; more can be more accurate. Each setting you test gets its own row.",
22
+ checkBreakdown: "How often each check passed, for every model with a current test. Serious checks come first; minor ones are fair differences of judgment, so their bar is lower.",
19
23
  confirmed: "A person said this answer is right. Tests grade against it.",
20
24
  provisional: "Put to use before anyone reviewed it. Tests use it, and every score says it rests on unreviewed answers.",
21
25
  pending: "Proposed and not reviewed yet. Tests never grade against it until a person confirms it.",
@@ -1 +1 @@
1
- {"version":3,"file":"glossary.js","sourceRoot":"","sources":["../src/glossary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,KAAK,EACH,mJAAmJ;IACrJ,eAAe,EACb,yGAAyG;IAC3G,IAAI,EAAE,6GAA6G;IACnH,IAAI,EAAE,oEAAoE;IAC1E,WAAW,EACT,uIAAuI;IACzI,IAAI,EAAE,qCAAqC;IAC3C,QAAQ,EACN,gKAAgK;IAClK,QAAQ,EACN,+HAA+H;IACjI,SAAS,EACP,uHAAuH;IACzH,OAAO,EACL,6HAA6H;IAC/H,KAAK,EACH,4GAA4G;IAC9G,GAAG,EAAE,wCAAwC;IAC7C,SAAS,EAAE,6DAA6D;IACxE,WAAW,EACT,0GAA0G;IAC5G,OAAO,EACL,yFAAyF;IAC3F,cAAc,EACZ,uIAAuI;IACzI,YAAY,EACV,qJAAqJ;IACvJ,cAAc,EACZ,kKAAkK;IACpK,GAAG,EAAE,2EAA2E;IAChF,IAAI,EAAE,6GAA6G;IACnH,UAAU,EACR,wIAAwI;IAC1I,eAAe,EACb,wIAAwI;IAC1I,aAAa,EACX,8IAA8I;IAChJ,QAAQ,EACN,+IAA+I;IACjJ,OAAO,EACL,wFAAwF;IAC1F,IAAI,EAAE,wEAAwE;IAC9E,OAAO,EACL,+GAA+G;IACjH,OAAO,EACL,qEAAqE;IACvE,SAAS,EAAE,iEAAiE;IAC5E,MAAM,EACJ,6FAA6F;IAC/F,SAAS,EACP,qJAAqJ;IACvJ,QAAQ,EACN,iLAAiL;IACnL,SAAS,EACP,8MAA8M;IAChN,SAAS,EACP,oJAAoJ;IACtJ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AC9M,kBAAkB,EAChB,wKAAwK;IAC1K,gBAAgB,EACd,wKAAwK;IAC1K,mBAAmB,EACjB,+FAA+F;IACjG,qBAAqB,EACnB,qIAAqI;IACvI,UAAU,EACR,yIAAyI;IAC3I,OAAO,EACL,mGAAmG;IACrG,UAAU,EACR,sGAAsG;IACxG,OAAO,EACL,mJAAmJ;IACrJ,WAAW,EAAE,qDAAqD;IAClE,mBAAmB,EACjB,mJAAmJ;IACrJ,QAAQ,EACN,mFAAmF;IACrF,aAAa,EACX,+IAA+I;IACjJ,KAAK,EAAE,qEAAqE;IAC5E,KAAK,EAAE,qEAAqE;IAC5E,iBAAiB,EACf,4IAA4I;IAC9I,SAAS,EACP,6IAA6I;IAC/I,UAAU,EACR,sIAAsI;IACxI,eAAe,EACb,6IAA6I;IAC/I,SAAS,EACP,8JAA8J;IAChK,SAAS,EACP,6HAA6H;IAC/H,UAAU,EACR,oIAAoI;IACtI,cAAc,EACZ,0HAA0H;IAC5H,SAAS,EACP,4GAA4G;IAC9G,WAAW,EACT,iHAAiH;IACnH,cAAc,EACZ,2GAA2G;CACrG,CAAC"}
package/dist/health.d.ts CHANGED
@@ -7,12 +7,45 @@ import { type CheckDef, type SuitePriority } from "./types.js";
7
7
  * reasons, from the same board and suggestion its own page shows. Pure.
8
8
  */
9
9
  /** Where a suite stands, from not tested to good. */
10
- export type HealthStatus = "untested" | "stale" | "few" | "improve" | "fair" | "good";
10
+ export type HealthStatus = "untested" | "stale" | "few" | "improve" | "change" | "fair" | "good";
11
+ /**
12
+ * One reason a suite stands where it does, for a chip on its card. A suite
13
+ * can have several: checks under their bar and a suggestion, say.
14
+ */
15
+ export type HealthFlag = {
16
+ kind: "untested";
17
+ } | {
18
+ kind: "stale";
19
+ } | {
20
+ kind: "below";
21
+ serious: number;
22
+ minor: number;
23
+ } | {
24
+ kind: "suggestLive";
25
+ } | {
26
+ kind: "suggestFallback";
27
+ } | {
28
+ kind: "retestLive";
29
+ } | {
30
+ kind: "provisional";
31
+ answers: number;
32
+ } | {
33
+ kind: "fewCases";
34
+ cases: number;
35
+ } | {
36
+ kind: "addCases";
37
+ cases: number;
38
+ target: number;
39
+ } | {
40
+ kind: "good";
41
+ };
11
42
  /**
12
43
  * A suite's status for its card, with the live model's score and the reasons, most important first.
13
44
  */
14
45
  export type Health = {
15
46
  status: HealthStatus;
47
+ /** Each reason behind the status, most important first, for chips. */
48
+ flags: HealthFlag[];
16
49
  title: string;
17
50
  /** The live model, its score, and how many models were tested. */
18
51
  live: {
@@ -31,7 +64,7 @@ export type Health = {
31
64
  * ```ts
32
65
  * const board = await runner.board("ticket_triage");
33
66
  * const h = suiteHealth(board.rows, suite.checks, suite.priority, board.cases, board.provisional, MODELS);
34
- * // h.status: "good" | "fair" | "improve" | "few" | "stale" | "untested"
67
+ * // h.status: "good" | "fair" | "change" | "improve" | "few" | "stale" | "untested"
35
68
  * ```
36
69
  */
37
70
  export declare function suiteHealth(rows: BoardRow[], checks: CheckDef[], priority: SuitePriority, cases: number,
package/dist/health.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { confidenceFor, TARGET_CASES } from "./summary.js";
2
2
  import { suggest } from "./suggest.js";
3
- import { checkBar } from "./types.js";
3
+ import { checkBar, pctBeside, } from "./types.js";
4
4
  const pct = (x) => `${Math.round(x * 100)}%`;
5
5
  /**
6
6
  * Where a suite stands, for its card on the hub, from the same board and suggestion its
@@ -10,7 +10,7 @@ const pct = (x) => `${Math.round(x * 100)}%`;
10
10
  * ```ts
11
11
  * const board = await runner.board("ticket_triage");
12
12
  * const h = suiteHealth(board.rows, suite.checks, suite.priority, board.cases, board.provisional, MODELS);
13
- * // h.status: "good" | "fair" | "improve" | "few" | "stale" | "untested"
13
+ * // h.status: "good" | "fair" | "change" | "improve" | "few" | "stale" | "untested"
14
14
  * ```
15
15
  */
16
16
  export function suiteHealth(rows, checks, priority, cases,
@@ -30,6 +30,7 @@ opts = {}) {
30
30
  return {
31
31
  ...base,
32
32
  status: "untested",
33
+ flags: [{ kind: "untested" }],
33
34
  title: "Not tested yet",
34
35
  details: [
35
36
  `Test the models to see how ${liveRow?.label ?? "the live model"} does.`,
@@ -39,6 +40,7 @@ opts = {}) {
39
40
  return {
40
41
  ...base,
41
42
  status: "stale",
43
+ flags: [{ kind: "stale" }],
42
44
  title: "Test again",
43
45
  details: ["Cases, answers, or instructions changed since the last test."],
44
46
  };
@@ -52,7 +54,7 @@ opts = {}) {
52
54
  .sort((a, b) => Number(b.c.severity === "serious") -
53
55
  Number(a.c.severity === "serious") || a.rate - b.rate);
54
56
  for (const { c, rate } of below.slice(0, 3))
55
- details.push(`${c.label}: ${pct(rate)}, under the ${pct(checkBar(c))} bar${c.severity === "serious" ? " (serious)" : ""}.`);
57
+ details.push(`${c.label}: ${pctBeside(rate, checkBar(c))}, under the ${pct(checkBar(c))} bar${c.severity === "serious" ? " (serious)" : ""}.`);
56
58
  if (below.length > 3)
57
59
  details.push(`${below.length - 3} more under the bar.`);
58
60
  const s = suggest(rows, checks, priority, models, opts);
@@ -66,21 +68,41 @@ opts = {}) {
66
68
  if (testedModels < 2)
67
69
  details.push("Only one model tested: test others to compare.");
68
70
  const confidence = confidenceFor(cases, live?.rate ?? 0.5);
71
+ const serious = below.filter((x) => x.c.severity === "serious").length;
72
+ const flags = [];
73
+ if (below.length)
74
+ flags.push({ kind: "below", serious, minor: below.length - serious });
75
+ if (change)
76
+ flags.push(s.retestLive
77
+ ? { kind: "retestLive" }
78
+ : s.keepLive
79
+ ? { kind: "suggestFallback" }
80
+ : { kind: "suggestLive" });
81
+ if (provisional)
82
+ flags.push({ kind: "provisional", answers: provisional });
83
+ if (confidence.level === "too-few")
84
+ flags.push({ kind: "fewCases", cases });
85
+ else if (cases < TARGET_CASES)
86
+ flags.push({ kind: "addCases", cases, target: TARGET_CASES });
69
87
  if (confidence.level === "too-few")
70
88
  return {
71
89
  ...base,
72
90
  status: "few",
91
+ flags,
73
92
  title: "Too few cases to trust",
74
93
  details: [
75
94
  `${fewer}: a score could be off by about ${confidence.margin} points.`,
76
95
  ...details,
77
96
  ],
78
97
  };
98
+ // Checks under their bar need work; a better choice alone is only a
99
+ // suggestion, even when the live model meets every bar.
79
100
  if (below.length || change)
80
101
  return {
81
102
  ...base,
82
- status: "improve",
83
- title: "Room to improve",
103
+ status: below.length ? "improve" : "change",
104
+ flags,
105
+ title: below.length ? "Room to improve" : "Change suggested",
84
106
  details: fewer
85
107
  ? [...details, `${fewer}: add more to firm it up.`]
86
108
  : details,
@@ -89,6 +111,7 @@ opts = {}) {
89
111
  return {
90
112
  ...base,
91
113
  status: "fair",
114
+ flags,
92
115
  title: "Good so far",
93
116
  details: [
94
117
  `Meets every bar, but with ${fewer} a score could be off by about ${confidence.margin} points.`,
@@ -98,6 +121,7 @@ opts = {}) {
98
121
  return {
99
122
  ...base,
100
123
  status: "good",
124
+ flags: flags.length ? flags : [{ kind: "good" }],
101
125
  title: "In good shape",
102
126
  details: details.length ? details : ["Meets every bar on enough cases."],
103
127
  };
@@ -1 +1 @@
1
- {"version":3,"file":"health.js","sourceRoot":"","sources":["../src/health.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAuB,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAqC,MAAM,YAAY,CAAC;AAwBzE,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC;AAErD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CACzB,IAAgB,EAChB,MAAkB,EAClB,QAAuB,EACvB,KAAa;AACb,0CAA0C;AAC1C,WAAW,GAAG,CAAC;AACf,uEAAuE;AACvE,SAAuB,EAAE;AACzB,mFAAmF;AACnF,OAAuB,EAAE;IAEzB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,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
36
36
  export * from "./importCases.js";
37
37
  export * from "./reviews.js";
38
38
  export * from "./activity.js";
39
+ export * from "./drafts.js";
40
+ export * from "./order.js";
package/dist/index.js CHANGED
@@ -38,4 +38,6 @@ export * from "./inInstructions.js";
38
38
  export * from "./importCases.js";
39
39
  export * from "./reviews.js";
40
40
  export * from "./activity.js";
41
+ export * from "./drafts.js";
42
+ export * from "./order.js";
41
43
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,4EAA4E;AAC5E,0EAA0E;AAC1E,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,4EAA4E;AAC5E,0EAA0E;AAC1E,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import { after } from "next/server.js";
2
2
  import { revalidatePath } from "next/cache.js";
3
- import { answerFromForm, attackMistakes, attacksFrom, blindRating, caseFromFeedback, formText, isInjectionSuite, leakNote, raterStatus, skipMark, suggest, withoutLeaks, } from "../index.js";
3
+ import { answerFromForm, attackMistakes, attacksFrom, blindRating, caseFromFeedback, draftMoreCases, formText, importStarters, isInjectionSuite, leakNote, raterStatus, skipMark, suggest, useDraftsProvisionally, withoutLeaks, priorityOf, } from "../index.js";
4
4
  import { evalsPath } from "../react/app.js";
5
+ import { injectionCases } from "../suites/injection.js";
5
6
  import { weeklyCheck } from "./weekly.js";
6
7
  const VS = {
7
8
  BETTER: "more accurate than live",
@@ -28,6 +29,8 @@ export function evalActions(w) {
28
29
  revalidatePath(w.basePath, "layout");
29
30
  };
30
31
  const weekly = weeklyCheck(w);
32
+ /** Who a settings change records: the admin's name, or their id. */
33
+ const changer = (admin) => w.changedBy === "id" ? admin.id : admin.name;
31
34
  const suiteFrom = (form) => runner.suiteOrThrow(formText(form, "suite"));
32
35
  /**
33
36
  * The suite whose page chooses models: never an injection suite, whose
@@ -61,7 +64,7 @@ export function evalActions(w) {
61
64
  */
62
65
  async function caseToRate(form, raterId) {
63
66
  const suite = suiteFrom(form);
64
- if (suite.caseKind !== "imported")
67
+ if (suite.caseKind !== "imported" || suite.rateBlind === false)
65
68
  throw new Error("This suite isn't rated blind");
66
69
  const c = await knownCase(suite.key, form);
67
70
  if (raterStatus(c, raterId))
@@ -69,13 +72,60 @@ export function evalActions(w) {
69
72
  return { suite, c };
70
73
  }
71
74
  /** The current test of a model's row, for choosing it live or fallback. */
72
- async function rowOf(suiteKey, model) {
75
+ /**
76
+ * A model's row: at the feature's own setting, or with `effort` at
77
+ * another ("default": the model's own default).
78
+ */
79
+ async function rowOf(suiteKey, model, effort) {
73
80
  const board = await runner.board(suiteKey);
81
+ const wanted = effort === "default" ? null : effort;
74
82
  return {
75
83
  board,
76
- row: board.rows.find((r) => r.model === model && !r.variant),
84
+ row: board.rows.find((r) => effort === undefined
85
+ ? r.model === model && !r.variant
86
+ : r.model === model && r.variant && r.effort === wanted),
77
87
  };
78
88
  }
89
+ /**
90
+ * The model and reasoning setting a Test form asks for: `setting` (a
91
+ * model and setting together, from one dropdown) or `model` with an
92
+ * optional `effort`. No setting: the feature's own. "default": the
93
+ * model's own default, sending none. Any other must be one the catalog
94
+ * lists for the model.
95
+ */
96
+ function testRequest(form, operation) {
97
+ let model;
98
+ let effort;
99
+ const setting = form.get("setting");
100
+ if (typeof setting === "string" && setting) {
101
+ let parsed;
102
+ try {
103
+ parsed = JSON.parse(setting);
104
+ }
105
+ catch {
106
+ throw new Error("Unknown setting");
107
+ }
108
+ if (!Array.isArray(parsed) ||
109
+ parsed.length !== 2 ||
110
+ !parsed.every((x) => typeof x === "string"))
111
+ throw new Error("Unknown setting");
112
+ [model, effort] = parsed;
113
+ }
114
+ else {
115
+ model = formText(form, "model");
116
+ const e = form.get("effort");
117
+ effort = typeof e === "string" && e ? e : undefined;
118
+ }
119
+ if (!runner.modelsFor(operation).includes(model))
120
+ throw new Error("Unknown model");
121
+ if (effort === undefined)
122
+ return { model };
123
+ if (effort === "default")
124
+ return { model, reasoningEffort: null };
125
+ if (!w.models[model]?.efforts?.includes(effort))
126
+ throw new Error(`${model} doesn't take ${effort} reasoning`);
127
+ return { model, reasoningEffort: effort };
128
+ }
79
129
  async function feedbackById(id) {
80
130
  const f = (await feedbackStore.listFeedback()).find((x) => x.id === id);
81
131
  if (!f)
@@ -86,11 +136,12 @@ export function evalActions(w) {
86
136
  async testModel(form) {
87
137
  await w.requireAdmin();
88
138
  const suite = suiteFrom(form);
89
- const model = formText(form, "model");
90
- if (!runner.modelsFor(suite.operation).includes(model))
91
- throw new Error("Unknown model");
139
+ const request = testRequest(form, suite.operation);
92
140
  // The feature's cases and its attack cases, in one test.
93
- const { runs } = await runner.createTest({ suite: suite.key, model });
141
+ const { runs } = await runner.createTest({
142
+ suite: suite.key,
143
+ ...request,
144
+ });
94
145
  after(() => runAll(runs));
95
146
  revalidatePath(page(suite.key));
96
147
  },
@@ -106,13 +157,18 @@ export function evalActions(w) {
106
157
  async makeLive(form) {
107
158
  const admin = await w.requireAdmin();
108
159
  const suite = choosingSuite(form);
109
- const { board, row } = await rowOf(suite.key, formText(form, "model"));
160
+ const effort = form.get("effort");
161
+ const { board, row } = await rowOf(suite.key, formText(form, "model"), typeof effort === "string" && effort ? effort : undefined);
110
162
  if (!row?.test || row.test.stale)
111
163
  throw new Error("Test this model on the current cases first");
112
164
  const score = { right: row.test.right, total: row.test.total };
113
165
  const attacked = attackMistakes(row.key, await attacksOn(suite.key));
114
- await settings.update(suite.operation, { model: row.model }, {
115
- by: admin.name,
166
+ await settings.update(suite.operation,
167
+ // A row at another setting goes live at that setting.
168
+ row.variant
169
+ ? { model: row.model, reasoningEffort: row.effort }
170
+ : { model: row.model }, {
171
+ by: changer(admin),
116
172
  reason: `Made ${row.label} live: ${score.right}/${score.total}, ${VS[row.vsLive ?? ""] ?? "no comparison"}${attacked === null ? "" : `; ${attacked} serious ${attacked === 1 ? "mistake" : "mistakes"} under attack`}`,
117
173
  // The evidence, so the history can show why.
118
174
  evidence: {
@@ -135,7 +191,7 @@ export function evalActions(w) {
135
191
  ? `, ${test.failedAnswers} failed`
136
192
  : "";
137
193
  await settings.update(suite.operation, { fallbackModel: row.model }, {
138
- by: admin.name,
194
+ by: changer(admin),
139
195
  reason: `Made ${row.label} the fallback: ${test ? `${Math.round(test.right)}/${Math.round(test.total)}${failed}` : "not tested"}`,
140
196
  evidence: {
141
197
  runId: test?.runId ?? null,
@@ -153,13 +209,14 @@ export function evalActions(w) {
153
209
  runner.board(suite.key),
154
210
  attacksOn(suite.key),
155
211
  ]);
156
- const s = suggest(board.rows, suite.checks, suite.priority, w.models, {
212
+ const { settings: live } = await settings.current(suite.operation);
213
+ const s = suggest(board.rows, suite.checks, priorityOf(suite, live), w.models, {
157
214
  attacks,
158
215
  });
159
216
  if (!s || s.same)
160
217
  return;
161
218
  await settings.update(suite.operation, { model: s.live.model, fallbackModel: s.fallback?.model ?? null }, {
162
- by: admin.name,
219
+ by: changer(admin),
163
220
  reason: s.reasons.join(" "),
164
221
  evidence: {
165
222
  suggestion: s.reasons,
@@ -177,7 +234,7 @@ export function evalActions(w) {
177
234
  if (!reason)
178
235
  throw new Error("Say why you're rolling back");
179
236
  await settings.rollBack(suite.operation, formText(form, "version"), {
180
- by: admin.name,
237
+ by: changer(admin),
181
238
  reason,
182
239
  });
183
240
  everyPage();
@@ -276,6 +333,62 @@ export function evalActions(w) {
276
333
  await runner.retireStaleDrafts(suite.key);
277
334
  revalidatePath(page(suite.key));
278
335
  },
336
+ async addStarters(form) {
337
+ await w.requireAdmin();
338
+ const suite = suiteFrom(form);
339
+ await importStarters(store, suite);
340
+ revalidatePath(page(suite.key));
341
+ },
342
+ async makeAttackCases(form) {
343
+ await w.requireAdmin();
344
+ const suite = suiteFrom(form);
345
+ if (!isInjectionSuite(suite))
346
+ throw new Error("This suite has no attacks");
347
+ const r = await injectionCases(store,
348
+ // Trust boundary: isInjectionSuite means injectionSuite made it.
349
+ suite);
350
+ if (!r.baseCases)
351
+ throw new Error(`Confirm some ${suite.base.label} answers first: attack cases copy them`);
352
+ everyPage();
353
+ },
354
+ async draftMore(form) {
355
+ await w.requireAdmin();
356
+ const suite = suiteFrom(form);
357
+ if (!suite.draftMore)
358
+ throw new Error("This suite can't draft cases");
359
+ const focus = form.get("focus");
360
+ await draftMoreCases({
361
+ store,
362
+ suite,
363
+ focus: typeof focus === "string" && focus.trim()
364
+ ? focus.trim().slice(0, 500)
365
+ : null,
366
+ });
367
+ revalidatePath(page(suite.key));
368
+ },
369
+ async setPriority(form) {
370
+ const admin = await w.requireAdmin();
371
+ const suite = choosingSuite(form);
372
+ const favor = formText(form, "favor");
373
+ if (favor !== "quality" && favor !== "speed" && favor !== "cost")
374
+ throw new Error("Pick accuracy, speed, or cost");
375
+ const reason = form.get("reason");
376
+ await settings.update(suite.operation,
377
+ // The suite's own priority needs no override.
378
+ { favor: favor === suite.priority.favor ? null : favor }, {
379
+ by: changer(admin),
380
+ reason: typeof reason === "string" && reason.trim()
381
+ ? reason.trim().slice(0, 300)
382
+ : `Favors ${favor === "quality" ? "accuracy" : favor}`,
383
+ });
384
+ everyPage();
385
+ },
386
+ async useDraftsProvisionally(form) {
387
+ await w.requireAdmin();
388
+ const suite = suiteFrom(form);
389
+ await useDraftsProvisionally({ store, suite });
390
+ everyPage();
391
+ },
279
392
  /**
280
393
  * A person rates an imported case blind: their own confirmed answer,
281
394
  * with their reason, added beside anyone else's. Tests are rescored