evalproof 0.2.0__tar.gz → 0.3.0__tar.gz
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.
- evalproof-0.3.0/CHANGELOG.md +188 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/CITATION.cff +2 -2
- {evalproof-0.2.0 → evalproof-0.3.0}/PKG-INFO +128 -17
- {evalproof-0.2.0 → evalproof-0.3.0}/README.md +130 -17
- {evalproof-0.2.0 → evalproof-0.3.0}/pyproject.toml +6 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/__init__.py +5 -1
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/_version.py +1 -1
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/cache.py +10 -2
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/cli.py +65 -4
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/config.py +48 -6
- evalproof-0.3.0/src/evalproof/gate.py +135 -0
- evalproof-0.3.0/src/evalproof/importers/__init__.py +75 -0
- evalproof-0.3.0/src/evalproof/importers/_common.py +309 -0
- evalproof-0.3.0/src/evalproof/importers/deepeval.py +127 -0
- evalproof-0.3.0/src/evalproof/importers/inspect_ai.py +207 -0
- evalproof-0.3.0/src/evalproof/importers/lm_eval.py +114 -0
- evalproof-0.3.0/src/evalproof/importers/promptfoo.py +256 -0
- evalproof-0.3.0/src/evalproof/importers/table.py +246 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/providers/__init__.py +32 -7
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/providers/anthropic.py +38 -11
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/providers/base.py +27 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/providers/ollama.py +10 -2
- evalproof-0.3.0/src/evalproof/providers/openai.py +163 -0
- evalproof-0.3.0/src/evalproof/providers/profiles.py +164 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/report.py +23 -12
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/stats.py +20 -0
- evalproof-0.3.0/tests/fixtures/README.md +9 -0
- evalproof-0.3.0/tests/fixtures/deepeval/test_run.json +167 -0
- evalproof-0.3.0/tests/fixtures/inspect/log_formats.json +399 -0
- evalproof-0.3.0/tests/fixtures/lm-eval/gpt2/samples_hellaswag_2024-05-01T10-20-30.123456.jsonl +4 -0
- evalproof-0.3.0/tests/fixtures/lm-eval/llama3/samples_gsm8k_2024-05-01T10-20-30.123456.jsonl +6 -0
- evalproof-0.3.0/tests/fixtures/promptfoo/sample-export.json +692 -0
- evalproof-0.3.0/tests/fixtures/table/long.csv +9 -0
- evalproof-0.3.0/tests/fixtures/table/long.jsonl +8 -0
- evalproof-0.3.0/tests/fixtures/table/wide.csv +4 -0
- evalproof-0.3.0/tests/test_action.py +85 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/test_cache_systems.py +22 -0
- evalproof-0.3.0/tests/test_holm_gate.py +168 -0
- evalproof-0.3.0/tests/test_importers.py +795 -0
- evalproof-0.3.0/tests/test_providers.py +517 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/test_public_api.py +14 -0
- evalproof-0.3.0/tests/test_release_fixes.py +162 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/test_security.py +23 -9
- evalproof-0.2.0/CHANGELOG.md +0 -99
- evalproof-0.2.0/src/evalproof/gate.py +0 -107
- evalproof-0.2.0/src/evalproof/providers/openai.py +0 -76
- evalproof-0.2.0/tests/test_providers.py +0 -161
- {evalproof-0.2.0 → evalproof-0.3.0}/.gitignore +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/LICENSE +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/NOTICE +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/calibration.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/compare.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/dataset.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/models.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/py.typed +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/runner.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/scorers/__init__.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/scorers/deterministic.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/scorers/judge.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/scorers/retrieval.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/src/evalproof/systems.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/__init__.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/conftest.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/test_calibration.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/test_compare_gate_report.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/test_config_dataset.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/test_runner_cli.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/test_scorers.py +0 -0
- {evalproof-0.2.0 → evalproof-0.3.0}/tests/test_stats.py +0 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes are listed here. The project follows [Semantic Versioning](https://semver.org/).
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [0.3.0] — 2026-11-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `evalproof import` and `evalproof.import_run`: per-case results from promptfoo (JSON and
|
|
12
|
+
JSONL), Inspect (`.json` and `.eval` logs), DeepEval, lm-evaluation-harness
|
|
13
|
+
(`samples_*.jsonl`) and generic long or wide `jsonl` and `csv` files become a run that
|
|
14
|
+
`compare` and the gate read. Case ids are stable across runs, system errors score as
|
|
15
|
+
failures, repeats collapse by `--epochs`, and NaN or infinite scores are refused with the
|
|
16
|
+
case and metric named. Raises `evalproof.ImportFormatError` (a `ValueError`; exit 2 on the
|
|
17
|
+
command line).
|
|
18
|
+
- Gating several metrics: `gate.metrics` in the suite or `--metric` repeated on
|
|
19
|
+
`compare`, with Holm-adjusted p-values (`evalproof.holm`). The decision carries
|
|
20
|
+
`adjusted_p`, the report gains a Holm-adjusted p column, and a single metric behaves as
|
|
21
|
+
before. ADR 0003 has the reasoning.
|
|
22
|
+
- The composite action's `metric` input takes several names, separated by newlines or commas.
|
|
23
|
+
- `examples/retrieval`: an offline retrieval example for recall@k, MRR and nDCG, with a
|
|
24
|
+
regression that recall@5 cannot see and MRR and nDCG@5 can. Contributed by
|
|
25
|
+
@HarshRajSinghania in #5. CI asserts its gate exits 1 on the regression and 0 on no change.
|
|
26
|
+
- MEASUREMENTS §8: the support-qa judge with thinking on (#3), with its runs, suite and
|
|
27
|
+
analysis in `measure.py`. Against labels audited case by case it passes no wrong answer
|
|
28
|
+
and κ rises, at 6.7× the judge time; the gate's decision does not change.
|
|
29
|
+
- A provider profile table (`providers/profiles.py`) behind one OpenAI-compatible adapter:
|
|
30
|
+
`openai`, `azure`, `gemini`, `mistral`, `groq`, `together`, `fireworks`, `deepseek`, `xai`,
|
|
31
|
+
`openrouter`, `cerebras`, the local servers `vllm`, `lmstudio` and `llamacpp`, and
|
|
32
|
+
`openai-compatible` for any other server (set `base_url`). Each profile carries its base
|
|
33
|
+
URL, key variable, auth header, token-limit field and a link to the provider's docs.
|
|
34
|
+
`OpenAIProvider` stays importable.
|
|
35
|
+
- `TargetConfig.api_key_env` names the environment variable that holds the key, and
|
|
36
|
+
`TargetConfig.headers` adds request headers to every HTTP provider; suite headers win over
|
|
37
|
+
a provider's own, and neither is part of the cache key or written to a run. A named key
|
|
38
|
+
variable that is not set is an error rather than a 401.
|
|
39
|
+
- Anthropic: a `refusal` stop reason is recorded as a case error naming its category, and so
|
|
40
|
+
is `max_tokens` reached before any text, with a hint to raise `params.max_tokens`. The
|
|
41
|
+
OpenAI-compatible adapter does the same for `finish_reason` `length` with no text, and
|
|
42
|
+
for `content_filter`, and reads replies that arrive as a list of typed content parts.
|
|
43
|
+
- A test pins the cache key of an existing Ollama call, so a change to it cannot slip in.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- Hosted providers (everything except Ollama and the local servers) send `temperature` and
|
|
48
|
+
`seed` only when the suite sets them. Before, `openai` sent `temperature: 0` and
|
|
49
|
+
`seed: 0` on every call, which reasoning models reject; now an unset value is left to the
|
|
50
|
+
provider's default. A hosted run that relied on the implicit `temperature: 0` should set
|
|
51
|
+
it in `params`. Ollama and the local servers still send both, so local runs repeat as
|
|
52
|
+
before and keep their cache keys; `GenerationParams` defaults are unchanged. A hosted call
|
|
53
|
+
that now leaves a value out gets a new cache key, so a reply cached at the old implicit
|
|
54
|
+
`temperature: 0` is not reused for it. To point `openai` at an older local server through
|
|
55
|
+
`base_url`, use `openai-compatible` or a local profile instead, which send both values.
|
|
56
|
+
- `openai` sends the token limit as `max_completion_tokens`, which OpenAI's reasoning models
|
|
57
|
+
require (they reject `max_tokens`), and `mistral` sends its seed as `random_seed`. The
|
|
58
|
+
default limit is still 512.
|
|
59
|
+
- The llama.cpp profile defaults to port 9931, the one its server documents now; for an older
|
|
60
|
+
build on 8080, set `base_url`.
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
|
|
64
|
+
- Anthropic calls to current Claude models failed with HTTP 400, because `temperature` was
|
|
65
|
+
sent on every request. It goes out only when the suite sets it, and no seed is sent, since
|
|
66
|
+
the Messages API has none.
|
|
67
|
+
- A gate built without validation and given no metric passed by gating nothing; it now
|
|
68
|
+
cannot gate (exit 4), and `compare --metric ""` is a usage error (exit 2).
|
|
69
|
+
- Found in review before release, in the new importers: two promptfoo prompts whose first 60
|
|
70
|
+
characters matched merged into one system (the label is no longer truncated, and two
|
|
71
|
+
prompts that share a label are an error), promptfoo output with repeated tests but no
|
|
72
|
+
`repeatIndex` now warns that it reads as separate cases, Inspect message ids no longer
|
|
73
|
+
change the dataset hash, a `null` promptfoo `testIdx` no longer crashes, and under
|
|
74
|
+
`--epochs any` or `mean` a case with one good repeat is no longer marked as an error.
|
|
75
|
+
- `examples/support-qa/cases.jsonl`: the q21 and q22 references named Enterprise, which the
|
|
76
|
+
product facts do not give SSO or an admin console (#7). The original set is kept as
|
|
77
|
+
`cases.v1.jsonl` so the recorded runs stay reproducible; the runs judged on the revised set
|
|
78
|
+
are in `runs/v2/`, and MEASUREMENTS §8 reports both.
|
|
79
|
+
|
|
80
|
+
## [0.2.1] — 2026-10-16
|
|
81
|
+
|
|
82
|
+
### Fixed
|
|
83
|
+
|
|
84
|
+
- The PyPI and Python badges on the 0.2.0 PyPI page read "package or version not found".
|
|
85
|
+
PyPI's image proxy fetched them about a minute after the first upload, before the badge
|
|
86
|
+
service could see the package, and keeps that answer for 12 to 24 hours. The PyPI page
|
|
87
|
+
now leaves those two badges out, since it shows the version and supported Pythons
|
|
88
|
+
itself, and the README's copies use new URLs so no cache serves the old images. CI fails
|
|
89
|
+
if a PyPI-data badge reaches the PyPI description again.
|
|
90
|
+
|
|
91
|
+
## [0.2.0] — 2026-10-16
|
|
92
|
+
|
|
93
|
+
The first release on PyPI: `pip install evalproof`.
|
|
94
|
+
|
|
95
|
+
### Added
|
|
96
|
+
|
|
97
|
+
- A supported Python API: `from evalproof import compare_runs, decide, calibrate, ...`.
|
|
98
|
+
The names in `evalproof.__all__` are the public surface; other modules are internal.
|
|
99
|
+
- Python 3.14 support, tested in CI alongside 3.11 to 3.13.
|
|
100
|
+
- Releases publish to PyPI from GitHub Actions with trusted publishing, so no token is
|
|
101
|
+
stored anywhere. Each file on PyPI carries a PEP 740 attestation, and the GitHub release
|
|
102
|
+
carries the same files with a build-provenance attestation.
|
|
103
|
+
- `SECURITY.md` with private vulnerability reporting and the trust boundaries, backed by a
|
|
104
|
+
test that runs both hosted providers with a placeholder key and finds it in no file written.
|
|
105
|
+
- `CODE_OF_CONDUCT.md` (Contributor Covenant 2.1), issue and pull-request templates,
|
|
106
|
+
`CITATION.cff`, `CODEOWNERS`, Dependabot for actions and Python dependencies with a
|
|
107
|
+
three-day cooldown, and a pre-commit configuration.
|
|
108
|
+
|
|
109
|
+
### Changed
|
|
110
|
+
|
|
111
|
+
- The version is written once, in `src/evalproof/_version.py`; the build reads it.
|
|
112
|
+
- The README published to PyPI rewrites relative links to GitHub and replaces the Mermaid
|
|
113
|
+
diagram with a link, so the PyPI page has no broken links. CI checks this on every
|
|
114
|
+
commit, along with `twine check --strict` and a clean install of the built wheel.
|
|
115
|
+
- CI pins every action to a commit SHA, checks out without persisted credentials, sets
|
|
116
|
+
timeouts and cancels superseded pull-request runs, and audits the workflows with zizmor.
|
|
117
|
+
The composite action pins `setup-uv` the same way.
|
|
118
|
+
- Package metadata: documentation, source, changelog and live-demo links; classifiers for
|
|
119
|
+
typing, Python 3.14 and beta status.
|
|
120
|
+
|
|
121
|
+
## [0.1.2] — 2026-10-15
|
|
122
|
+
|
|
123
|
+
### Added
|
|
124
|
+
|
|
125
|
+
- `app/`: an interactive Streamlit app, live at https://evalproof.streamlit.app.
|
|
126
|
+
*Check a drop* starts from four scenarios (the recorded run, the same rates on 4× the
|
|
127
|
+
cases, a small but certain drop, a twenty-case suite) or from sliders, and shows the
|
|
128
|
+
gate's verdict, every paired case as a grid, the coin-flip distribution behind the exact
|
|
129
|
+
McNemar p-value, and the suite size at which the same drop would become significant.
|
|
130
|
+
*The recorded run* replays the committed `examples/support-qa` runs: select any of the
|
|
131
|
+
twelve changed answers to read both versions side by side, add a latency budget, and
|
|
132
|
+
calibrate the judge on a gold sample of chosen size. It runs the library from `src/`
|
|
133
|
+
through the same `compare_runs` and `decide` calls as the CLI; CI installs the app's own
|
|
134
|
+
requirements and drives every scenario.
|
|
135
|
+
|
|
136
|
+
### Fixed
|
|
137
|
+
|
|
138
|
+
- `evalproof compare` raised OverflowError when a metric had more than about 1,030
|
|
139
|
+
discordant pairs: the exact McNemar test summed `comb(n, i) * 0.5**n` in floating
|
|
140
|
+
point, and `comb(n, i)` outgrows the largest float. The binomial tail is now summed
|
|
141
|
+
as integers and divided once, so it stays exact at any size.
|
|
142
|
+
|
|
143
|
+
## [0.1.1] — 2026-10-13
|
|
144
|
+
|
|
145
|
+
### Fixed
|
|
146
|
+
|
|
147
|
+
- The Wilson interval now returns exactly 0 at k=0 and exactly 1 at k=n. Computing
|
|
148
|
+
the boundaries by subtraction left platform-dependent rounding (2.8e-17 on x86_64
|
|
149
|
+
Linux, 0.0 on arm64 macOS).
|
|
150
|
+
|
|
151
|
+
### Changed
|
|
152
|
+
|
|
153
|
+
- The three-day `exclude-newer` resolution guard is declared in `[tool.uv]`, so
|
|
154
|
+
`uv.lock` means the same thing on every machine and in CI.
|
|
155
|
+
- CI pins uv to the version that wrote `uv.lock`.
|
|
156
|
+
|
|
157
|
+
## [0.1.0] — 2026-10-13
|
|
158
|
+
|
|
159
|
+
First release.
|
|
160
|
+
|
|
161
|
+
### Added
|
|
162
|
+
|
|
163
|
+
- Suites in YAML: a JSONL golden set, a system under test, scorers, an optional judge,
|
|
164
|
+
calibration settings and a gate.
|
|
165
|
+
- Systems under test: Ollama, Anthropic and OpenAI models with a prompt template; Python
|
|
166
|
+
functions; HTTP endpoints. System failures are recorded per case, never fatal.
|
|
167
|
+
- Scorers: exact match, contains, regex with accept/reject answer keys, a JSON Schema
|
|
168
|
+
subset, numeric tolerance, recall@k, MRR, nDCG, and an LLM judge with a strict JSON
|
|
169
|
+
verdict, one parse retry and an explicit undecided state.
|
|
170
|
+
- Pairwise judging with order swap; position-inconsistent verdicts become ties.
|
|
171
|
+
- Judge calibration: confusion matrix, TPR, FPR, Cohen's κ, and prevalence-corrected pass
|
|
172
|
+
rates by adjusted classify-and-count (bootstrap interval) and prediction-powered
|
|
173
|
+
inference (normal interval).
|
|
174
|
+
- Paired comparison of two runs: exact McNemar for pass/fail, paired bootstrap for scores.
|
|
175
|
+
- A CI gate that fails only on a drop that is both beyond `max_drop` and significant at
|
|
176
|
+
`alpha`, plus p95-latency and cost budgets, with distinct exit codes.
|
|
177
|
+
- Content-addressed response cache; runs record the Ollama version and model digests.
|
|
178
|
+
- Markdown reports for GitHub step summaries, JSON reports, and a composite GitHub Action.
|
|
179
|
+
- Two examples: an offline ticket router (CI's gate contract) and a product support
|
|
180
|
+
assistant judged by a local model, with measurements.
|
|
181
|
+
|
|
182
|
+
[Unreleased]: https://github.com/technobasant/evalproof/compare/v0.3.0...HEAD
|
|
183
|
+
[0.3.0]: https://github.com/technobasant/evalproof/compare/v0.2.1...v0.3.0
|
|
184
|
+
[0.2.1]: https://github.com/technobasant/evalproof/compare/v0.2.0...v0.2.1
|
|
185
|
+
[0.2.0]: https://github.com/technobasant/evalproof/compare/v0.1.2...v0.2.0
|
|
186
|
+
[0.1.2]: https://github.com/technobasant/evalproof/compare/v0.1.1...v0.1.2
|
|
187
|
+
[0.1.1]: https://github.com/technobasant/evalproof/compare/v0.1.0...v0.1.1
|
|
188
|
+
[0.1.0]: https://github.com/technobasant/evalproof/releases/tag/v0.1.0
|
|
@@ -11,8 +11,8 @@ authors:
|
|
|
11
11
|
- family-names: Bhattarai
|
|
12
12
|
given-names: Basant
|
|
13
13
|
website: "https://basantbhattarai.com.np"
|
|
14
|
-
version: 0.
|
|
15
|
-
date-released: "2026-
|
|
14
|
+
version: 0.3.0
|
|
15
|
+
date-released: "2026-11-12"
|
|
16
16
|
license: Apache-2.0
|
|
17
17
|
repository-code: "https://github.com/technobasant/evalproof"
|
|
18
18
|
url: "https://pypi.org/project/evalproof/"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: evalproof
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Treat LLM evaluation as measurement: calibrate the judge, correct the pass rate, gate CI on significant regressions.
|
|
5
5
|
Project-URL: Homepage, https://github.com/technobasant/evalproof
|
|
6
6
|
Project-URL: Documentation, https://github.com/technobasant/evalproof#readme
|
|
@@ -38,8 +38,6 @@ Description-Content-Type: text/markdown
|
|
|
38
38
|
|
|
39
39
|
# evalproof
|
|
40
40
|
|
|
41
|
-
[](https://pypi.org/project/evalproof/)
|
|
42
|
-
[](https://pypi.org/project/evalproof/)
|
|
43
41
|
[](https://github.com/technobasant/evalproof/actions/workflows/ci.yml)
|
|
44
42
|
[](https://github.com/technobasant/evalproof/blob/main/LICENSE)
|
|
45
43
|
[](https://evalproof.streamlit.app)
|
|
@@ -69,8 +67,9 @@ evalproof:
|
|
|
69
67
|
4. **gates CI** only when a drop is both larger than your tolerance *and* statistically
|
|
70
68
|
significant, plus latency and cost budgets, with distinct exit codes.
|
|
71
69
|
|
|
72
|
-
It is local-first: Ollama is the default
|
|
73
|
-
every model call is cached by content so re-runs are free
|
|
70
|
+
It is local-first: Ollama is the default, every major hosted provider is one `target:` line
|
|
71
|
+
away ([Providers](#providers)), and every model call is cached by content so re-runs are free
|
|
72
|
+
and reproducible.
|
|
74
73
|
|
|
75
74
|
## Install
|
|
76
75
|
|
|
@@ -80,12 +79,12 @@ uv tool install evalproof # just the CLI
|
|
|
80
79
|
```
|
|
81
80
|
|
|
82
81
|
Python 3.11 to 3.14. `compare`, `calibrate` and `report` work on run files and need no
|
|
83
|
-
model. `run` needs a system to evaluate: a Python function, an HTTP endpoint, a local
|
|
84
|
-
Ollama
|
|
82
|
+
model. `run` needs a system to evaluate: a Python function, an HTTP endpoint, a local model
|
|
83
|
+
(Ollama, vLLM, LM Studio, llama.cpp), or a key for a hosted provider.
|
|
85
84
|
|
|
86
85
|
## What it found on a real run
|
|
87
86
|
|
|
88
|
-
A local `qwen3:1.7b` support assistant
|
|
87
|
+
A local `qwen3:1.7b` product support assistant, judged by `qwen3:8b`, 83
|
|
89
88
|
questions, one Apple M5. Full method and every table in [MEASUREMENTS.md](https://github.com/technobasant/evalproof/blob/main/MEASUREMENTS.md).
|
|
90
89
|
|
|
91
90
|
| Question | Measured |
|
|
@@ -96,7 +95,8 @@ questions, one Apple M5. Full method and every table in [MEASUREMENTS.md](https:
|
|
|
96
95
|
| Does correcting the judge's rate help? | On average yes (offset 4.8 → ~3.8 pts), but with 30 labels the interval doubles; at 83 cases the judge's bias is smaller than its own noise |
|
|
97
96
|
| Was the gold trustworthy? | No: of 13 judge–key disagreements the key was wrong 7 times, the judge 4. Most of the "bias" corrected was the gold's |
|
|
98
97
|
| Is pairwise judging safer? | No: 42% of verdicts flipped with the order of the two answers, and the judge preferred the candidate 42 to 6 — mostly where both answers were right and the candidate's was five times longer |
|
|
99
|
-
|
|
|
98
|
+
| Does a reasoning judge help? | Against audited labels, yes: thinking on passed no wrong answer (three without it) and κ rose from 0.86–0.88 to 0.90–0.94, at 6.7× the judge time. Against the raw answer key it looked worse, because the key is wrong on exactly those cases. The gate's decision did not change |
|
|
99
|
+
| Is it reproducible? | 20/20 identical outputs and verdicts with the cache off; a warm-cache re-run took 0.05 s instead of 363 s; a re-judge three days later matched 83/83 |
|
|
100
100
|
|
|
101
101
|
## Five-minute quickstart
|
|
102
102
|
|
|
@@ -117,6 +117,11 @@ uv run evalproof compare runs/baseline.json runs/noisy.json \
|
|
|
117
117
|
--suite examples/deterministic/suite.yaml --gate; echo "exit $?" # 0: 2 of 60 is noise
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
+
[`examples/retrieval`](https://github.com/technobasant/evalproof/blob/main/examples/retrieval) runs the same gate on a retrieval change: recall@5
|
|
121
|
+
does not move when the top hit drops to rank 5, while MRR and nDCG@5 do, and the gate fails
|
|
122
|
+
it. It was contributed by [@HarshRajSinghania](https://github.com/HarshRajSinghania), and CI
|
|
123
|
+
checks its exit codes too.
|
|
124
|
+
|
|
120
125
|
With Ollama installed, the LLM example is
|
|
121
126
|
[`examples/support-qa`](https://github.com/technobasant/evalproof/blob/main/examples/support-qa) (`ollama pull qwen3:1.7b` and
|
|
122
127
|
`ollama pull qwen3:8b`; about 6–10 minutes per run on an Apple M5).
|
|
@@ -124,6 +129,63 @@ With Ollama installed, the LLM example is
|
|
|
124
129
|
The browser app in [`app/`](https://github.com/technobasant/evalproof/blob/main/app) runs locally too:
|
|
125
130
|
`uv run --with-requirements app/requirements.txt streamlit run app/streamlit_app.py`.
|
|
126
131
|
|
|
132
|
+
## Providers
|
|
133
|
+
|
|
134
|
+
The target is `<provider>:<model>`; the model name is everything after the first colon, so
|
|
135
|
+
`openrouter:anthropic/claude-sonnet-4.5` and `ollama:qwen3:8b` both work. Two native adapters
|
|
136
|
+
(`ollama`, `anthropic`) and one OpenAI-compatible adapter driven by a table of provider
|
|
137
|
+
profiles ([`providers/profiles.py`](https://github.com/technobasant/evalproof/blob/main/src/evalproof/providers/profiles.py), each row cites the
|
|
138
|
+
provider's documentation). Plain HTTP throughout, no vendor SDK.
|
|
139
|
+
|
|
140
|
+
| Provider | Example target | Key variable | Where |
|
|
141
|
+
|---|---|---|---|
|
|
142
|
+
| `ollama` | `ollama:qwen3:8b` | none | local |
|
|
143
|
+
| `vllm` | `vllm:meta-llama/Llama-3.1-8B-Instruct` | `VLLM_API_KEY`, optional | local |
|
|
144
|
+
| `lmstudio` | `lmstudio:qwen3-8b` | optional, via `api_key_env` | local |
|
|
145
|
+
| `llamacpp` | `llamacpp:qwen3-8b` | `LLAMA_API_KEY`, optional | local |
|
|
146
|
+
| `anthropic` | `anthropic:claude-sonnet-4-5` | `ANTHROPIC_API_KEY` | hosted |
|
|
147
|
+
| `openai` | `openai:gpt-5` | `OPENAI_API_KEY` | hosted |
|
|
148
|
+
| `azure` | `azure:<deployment>` | `AZURE_OPENAI_API_KEY` | hosted, needs `base_url` |
|
|
149
|
+
| `gemini` | `gemini:gemini-2.5-flash` | `GEMINI_API_KEY` | hosted |
|
|
150
|
+
| `mistral` | `mistral:mistral-large-latest` | `MISTRAL_API_KEY` | hosted |
|
|
151
|
+
| `groq` | `groq:llama-3.3-70b-versatile` | `GROQ_API_KEY` | hosted |
|
|
152
|
+
| `together` | `together:meta-llama/Llama-3.3-70B-Instruct-Turbo` | `TOGETHER_API_KEY` | hosted |
|
|
153
|
+
| `fireworks` | `fireworks:accounts/fireworks/models/llama-v3p3-70b-instruct` | `FIREWORKS_API_KEY` | hosted |
|
|
154
|
+
| `deepseek` | `deepseek:deepseek-chat` | `DEEPSEEK_API_KEY` | hosted |
|
|
155
|
+
| `xai` | `xai:grok-4` | `XAI_API_KEY` | hosted |
|
|
156
|
+
| `openrouter` | `openrouter:anthropic/claude-sonnet-4.5` | `OPENROUTER_API_KEY` | hosted |
|
|
157
|
+
| `cerebras` | `cerebras:gpt-oss-120b` | `CEREBRAS_API_KEY` | hosted |
|
|
158
|
+
| `openai-compatible` | `openai-compatible:<model>` | optional, via `api_key_env` | any server, needs `base_url` |
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
system:
|
|
162
|
+
target: openai-compatible:gpt-4o # a gateway, LiteLLM proxy, TGI, SGLang, ...
|
|
163
|
+
base_url: https://llm-gateway.internal/v1
|
|
164
|
+
api_key_env: TEAM_GATEWAY_KEY # the variable to read; the key itself never goes in the suite
|
|
165
|
+
headers: {x-team: search} # extra HTTP headers on every call, never secrets
|
|
166
|
+
params: {max_tokens: 2048}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
* `base_url` overrides any profile's default (a regional endpoint, a proxy, an older
|
|
170
|
+
`llama-server`, which listened on port 8080 before October 2026 and now defaults to 9931).
|
|
171
|
+
* `api_key_env` replaces the profile's variable for any provider; a variable named there
|
|
172
|
+
must be set.
|
|
173
|
+
* `headers` merge into every request and win over the adapter's own, for example
|
|
174
|
+
`anthropic-version`. They are not part of the cache key, and a suite file is usually
|
|
175
|
+
committed, so keep keys in the environment.
|
|
176
|
+
* Sampling: local servers (`ollama`, `vllm`, `lmstudio`, `llamacpp`) receive `temperature` and
|
|
177
|
+
`seed` on every call, defaults included, so a local run repeats. Hosted providers receive
|
|
178
|
+
them only when `params` sets them, because reasoning models reject a non-default
|
|
179
|
+
temperature; Anthropic never receives a seed, and since its current models also reject
|
|
180
|
+
`temperature`, it gets one only when the suite asks. `params.extra` adds any other body
|
|
181
|
+
field, such as `{thinking: {type: adaptive}, output_config: {effort: low}}`.
|
|
182
|
+
* Thinking models spend output tokens on thinking inside `max_tokens`, which defaults to 512
|
|
183
|
+
(changing it would change every cache key). Set `params.max_tokens` higher for them; a reply
|
|
184
|
+
cut off before its first word, a refusal, or a content-filter block is recorded as that
|
|
185
|
+
case's error rather than as an empty answer.
|
|
186
|
+
* AWS Bedrock and Google Vertex AI sign requests with cloud credentials, which evalproof does
|
|
187
|
+
not implement. Use a gateway's OpenAI-compatible endpoint through `openai-compatible`.
|
|
188
|
+
|
|
127
189
|
## Concepts
|
|
128
190
|
|
|
129
191
|
**Suite** — one YAML file: a JSONL golden set, the system under test, scorers, an optional
|
|
@@ -133,7 +195,7 @@ judge, calibration settings and a gate.
|
|
|
133
195
|
name: support-qa
|
|
134
196
|
dataset: cases.jsonl # {"id", "input", "reference", ...extra fields}
|
|
135
197
|
system:
|
|
136
|
-
target: ollama:qwen3:1.7b # or
|
|
198
|
+
target: ollama:qwen3:1.7b # or groq:…, anthropic:…, python:module:func, https://…
|
|
137
199
|
system_prompt_file: prompt.md
|
|
138
200
|
prompt_template: "{question}"
|
|
139
201
|
params: {temperature: 0, seed: 0, think: false}
|
|
@@ -176,6 +238,56 @@ orders and reports order-dependent verdicts as ties.
|
|
|
176
238
|
| 4 | cannot gate: fewer than `min_cases` paired cases, or the runs used different data |
|
|
177
239
|
| 2 | usage or configuration error |
|
|
178
240
|
|
|
241
|
+
The gate checks one metric by default. To gate several, repeat `--metric` or list them in
|
|
242
|
+
the suite; each metric's p-value is then Holm-adjusted for the number of metrics gated, so
|
|
243
|
+
the chance of failing a build on noise stays at `alpha` for the set as a whole, and the
|
|
244
|
+
report shows the raw and the adjusted p-value side by side. Metrics that are not gated are
|
|
245
|
+
still reported.
|
|
246
|
+
|
|
247
|
+
```yaml
|
|
248
|
+
gate:
|
|
249
|
+
metrics: [judge, answer_key] # one metric: `metric: judge`
|
|
250
|
+
max_drop: 0.03
|
|
251
|
+
alpha: 0.05
|
|
252
|
+
min_cases: 40
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
evalproof compare baseline.json candidate.json --gate --metric judge --metric answer_key
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Import results from other tools
|
|
260
|
+
|
|
261
|
+
You do not have to run your evals with evalproof to gate them. `evalproof import` turns the
|
|
262
|
+
per-case results another tool wrote into a run file that `compare` and the gate read:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
evalproof import promptfoo output.json --system openai:gpt-5 --out runs/candidate.json
|
|
266
|
+
evalproof import inspect logs/task.eval --out runs/candidate.json
|
|
267
|
+
evalproof import deepeval .deepeval/.latest_test_run.json --out runs/candidate.json
|
|
268
|
+
evalproof import lm-eval results/gpt2/samples_hellaswag_2026-11-12T10-20-30.jsonl --out runs/gpt2.json
|
|
269
|
+
evalproof import csv results.csv --system a --out runs/a.json # id,metric,passed,score,...
|
|
270
|
+
evalproof import jsonl results.jsonl --wide --id-field case --out runs/a.json # one column per metric
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Import each side with the same importer, then gate as usual, for example
|
|
274
|
+
`evalproof compare runs/baseline.json runs/candidate.json --gate --metric pass`. What to know:
|
|
275
|
+
|
|
276
|
+
* Case ids are stable between runs of the same dataset (they come from the test's inputs, or
|
|
277
|
+
the tool's own sample id, never from its position), which is what lets two files pair.
|
|
278
|
+
The dataset hash covers the ids and inputs as the tool recorded them, so runs imported by
|
|
279
|
+
different importers refuse to gate (exit 4) instead of pairing on a coincidence.
|
|
280
|
+
* A system error counts as a failure on every metric, as in a native run. Repeats of one case
|
|
281
|
+
(epochs, repeated tests) collapse by `--epochs`: `mean` (the default), `first`, `all`
|
|
282
|
+
or `any`. Under `mean`, `first` and `any`, a case with at least one repeat that ran is not
|
|
283
|
+
counted as a system error; its errored repeats still score as failures.
|
|
284
|
+
* A NaN or infinite score is refused at import, naming the case and metric, because it would
|
|
285
|
+
make the bootstrap report a significant difference that is not there.
|
|
286
|
+
* promptfoo files can hold several providers and `--system` picks one. Inspect `.eval` logs
|
|
287
|
+
compressed with zstd need Python 3.14 or newer; otherwise run
|
|
288
|
+
`inspect log convert --to json <file>` first. DeepEval's conversational cases are skipped
|
|
289
|
+
with a warning.
|
|
290
|
+
|
|
179
291
|
## From Python
|
|
180
292
|
|
|
181
293
|
The CLI is a thin layer over the same functions:
|
|
@@ -209,7 +321,7 @@ The architecture diagram is in the [README on GitHub](https://github.com/technob
|
|
|
209
321
|
| Treat the judge as a classifier to be calibrated | Trust the judge's pass rate | Its count is biased by its own error rates, and the bias moves with the true rate | [0001](https://github.com/technobasant/evalproof/blob/main/docs/adr/0001-judge-is-a-classifier.md) |
|
|
210
322
|
| Local Ollama by default, HTTP-only providers, content-addressed cache | Hosted APIs and vendor SDKs | Reproducible, free to re-run, tied to a model digest; no SDK dependency | [0002](https://github.com/technobasant/evalproof/blob/main/docs/adr/0002-local-first-providers.md) |
|
|
211
323
|
| Gate on "large AND significant", on paired cases | "Fail if the score dropped by X" | On a few dozen cases, X-point drops are mostly noise, and a noisy gate gets switched off | [0003](https://github.com/technobasant/evalproof/blob/main/docs/adr/0003-gate-on-significance-not-delta.md) |
|
|
212
|
-
|
|
|
324
|
+
| One metric by default; several with Holm correction | Gate every metric at α each | Testing many metrics at α = 0.05 each inflates false failures | 0003 |
|
|
213
325
|
| Pointwise verdicts for gating; pairwise as a diagnostic | Pairwise preference for gating | Measured: 42% of pairwise verdicts flipped with answer order, with a strong length preference | [MEASUREMENTS §6](https://github.com/technobasant/evalproof/blob/main/MEASUREMENTS.md) |
|
|
214
326
|
| numpy and the standard library for statistics | SciPy, statsmodels | Small enough to read and to test against hand-worked values | — |
|
|
215
327
|
|
|
@@ -219,11 +331,12 @@ The composite action runs `compare --gate`, appends the report to the job summar
|
|
|
219
331
|
fails the job on exit codes 1, 3 or 4:
|
|
220
332
|
|
|
221
333
|
```yaml
|
|
222
|
-
- uses: technobasant/evalproof@v0.
|
|
334
|
+
- uses: technobasant/evalproof@v0.3.0
|
|
223
335
|
with:
|
|
224
336
|
baseline: eval/baseline.json # produced on main, e.g. as a build artifact
|
|
225
337
|
candidate: eval/candidate.json # produced on this branch
|
|
226
338
|
suite: eval/suite.yaml
|
|
339
|
+
# metric: "judge, answer_key" # optional: gate several metrics, newline- or comma-separated
|
|
227
340
|
```
|
|
228
341
|
|
|
229
342
|
This repository's own CI runs the offline example on every commit and asserts that the
|
|
@@ -243,11 +356,12 @@ frameworks.
|
|
|
243
356
|
evalproof is deliberately narrow: it is the measurement layer — how much a judge's verdict
|
|
244
357
|
is worth, and whether a difference between two runs is real. Its run file is plain,
|
|
245
358
|
documented JSON, so it can sit beside an existing harness: produce the per-case verdicts
|
|
246
|
-
however you like, then calibrate and gate here.
|
|
359
|
+
however you like, then calibrate and gate here. For promptfoo, Inspect, DeepEval and
|
|
360
|
+
lm-eval you do not even need to do that: evalproof [imports their results](#import-results-from-other-tools).
|
|
247
361
|
|
|
248
362
|
## Limits
|
|
249
363
|
|
|
250
|
-
* The measurements cover one machine, two small local models, one
|
|
364
|
+
* The measurements cover one machine, two small local models, one product domain and
|
|
251
365
|
83 cases. They show the method; they are not a benchmark of those models.
|
|
252
366
|
* Calibration is only as good as its gold labels — [MEASUREMENTS §4](https://github.com/technobasant/evalproof/blob/main/MEASUREMENTS.md)
|
|
253
367
|
shows a regex answer key being wrong more often than the judge. Use human labels when
|
|
@@ -262,9 +376,6 @@ however you like, then calibrate and gate here.
|
|
|
262
376
|
## Roadmap
|
|
263
377
|
|
|
264
378
|
* Stratified gold sampling (by tag) and per-tag calibration.
|
|
265
|
-
* Multiple-comparison correction when more than one metric is gated.
|
|
266
|
-
* A reasoning judge (`think: true`) measured against the same answer key.
|
|
267
|
-
* Importers for other harnesses' per-case results.
|
|
268
379
|
|
|
269
380
|
## Project
|
|
270
381
|
|