@crowandraven/evalkeeper 0.2.0 → 0.3.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/src/types.ts CHANGED
@@ -114,6 +114,11 @@ export type Suite<Input, Output, Label> = {
114
114
  * temperature was versioned.
115
115
  */
116
116
  temperature?: number | null;
117
+ /**
118
+ * The output-token cap the test runs at, like temperature. Null: send
119
+ * none (the call's own default).
120
+ */
121
+ maxOutputTokens?: number | null;
117
122
  onCost: (usd: number) => void;
118
123
  },
119
124
  ): Promise<Output>;
package/src/weekly.ts CHANGED
@@ -104,8 +104,8 @@ export function weeklySummary(args: {
104
104
  continue;
105
105
  }
106
106
  if (r.status !== "SUCCEEDED") continue;
107
- // The last check of the same model, temperature, instructions, and
108
- // grading, a day or more earlier: anything else changed for a known
107
+ // The last check of the same model, temperature, output cap,
108
+ // instructions, and grading, a day or more earlier: anything else changed for a known
109
109
  // reason.
110
110
  const prior = scheduled.find(
111
111
  (p) =>
@@ -113,6 +113,7 @@ export function weeklySummary(args: {
113
113
  p.status === "SUCCEEDED" &&
114
114
  p.model === r.model &&
115
115
  (p.temperature ?? null) === (r.temperature ?? null) &&
116
+ (p.maxOutputTokens ?? null) === (r.maxOutputTokens ?? null) &&
116
117
  p.promptVersion === r.promptVersion &&
117
118
  p.graderVersion === r.graderVersion &&
118
119
  +r.startedAt - +p.startedAt >= DAY,
@@ -7,7 +7,6 @@ import {
7
7
  money,
8
8
  probabilityQuality,
9
9
  perAnswer,
10
- type ReasoningEffort,
11
10
  retiresLabel,
12
11
  seconds,
13
12
  seriousMistakes,
@@ -75,7 +74,7 @@ export default async function SuitePage({
75
74
  [
76
75
  r.key,
77
76
  await runner.estimateRun(key, r.model, "ALL", 1, {
78
- reasoningEffort: r.effort as ReasoningEffort | null,
77
+ reasoningEffort: r.effort,
79
78
  }),
80
79
  ] as const,
81
80
  ),
@@ -1,4 +1,3 @@
1
- import Link from "next/link";
2
1
  import {
3
2
  asText,
4
3
  thumbsSummary,
@@ -103,11 +102,17 @@ export default async function FeedbackPage() {
103
102
  </h2>
104
103
  {open.length === 0 && (
105
104
  <p className="text-sm text-muted">
106
- Nothing waiting. Rate an answer on the{" "}
107
- <Link href="/try" className="underline">
108
- try it
109
- </Link>{" "}
110
- page to see one here.
105
+ Nothing waiting. Ratings show up here once an AI feature has a
106
+ thumbs up and down (step 8 of{" "}
107
+ <a
108
+ href="https://github.com/seanhudson/evalkeeper/blob/main/docs/adding-to-your-app.md#8-add-thumbs-to-your-ai-answers-optional"
109
+ target="_blank"
110
+ rel="noreferrer"
111
+ className="underline"
112
+ >
113
+ the guide
114
+ </a>
115
+ ).
111
116
  </p>
112
117
  )}
113
118
  <div className="space-y-3">
@@ -120,6 +120,7 @@ export default async function EvalsHub() {
120
120
  Suites
121
121
  <InfoTip term="suites" />
122
122
  </h2>
123
+ {boards.length === 0 && <NoSuites />}
123
124
  <div className="space-y-4">
124
125
  {boards.map((b, i) => {
125
126
  const h = suiteHealth(
@@ -147,6 +148,45 @@ export default async function EvalsHub() {
147
148
  );
148
149
  }
149
150
 
151
+ /** Before the first suite: what a suite is, and how to add one. */
152
+ function NoSuites() {
153
+ return (
154
+ <Card className="readable space-y-3 text-sm">
155
+ <p className="font-semibold">No suites yet</p>
156
+ <p className="text-muted">
157
+ A suite tests one AI feature: its cases, the answers a person confirms,
158
+ and the checks that grade any model against them. To add one:
159
+ </p>
160
+ <ol className="list-decimal space-y-2 pl-4">
161
+ <li>
162
+ Write it: the input and answer shapes with zod, two or three checks,{" "}
163
+ <code>run</code>, and <code>grade</code>.
164
+ </li>
165
+ <li>
166
+ Add it to <code>SUITES</code> in <code>lib/evalkeeper/index.ts</code>,
167
+ with its instructions hash.
168
+ </li>
169
+ <li>
170
+ Add cases (here, or with <code>importCases</code> from files you
171
+ have), confirm their answers, and test models.
172
+ </li>
173
+ </ol>
174
+ <p className="text-muted">
175
+ Step by step:{" "}
176
+ <a
177
+ href="https://github.com/seanhudson/evalkeeper/blob/main/docs/adding-to-your-app.md#5-write-your-first-suite"
178
+ target="_blank"
179
+ rel="noreferrer"
180
+ className="underline"
181
+ >
182
+ Write your first suite
183
+ </a>
184
+ .
185
+ </p>
186
+ </Card>
187
+ );
188
+ }
189
+
150
190
  function Stat({
151
191
  title,
152
192
  term,