@crowandraven/evalkeeper 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drafts.d.ts +2 -0
- package/dist/drafts.js +3 -1
- package/dist/drafts.js.map +1 -1
- package/dist/failures.d.ts +16 -0
- package/dist/failures.js +40 -0
- package/dist/failures.js.map +1 -0
- package/dist/glossary.d.ts +4 -2
- package/dist/glossary.js +4 -2
- package/dist/glossary.js.map +1 -1
- package/dist/health.d.ts +35 -2
- package/dist/health.js +31 -6
- package/dist/health.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/legs.d.ts +4 -1
- package/dist/legs.js +6 -2
- package/dist/legs.js.map +1 -1
- package/dist/next/actions.js +79 -15
- package/dist/next/actions.js.map +1 -1
- package/dist/next/route.js +2 -1
- package/dist/next/route.js.map +1 -1
- package/dist/next/weekly.d.ts +7 -2
- package/dist/next/weekly.js +5 -3
- package/dist/next/weekly.js.map +1 -1
- package/dist/next/wiring.d.ts +6 -0
- package/dist/order.d.ts +18 -0
- package/dist/order.js +53 -0
- package/dist/order.js.map +1 -0
- package/dist/prisma/index.d.ts +1 -0
- package/dist/prisma/index.js +3 -0
- package/dist/prisma/index.js.map +1 -1
- package/dist/prune.d.ts +4 -1
- package/dist/prune.js +11 -2
- package/dist/prune.js.map +1 -1
- package/dist/react/AddCase.d.ts +12 -2
- package/dist/react/AddCase.js +70 -8
- package/dist/react/AddCase.js.map +1 -1
- package/dist/react/AnswerKey.js +11 -5
- package/dist/react/AnswerKey.js.map +1 -1
- package/dist/react/CaseMenu.d.ts +6 -1
- package/dist/react/CaseMenu.js +5 -2
- package/dist/react/CaseMenu.js.map +1 -1
- package/dist/react/CompareView.js +4 -4
- package/dist/react/CompareView.js.map +1 -1
- package/dist/react/FeedbackView.js +3 -3
- package/dist/react/FeedbackView.js.map +1 -1
- package/dist/react/HubSections.js +11 -10
- package/dist/react/HubSections.js.map +1 -1
- package/dist/react/ModelMenu.d.ts +13 -4
- package/dist/react/ModelMenu.js +12 -7
- package/dist/react/ModelMenu.js.map +1 -1
- package/dist/react/PriorityPicker.d.ts +21 -0
- package/dist/react/PriorityPicker.js +47 -0
- package/dist/react/PriorityPicker.js.map +1 -0
- package/dist/react/RateView.js +1 -0
- package/dist/react/RateView.js.map +1 -1
- package/dist/react/RunView.js +21 -5
- package/dist/react/RunView.js.map +1 -1
- package/dist/react/SettingsHistory.js +3 -3
- package/dist/react/SettingsHistory.js.map +1 -1
- package/dist/react/SuiteSections.d.ts +6 -0
- package/dist/react/SuiteSections.js +100 -39
- package/dist/react/SuiteSections.js.map +1 -1
- package/dist/react/WeeklyCheck.js +4 -8
- package/dist/react/WeeklyCheck.js.map +1 -1
- package/dist/react/app.d.ts +4 -0
- package/dist/react/app.js.map +1 -1
- package/dist/react/format.d.ts +2 -2
- package/dist/react/format.js +4 -2
- package/dist/react/format.js.map +1 -1
- package/dist/react/pieces.d.ts +21 -1
- package/dist/react/pieces.js +67 -2
- package/dist/react/pieces.js.map +1 -1
- package/dist/runner.d.ts +7 -2
- package/dist/runner.js +5 -2
- package/dist/runner.js.map +1 -1
- package/dist/settings.d.ts +14 -0
- package/dist/settings.js +24 -2
- package/dist/settings.js.map +1 -1
- package/dist/suggest.js +25 -7
- package/dist/suggest.js.map +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +32 -0
- package/dist/testing.js.map +1 -1
- package/dist/types.d.ts +12 -0
- package/dist/types.js +11 -0
- package/dist/types.js.map +1 -1
- package/package.json +10 -10
- package/schema/evalkeeper.prisma +3 -0
- package/src/drafts.ts +6 -1
- package/src/failures.ts +50 -0
- package/src/glossary.ts +6 -2
- package/src/health.ts +55 -7
- package/src/index.ts +2 -0
- package/src/legs.ts +8 -2
- package/src/next/actions.ts +96 -17
- package/src/next/route.ts +2 -1
- package/src/next/weekly.ts +15 -4
- package/src/next/wiring.ts +6 -0
- package/src/order.ts +64 -0
- package/src/prisma/index.ts +5 -0
- package/src/prune.ts +15 -1
- package/src/react/AddCase.tsx +98 -11
- package/src/react/AnswerKey.tsx +74 -14
- package/src/react/CaseMenu.tsx +24 -0
- package/src/react/CompareView.tsx +19 -4
- package/src/react/FeedbackView.tsx +13 -3
- package/src/react/HubSections.tsx +18 -11
- package/src/react/ModelMenu.tsx +24 -7
- package/src/react/PriorityPicker.tsx +143 -0
- package/src/react/RateView.tsx +1 -0
- package/src/react/RunView.tsx +41 -6
- package/src/react/SettingsHistory.tsx +3 -3
- package/src/react/SuiteSections.tsx +418 -251
- package/src/react/WeeklyCheck.tsx +12 -6
- package/src/react/app.ts +4 -0
- package/src/react/format.ts +4 -2
- package/src/react/pieces.tsx +96 -2
- package/src/runner.ts +11 -4
- package/src/settings.ts +37 -2
- package/src/suggest.ts +26 -7
- package/src/testing.ts +35 -1
- package/src/types.ts +18 -0
- package/templates/lib/evalkeeper/actions.ts +8 -0
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FAVOR_TEXT,
|
|
3
|
+
allPassed,
|
|
3
4
|
answerKeyHealth,
|
|
4
5
|
attacksFrom,
|
|
5
6
|
barStatus,
|
|
6
7
|
checkBar,
|
|
7
8
|
draftAnswers,
|
|
8
|
-
draftsToTarget,
|
|
9
9
|
newStarters,
|
|
10
|
+
orderRows,
|
|
11
|
+
pctBeside,
|
|
12
|
+
priorityGain,
|
|
13
|
+
priorityOf,
|
|
14
|
+
type SuitePriority,
|
|
10
15
|
isInjectionSuite,
|
|
11
16
|
meanCalibrationError,
|
|
12
17
|
money,
|
|
@@ -19,6 +24,7 @@ import {
|
|
|
19
24
|
} from "../index.js";
|
|
20
25
|
import { AnswerKey } from "./AnswerKey.js";
|
|
21
26
|
import { ModelMenu } from "./ModelMenu.js";
|
|
27
|
+
import { PriorityPicker } from "./PriorityPicker.js";
|
|
22
28
|
import { Tabs } from "./Tabs.js";
|
|
23
29
|
import {
|
|
24
30
|
Link,
|
|
@@ -32,10 +38,9 @@ import {
|
|
|
32
38
|
Select,
|
|
33
39
|
Spinner,
|
|
34
40
|
Submit,
|
|
35
|
-
TextInput,
|
|
36
41
|
Tip,
|
|
37
42
|
} from "./pieces.js";
|
|
38
|
-
import { pct, LINK } from "./format.js";
|
|
43
|
+
import { pct, LINK, QUIET_BUTTON } from "./format.js";
|
|
39
44
|
import { ChevronDown, RotateCw, ShieldAlert, Sparkles } from "lucide-react";
|
|
40
45
|
import { evalsPath, type EvalAppConfig, attacksResisted } from "./app.js";
|
|
41
46
|
import { SettingsHistory } from "./SettingsHistory.js";
|
|
@@ -74,12 +79,16 @@ export async function loadSuitePage(app: EvalAppConfig, key: string) {
|
|
|
74
79
|
const attacks = attacksFrom(attackBoards);
|
|
75
80
|
// An injection suite's models are chosen on its base suite's page.
|
|
76
81
|
const choosesHere = !isInjectionSuite(suite);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
: null;
|
|
82
|
+
// The suite's priority, or the one an admin chose in its settings.
|
|
83
|
+
const priority = priorityOf(suite, liveSettings.settings);
|
|
80
84
|
const testing =
|
|
81
85
|
rows.some((r) => r.testing) ||
|
|
82
86
|
attackBoards.some((a) => a.rows.some((r) => r.testing));
|
|
87
|
+
// No suggestion while a test runs: it would weigh half a board.
|
|
88
|
+
const s =
|
|
89
|
+
choosesHere && !testing
|
|
90
|
+
? suggest(rows, suite.checks, priority, app.models, { attacks })
|
|
91
|
+
: null;
|
|
83
92
|
// What testing each model would cost now, attack cases included,
|
|
84
93
|
// counting answers it would reuse.
|
|
85
94
|
const estimates = new Map(
|
|
@@ -100,7 +109,30 @@ export async function loadSuitePage(app: EvalAppConfig, key: string) {
|
|
|
100
109
|
const showAttacks = attackBoards.some((a) => a.cases > 0);
|
|
101
110
|
const live = rows.find((r) => r.live);
|
|
102
111
|
// What would keep the answer key useful, from the same tests.
|
|
103
|
-
const
|
|
112
|
+
const current = rows.filter((r) => r.test && !r.test.stale && !r.baseline);
|
|
113
|
+
const testedAt = current.reduce<Date | null>(
|
|
114
|
+
(m, r) => (r.test && (!m || r.test.at > m) ? r.test.at : m),
|
|
115
|
+
null,
|
|
116
|
+
);
|
|
117
|
+
const health = answerKeyHealth(cases, b.caseResults, new Date(), testedAt);
|
|
118
|
+
// For each split case, which models got it fully right and which didn't,
|
|
119
|
+
// so a person sees the disagreement before deciding.
|
|
120
|
+
const split = new Set(health.split.map((c) => c.id));
|
|
121
|
+
const splitBy: Record<string, { right: string[]; wrong: string[] }> = {};
|
|
122
|
+
if (split.size)
|
|
123
|
+
await Promise.all(
|
|
124
|
+
current
|
|
125
|
+
.filter((r) => !r.variant)
|
|
126
|
+
.map(async (r) => {
|
|
127
|
+
if (!r.test) return;
|
|
128
|
+
for (const o of await app.store.listOutputs(r.test.runId)) {
|
|
129
|
+
if (!split.has(o.caseId) || o.error) continue;
|
|
130
|
+
const side = allPassed(o.scores) ? "right" : "wrong";
|
|
131
|
+
const entry = (splitBy[o.caseId] ??= { right: [], wrong: [] });
|
|
132
|
+
if (!entry[side].includes(r.label)) entry[side].push(r.label);
|
|
133
|
+
}
|
|
134
|
+
}),
|
|
135
|
+
);
|
|
104
136
|
|
|
105
137
|
return {
|
|
106
138
|
app,
|
|
@@ -122,6 +154,8 @@ export async function loadSuitePage(app: EvalAppConfig, key: string) {
|
|
|
122
154
|
live,
|
|
123
155
|
health,
|
|
124
156
|
cases,
|
|
157
|
+
priority,
|
|
158
|
+
splitBy,
|
|
125
159
|
};
|
|
126
160
|
}
|
|
127
161
|
|
|
@@ -133,6 +167,18 @@ export type SuitePageData = NonNullable<
|
|
|
133
167
|
/** A share as a whole percent, or a dash when there's nothing to show. */
|
|
134
168
|
const asPct = (x: number | null) => (x === null ? "—" : pct(x));
|
|
135
169
|
|
|
170
|
+
/**
|
|
171
|
+
* What a priority means for the suggestion, as a sentence: the
|
|
172
|
+
* explanation without its leading name ("cost: this runs…").
|
|
173
|
+
*/
|
|
174
|
+
const whyFavor = (favor: SuitePriority["favor"]) => {
|
|
175
|
+
const text = FAVOR_TEXT[favor].replace(/^\w+: /, "");
|
|
176
|
+
return `${text.charAt(0).toUpperCase()}${text.slice(1)}.`;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/** The suite's priority, as the page names it. */
|
|
180
|
+
const FAVORS = { cost: "cost", speed: "speed", quality: "accuracy" } as const;
|
|
181
|
+
|
|
136
182
|
const VS: Record<string, string> = {
|
|
137
183
|
BETTER: "More accurate",
|
|
138
184
|
SAME: "About as accurate",
|
|
@@ -149,10 +195,6 @@ export function SuiteHeader({ data }: { data: SuitePageData }) {
|
|
|
149
195
|
<BackLink href={app.basePath}>Evals</BackLink>
|
|
150
196
|
<h1 className="text-2xl font-semibold">{suite.label}</h1>
|
|
151
197
|
<p className="readable text-muted">{suite.description}</p>
|
|
152
|
-
<p className="readable text-sm text-muted">
|
|
153
|
-
Priority: {FAVOR_TEXT[suite.priority.favor]}.
|
|
154
|
-
<InfoTip term="priority" />
|
|
155
|
-
</p>
|
|
156
198
|
</div>
|
|
157
199
|
</>
|
|
158
200
|
);
|
|
@@ -189,15 +231,31 @@ export function ChosenOnBase({ data }: { data: SuitePageData }) {
|
|
|
189
231
|
|
|
190
232
|
/** Which models to make live and the fallback, and why; shown when nothing would change too. */
|
|
191
233
|
export function SuggestionCard({ data }: { data: SuitePageData }) {
|
|
192
|
-
const { app, key, s } = data;
|
|
234
|
+
const { app, key, s, choosesHere, testing } = data;
|
|
235
|
+
if (choosesHere && testing)
|
|
236
|
+
return (
|
|
237
|
+
<section className="space-y-3" aria-labelledby="suggestion">
|
|
238
|
+
<h2 id="suggestion" className="text-lg font-semibold">
|
|
239
|
+
Suggested
|
|
240
|
+
<InfoTip term="suggestion" />
|
|
241
|
+
</h2>
|
|
242
|
+
<Card>
|
|
243
|
+
<p className="readable text-sm text-muted">
|
|
244
|
+
Waiting for the tests running now to finish. The suggestion weighs
|
|
245
|
+
every model's finished test, so it follows then.
|
|
246
|
+
</p>
|
|
247
|
+
</Card>
|
|
248
|
+
</section>
|
|
249
|
+
);
|
|
193
250
|
return (
|
|
194
251
|
<>
|
|
195
252
|
{/* Shown when nothing would change too, so a higher score that
|
|
196
|
-
isn't enough to switch for comes with its reason.
|
|
253
|
+
isn't enough to switch for comes with its reason. A section like
|
|
254
|
+
Models: the heading outside, Use these beside it. */}
|
|
197
255
|
{s && (
|
|
198
|
-
<
|
|
199
|
-
<div className="flex
|
|
200
|
-
<h2 className="font-semibold">
|
|
256
|
+
<section className="space-y-3" aria-labelledby="suggestion">
|
|
257
|
+
<div className="flex items-center justify-between gap-4">
|
|
258
|
+
<h2 id="suggestion" className="text-lg font-semibold">
|
|
201
259
|
{s.same ? "No change suggested" : "Suggested"}
|
|
202
260
|
<InfoTip term="suggestion" />
|
|
203
261
|
</h2>
|
|
@@ -210,23 +268,25 @@ export function SuggestionCard({ data }: { data: SuitePageData }) {
|
|
|
210
268
|
</form>
|
|
211
269
|
)}
|
|
212
270
|
</div>
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
271
|
+
<Card className="space-y-3">
|
|
272
|
+
{!s.same && (
|
|
273
|
+
<p>
|
|
274
|
+
Live: <strong>{s.live.label}</strong>
|
|
275
|
+
{s.fallback && (
|
|
276
|
+
<>
|
|
277
|
+
{" "}
|
|
278
|
+
· Fallback: <strong>{s.fallback.label}</strong>
|
|
279
|
+
</>
|
|
280
|
+
)}
|
|
281
|
+
</p>
|
|
282
|
+
)}
|
|
283
|
+
<ul className="readable list-disc space-y-1 pl-5 text-sm text-muted">
|
|
284
|
+
{s.reasons.map((r) => (
|
|
285
|
+
<li key={r}>{r}</li>
|
|
286
|
+
))}
|
|
287
|
+
</ul>
|
|
288
|
+
</Card>
|
|
289
|
+
</section>
|
|
230
290
|
)}
|
|
231
291
|
</>
|
|
232
292
|
);
|
|
@@ -273,12 +333,37 @@ export function ModelTable({ data }: { data: SuitePageData }) {
|
|
|
273
333
|
estimates,
|
|
274
334
|
showAttacks,
|
|
275
335
|
live,
|
|
336
|
+
s,
|
|
337
|
+
priority,
|
|
276
338
|
} = data;
|
|
339
|
+
const suggestedLive = s && !s.keepLive ? s.live.key : null;
|
|
340
|
+
const suggestedFallback =
|
|
341
|
+
s?.fallback && !s.fallback.fallback ? s.fallback.key : null;
|
|
342
|
+
const ordered = orderRows(rows, suite.checks, priority, {
|
|
343
|
+
live: suggestedLive,
|
|
344
|
+
});
|
|
277
345
|
return (
|
|
278
346
|
<>
|
|
279
347
|
<section className="space-y-3">
|
|
280
348
|
<div className="flex items-center justify-between gap-4">
|
|
281
|
-
<
|
|
349
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
350
|
+
<h2 className="text-lg font-semibold">Models</h2>
|
|
351
|
+
{/* Why this priority, in its words: the page says it once. */}
|
|
352
|
+
{choosesHere && app.actions.setPriority ? (
|
|
353
|
+
<PriorityPicker
|
|
354
|
+
action={app.actions.setPriority}
|
|
355
|
+
suite={key}
|
|
356
|
+
favor={priority.favor}
|
|
357
|
+
own={suite.priority.favor}
|
|
358
|
+
label={`Favors ${FAVORS[priority.favor]}`}
|
|
359
|
+
why={whyFavor(priority.favor)}
|
|
360
|
+
/>
|
|
361
|
+
) : (
|
|
362
|
+
<Tip text={whyFavor(priority.favor)} side="bottom" id="favors">
|
|
363
|
+
<Chip tone="neutral">Favors {FAVORS[priority.favor]}</Chip>
|
|
364
|
+
</Tip>
|
|
365
|
+
)}
|
|
366
|
+
</div>
|
|
282
367
|
<div className="flex items-center gap-4">
|
|
283
368
|
<form action={app.actions.testAll}>
|
|
284
369
|
<input type="hidden" name="suite" value={key} />
|
|
@@ -293,7 +378,7 @@ export function ModelTable({ data }: { data: SuitePageData }) {
|
|
|
293
378
|
<th className="p-3 font-normal">Model</th>
|
|
294
379
|
<th className="p-3 font-normal">
|
|
295
380
|
<Tip term="score" side="bottom">
|
|
296
|
-
|
|
381
|
+
Accuracy
|
|
297
382
|
</Tip>
|
|
298
383
|
</th>
|
|
299
384
|
<th className="p-3 font-normal">
|
|
@@ -310,7 +395,7 @@ export function ModelTable({ data }: { data: SuitePageData }) {
|
|
|
310
395
|
)}
|
|
311
396
|
<th className="p-3 font-normal">
|
|
312
397
|
<Tip term="time" side="bottom" align="end">
|
|
313
|
-
|
|
398
|
+
Speed
|
|
314
399
|
</Tip>
|
|
315
400
|
</th>
|
|
316
401
|
{suite.decisions && (
|
|
@@ -341,7 +426,7 @@ export function ModelTable({ data }: { data: SuitePageData }) {
|
|
|
341
426
|
</tr>
|
|
342
427
|
</thead>
|
|
343
428
|
<tbody>
|
|
344
|
-
{
|
|
429
|
+
{ordered.map((r) => (
|
|
345
430
|
<tr key={r.key} className="border-b border-line last:border-0">
|
|
346
431
|
<td className="p-3">
|
|
347
432
|
<div className="flex flex-wrap items-center gap-2">
|
|
@@ -364,6 +449,20 @@ export function ModelTable({ data }: { data: SuitePageData }) {
|
|
|
364
449
|
<Chip tone="fallback">Fallback</Chip>
|
|
365
450
|
</Tip>
|
|
366
451
|
)}
|
|
452
|
+
{(r.key === suggestedLive ||
|
|
453
|
+
r.key === suggestedFallback) && (
|
|
454
|
+
<Tip
|
|
455
|
+
term="suggestion"
|
|
456
|
+
side="bottom"
|
|
457
|
+
id={`suggested-${r.key}`}
|
|
458
|
+
>
|
|
459
|
+
<Chip tone="suggested">
|
|
460
|
+
{r.key === suggestedLive
|
|
461
|
+
? "Suggested"
|
|
462
|
+
: "Suggested fallback"}
|
|
463
|
+
</Chip>
|
|
464
|
+
</Tip>
|
|
465
|
+
)}
|
|
367
466
|
{retiresLabel(app.models, r.model) && (
|
|
368
467
|
<Tip
|
|
369
468
|
term="retiring"
|
|
@@ -413,9 +512,21 @@ export function ModelTable({ data }: { data: SuitePageData }) {
|
|
|
413
512
|
<Spinner />
|
|
414
513
|
</span>
|
|
415
514
|
) : r.test ? (
|
|
416
|
-
<
|
|
417
|
-
<
|
|
418
|
-
|
|
515
|
+
<div className="flex flex-col gap-0.5">
|
|
516
|
+
<Link href={evalsPath(app, key, "runs", r.test.runId)}>
|
|
517
|
+
<Score right={r.test.right} total={r.test.total} />
|
|
518
|
+
</Link>
|
|
519
|
+
{!r.test.stale && r.test.failedAnswers > 0 && (
|
|
520
|
+
<Link
|
|
521
|
+
href={`${evalsPath(app, key, "runs", r.test.runId)}#failed`}
|
|
522
|
+
className="text-xs text-muted hover:underline"
|
|
523
|
+
>
|
|
524
|
+
{r.test.failedAnswers}{" "}
|
|
525
|
+
{r.test.failedAnswers === 1 ? "answer" : "answers"}{" "}
|
|
526
|
+
failed: see why
|
|
527
|
+
</Link>
|
|
528
|
+
)}
|
|
529
|
+
</div>
|
|
419
530
|
) : (
|
|
420
531
|
<span className="text-muted">
|
|
421
532
|
{r.failed ?? "Not tested"}
|
|
@@ -468,6 +579,9 @@ export function ModelTable({ data }: { data: SuitePageData }) {
|
|
|
468
579
|
className={LINK}
|
|
469
580
|
>
|
|
470
581
|
{VS[r.vsLive]}
|
|
582
|
+
{(r.vsLive === "SAME" || r.vsLive === "BETTER") &&
|
|
583
|
+
priorityGain(r, live, priority) &&
|
|
584
|
+
`, ${priorityGain(r, live, priority)}`}
|
|
471
585
|
</Link>
|
|
472
586
|
) : r.vsLive ? (
|
|
473
587
|
VS[r.vsLive]
|
|
@@ -476,68 +590,28 @@ export function ModelTable({ data }: { data: SuitePageData }) {
|
|
|
476
590
|
)}
|
|
477
591
|
</td>
|
|
478
592
|
<td className="p-3">
|
|
479
|
-
<div className="flex
|
|
480
|
-
<
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
side="bottom"
|
|
501
|
-
align="end"
|
|
502
|
-
>
|
|
503
|
-
<IconSubmit
|
|
504
|
-
label="Test"
|
|
505
|
-
icon={
|
|
506
|
-
<RotateCw aria-hidden className="h-4 w-4" />
|
|
507
|
-
}
|
|
508
|
-
/>
|
|
509
|
-
</Tip>
|
|
510
|
-
</form>
|
|
511
|
-
{choosesHere && (
|
|
512
|
-
<ModelMenu
|
|
513
|
-
suite={key}
|
|
514
|
-
model={r.model}
|
|
515
|
-
label={r.label}
|
|
516
|
-
makeLive={
|
|
517
|
-
!r.live && r.canMakeLive
|
|
518
|
-
? app.actions.makeLive
|
|
519
|
-
: null
|
|
520
|
-
}
|
|
521
|
-
makeFallback={
|
|
522
|
-
r.canMakeFallback
|
|
523
|
-
? app.actions.makeFallback
|
|
524
|
-
: null
|
|
525
|
-
}
|
|
526
|
-
effort={r.variant ? r.effort : undefined}
|
|
527
|
-
/>
|
|
528
|
-
)}
|
|
529
|
-
</div>
|
|
530
|
-
<EstimateNote
|
|
531
|
-
id={r.key}
|
|
532
|
-
estimate={estimates.get(r.key)}
|
|
593
|
+
<div className="flex justify-end">
|
|
594
|
+
<ModelMenu
|
|
595
|
+
suite={key}
|
|
596
|
+
model={r.model}
|
|
597
|
+
label={r.label}
|
|
598
|
+
test={{
|
|
599
|
+
action: app.actions.testModel,
|
|
600
|
+
text: r.test ? "Test again" : "Test",
|
|
601
|
+
note: estimateText(estimates.get(r.key)),
|
|
602
|
+
}}
|
|
603
|
+
makeLive={
|
|
604
|
+
choosesHere && !r.live && r.canMakeLive
|
|
605
|
+
? app.actions.makeLive
|
|
606
|
+
: null
|
|
607
|
+
}
|
|
608
|
+
makeFallback={
|
|
609
|
+
choosesHere && r.canMakeFallback
|
|
610
|
+
? app.actions.makeFallback
|
|
611
|
+
: null
|
|
612
|
+
}
|
|
613
|
+
effort={r.variant ? r.effort : undefined}
|
|
533
614
|
/>
|
|
534
|
-
{r.test && !r.test.stale && r.test.failedAnswers > 0 && (
|
|
535
|
-
<span className="text-right text-xs text-muted">
|
|
536
|
-
{r.test.failedAnswers}{" "}
|
|
537
|
-
{r.test.failedAnswers === 1 ? "answer" : "answers"}{" "}
|
|
538
|
-
failed on its last test
|
|
539
|
-
</span>
|
|
540
|
-
)}
|
|
541
615
|
</div>
|
|
542
616
|
</td>
|
|
543
617
|
</tr>
|
|
@@ -676,7 +750,7 @@ export function CheckBreakdownSection({ data }: { data: SuitePageData }) {
|
|
|
676
750
|
<span
|
|
677
751
|
className={`inline-block rounded px-2 py-0.5 tabular-nums ${BAR_TONE[barStatus(rate, checkBar(c))]}`}
|
|
678
752
|
>
|
|
679
|
-
{
|
|
753
|
+
{pctBeside(rate, checkBar(c))}
|
|
680
754
|
</span>
|
|
681
755
|
)}
|
|
682
756
|
</td>
|
|
@@ -730,7 +804,11 @@ export function ChecksSection({ data }: { data: SuitePageData }) {
|
|
|
730
804
|
<InfoTip term="checks" />
|
|
731
805
|
</h2>
|
|
732
806
|
<div className="grid gap-3 md:grid-cols-2">
|
|
733
|
-
{suite.
|
|
807
|
+
{/* Serious first; each group keeps the suite's own order. */}
|
|
808
|
+
{[
|
|
809
|
+
...suite.checks.filter((c) => c.severity === "serious"),
|
|
810
|
+
...suite.checks.filter((c) => c.severity !== "serious"),
|
|
811
|
+
].map((c) => {
|
|
734
812
|
const rate = live?.test?.byCheck[c.key];
|
|
735
813
|
return (
|
|
736
814
|
<Card key={c.key} className="space-y-1">
|
|
@@ -756,7 +834,7 @@ export function ChecksSection({ data }: { data: SuitePageData }) {
|
|
|
756
834
|
: "text-warn"
|
|
757
835
|
}
|
|
758
836
|
>
|
|
759
|
-
{
|
|
837
|
+
{pctBeside(rate.passed / rate.n, checkBar(c))}
|
|
760
838
|
</span>{" "}
|
|
761
839
|
({rate.passed}/{rate.n}) ·{" "}
|
|
762
840
|
</>
|
|
@@ -873,44 +951,6 @@ export function AnswerKeyToolsSection({ data }: { data: SuitePageData }) {
|
|
|
873
951
|
</form>
|
|
874
952
|
</Card>
|
|
875
953
|
),
|
|
876
|
-
actions.draftMore && suite.draftMore && inUse.length > 0 && (
|
|
877
|
-
<details
|
|
878
|
-
key="draft"
|
|
879
|
-
className="group rounded-lg border border-line bg-card"
|
|
880
|
-
>
|
|
881
|
-
<summary className="flex cursor-pointer list-none items-center justify-between gap-3 p-4 text-sm font-medium">
|
|
882
|
-
<span className="flex items-center gap-1.5">
|
|
883
|
-
<Sparkles aria-hidden className="h-4 w-4" />
|
|
884
|
-
Draft {draftsToTarget(inUse.length)} more cases
|
|
885
|
-
</span>
|
|
886
|
-
<ChevronDown
|
|
887
|
-
aria-hidden
|
|
888
|
-
className="h-4 w-4 transition-transform group-open:rotate-180"
|
|
889
|
-
/>
|
|
890
|
-
</summary>
|
|
891
|
-
<form action={actions.draftMore} className="space-y-3 px-4 pb-4">
|
|
892
|
-
<input type="hidden" name="suite" value={key} />
|
|
893
|
-
<div>
|
|
894
|
-
<label htmlFor="draft-focus" className="block text-sm font-medium">
|
|
895
|
-
Anything to focus on? (optional)
|
|
896
|
-
</label>
|
|
897
|
-
<TextInput
|
|
898
|
-
id="draft-focus"
|
|
899
|
-
name="focus"
|
|
900
|
-
maxLength={500}
|
|
901
|
-
placeholder="e.g. longer, messier notes; more than one owner"
|
|
902
|
-
className="mt-1 w-full rounded-md border border-line bg-card px-3 py-2 text-sm"
|
|
903
|
-
/>
|
|
904
|
-
<p className="readable mt-1 text-xs text-muted">
|
|
905
|
-
A model looks at the cases you have and covers what's
|
|
906
|
-
missing. Drafts need your review and count only once you confirm
|
|
907
|
-
them.
|
|
908
|
-
</p>
|
|
909
|
-
</div>
|
|
910
|
-
<Submit>Draft cases</Submit>
|
|
911
|
-
</form>
|
|
912
|
-
</details>
|
|
913
|
-
),
|
|
914
954
|
].filter(Boolean);
|
|
915
955
|
if (!parts.length) return null;
|
|
916
956
|
return <div className="space-y-3">{parts}</div>;
|
|
@@ -934,6 +974,7 @@ export function AnswerKeySection({ data }: { data: SuitePageData }) {
|
|
|
934
974
|
tools={
|
|
935
975
|
<>
|
|
936
976
|
{suite.caseKind === "imported" &&
|
|
977
|
+
suite.rateBlind !== false &&
|
|
937
978
|
(suite.labelFromForm || app.answerEditors[key]) && (
|
|
938
979
|
<Tip control term="rateBlind" side="bottom" align="end">
|
|
939
980
|
<Link
|
|
@@ -984,6 +1025,26 @@ export function AnswerKeySection({ data }: { data: SuitePageData }) {
|
|
|
984
1025
|
answers change.
|
|
985
1026
|
</p>
|
|
986
1027
|
}
|
|
1028
|
+
tools={
|
|
1029
|
+
<>
|
|
1030
|
+
<a
|
|
1031
|
+
href="https://seanhudson.github.io/evalkeeper/guides/suites/#more-attacks"
|
|
1032
|
+
className={LINK}
|
|
1033
|
+
>
|
|
1034
|
+
Add an attack
|
|
1035
|
+
</a>
|
|
1036
|
+
{app.actions.makeAttackCases && (
|
|
1037
|
+
<form action={app.actions.makeAttackCases}>
|
|
1038
|
+
<input
|
|
1039
|
+
type="hidden"
|
|
1040
|
+
name="suite"
|
|
1041
|
+
value={a.suite.key}
|
|
1042
|
+
/>
|
|
1043
|
+
<Submit variant="quiet">Update attack cases</Submit>
|
|
1044
|
+
</form>
|
|
1045
|
+
)}
|
|
1046
|
+
</>
|
|
1047
|
+
}
|
|
987
1048
|
/>
|
|
988
1049
|
),
|
|
989
1050
|
})),
|
|
@@ -994,31 +1055,19 @@ export function AnswerKeySection({ data }: { data: SuitePageData }) {
|
|
|
994
1055
|
);
|
|
995
1056
|
}
|
|
996
1057
|
|
|
997
|
-
/**
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
id: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* What testing a model costs now, as the menu says it: "free, all 34
|
|
1060
|
+
* reused", "~$0.10, 15 of 34 reused". Null before any cases.
|
|
1061
|
+
*/
|
|
1062
|
+
function estimateText(
|
|
1003
1063
|
estimate:
|
|
1004
|
-
{ answers: number; reused: number; costUsd: number | null } | undefined
|
|
1005
|
-
|
|
1064
|
+
{ answers: number; reused: number; costUsd: number | null } | undefined,
|
|
1065
|
+
): string | null {
|
|
1006
1066
|
if (!estimate || estimate.answers === 0) return null;
|
|
1007
1067
|
const { answers, reused, costUsd } = estimate;
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
: `${costUsd === null ? "Cost unknown" : `~${money(costUsd)}`}${reused ? `, ${reused} of ${answers} reused` : ""}`;
|
|
1012
|
-
return (
|
|
1013
|
-
<Tip
|
|
1014
|
-
text="What testing this model costs now. Answers an identical request gave in the last 7 days are reused for free."
|
|
1015
|
-
id={`estimate-${id}`}
|
|
1016
|
-
side="bottom"
|
|
1017
|
-
align="end"
|
|
1018
|
-
>
|
|
1019
|
-
<span className="whitespace-nowrap text-xs text-muted">{text}</span>
|
|
1020
|
-
</Tip>
|
|
1021
|
-
);
|
|
1068
|
+
return reused === answers
|
|
1069
|
+
? `free, all ${answers} reused`
|
|
1070
|
+
: `${costUsd === null ? "cost unknown" : `~${money(costUsd)}`}${reused ? `, ${reused} of ${answers} reused` : ""}`;
|
|
1022
1071
|
}
|
|
1023
1072
|
|
|
1024
1073
|
/**
|
|
@@ -1059,12 +1108,23 @@ function UnderAttack({
|
|
|
1059
1108
|
title={attackLabel}
|
|
1060
1109
|
className="tabular-nums"
|
|
1061
1110
|
>
|
|
1062
|
-
{
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1111
|
+
{row.test.stale ? (
|
|
1112
|
+
`${resisted ? pct(resisted.resisted / resisted.of) : "—"} · out of date`
|
|
1113
|
+
) : row.test.failedAnswers && !resisted ? (
|
|
1114
|
+
<Tip
|
|
1115
|
+
term="attackFailures"
|
|
1116
|
+
side="bottom"
|
|
1117
|
+
id={`attack-failed-${row.key}`}
|
|
1118
|
+
>
|
|
1119
|
+
<span className="text-warn">
|
|
1120
|
+
{row.test.failedAnswers} failed: test again
|
|
1121
|
+
</span>
|
|
1122
|
+
</Tip>
|
|
1123
|
+
) : resisted ? (
|
|
1124
|
+
pct(resisted.resisted / resisted.of)
|
|
1125
|
+
) : (
|
|
1126
|
+
"—"
|
|
1127
|
+
)}
|
|
1068
1128
|
</Link>
|
|
1069
1129
|
);
|
|
1070
1130
|
// Not tested yet: the model's Test runs the attacks with its cases.
|
|
@@ -1078,7 +1138,7 @@ function UnderAttack({
|
|
|
1078
1138
|
* an injection suite, whose cases are made from its base suite's.
|
|
1079
1139
|
*/
|
|
1080
1140
|
export function AnswerKeyHealthSection({ data }: { data: SuitePageData }) {
|
|
1081
|
-
const { app, key, suite, health: h, choosesHere } = data;
|
|
1141
|
+
const { app, key, suite, health: h, choosesHere, splitBy } = data;
|
|
1082
1142
|
const thin = h.tags.filter(([, n]) => n === 1).map(([t]) => t);
|
|
1083
1143
|
const needs =
|
|
1084
1144
|
h.easyToRetire.length ||
|
|
@@ -1096,105 +1156,212 @@ export function AnswerKeyHealthSection({ data }: { data: SuitePageData }) {
|
|
|
1096
1156
|
{title(c)}
|
|
1097
1157
|
</a>
|
|
1098
1158
|
);
|
|
1099
|
-
const { retireEasy, retireStaleDrafts } = app.actions;
|
|
1159
|
+
const { retireEasy, retireStaleDrafts, keepAnswer } = app.actions;
|
|
1100
1160
|
const cases = (n: number) => `${n} ${n === 1 ? "case" : "cases"}`;
|
|
1101
1161
|
const drafts = (n: number) => `${n} ${n === 1 ? "draft" : "drafts"}`;
|
|
1162
|
+
const { draftMore } = app.actions;
|
|
1163
|
+
const check = h.split.length > 0 || h.duplicates.length > 0;
|
|
1164
|
+
const retire = h.easyToRetire.length > 0 || h.staleDrafts.length > 0;
|
|
1102
1165
|
return (
|
|
1103
1166
|
<section className="space-y-3" aria-labelledby="answer-key-health">
|
|
1104
1167
|
<h2 id="answer-key-health" className="text-lg font-semibold">
|
|
1105
1168
|
Answer key health
|
|
1106
1169
|
<InfoTip term="answerKeyHealth" />
|
|
1107
1170
|
</h2>
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
<
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1171
|
+
{/* What to do, in order: fix doubtful answers, fill thin spots, prune. */}
|
|
1172
|
+
<Card className="space-y-6 text-sm">
|
|
1173
|
+
{check && (
|
|
1174
|
+
<div className="readable space-y-3">
|
|
1175
|
+
<h3 className="font-medium">Check these answers</h3>
|
|
1176
|
+
{h.split.length > 0 && (
|
|
1177
|
+
<div className="space-y-2">
|
|
1178
|
+
<p>
|
|
1179
|
+
Models split about evenly on {cases(h.split.length)}: some
|
|
1180
|
+
give the answer key's answer, some don't. For each,
|
|
1181
|
+
decide who's right. Keep the answer if it's right,
|
|
1182
|
+
fix it if the models were, or retire the case if there's
|
|
1183
|
+
no right answer.
|
|
1184
|
+
<InfoTip term="splitCases" />
|
|
1185
|
+
</p>
|
|
1186
|
+
<ul className="space-y-2">
|
|
1187
|
+
{h.split.map((c) => {
|
|
1188
|
+
const by = splitBy[c.id];
|
|
1189
|
+
const names = (xs: string[]) =>
|
|
1190
|
+
new Intl.ListFormat("en-US").format(xs);
|
|
1191
|
+
return (
|
|
1192
|
+
<li
|
|
1193
|
+
key={c.id}
|
|
1194
|
+
className="space-y-2 rounded-md bg-tint p-3"
|
|
1195
|
+
>
|
|
1196
|
+
<div className="font-medium">{caseLink(c)}</div>
|
|
1197
|
+
{by && (
|
|
1198
|
+
<p className="text-xs text-muted">
|
|
1199
|
+
{by.right.length > 0 &&
|
|
1200
|
+
`Gave the answer key's answer: ${names(by.right)}. `}
|
|
1201
|
+
{by.wrong.length > 0 &&
|
|
1202
|
+
`Didn't: ${names(by.wrong)}.`}
|
|
1203
|
+
</p>
|
|
1204
|
+
)}
|
|
1205
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
1206
|
+
{keepAnswer && (
|
|
1207
|
+
<form action={keepAnswer}>
|
|
1208
|
+
<input type="hidden" name="suite" value={key} />
|
|
1209
|
+
<input type="hidden" name="case" value={c.id} />
|
|
1210
|
+
<Submit variant="quiet">
|
|
1211
|
+
The answer is right
|
|
1212
|
+
</Submit>
|
|
1213
|
+
</form>
|
|
1214
|
+
)}
|
|
1215
|
+
<a
|
|
1216
|
+
href={`#case-${c.id}`}
|
|
1217
|
+
className={`inline-flex items-center rounded-md px-3 py-1.5 text-sm ${QUIET_BUTTON}`}
|
|
1218
|
+
>
|
|
1219
|
+
Fix the answer
|
|
1220
|
+
</a>
|
|
1221
|
+
<form action={app.actions.retireCase}>
|
|
1222
|
+
<input type="hidden" name="suite" value={key} />
|
|
1223
|
+
<input type="hidden" name="case" value={c.id} />
|
|
1224
|
+
<Submit variant="quiet">Retire it</Submit>
|
|
1225
|
+
</form>
|
|
1226
|
+
</div>
|
|
1227
|
+
</li>
|
|
1228
|
+
);
|
|
1229
|
+
})}
|
|
1230
|
+
</ul>
|
|
1231
|
+
</div>
|
|
1232
|
+
)}
|
|
1233
|
+
{h.duplicates.length > 0 && (
|
|
1234
|
+
<div className="space-y-1">
|
|
1235
|
+
<p>
|
|
1236
|
+
These pairs share nearly all their words, so each counts
|
|
1237
|
+
twice. Keep the clearer one and retire the other.
|
|
1238
|
+
<InfoTip term="nearDuplicates" />
|
|
1239
|
+
</p>
|
|
1240
|
+
<ul className="list-disc space-y-0.5 pl-5">
|
|
1241
|
+
{h.duplicates.map(([a, b]) => (
|
|
1242
|
+
<li key={`${a.id}-${b.id}`}>
|
|
1243
|
+
{caseLink(a)} and {caseLink(b)}
|
|
1244
|
+
</li>
|
|
1245
|
+
))}
|
|
1246
|
+
</ul>
|
|
1247
|
+
</div>
|
|
1128
1248
|
)}
|
|
1129
1249
|
</div>
|
|
1130
1250
|
)}
|
|
1131
|
-
{
|
|
1132
|
-
<div className="
|
|
1133
|
-
<
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
{h.split.map((c) => (
|
|
1141
|
-
<li key={c.id}>{caseLink(c)}</li>
|
|
1142
|
-
))}
|
|
1143
|
-
</ul>
|
|
1144
|
-
</div>
|
|
1145
|
-
)}
|
|
1146
|
-
{h.duplicates.length > 0 && (
|
|
1147
|
-
<div className="readable space-y-1">
|
|
1148
|
-
<p>
|
|
1149
|
-
<span className="font-medium">Near-duplicates</span>
|
|
1150
|
-
<InfoTip term="nearDuplicates" />: these pairs share nearly all
|
|
1151
|
-
their words. Keep the clearer one.
|
|
1152
|
-
</p>
|
|
1153
|
-
<ul className="list-disc space-y-0.5 pl-5">
|
|
1154
|
-
{h.duplicates.map(([a, b]) => (
|
|
1155
|
-
<li key={`${a.id}-${b.id}`}>
|
|
1156
|
-
{caseLink(a)} and {caseLink(b)}
|
|
1157
|
-
</li>
|
|
1158
|
-
))}
|
|
1159
|
-
</ul>
|
|
1160
|
-
</div>
|
|
1161
|
-
)}
|
|
1162
|
-
{h.staleDrafts.length > 0 && (
|
|
1163
|
-
<div className="readable space-y-2">
|
|
1164
|
-
<p>
|
|
1165
|
-
<span className="font-medium">Old drafts</span>
|
|
1166
|
-
<InfoTip term="oldDrafts" />: {drafts(h.staleDrafts.length)}{" "}
|
|
1167
|
-
nobody reviewed in 30 days. The weekly check retires them on its
|
|
1168
|
-
own.
|
|
1251
|
+
{thin.length > 0 && (
|
|
1252
|
+
<div className="space-y-2">
|
|
1253
|
+
<h3 className="font-medium">Add cases here</h3>
|
|
1254
|
+
<p className="readable">
|
|
1255
|
+
{thin.length} {thin.length === 1 ? "topic has" : "topics have"}{" "}
|
|
1256
|
+
only one case, so the score on each rests on a single example: one
|
|
1257
|
+
mistake swings it, and a fix can't be confirmed. Add a case
|
|
1258
|
+
or two to each.
|
|
1259
|
+
<InfoTip term="tagCoverage" />
|
|
1169
1260
|
</p>
|
|
1170
|
-
{
|
|
1171
|
-
<form action={
|
|
1261
|
+
{draftMore && suite.draftMore ? (
|
|
1262
|
+
<form action={draftMore} className="space-y-2">
|
|
1172
1263
|
<input type="hidden" name="suite" value={key} />
|
|
1264
|
+
<ul className="flex flex-wrap gap-1.5">
|
|
1265
|
+
{thin.map((t) => (
|
|
1266
|
+
<li key={t}>
|
|
1267
|
+
<label className="inline-flex cursor-pointer items-center gap-1 rounded-full bg-amber-100 px-2 py-0.5 text-xs text-amber-800 has-[:checked]:bg-amber-300 dark:bg-amber-500/15 dark:text-amber-200 dark:has-[:checked]:bg-amber-500/40">
|
|
1268
|
+
<input
|
|
1269
|
+
type="checkbox"
|
|
1270
|
+
name="topic"
|
|
1271
|
+
value={t}
|
|
1272
|
+
className="h-3 w-3 accent-amber-700"
|
|
1273
|
+
/>
|
|
1274
|
+
{t}
|
|
1275
|
+
</label>
|
|
1276
|
+
</li>
|
|
1277
|
+
))}
|
|
1278
|
+
</ul>
|
|
1173
1279
|
<Submit variant="quiet">
|
|
1174
|
-
|
|
1175
|
-
{h.staleDrafts.length === 1 ? "draft" : "drafts"} now
|
|
1280
|
+
Draft cases for the topics you picked
|
|
1176
1281
|
</Submit>
|
|
1282
|
+
<p className="readable text-xs text-muted">
|
|
1283
|
+
Two drafts a topic, to confirm like any draft. Pick none to
|
|
1284
|
+
cover them all.
|
|
1285
|
+
</p>
|
|
1177
1286
|
</form>
|
|
1287
|
+
) : (
|
|
1288
|
+
<>
|
|
1289
|
+
<ul className="flex flex-wrap gap-1.5">
|
|
1290
|
+
{thin.map((t) => (
|
|
1291
|
+
<li key={t}>
|
|
1292
|
+
<a
|
|
1293
|
+
href={`#add-case=${encodeURIComponent(t)}`}
|
|
1294
|
+
className="inline-flex rounded-full bg-amber-100 px-2 py-0.5 text-xs text-amber-800 hover:underline dark:bg-amber-500/15 dark:text-amber-200"
|
|
1295
|
+
>
|
|
1296
|
+
{t}
|
|
1297
|
+
</a>
|
|
1298
|
+
</li>
|
|
1299
|
+
))}
|
|
1300
|
+
</ul>
|
|
1301
|
+
<p className="readable text-xs text-muted">
|
|
1302
|
+
Pick a topic to add a case with it already tagged.
|
|
1303
|
+
</p>
|
|
1304
|
+
</>
|
|
1178
1305
|
)}
|
|
1306
|
+
<details className="group">
|
|
1307
|
+
<summary className="cursor-pointer text-muted">
|
|
1308
|
+
Show all topics
|
|
1309
|
+
</summary>
|
|
1310
|
+
<ul className="mt-2 flex flex-wrap gap-1.5">
|
|
1311
|
+
{h.tags.map(([t, n]) => (
|
|
1312
|
+
<li key={t}>
|
|
1313
|
+
<Chip tone={n === 1 ? "warn" : "neutral"}>
|
|
1314
|
+
{t} · {n}
|
|
1315
|
+
</Chip>
|
|
1316
|
+
</li>
|
|
1317
|
+
))}
|
|
1318
|
+
</ul>
|
|
1319
|
+
</details>
|
|
1179
1320
|
</div>
|
|
1180
1321
|
)}
|
|
1181
|
-
{
|
|
1182
|
-
<div className="space-y-
|
|
1183
|
-
<
|
|
1184
|
-
|
|
1185
|
-
<
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1322
|
+
{retire && (
|
|
1323
|
+
<div className="readable space-y-3">
|
|
1324
|
+
<h3 className="font-medium">Retire these</h3>
|
|
1325
|
+
{h.easyToRetire.length > 0 && (
|
|
1326
|
+
<div className="space-y-2">
|
|
1327
|
+
<p>
|
|
1328
|
+
Every current model gets {cases(h.easy.length)} fully right,
|
|
1329
|
+
so they no longer tell models apart. Retire{" "}
|
|
1330
|
+
{h.easyToRetire.length} and keep{" "}
|
|
1331
|
+
{h.easy.length - h.easyToRetire.length} as a floor, so a test
|
|
1332
|
+
still catches a model that breaks the basics. Recent tests are
|
|
1333
|
+
rescored for free.
|
|
1334
|
+
<InfoTip term="easyCases" />
|
|
1335
|
+
</p>
|
|
1336
|
+
{retireEasy && (
|
|
1337
|
+
<form action={retireEasy}>
|
|
1338
|
+
<input type="hidden" name="suite" value={key} />
|
|
1339
|
+
<Submit variant="quiet">
|
|
1340
|
+
Retire {h.easyToRetire.length} easy{" "}
|
|
1341
|
+
{h.easyToRetire.length === 1 ? "case" : "cases"}
|
|
1342
|
+
</Submit>
|
|
1343
|
+
</form>
|
|
1344
|
+
)}
|
|
1345
|
+
</div>
|
|
1346
|
+
)}
|
|
1347
|
+
{h.staleDrafts.length > 0 && (
|
|
1348
|
+
<div className="space-y-2">
|
|
1349
|
+
<p>
|
|
1350
|
+
{drafts(h.staleDrafts.length)} nobody reviewed in 30 days. The
|
|
1351
|
+
weekly check retires them on its own.
|
|
1352
|
+
<InfoTip term="oldDrafts" />
|
|
1353
|
+
</p>
|
|
1354
|
+
{retireStaleDrafts && (
|
|
1355
|
+
<form action={retireStaleDrafts}>
|
|
1356
|
+
<input type="hidden" name="suite" value={key} />
|
|
1357
|
+
<Submit variant="quiet">
|
|
1358
|
+
Retire {h.staleDrafts.length} old{" "}
|
|
1359
|
+
{h.staleDrafts.length === 1 ? "draft" : "drafts"} now
|
|
1360
|
+
</Submit>
|
|
1361
|
+
</form>
|
|
1362
|
+
)}
|
|
1363
|
+
</div>
|
|
1364
|
+
)}
|
|
1198
1365
|
</div>
|
|
1199
1366
|
)}
|
|
1200
1367
|
</Card>
|