Skip to main content

EvalPen

Know if your prompt change actually made things better, with a judge you've verified.

EvalPen is a Python library for LLM evaluation, with four ways in: an MCP server and skill for your coding agent (Claude Code, Cursor, or any MCP client), a CLI, a Python API and a CI check. There's no dashboard and no account. In your agent, you ask in plain language and get a report back in the conversation.

"Compare prompt v1 and v2 on my 50 test cases." "Is this answer supported by these documents?" "Here are 30 hand-labeled examples. Can I trust my judge?"

⚠️ Work in progress. Name and API may change before v0.1.

Why

  • Prompt changes get tested by vibes. Three examples, eyeballed. Regressions ship.
  • LLM judges get trusted blindly. Judges have known biases (position, length) and can disagree with humans on hard cases. Most setups never check.
  • Eval frameworks take setup. Many teams never get past it.

EvalPen makes evaluation a one-sentence ask, and every report states how reliable its judge is.

Tools

Tool What it does
create_eval_set Builds a varied test set (JSONL) from logs or a task description
compare_prompts Pairwise comparison of two prompts: win rate, confidence interval, regressions with explanations
check_faithfulness Splits an answer into atomic claims and checks each against the source documents
calibrate_judge Measures judge vs. human agreement (raw agreement, Cohen's kappa, position bias)

Example report

Prompt v2 wins 34/50 (68%, 95% CI: 54–80%)
Judge: kappa = 0.78 vs. human labels (reliable)

Regressions (4):
- case_12: v2 drops the currency from the amount
- case_27: v2 answers in English to a French question
...

(Illustrative format, not real results.)

How it works

  • Pairwise judging. The judge picks the better of two answers against your criteria. This is more stable than absolute 1–10 scores.
  • Position-bias control. Each pair is judged twice with A/B swapped. A flipped verdict counts as a tie and gets flagged.
  • Confidence intervals. Win rates come with an interval, so you don't conclude from 10 examples.
  • Local first. Test cases, runs and reports stay on your machine as JSONL and Markdown. LLM calls use your own API key.

Try it now (v0.0.1)

v0.0.1 ships the first tool: judge calibration. Give it a JSONL file where each line has a human label and your LLM judge's label:

{"id": "case_01", "human": "pass", "judge": "pass"}
{"id": "case_05", "human": "fail", "judge": "pass"}
uvx evalpen calibrate examples/judge_vs_human.jsonl
Judge calibration on 20 examples: **reliable**

- Raw agreement: 85% (95% CI 64%–95%)
- Cohen's kappa: 0.69 (substantial)
- Threshold used: kappa >= 0.6

Disagreements (3):
- case_05: human='fail', judge='pass'
...

Add --fail-if-unreliable to exit with code 1 in CI when kappa is below 0.6.

The same tool is available to your agent through the MCP server:

claude mcp add evalpen -- uvx evalpen mcp

Usage (planned for v0.1)

The commands below are the target interface. They may change.

In your agent (MCP + skill)

claude mcp add evalpen -- uvx evalpen mcp

Then just ask: "I changed the classification prompt. Compare it with the old one on my test cases." The agent calls compare_prompts, summarizes the regressions, and can fix the prompt and re-run.

From the terminal (CLI)

evalpen compare prompts/v1.txt prompts/v2.txt --cases tests.jsonl

From Python

from evalpen import compare, check_faithfulness

result = compare(prompt_a, prompt_b, cases="tests.jsonl", judge="claude-haiku")
claims = check_faithfulness(answer, sources=docs)

In CI (block regressions before merge)

- run: evalpen compare main.txt pr.txt --cases tests.jsonl --fail-if-win-rate-below 0.5

Architecture

  MCP + skill     CLI      Python API      CI
        \          |           |          /
         ──────  evalpen core library  ──────
         create_eval_set · compare_prompts
         check_faithfulness · calibrate_judge
         runner · judge · stats
            /                        \
     local files (JSONL)        LLM APIs (your key)

All logic lives in the core library. The CLI, MCP server, skill and CI check are thin layers on top.

Roadmap

  • Core library + CLI + MCP server skeleton
  • calibrate_judge + Cohen's kappa (v0.0.1)
  • check_faithfulness
  • compare_prompts with position-bias control and CIs
  • create_eval_set
  • MCP server, skill, GitHub Action
  • Demo dataset, GIF, tests
  • v0.1 release: PyPI + MCP registry

Background

Built by an AI engineer who shipped LLM classification and recommendation systems at scale, where every release was validated with human review plus LLM-as-a-judge. EvalPen packages that workflow so anyone can use it from their agent.

License

MIT

Metadata

Release files for evalpen 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evalpen 0.0.1
File Size Uploaded Provenance Actions
evalpen-0.0.1.tar.gz 81.6 kB With provenance Details for evalpen-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for evalpen 0.0.1
File Interpreter ABI Platform Actions
evalpen-0.0.1-py3-none-any.whl Python 3 none any Details for evalpen-0.0.1-py3-none-any.whl

Total release size: 90.7 kB

Release files / evalpen-0.0.1.tar.gz

Download URL evalpen-0.0.1.tar.gz
Size 81.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e5c5c5926fa2074a89122076402597a667b646f0d6b8e8f37ea6cd102fbbd148
BLAKE2b-256 checksum
How to use checksums
86695d64ff8788b5f9431fa127c0d1904ee7450deaa2da84f7974c66ebc34d5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / evalpen-0.0.1-py3-none-any.whl

Download URL evalpen-0.0.1-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
670da3e3598a112ebb724ad88ea10f560386f20451ac7b8e55d4bb5c78723a4d
BLAKE2b-256 checksum
How to use checksums
760b2aca1a7167e357c1a98d1c6ccdc63dd96c5f070f0116a9a1de6863e3dd46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for evalpen 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for evalpen-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page