Skip to main content

Causal Judge Evaluation - Unbiased LLM evaluation framework

Project description

CJE Logo

CJE - Causal Judge Evaluation

Your LLM judge scores are noisy and biased. CJE calibrates them to what actually matters.

arXiv Dataset Open In Colab Docs Python Tests License PyPI Downloads


Quick Start

pip install cje-eval
from cje import analyze_dataset

results = analyze_dataset(
    fresh_draws_data={
        "gpt-4o": [
            {"prompt_id": "eval_001", "judge_score": 0.85, "oracle_label": 0.90},
            {"prompt_id": "eval_002", "judge_score": 0.72, "oracle_label": 0.70},
            {"prompt_id": "eval_003", "judge_score": 0.91, "oracle_label": 0.88},
            {"prompt_id": "eval_004", "judge_score": 0.64, "oracle_label": 0.55},
            {"prompt_id": "eval_005", "judge_score": 0.77, "oracle_label": 0.74},
            {"prompt_id": "eval_006", "judge_score": 0.88, "oracle_label": 0.92},
            {"prompt_id": "eval_007", "judge_score": 0.68},
            {"prompt_id": "eval_008", "judge_score": 0.79},
        ],
        "claude-sonnet": [
            {"prompt_id": "eval_001", "judge_score": 0.78, "oracle_label": 0.82},
            {"prompt_id": "eval_002", "judge_score": 0.81, "oracle_label": 0.79},
            {"prompt_id": "eval_003", "judge_score": 0.86, "oracle_label": 0.84},
            {"prompt_id": "eval_004", "judge_score": 0.70, "oracle_label": 0.66},
            {"prompt_id": "eval_005", "judge_score": 0.74, "oracle_label": 0.71},
            {"prompt_id": "eval_006", "judge_score": 0.93, "oracle_label": 0.90},
            {"prompt_id": "eval_007", "judge_score": 0.75},
            {"prompt_id": "eval_008", "judge_score": 0.83},
        ],
    }
)

results.plot_estimates(save_path="ranking.png")  # requires pip install "cje-eval[viz]"

CJE learns the judge→oracle mapping from labeled samples and applies it everywhere. CJE needs at least 10 oracle-labeled samples pooled across policies (2 per calibration fold) — in practice, label 5–25% of your data with your oracle (human raters, strong model, downstream metric). Any bounded scale works automatically (0–1, 0–100, Likert 1–5).

Default workflow: If you can generate fresh responses on a shared prompt set, use Direct + two-stage calibration. Use IPS/DR only when you truly need off-policy estimation and overlap diagnostics look healthy enough to trust reweighting.

What CJE covers: reward calibration, calibration-aware inference, transport audits, and overlap diagnostics for counterfactual OPE.


Real-World Validation

We ran CJE on 29,511 physician-labeled HealthBench records with two LLM judges. Both judges were overconfident — by 24.5 pp and 13.0 pp respectively — and disagreed with each other by up to 73 percentage points on specific criteria categories. After calibration with just 5% oracle labels (~1,400 records), both converged to the physician ground truth.

Read the full HealthBench audit →

CJE forest plot showing calibrated policy estimates with confidence intervals
Example output: calibrated estimates with confidence intervals (valid under the calibration and transport checks CJE runs by default)

Documentation

Resource Description
Interactive Tutorial Walk through a complete example in Colab — no setup required
CJE in 3 Minutes Video: why raw judge scores mislead and how CJE fixes it
Technical Walkthrough Video: calibration, evaluation, and transport auditing pipeline
Operational Playbook End-to-end runbook: audits, drift correction, label budgeting
Planning Notebook Optimize your evaluation budget with pilot data
Full Docs Installation, assumptions, API reference, research notes

Bridges: Already running evals in Promptfoo, TruLens, LangSmith, or OpenCompass? Convert those outputs into CJE format with one command.

Technical deep dives: Calibration methods · Diagnostics · Estimators · Interface/API · Experiments


Development

git clone https://github.com/cimo-labs/cje.git
cd cje && poetry install && make test

Citation

If you use CJE in your research, please cite:

@misc{landesberg2025causaljudgeevaluationcalibrated,
  title={Causal Judge Evaluation: Calibrated Surrogate Metrics for LLM Systems},
  author={Eddie Landesberg},
  year={2025},
  eprint={2512.11150},
  archivePrefix={arXiv},
  primaryClass={stat.ME},
  url={https://arxiv.org/abs/2512.11150},
}

License

MIT — See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cje_eval-0.3.0.tar.gz (402.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cje_eval-0.3.0-py3-none-any.whl (469.3 kB view details)

Uploaded Python 3

File details

Details for the file cje_eval-0.3.0.tar.gz.

File metadata

  • Download URL: cje_eval-0.3.0.tar.gz
  • Upload date:
  • Size: 402.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cje_eval-0.3.0.tar.gz
Algorithm Hash digest
SHA256 977c1aafd7f9265214e5225dd7de56c04eff219eda8d958039fc8f263b7f7605
MD5 f7970bf516f77a4af5c428382f8f516c
BLAKE2b-256 1463efa5ccc3da8cb068aaa19c87ac5fe7cbdcd784a59148ca29f56e7595a969

See more details on using hashes here.

Provenance

The following attestation bundles were made for cje_eval-0.3.0.tar.gz:

Publisher: publish.yml on cimo-labs/cje

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cje_eval-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: cje_eval-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 469.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cje_eval-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f24753a861daa81f6c2aeb7ac2c49a9e1864fd879027cd2760bce22ed6b8ba9a
MD5 34aa2cc9f10cb307fad56f94e4a1195c
BLAKE2b-256 e9e886978214e70bebd125a6760a7087de4efa043f478ceb5c4d72c9c4dbf52a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cje_eval-0.3.0-py3-none-any.whl:

Publisher: publish.yml on cimo-labs/cje

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page