Skip to main content

Causal Judge Evaluation - Unbiased LLM evaluation framework

Project description

CJE Logo

CJE - Causal Judge Evaluation

Your LLM judge scores are lying. CJE calibrates them to what actually matters.

Open In Colab Docs Python Tests License PyPI Downloads

CJE Pipeline

Quick Start

pip install cje-eval
from cje import analyze_dataset

# Point to your response files (one JSONL per policy)
results = analyze_dataset(fresh_draws_dir="data/responses/")

# Get calibrated estimates with valid confidence intervals
results.plot_estimates(
    policy_labels={"prompt_v1": "Conversational tone", ...},
    save_path="ranking.png"
)

Data format (one JSONL file per policy):

{"prompt_id": "1", "judge_score": 0.85, "oracle_label": 0.9}
{"prompt_id": "2", "judge_score": 0.72}

Only 5-25% of samples need oracle labels. CJE learns the judge→oracle mapping and applies it everywhere.


Why You Need This

Raw LLM judge scores suffer from systematic biases that make your metrics unreliable:

  • Preference inversion: Higher scores often predict lower real-world quality
  • Invalid confidence intervals: Standard error bars yield 0% coverage
  • Scale arbitrariness: Is "4.2" actually better than "4.0"?

CJE fixes this by treating your judge as a sensor that must be calibrated against ground truth.

Read the full explanation →


The Proof

We benchmarked 14 estimators on 5,000 real Chatbot Arena prompts using GPT-5 as oracle:

CJE Calibration Accuracy
Illustrative output comparing prompt variants
Method Result
Raw Judges 0% CI coverage — error bars were mathematical lies
CJE (Direct + Two-Stage) 99% ranking accuracy with just 5% oracle labels

Cost savings: CJE achieves oracle-quality rankings at 14× lower cost by calibrating a cheap judge (~250 labels) instead of labeling everything.

Read the full Arena Experiment →Paper (Zenodo)


Monitoring Calibration Over Time

Calibration can drift. Periodically verify it still holds with a small probe:

from cje.diagnostics import audit_transportability

# Check if last month's calibration still works on this week's data
diag = audit_transportability(calibrator, this_week_samples)
print(diag.summary())
# Transport: PASS | N=48 | δ̂: +0.007 (CI: [-0.05, +0.06])
Temporal Monitoring

PASS means your calibration is still valid. FAIL means something changed — investigate or recalibrate.


Try It Now

Open the interactive tutorial in Google Colab →

Walk through a complete example: compare prompt variants, check if calibration transfers, inspect what's fooling the judge, and monitor drift over time. No setup required.


Documentation

Technical Guides

Examples & Data


Development

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

Support

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.2.6.tar.gz (304.4 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.2.6-py3-none-any.whl (366.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cje_eval-0.2.6.tar.gz
Algorithm Hash digest
SHA256 fb67a643b4bdc4b0d0c99f5c5b06eaedd9d4c8b82ca4a29944df50bd8281de37
MD5 fc082435b3ba2a23adde370b99549a10
BLAKE2b-256 36fbf39a8bacc24082203ee1836d1048dbb467e3c0fa1f77adf1255d1f5172f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cje_eval-0.2.6.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.2.6-py3-none-any.whl.

File metadata

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

File hashes

Hashes for cje_eval-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 20c11a0aa0ecbcb116b4ed473e369a2586b7a895fe6037ed165dd09567fcc282
MD5 53248577fb2c5b216a1354d82c837182
BLAKE2b-256 5f305ad9780cee1c6b328f04d557d3f755a1c21156a1bad448ec322ca92aefc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cje_eval-0.2.6-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