Skip to main content

Glite SenseBench benchmark and leaderboard tooling for English word sense disambiguation evaluation

Project description

SenseBench

SenseBench is benchmark and leaderboard tooling for evaluating English word sense disambiguation (WSD) on lexEN and related datasets. A model is shown a target word in context plus its candidate WordNet senses and must answer with the index of the correct sense. Prompts are immutable, registered definitions; runs produce fully auditable artifacts that anyone can re-verify down to the raw API responses.

Install

Requires Python 3.12+.

uv tool install sensebench   # or: pipx install sensebench / pip install sensebench

For development, clone this repository and run uv sync.

Configure API keys

SenseBench calls models through LiteLLM, so any supported provider works. Export the provider key, or put it in a .env file in your working directory (see .env.example):

export OPENAI_API_KEY=...

Run a benchmark

sensebench run --model gpt-5.5 --prompt p001

On first use this downloads the NLTK WordNet corpus and the registered dataset release (lexen-v0.1.0, cached under ~/.cache/sensebench/, integrity-checked against a pinned SHA-256 hash). The run preflights the model with a single call, evaluates every item, writes runs/<run-id>/, and prints an accuracy summary. Useful flags:

  • --limit 25 for a cheap smoke run (not leaderboard-eligible)
  • --run-id my-run to name the run yourself (otherwise generated from model, prompt, and dataset)
  • --temperature, --max-tokens, --seed, --reasoning-effort for sampling control
  • --hosting-kind self_hosted --endpoint-base-url http://... for self-hosted models

Each run directory contains:

  • run.json — run metadata, policy, and totals
  • predictions.jsonl — one record per item with candidates, votes, and correctness
  • calls.jsonl.gz — every raw API request and response

Verify a run

Verification replays the full chain — prompt rendering, answer extraction, vote decisions, and correctness against gold — from the stored artifacts:

sensebench verify runs/<run-id> --dataset lexen-v0.1.0 --prompt p001

Prompts

Registered prompts are immutable JSON definitions under src/sensebench/prompts/registered/. Any benchmark-relevant change requires a new prompt ID. See docs/prompts.md.

Leaderboard

sensebench leaderboard aggregates verified run directories from results/ into leaderboard.json. Every run is re-verified before inclusion, and accuracy is recomputed from the predictions rather than trusted from metadata.

Website

The public leaderboard site is generated as static GitHub Pages output:

sensebench site build --results-dir results --output-dir _site --strict

The generated site includes an interactive leaderboard, Pareto charts, static run-detail pages, dataset and prompt reference pages, submission instructions, a sitemap, and static JSON under _site/data/. Pull requests that add public results must place complete run artifacts under results/<run-id>/; CI verifies all submitted results and builds a preview artifact. Merges to main deploy the rebuilt site automatically.

Development

uv sync
uv run pytest
uv run ruff check src tests tools
uv run mypy src
uv run python tools/verify_prompt.py --all
uv run sensebench site build --results-dir results --output-dir _site --strict

License

Apache-2.0.

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

sensebench-0.1.0.tar.gz (6.6 MB view details)

Uploaded Source

Built Distribution

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

sensebench-0.1.0-py3-none-any.whl (407.7 kB view details)

Uploaded Python 3

File details

Details for the file sensebench-0.1.0.tar.gz.

File metadata

  • Download URL: sensebench-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sensebench-0.1.0.tar.gz
Algorithm Hash digest
SHA256 10537b99b68081ec19af957f8771c9a7a8fe6ba18cad62bdb377b1d8bbec9d4d
MD5 4b2e277b9877869a5bf1f3a2f07955b9
BLAKE2b-256 3c2e6c1c3de5e2b6bffa93a480f7a21d34a87387d14e10ce23dad74a10a71f75

See more details on using hashes here.

Provenance

The following attestation bundles were made for sensebench-0.1.0.tar.gz:

Publisher: release.yml on GliteTech/sensebench

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

File details

Details for the file sensebench-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for sensebench-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fcf16234ac6561aa02a4964caf2c2a5fac341dfcf43ce0beb9c8ef0ed353e8c
MD5 29aec1d2a62ae09c8295a9a081907064
BLAKE2b-256 87f8d39b08477483a8c6550fddf2cac55a315334def86dae50969a4f15b018a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for sensebench-0.1.0-py3-none-any.whl:

Publisher: release.yml on GliteTech/sensebench

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