Skip to main content

LLMScorecard

Regression-based LLM benchmark ratings + publication-ready scorecards.

Title and one-line promise

LLMScorecard turns raw LLM evaluation results into defensible ratings (with uncertainty) and an offline HTML scorecard report.

Overview

LLMScorecard is not an eval runner. It does not prompt models, execute tasks, or manage datasets.

It is the “score modeling + reporting” layer you put downstream of your existing evaluation harness to:

  • validate inputs (schema-first)
  • fit research-based score models (regression with controls/interactions)
  • quantify uncertainty (bootstrap and/or cluster-robust)
  • emit reproducible artifacts you can publish and archive

Outputs are designed for org adoption: deterministic seeds, embedded config, schema versions, offline HTML, no phone-home.

Typical artifacts:

  • results.json + fitted_model.json
  • ratings.csv (leaderboard + intervals)
  • report.html (shareable, offline)

Features

  • Single-command report generation: llmscorecard report results.csv --out report.html
  • Schema-first: validate + summarize
  • Research-based ratings: fixed effects + interactions (LLM, category, task)
  • Uncertainty: bootstrap and/or cluster-robust
  • Reproducibility: config embedded, seed, schema version
  • Exports: ratings.csv, tables.csv, plots
  • Extensible adapters (future): lm-eval-harness, lighteval

Install

Requires Python >= 3.9.

pip install llmscorecard

Optional extras (future-proof; may be thin in early versions):

pip install "llmscorecard[report]"
pip install "llmscorecard[stats]"

Quickstart (CLI)

Create examples/results.csv with the required columns:

llm,category,task,item_id,score
gpt-4o-mini,math,arithmetic,1,0.92
gpt-4o-mini,math,arithmetic,2,0.88
llama-3.1-8b-instruct,math,arithmetic,1,0.74
llama-3.1-8b-instruct,math,arithmetic,2,0.70
gpt-4o-mini,code,unit_tests,3,0.81
llama-3.1-8b-instruct,code,unit_tests,3,0.63

Validate:

llmscorecard validate examples/results.csv

Generate an offline HTML scorecard:

llmscorecard report examples/results.csv --out report.html

This produces report.html (and, depending on your config/version, sidecar artifacts like ratings.csv).

Quickstart (Python)

Target API (stable intent; may evolve early on):

from llmscorecard import Scorecard

sc = Scorecard.from_csv("examples/results.csv")

sc.fit(
		model="fe_interaction_task",
		ci="bootstrap",
		n_boot=400,
		seed=123,
)

sc.report("report.html")

Example output

llmscorecard report … emits a CI-friendly summary and writes the HTML report:

report:
	leaderboard (overall):
		1) gpt-4o-mini              0.000  [ -0.042,  0.041]
		2) llama-3.1-8b-instruct   -0.138  [ -0.191, -0.087]

	top categories (mean effect):
		math                        +0.021
		code                        -0.017

	model card:
		model: fe_interaction_task
		formula: score ~ C(llm) + C(category) + C(task) + C(llm):C(category)
		ci: bootstrap (by item_id), n=400, seed=123
		n_rows: 6
		n_items: 3
		schema_version: 0.1
		artifacts: results.json, fitted_model.json, ratings.csv, report.html

Results schema

LLMScorecard expects long-form results (one row per item × model, optionally with weights).

Required:

  • llm (string)
  • category (string)
  • task (string)
  • item_id (string|int)
  • score (float; higher is better)

Optional:

  • metric (string; if you store multiple metrics in one file)
  • weight (float; defaults to 1.0)
  • meta (JSON; per-row metadata)

Canonical JSON:

  • results.json includes schema_version: "0.1" and normalized fields.
  • llmscorecard validate is the gatekeeper (fail fast, actionable errors).

Rating models

Current models:

  • fe_interaction_task (default): score ~ C(llm) + C(category) + C(task) + C(llm):C(category)
  • fe_interaction: score ~ C(llm) + C(category) + C(llm):C(category)
  • pairwise_bt (future/experimental): Bradley–Terry for A/B preferences

Uncertainty:

  • Bootstrap by item_id (clustered resampling) for CIs and stability checks.
  • Cluster-robust SEs clustered by item_id (when aligned with your modeling assumptions).

Configuration

Example scorecard.yaml:

metric: score
model: fe_interaction_task
ci:
	method: bootstrap
	n: 400
	seed: 123
	cluster: item_id
filters:
	llms: ["gpt-4o-mini", "llama-3.1-8b-instruct"]
	categories: ["math", "code"]

Usage:

llmscorecard report results.json --config scorecard.yaml --out report.html

CLI usage

llmscorecard validate <results.(csv|json)>
llmscorecard summarize <results.(csv|json)>
llmscorecard ingest <results.csv> --out results.json
llmscorecard report <results.(csv|json)> --out report.html [--config scorecard.yaml]

Exit codes:

  • validate: 0 ok, 2 invalid input
  • summarize: 0 ok, 2 invalid input
  • ingest: 0 ok, 2 invalid input
  • report: 0 ok (warnings print to stderr but do not fail CI by default)

Development

git clone https://github.com/<user>/llmscorecard
cd llmscorecard
pip install -e .
pip install -e ".[dev]"
pytest
ruff check .

Build:

python -m build

Roadmap

  • v0.0.3 schema validation + summarize
  • v0.0.4 HTML report
  • v0.0.5 regression ratings
  • v0.0.6 uncertainty + P(A>B)
  • v0.0.7 results.json artifacts
  • v0.0.8 config
  • v0.0.9 exports
  • v0.1.0 stable schema + docs
  • Future: adapters (lm-eval-harness, lighteval), mixed effects, IRT, hosted leaderboard generator

Contributing

Small, reviewable PRs win. Please include tests where they fit.

pytest
ruff check .

If you’re changing schemas or rating models, include a minimal fixture and expected artifacts.

License

MIT. See LICENSE.

Metadata

Release files for llmscorecard 0.0.2

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

Source distribution (sdist)

Source distribution for llmscorecard 0.0.2
File Size Uploaded Provenance
llmscorecard-0.0.2.tar.gz 5.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 11.3 kB

Release files / llmscorecard-0.0.2.tar.gz

Download URL llmscorecard-0.0.2.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
66e6f268e7c0e6cb530bdcec1d4235139505077b54e487f0e173efdeb3fdebd2
BLAKE2b-256 checksum
How to use checksums
8750af698a4bc506f25e6863dada78bf40efc075e1d0e22f65e439a9d2c45ec7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / llmscorecard-0.0.2-py3-none-any.whl

Download URL llmscorecard-0.0.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b65bade8c49213d8af6a736d56e06b002b2523ca0cc37cdf4c8bed9cf49d26d0
BLAKE2b-256 checksum
How to use checksums
a916e01b1fa3ca631f3bc8c209ff36077f3b31255d89c1ae3d8f42437a5bc687
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for llmscorecard 0.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.2 This release

2 release files No 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