OpenBench AI (v0.4.0)
A modular, open-source LLM experiment execution, evaluation, statistical comparison, and benchmarking platform.
Project Overview
OpenBench AI is a Python toolkit for running reproducible language model benchmarks. It evaluates model responses against standardized JSONL datasets, repeats experiments, compares models with appropriate statistics, collects blinded human preferences, and audits dataset and run quality. The core installation has no external runtime dependencies, and nothing requires a paid API.
Note: OpenBench AI is maintained by its project owner, and its initial development was AI-assisted. Contributions, bug reports, and new datasets are welcome!
What's new in v0.4.0
-
Repeated-run benchmarking:
openbench run --repetitions N --seed Screates a repeat group. Each repetition is its own run with recorded lineage: group ID, repetition index, seeds and seed status, the exact record IDs, per-record content hashes, and cache provenance. -
Interrupted groups resume without re-requesting completed items (
openbench runs resume grp_...). -
Fix: repetitions no longer reuse cached responses. In v0.3.1, repeated runs reused cached responses across repetitions, which understated variability.
-
Paired model comparison:
openbench analyzealigns stored runs, repeat groups or evaluation files on stable record IDs, with no provider calls. It reports the following, with Holm (or BH) correction, an explicit missing-data policy, coverage and failure-rate comparisons, and category and difficulty breakdowns:- percentile bootstrap confidence intervals;
- an exact McNemar test (binary metrics) or a paired sign-flip permutation test;
- effect sizes;
- wins, losses and ties;
- optional equivalence testing (TOST) with a pre-specified margin.
-
Compatibility checks: incompatible inputs, such as different record content, metric versions or scoring options, are refused unless you request a clearly labelled exploratory comparison.
-
Repeated-run variability: generation variability (within items), item-to-item variation and provider failures are reported separately.
-
Human preference evaluation:
openbench preferences create|validate|analyzeis a local-first, blinded A/B workflow. The task file contains no model identities; the identity key is a separate file. Analysis covers validated annotation import, task-weighted win rates with task-clustered CIs, tie and neither outcomes, position bias, Cohen's and Fleiss' kappa, and optional Elo with stated limitations. -
Quality audits:
openbench validate-dataset PATH --quality-checksandopenbench runs verify ID --quality-checksrun read-only checks for:- duplicate IDs, and exact and near-duplicate prompts (a lexical 5-gram heuristic);
- malformed or placeholder references, and keyword expectations missing from references;
- invalid metric configurations and inconsistent versions;
- missing outputs, incomplete runs and groups, integrity failures, and insufficient data.
Audits never modify data.
-
Reports: every new analysis renders to JSON, Markdown and CSV, with provenance (software, environment, input SHA-256s, seeds, parameters). CSV cells are protected against spreadsheet formula injection.
-
Opt-in evaluation CIs:
openbench evaluate --confidence-intervals. Output is unchanged without the flag.
v0.3.1 commands, flags, public Python names, the 200 dataset records and existing scores are preserved, and v0.3.1 run directories can be read without modification. See the migration guide for the details and the few documented behaviour changes.
Installation
git clone https://github.com/lakshaychhaba0001-sys/openbench-ai.git
cd openbench-ai
# Core installation (zero external runtime dependencies)
python -m pip install -e .
# Development + YAML config + JSON Schema validation
python -m pip install -e ".[dev]"
# Optional integration groups
python -m pip install -e ".[huggingface]" # transformers + torch for local HF models
python -m pip install -e ".[semantic]" # sentence-transformers for neural embeddings
python -m pip install -e ".[all]" # All optional runtime integrations
# Statistical reference cross-checks (tests only; never imported by the library)
python -m pip install -e ".[dev,stats-ref]"
The Ollama adapter needs no extra packages: it uses the Python standard library HTTP client. All v0.4.0 statistics, preference and audit features use the standard library only.
Quick Start
1. Evaluate response files
openbench evaluate --dataset datasets/reasoning/sample.jsonl --responses examples/sample_responses.json \
--metrics exact_match accuracy keyword_coverage --output results/
# With percentile bootstrap confidence intervals over items (v0.4.0, opt-in)
openbench evaluate --dataset datasets/reasoning/sample.jsonl --responses examples/sample_responses.json \
--confidence-intervals --seed 0 --output results/ci/
2. Run models, with repetitions
openbench providers list
openbench run --dataset datasets/reasoning/sample.jsonl --provider mock --model model-a --repetitions 3 --seed 100
openbench run --dataset datasets/reasoning/sample.jsonl --provider mock --model model-b
openbench runs list
openbench runs show grp_<id> # a repeat group
openbench runs verify grp_<id> --quality-checks
openbench runs resume grp_<id> # finish an interrupted group
3. Compare stored results (no provider calls)
openbench analyze --runs grp_<id> run_<id> --baseline run_<id> --format markdown --output results/comparison.md
openbench analyze --results results/model_a.json results/model_b.json --equivalence-margin 0.05 --output results/cmp.json
openbench analyze --runs grp_<id> --output results/variability.json # one repeat group: variability report
4. Collect blinded human preferences
openbench preferences create --runs run_<a> run_<b> --seed 7 --output tasks/ --key-output private/tasks.key.json
# annotators fill annotations.jsonl from tasks/tasks.jsonl
openbench preferences validate --key private/tasks.key.json --annotations annotations.jsonl
openbench preferences analyze --key private/tasks.key.json --annotations annotations.jsonl --format markdown --output results/preferences.md
5. Audit quality
openbench validate-dataset datasets/ --quality-checks --format markdown --output results/dataset_audit.md
A complete runnable walkthrough using the mock provider is in examples/v040_workflow.py.
CLI Commands
| Command | Purpose |
|---|---|
validate-dataset, list-datasets, inspect-dataset, dataset-stats |
Dataset validation and exploration (--quality-checks adds the audit) |
evaluate, compare, export, history list/show |
Evaluate response files, descriptive comparison, export, history |
run, runs list/show/verify/resume/compare |
Provider execution, repeat groups, run management and integrity |
providers list/check, cache stats/clear |
Providers and the response cache |
analyze |
v0.4.0 paired comparison or repeated-run variability of stored results |
preferences create/validate/analyze |
v0.4.0 blinded pairwise human preference evaluation |
See the CLI reference for every flag.
Built-in Dataset Catalog (200 Examples)
| Category | Path | Examples | Highlights |
|---|---|---|---|
reasoning |
datasets/reasoning/sample.jsonl |
20 | Deductive logic, scheduling, combinatorics, rate problems |
mathematics |
datasets/mathematics/sample.jsonl |
20 | Calculus, linear algebra, number theory, geometry |
coding |
datasets/coding/sample.jsonl |
20 | Python stdlib, algorithms, Big-O, SQL, HTTP, Git |
debugging |
datasets/debugging/sample.jsonl |
20 | Root-cause analysis across Python, SQL, C, JS, and Git |
instruction_following |
datasets/instruction_following/sample.jsonl |
20 | Strict formatting, delimiters, casing, sorting |
factual_knowledge |
datasets/factual_knowledge/sample.jsonl |
20 | Verifiable science & CS facts with source metadata |
safety |
datasets/safety/sample.jsonl |
20 | Harm refusal, secure coding, medical boundaries with rationale |
multilingual |
datasets/multilingual/sample.jsonl |
20 | 11 languages (es, fr, de, hi, pt, it, ja, zh, ru, nl, la) |
summarization |
datasets/summarization/sample.jsonl |
20 | Single-sentence technical and scientific summarization |
structured_output |
datasets/structured_output/sample.jsonl |
20 | JSON generation with required_keys, field_types, expected_schema |
The built-in quality audit reports 0 errors, 6 warnings and 8 informational findings. These are documented historical keyword exceptions, one ambiguous item and accepted answer variants; see quality audits. With 20 items per category, statistical comparisons on one category have low power, and the reports say so.
Metrics Reference
| Metric Identifier | Version | Kind | Description | Key Methodological Limitation |
|---|---|---|---|---|
exact_match |
0.1.0 |
binary | Normalized string equality (1.0 or 0.0). |
Penalizes conversational framing. |
accuracy |
0.1.0 |
binary | Deterministic correctness via exact or word-bounded answer containment. | Does not parse negation or complex paraphrases. |
keyword_coverage |
0.1.0 |
continuous | Proportion of expected keywords present in the response. | Not equivalent to semantic correctness. |
precision |
0.2.0 |
continuous | $\text{TP} / (\text{TP} + \text{FP})$ for binary decisions or element sets. | Applies to discrete decisions/sets, not free-form prose truth. |
recall |
0.2.0 |
continuous | $\text{TP} / (\text{TP} + \text{FN})$ for binary decisions or element sets. | Does not penalize extra false-positive elements alone. |
f1 |
0.2.0 |
continuous | Harmonic mean of precision and recall. |
Ignores word order outside discrete elements. |
rouge / rouge_1 / rouge_l |
0.2.0 |
continuous | Unigram (rouge_1) and LCS (rouge_l) overlap F1. |
Cannot detect factual hallucinations or antonym flips. |
bleu |
0.2.0 |
continuous | Smoothed clipped $n$-gram precision with brevity penalty. | Penalizes valid synonyms and paraphrases. |
semantic_similarity |
0.2.0 |
continuous | Embedding cosine similarity via configurable EmbeddingProvider; with the default local_ngram_hash provider it is a legacy alias for lexical_similarity. |
Not factual correctness; opposite statements can have high similarity. |
lexical_similarity |
0.3.1 |
continuous | Cosine similarity of hashed word and character 3-gram features. | Surface wording only; paraphrases score low and negations score high. |
structured_output |
0.2.0 |
continuous | Validates JSON syntax, required keys, field types, and JSON Schema. | Structural validity is separate from factual value accuracy. |
The kind (score_kind) selects the statistical procedure in analyze. Metric scores and versions are unchanged in v0.4.0.
Statistical honesty
- A non-significant difference is never reported as "no difference" or "equivalent". Equivalence requires a pre-specified margin and a TOST, and continuous-metric equivalence is disabled in v0.4.0 (descriptive only).
- Exact binary equivalence p-values are computed in floating point with a documented, tested error allowance. This is an engineering bound, not a machine-checked proof.
- Confidence intervals describe uncertainty over items for fixed models, prompts and settings. They are labelled as not adjusted for multiple comparisons.
- A seed passed to a provider does not guarantee deterministic output.
- SHA-256 checksums show that files match recorded checksums. They do not prove that results are correct or authentic.
See the statistical methodology.
Documentation Index
- v0.4.0 guides: Repeated runs | Model comparison | Human preferences | Quality audits | Reproducibility & reports | Statistical methodology | CLI reference | Python API | Migration from v0.3.1
- Execution, providers & integrity: Model Execution Engine | Providers | Ollama | Hugging Face (experimental) | Custom providers | Experiment tracking | Performance monitoring | Reliability & caching | Benchmark integrity | Security & privacy
- Datasets, metrics & configuration: Installation | Usage | Architecture | Dataset catalog | Core metrics | Advanced metrics | YAML profiles | Historical tracking | v0.3 compatibility
- Project: Changelog | Contributing | Security policy | v0.3.1 compatibility report
License
Released under the MIT License.
Metadata
Release files for openbench-ai 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openbench_ai-0.4.0.tar.gz | 259.4 kB | With provenance | Details for openbench_ai-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openbench_ai-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for openbench_ai-0.4.0-py3-none-any.whl |
Total release size: 469.9 kB
Release files / openbench_ai-0.4.0.tar.gz
| Download URL | openbench_ai-0.4.0.tar.gz |
|---|---|
| Size | 259.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2154334c78d79431f9683e21b2e188bffd93fbaa205855685c43b5c60eb02a6f
|
|
BLAKE2b-256 checksum How to use checksums |
63f686c5885f5050a2371d3edf477c66b25a4cc2c4099a7f6677ed8dabddd446
|
| 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 11, 2026.
Transparency logRelease files / openbench_ai-0.4.0-py3-none-any.whl
| Download URL | openbench_ai-0.4.0-py3-none-any.whl |
|---|---|
| Size | 210.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70917d2737f1ca514d635ae78fe38084d1cde96bb0ce31dc396f0912f5362d7e
|
|
BLAKE2b-256 checksum How to use checksums |
63e88e4f11435fdf65467ead7655f2f6bf83255454f5068630b6e3ab5a29d5dc
|
| 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 11, 2026.
Transparency logSecurity for openbench-ai 0.4.0
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.
Attestation for openbench_ai-0.4.0.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 11, 2026.
Transparency logA 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.