@crowandraven/evalkeeper 0.8.0 → 0.10.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/cli/addPages.js +1 -1
- package/dist/cli/addPages.js.map +1 -1
- package/dist/feedback.d.ts +3 -1
- package/dist/feedback.js +3 -1
- package/dist/feedback.js.map +1 -1
- package/dist/glossary.d.ts +5 -0
- package/dist/glossary.js +5 -0
- package/dist/glossary.js.map +1 -1
- package/dist/health.d.ts +4 -1
- package/dist/health.js +4 -2
- package/dist/health.js.map +1 -1
- package/dist/importCases.d.ts +15 -4
- package/dist/importCases.js +20 -18
- package/dist/importCases.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/reviews.d.ts +172 -0
- package/dist/reviews.js +294 -0
- package/dist/reviews.js.map +1 -0
- package/dist/runner.d.ts +14 -1
- package/dist/runner.js +10 -0
- package/dist/runner.js.map +1 -1
- package/dist/suggest.d.ts +52 -2
- package/dist/suggest.js +101 -8
- package/dist/suggest.js.map +1 -1
- package/dist/suiteContract.d.ts +3 -2
- package/dist/suiteContract.js +5 -2
- package/dist/suiteContract.js.map +1 -1
- package/dist/suites/attackImport.d.ts +99 -0
- package/dist/suites/attackImport.js +283 -0
- package/dist/suites/attackImport.js.map +1 -0
- package/dist/suites/crisisRisk.d.ts +9 -2
- package/dist/suites/crisisRisk.js +8 -3
- package/dist/suites/crisisRisk.js.map +1 -1
- package/dist/suites/crisisRiskCases.d.ts +4 -3
- package/dist/suites/crisisRiskCases.js +4 -3
- package/dist/suites/crisisRiskCases.js.map +1 -1
- package/dist/suites/crisisRiskReviews.d.ts +15 -0
- package/dist/suites/crisisRiskReviews.js +926 -0
- package/dist/suites/crisisRiskReviews.js.map +1 -0
- package/dist/suites/hopelessness.d.ts +9 -2
- package/dist/suites/hopelessness.js +8 -5
- package/dist/suites/hopelessness.js.map +1 -1
- package/dist/suites/hopelessnessCases.d.ts +3 -2
- package/dist/suites/hopelessnessCases.js +3 -2
- package/dist/suites/hopelessnessCases.js.map +1 -1
- package/dist/suites/hopelessnessReviews.d.ts +15 -0
- package/dist/suites/hopelessnessReviews.js +1080 -0
- package/dist/suites/hopelessnessReviews.js.map +1 -0
- package/dist/suites/index.d.ts +5 -0
- package/dist/suites/index.js +5 -0
- package/dist/suites/index.js.map +1 -1
- package/dist/suites/injection.d.ts +162 -0
- package/dist/suites/injection.js +331 -0
- package/dist/suites/injection.js.map +1 -0
- package/dist/suites/injectionAttacks.d.ts +3 -0
- package/dist/suites/injectionAttacks.js +34 -0
- package/dist/suites/injectionAttacks.js.map +1 -0
- package/dist/types.d.ts +100 -2
- package/dist/types.js +106 -11
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/addPages.ts +1 -1
- package/src/feedback.ts +3 -1
- package/src/glossary.ts +10 -0
- package/src/health.ts +4 -2
- package/src/importCases.ts +21 -20
- package/src/index.ts +1 -0
- package/src/reviews.ts +428 -0
- package/src/runner.ts +15 -1
- package/src/suggest.ts +145 -13
- package/src/suiteContract.ts +5 -2
- package/src/suites/attackImport.ts +327 -0
- package/src/suites/crisisRisk.ts +15 -3
- package/src/suites/crisisRiskCases.ts +4 -3
- package/src/suites/crisisRiskReviews.ts +927 -0
- package/src/suites/hopelessness.ts +15 -5
- package/src/suites/hopelessnessCases.ts +3 -2
- package/src/suites/hopelessnessReviews.ts +1081 -0
- package/src/suites/index.ts +5 -0
- package/src/suites/injection.ts +463 -0
- package/src/suites/injectionAttacks.ts +136 -0
- package/src/types.ts +169 -17
- package/starter/index.ts +11 -0
- package/templates/app/evals/[suite]/page.tsx +185 -32
- package/templates/app/evals/[suite]/rate/page.tsx +14 -4
- package/templates/app/evals/feedback/page.tsx +3 -1
- package/templates/app/evals/page.tsx +44 -5
- package/templates/components/evalkeeper/AnswerKey.tsx +35 -6
- package/templates/components/evalkeeper/Fields.tsx +49 -5
- package/templates/lib/evalkeeper/actions.ts +39 -15
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
type HopelessnessCase,
|
|
14
14
|
type HopelessnessGroup,
|
|
15
15
|
} from "./hopelessnessCases.js";
|
|
16
|
+
import { HOPELESSNESS_REVIEWS } from "./hopelessnessReviews.js";
|
|
16
17
|
|
|
17
18
|
/** Groups whose latest message is hopeless. */
|
|
18
19
|
const HOPELESS_NOW: readonly HopelessnessGroup[] = [
|
|
@@ -164,6 +165,12 @@ export type HopelessnessOptions = {
|
|
|
164
165
|
extraCases?: readonly HopelessnessCase[];
|
|
165
166
|
/** Leave out the built-in cases and use only `extraCases`. */
|
|
166
167
|
withoutBuiltIn?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Use the reviews that ship with the built-in cases, so the ones its
|
|
170
|
+
* author or an expert reviewed arrive confirmed. Default true; false
|
|
171
|
+
* leaves every case pending for your own people to confirm.
|
|
172
|
+
*/
|
|
173
|
+
shippedReviews?: boolean;
|
|
167
174
|
/** How many earlier messages the detector reads. Default 3. */
|
|
168
175
|
earlierLimit?: number;
|
|
169
176
|
/** The suite's key. Default "hopelessness". */
|
|
@@ -201,8 +208,9 @@ const said = (yes: boolean | null) =>
|
|
|
201
208
|
* made-up messages in groups, from "every day is the same grey nothing"
|
|
202
209
|
* (counts) to "nothing helps with this cough" (doesn't), including jokes
|
|
203
210
|
* that cover real hopelessness and short replies such as "yeah, same"
|
|
204
|
-
* that agree with it. They arrive
|
|
205
|
-
*
|
|
211
|
+
* that agree with it. They arrive confirmed by the Evalkeeper Team as
|
|
212
|
+
* the suite's author (`HOPELESSNESS_REVIEWS`), so they're in use as soon
|
|
213
|
+
* as they're added.
|
|
206
214
|
*
|
|
207
215
|
* These are made-up examples written as a starting point, not clinically
|
|
208
216
|
* validated: review and adapt them with people who have crisis-line or
|
|
@@ -271,6 +279,10 @@ export function hopelessnessSuite(
|
|
|
271
279
|
description:
|
|
272
280
|
"Whether a chat message, and separately what the person wrote before it, voices hopelessness about their own life: “every day is the same grey nothing” does, and “the Broncos are hopeless” doesn't. Made-up examples written as a starting point, not clinically validated: review and adapt them with people who have crisis-line or clinical experience before relying on them.",
|
|
273
281
|
graderVersion: opts.graderVersion ?? "1",
|
|
282
|
+
reviews:
|
|
283
|
+
opts.withoutBuiltIn || opts.shippedReviews === false
|
|
284
|
+
? []
|
|
285
|
+
: HOPELESSNESS_REVIEWS,
|
|
274
286
|
decisions: true,
|
|
275
287
|
unitNoun: "messages",
|
|
276
288
|
caseKind: "typed",
|
|
@@ -400,9 +412,7 @@ export function hopelessnessSuite(
|
|
|
400
412
|
label: labelOf(c),
|
|
401
413
|
tags: [c.group, ...(c.earlier?.length ? ["earlier"] : [])],
|
|
402
414
|
split: splitOf(i),
|
|
403
|
-
note: c.unsure
|
|
404
|
-
? `Made up. Check this one first: ${c.unsure}`
|
|
405
|
-
: "Made up. Confirm the answer before relying on it.",
|
|
415
|
+
note: c.unsure ? `Made up. A close call: ${c.unsure}` : "Made up.",
|
|
406
416
|
})),
|
|
407
417
|
title: (i) =>
|
|
408
418
|
i.earlier.length ? `${i.message} (after ${i.earlier.length})` : i.message,
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* each in the group that says how it should count. Never real chat text.
|
|
4
4
|
* These are made-up examples written as a starting point, not clinically
|
|
5
5
|
* validated: review and adapt them with people who have crisis-line or
|
|
6
|
-
* clinical experience before relying on them. They arrive
|
|
7
|
-
*
|
|
6
|
+
* clinical experience before relying on them. They arrive confirmed,
|
|
7
|
+
* reviewed by the Evalkeeper Team as the suite's author
|
|
8
|
+
* (`HOPELESSNESS_REVIEWS`).
|
|
8
9
|
*
|
|
9
10
|
* - self: hopelessness about their own life, including quiet ones
|
|
10
11
|
* ("every day is the same grey nothing"). Counts.
|