badgr-eval-check 0.1.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/README.md +139 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +58 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/package.json +16 -0
package/README.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# badgr-eval-check
|
|
2
|
+
|
|
3
|
+
Assert that AI model output contains what it should, excludes what it shouldn't, and matches the shape you expect — repeatable checks you can run in CI.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx badgr-eval-check \
|
|
7
|
+
--output "The answer is 42. Confidence: high." \
|
|
8
|
+
--must-include "42" \
|
|
9
|
+
--must-not-include "I cannot"
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**Free. No signup required.** Runs entirely on your machine.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## The problem it solves
|
|
17
|
+
|
|
18
|
+
LLM outputs are non-deterministic, so regressions are easy to miss. A model update silently starts refusing questions it used to answer, hallucinating success, or dropping required fields from JSON responses. `badgr-eval-check` lets you write simple assertions against model output and run them on every deploy — like unit tests for your prompts.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Check that output includes required text
|
|
26
|
+
npx badgr-eval-check --output "The answer is 42." --must-include "42"
|
|
27
|
+
|
|
28
|
+
# Check that output excludes banned phrases
|
|
29
|
+
npx badgr-eval-check --output "The answer is 42." --must-not-include "I cannot,sorry,I don't know"
|
|
30
|
+
|
|
31
|
+
# Check a JSON response has required fields
|
|
32
|
+
npx badgr-eval-check --output '{"answer": "42", "confidence": "high"}' --must-include answer,confidence
|
|
33
|
+
|
|
34
|
+
# Machine-readable JSON
|
|
35
|
+
npx badgr-eval-check --output "..." --must-include "42" --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## CLI flags
|
|
41
|
+
|
|
42
|
+
| Flag | Description |
|
|
43
|
+
|------|-------------|
|
|
44
|
+
| `--output <str>` | The model output string to check (required) |
|
|
45
|
+
| `--must-include <items>` | Comma-separated strings that **must** appear in the output |
|
|
46
|
+
| `--must-not-include <items>` | Comma-separated strings that **must not** appear in the output |
|
|
47
|
+
| `--json` | Output machine-readable JSON |
|
|
48
|
+
|
|
49
|
+
**Exit codes:** `0` = all checks passed, `1` = one or more checks failed
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Example output
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
badgr-eval-check
|
|
57
|
+
|
|
58
|
+
✓ must-include "42" found in output
|
|
59
|
+
✓ must-include "confidence" found in output
|
|
60
|
+
✗ must-not-include "I cannot" found in output — model refused to answer
|
|
61
|
+
|
|
62
|
+
1 check failed.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
badgr-eval-check
|
|
67
|
+
|
|
68
|
+
✓ must-include "42" found in output
|
|
69
|
+
✓ must-not-include "I cannot" not found ✓
|
|
70
|
+
✓ must-not-include "sorry" not found ✓
|
|
71
|
+
|
|
72
|
+
All checks passed.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## TypeScript API
|
|
78
|
+
|
|
79
|
+
Use the programmatic API to run multiple fixtures as a batch:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { runEvalCheck } from "badgr-eval-check";
|
|
83
|
+
|
|
84
|
+
const result = runEvalCheck([
|
|
85
|
+
{
|
|
86
|
+
name: "answer present",
|
|
87
|
+
output: modelOutput,
|
|
88
|
+
mustInclude: ["42", "confidence"],
|
|
89
|
+
mustNotInclude: ["I cannot", "sorry", "I don't know"],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "JSON fields present",
|
|
93
|
+
output: modelOutput,
|
|
94
|
+
requiredJsonFields: ["answer", "confidence"], // dot-path: "data.items.0.name"
|
|
95
|
+
},
|
|
96
|
+
]);
|
|
97
|
+
|
|
98
|
+
console.log(result.passed); // true / false
|
|
99
|
+
console.log(result.checks); // per-fixture results
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Types:**
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
interface EvalFixture {
|
|
106
|
+
name: string;
|
|
107
|
+
output: string;
|
|
108
|
+
mustInclude?: string[];
|
|
109
|
+
mustNotInclude?: string[];
|
|
110
|
+
requiredJsonFields?: string[]; // supports dot-path, e.g. "data.items.0.name"
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
interface EvalCheckResult {
|
|
114
|
+
checks: DiagnosticCheck[];
|
|
115
|
+
passed: boolean;
|
|
116
|
+
report: JsonReport;
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Use in CI
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
# GitHub Actions example
|
|
126
|
+
- name: Run model eval checks
|
|
127
|
+
run: |
|
|
128
|
+
OUTPUT=$(curl -s https://api.openai.com/v1/chat/completions \
|
|
129
|
+
-H "Authorization: Bearer $OPENAI_API_KEY" \
|
|
130
|
+
-d '{"model":"gpt-4o","messages":[{"role":"user","content":"What is 6*7?"}]}' \
|
|
131
|
+
| jq -r '.choices[0].message.content')
|
|
132
|
+
npx badgr-eval-check --output "$OUTPUT" --must-include "42" --must-not-include "I cannot"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Requirements
|
|
138
|
+
|
|
139
|
+
- Node.js 18+
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createLogger, fireTelemetry } from "badgr-shared";
|
|
3
|
+
import { runEvalCheck } from "./index.js";
|
|
4
|
+
fireTelemetry({ package: "badgr-eval-check" });
|
|
5
|
+
function readArg(name) {
|
|
6
|
+
const index = process.argv.indexOf(name);
|
|
7
|
+
return index >= 0 ? process.argv[index + 1] : undefined;
|
|
8
|
+
}
|
|
9
|
+
if (process.argv.includes("--help") || process.argv.includes("-h")) {
|
|
10
|
+
console.log(`badgr-eval-check — local AI output assertions
|
|
11
|
+
|
|
12
|
+
Usage:
|
|
13
|
+
npx badgr-eval-check --output "<model output>" --must-include "<text>"
|
|
14
|
+
npx badgr-eval-check --output '{"answer":"ok"}' --must-include answer --json
|
|
15
|
+
npx badgr-eval-check --output "<text>" --must-not-include "error" --json
|
|
16
|
+
|
|
17
|
+
Flags:
|
|
18
|
+
--output <str> Model output string to check
|
|
19
|
+
--must-include <items> Comma-separated strings that must appear in output
|
|
20
|
+
--must-not-include <items> Comma-separated strings that must NOT appear
|
|
21
|
+
--json Output machine-readable JSON
|
|
22
|
+
|
|
23
|
+
Exit codes:
|
|
24
|
+
0 All checks passed
|
|
25
|
+
1 One or more checks failed
|
|
26
|
+
|
|
27
|
+
No signup required. Attaching eval status to AI Badgr receipts is optional.
|
|
28
|
+
|
|
29
|
+
Environment:
|
|
30
|
+
BADGR_TELEMETRY=0 Disable anonymous usage telemetry`);
|
|
31
|
+
process.exit(0);
|
|
32
|
+
}
|
|
33
|
+
const json = process.argv.includes("--json");
|
|
34
|
+
const output = readArg("--output") ?? "";
|
|
35
|
+
const mustInclude = (readArg("--must-include") ?? "").split(",").map((v) => v.trim()).filter(Boolean);
|
|
36
|
+
const mustNotInclude = (readArg("--must-not-include") ?? "").split(",").map((v) => v.trim()).filter(Boolean);
|
|
37
|
+
if (!output) {
|
|
38
|
+
console.error("Error: --output is required");
|
|
39
|
+
console.error("Usage: npx badgr-eval-check --output '<model output>' --must-include '<text>'");
|
|
40
|
+
process.exit(2);
|
|
41
|
+
}
|
|
42
|
+
const result = runEvalCheck([{ name: "cli-output", output, mustInclude, mustNotInclude }]);
|
|
43
|
+
const logger = createLogger(json);
|
|
44
|
+
if (json) {
|
|
45
|
+
logger.report(result.report);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
logger.line(`Eval result: ${result.passed ? "passed" : "failed"}`);
|
|
49
|
+
logger.line("");
|
|
50
|
+
for (const check of result.checks) {
|
|
51
|
+
const sym = check.status === "pass" ? "✓" : check.status === "fail" ? "✗" : "!";
|
|
52
|
+
logger.line(`${sym} ${check.message}`);
|
|
53
|
+
}
|
|
54
|
+
logger.line("");
|
|
55
|
+
logger.line("Optional: include eval status in AI Badgr run receipts.");
|
|
56
|
+
}
|
|
57
|
+
process.exitCode = result.report.status === "failed" ? 1 : 0;
|
|
58
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,aAAa,CAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAE/C,SAAS,OAAO,CAAC,IAAY;IAC3B,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC;AAED,IAAI,OAAO,CAA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E,CAAC;IACT,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;KAAM,CAAC;IACN,MAAM,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IACnE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QAChF,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC;AACzE,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type DiagnosticCheck, type JsonReport } from "badgr-shared";
|
|
2
|
+
export interface EvalFixture {
|
|
3
|
+
name: string;
|
|
4
|
+
output: string;
|
|
5
|
+
mustInclude?: string[];
|
|
6
|
+
mustNotInclude?: string[];
|
|
7
|
+
requiredJsonFields?: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface EvalCheckResult {
|
|
10
|
+
checks: DiagnosticCheck[];
|
|
11
|
+
passed: boolean;
|
|
12
|
+
report: JsonReport;
|
|
13
|
+
}
|
|
14
|
+
export declare function runEvalCheck(fixtures: EvalFixture[]): EvalCheckResult;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0D,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE7H,MAAM,WAAW,WAAW;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAAE;AAChJ,MAAM,WAAW,eAAe;IAAG,MAAM,EAAE,eAAe,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,UAAU,CAAC;CAAE;AAEpG,wBAAgB,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,eAAe,CAiCrE"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { checkToFinding, createReport, reportStatusFromFindings } from "badgr-shared";
|
|
2
|
+
export function runEvalCheck(fixtures) {
|
|
3
|
+
const checks = [];
|
|
4
|
+
for (const fixture of fixtures) {
|
|
5
|
+
for (const text of fixture.mustInclude ?? []) {
|
|
6
|
+
checks.push({ name: `${fixture.name}-include-${text}`, status: fixture.output.includes(text) ? "pass" : "fail", message: fixture.output.includes(text) ? `${fixture.name} includes required content: ${text}` : `${fixture.name} is missing required content: ${text}` });
|
|
7
|
+
}
|
|
8
|
+
for (const text of fixture.mustNotInclude ?? []) {
|
|
9
|
+
checks.push({ name: `${fixture.name}-ban-${text}`, status: fixture.output.includes(text) ? "fail" : "pass", message: fixture.output.includes(text) ? `${fixture.name} contains banned output: ${text}` : `${fixture.name} avoided banned output: ${text}` });
|
|
10
|
+
}
|
|
11
|
+
if (fixture.requiredJsonFields?.length) {
|
|
12
|
+
let parsed;
|
|
13
|
+
try {
|
|
14
|
+
parsed = JSON.parse(fixture.output);
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
parsed = undefined;
|
|
18
|
+
}
|
|
19
|
+
for (const field of fixture.requiredJsonFields) {
|
|
20
|
+
checks.push({ name: `${fixture.name}-json-${field}`, status: hasPath(parsed, field) ? "pass" : "fail", message: hasPath(parsed, field) ? `${fixture.name} JSON includes ${field}` : `${fixture.name} JSON is missing ${field}` });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (checks.length === 0)
|
|
25
|
+
checks.push({ name: "eval-input", status: "info", message: "No eval fixtures were supplied" });
|
|
26
|
+
const findings = checks.map((check) => checkToFinding(check, "EVAL"));
|
|
27
|
+
const status = reportStatusFromFindings(findings);
|
|
28
|
+
return {
|
|
29
|
+
checks,
|
|
30
|
+
passed: status === "passed",
|
|
31
|
+
report: createReport({
|
|
32
|
+
tool: "eval-check",
|
|
33
|
+
status,
|
|
34
|
+
summary: status === "failed" ? "AI output eval failed" : status === "warning" ? "AI output eval has warnings" : "AI output eval passed",
|
|
35
|
+
findings,
|
|
36
|
+
recommendedActions: ["Run eval-check before deployment", "Attach eval status to future AI Badgr execution receipts"],
|
|
37
|
+
nextCommand: "npx @aibadgr/eval-check --json",
|
|
38
|
+
actionUrl: "https://aibadgr.com/agents/connect",
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function hasPath(value, path) {
|
|
43
|
+
let current = value;
|
|
44
|
+
for (const part of path.split(".")) {
|
|
45
|
+
if (typeof current !== "object" || current === null || !(part in current))
|
|
46
|
+
return false;
|
|
47
|
+
current = current[part];
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","s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AM,KAAK,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,uBAAuB;YACvI,QAAQ;YACR,kBAAkB,EAAE,CAAC,kCAAkC,EAAE,0DAA0D,CAAC;YACpH,WAAW,EAAE,gCAAgC;YAC7C,SAAS,EAAE,oCAAoC;SAChD,CAAC;KACH,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,KAAc,EAAE,IAAY;IAC3C,IAAI,OAAO,GAAY,KAAK,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC;YAAE,OAAO,KAAK,CAAC;QACxF,OAAO,GAAI,OAAmC,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "badgr-eval-check",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Local-first repeatable AI output checks for required content, banned output, schemas, and regressions.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": { "badgr-eval-check": "dist/cli.js" },
|
|
9
|
+
"exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" } },
|
|
10
|
+
"files": ["dist", "README.md"],
|
|
11
|
+
"scripts": { "build": "tsc -b", "typecheck": "tsc -b --pretty false", "test": "vitest run" },
|
|
12
|
+
"dependencies": { "badgr-shared": "0.1.1" },
|
|
13
|
+
"engines": { "node": ">=18.0.0" },
|
|
14
|
+
"keywords": ["eval", "llm", "output-validation", "regression", "rag"],
|
|
15
|
+
"license": "MIT"
|
|
16
|
+
}
|