Evaldiff
CI for LLM prompts. Datasets, eval runs, and regression diffs as a pass/fail gate for your CI — the
npm testof prompts.
Evaldiff scores your LLM output against a dataset of expected answers and rubric criteria, then gives you a green/red gate you can wire straight into GitHub Actions. When a model change or prompt edit regresses a case, the diff tells you exactly which one.
Why
You already know how to test normal software. LLM output is non-deterministic, so "it worked yesterday, why not today?" is a daily problem. Evaldiff sells the green checkmark — not "AI testing" as an abstract service.
- Dataset — a JSON file of
{input, expected, rubric?}cases. - Run — score a (dataset, model, prompt) combination; per-case score, pass/fail vs. a threshold, latency, tokens, cost.
- Diff —
run A vs B: regressions highlighted, side by side. - Gate —
evaldiff run --threshold 0.85→ exit code0/1, drops straight into GitHub Actions.
Install
pip install evaldiff
evaldiff --version
Quickstart
# Scaffold a dataset with two example cases
evaldiff init my-dataset
# Edit my-dataset.json, then run an eval against your model endpoint
evaldiff run --dataset my-dataset.json \
--endpoint https://your-openai-compatible/v1 \
--model your-model \
--threshold 0.85
# Compare two runs and see regressions
evaldiff diff <run-a-id> <run-b-id>
Dataset format
[
{
"input": "Refund policy for a returned item",
"expected": "You can return any item within 30 days for a full refund.",
"rubric": ["mentions the 30-day window", "mentions full refund"],
"tags": ["support"]
}
]
rubric is optional — a list of criteria a judge model scores 0/1 against.
Without it, evaldiff falls back to semantic / exact similarity vs. expected.
Supported endpoints (v0)
- Any OpenAI-compatible
/chat/completionsendpoint (BYO key) - OpenAI
- Anthropic
Everything else: bring your own adapter. Scope is the moat.
Status
v0.0.1 — name reservation. The hosted API, judge, and runner land in the
coming days. This release exists to lock the evaldiff name on PyPI.
MIT licensed.
Release files for evaldiff 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| evaldiff-0.0.1.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| evaldiff-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / evaldiff-0.0.1.tar.gz
| Download URL | evaldiff-0.0.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02ab95e491eb7a509e188b3c449669bfb86e48bdb6949e079d4309554880044d
|
|
BLAKE2b-256 checksum How to use checksums |
4eb3da6a7d280fcc0088d38d8a0a4295045ce2acd2e7ee7bcc38b8327a5f25d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / evaldiff-0.0.1-py3-none-any.whl
| Download URL | evaldiff-0.0.1-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c6f187a72d74a0255c6c70e8b9e54adb474d5af9491621c84bdbc33910c38a4
|
|
BLAKE2b-256 checksum How to use checksums |
fe1396098247f0c68c28212645c3fe5705083f7015231f3e5905b42fabb334fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|