openbench
CLAUDE.md832 starsChanged 14 months agoMITView on GitHub
Core Dependencies (in main dependencies): - inspect-ai: Required by all benchmarks - scipy, numpy: Used by multiple scorers (DROP, MMLU, HealthBench) - datasets, typer, groq, openai: Core infrastructure Optional Dependencies (in dependency-groups): - scicode: Only needed for SciCode benchmark - jsonschemabench: Only needed for JSONSchemaBench Most benchmarks (17/19) can run with just core dependencies. Only specialized benchmarks require their specific dependency group.
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
13 rules. About 0 are common, 7 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 6
Always source the virtual environment before running Python commands: source .venv/bin/activate
- Very specific: line 8
Dependency management: When adding dependencies with UV, use >= constraints (e.g., uv add "package>=1.2.3")
- Distinctive: line 10
Use the latest stable version as the minimum to keep dependencies healthy and secure
- Very specific: line 11
Check latest versions with uv pip list --outdated or on PyPI
- Distinctive: line 107
Inspect AI framework: All evaluations extend Inspect AI's task/solver pattern
- Very specific: line 133
Create evaluation file in src/openbench/evals/
- Very specific: line 134
Add metadata to config.py
- Distinctive: line 135
Follow existing patterns for dataset loading and scoring
- Distinctive: line 138
Use type hints for all functions
- Distinctive: line 139
Follow conventional commits (feat, fix, docs, etc.)
- Distinctive: line 141
Test new features with both unit and integration tests
- Very specific: line 143
Run pre-commit run --all-files to check all hooks
- Distinctive: line 148
If any hook fails, fix the issues and re-run until all pass
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Essential Setup
- Always source the virtual environment before running Python commands:
source .venv/bin/activate - This project uses UV as the package manager, not pip
- Dependency management: When adding dependencies with UV, use >= constraints (e.g.,
uv add "package>=1.2.3")- Exception:
inspect-aimust remain pinned to a specific version for stability - Use the latest stable version as the minimum to keep dependencies healthy and secure
- Check latest versions with
uv pip list --outdatedor on PyPI
- Exception:
Key Commands
Development Setup
# Initial setup
uv venv && uv sync --dev
source .venv/bin/activateRunning Tests
# Run all unit tests
pytest
# Run integration tests (requires API keys)
pytest -m integration
# Run specific test file
pytest tests/test_registry.py
# Run with coverage
pytest --cov=openbenchCode Quality
# Format code
ruff format .
# Lint code
ruff check .
# Type checking
mypy .
# Run all pre-commit hooks
pre-commit run --all-filesUsing the CLI
# List available benchmarks
bench list
# Describe a specific benchmark
bench describe mmlu
# Run evaluation
bench eval mmlu --model groq/llama-3.1-70b --limit 10
# View previous results
bench viewInstalling Dependencies
# Install core dependencies only (runs most benchmarks)
uv sync
# Install with specific benchmark dependencies
uv sync --group scicode # For SciCode benchmark
uv sync --group jsonschemabench # For JSONSchemaBench
# Install with development tools
uv sync --dev
# Install everything
uv sync --all-groupsPublishing to PyPI
# Build the package
uv build
# Publish to PyPI (requires PyPI API token)
uv publishArchitecture Overview
Project Structure
src/openbench/- Main package directory_cli/- CLI commands implementationdatasets/- Dataset loaders (MMLU, GPQA, HumanEval, SimpleQA)evals/- Benchmark implementations built on Inspect AImetrics/- Custom scoring metricsscorers/- Scoring functions used across benchmarksutils/- Shared utilities_registry.py- Dynamic task loading systemconfig.py- Benchmark metadata and configuration
Key Patterns
- Registry-based loading: Benchmarks are dynamically loaded via
_registry.py - Inspect AI framework: All evaluations extend Inspect AI's task/solver pattern
- Provider-agnostic: Uses Inspect AI's model abstraction for 15+ providers
- Shared components: Common scorers and utilities reduce code duplication
Dependency Architecture
openbench uses a tightly coupled architecture where benchmarks share common infrastructure:
┌─────────────┐ ┌──────────────┐ ┌──────────────┐
│ EVALS │ ---> │ DATASETS │ <--> │ SCORERS │
│ (19 files) │ │ (shared) │ │ (shared) │
└─────────────┘ └──────────────┘ └──────────────┘Core Dependencies (in main dependencies):
inspect-ai: Required by all benchmarksscipy,numpy: Used by multiple scorers (DROP, MMLU, HealthBench)datasets,typer,groq,openai: Core infrastructure
Optional Dependencies (in dependency-groups):
scicode: Only needed for SciCode benchmarkjsonschemabench: Only needed for JSONSchemaBench
Most benchmarks (17/19) can run with just core dependencies. Only specialized benchmarks require their specific dependency group.
Adding New Benchmarks
- Create evaluation file in
src/openbench/evals/ - Add metadata to
config.py - Follow existing patterns for dataset loading and scoring
Development Standards
- Use type hints for all functions
- Follow conventional commits (feat, fix, docs, etc.)
- Line length: 88 characters (configured in ruff)
- Test new features with both unit and integration tests
- IMPORTANT: All pre-commit hooks MUST pass before committing
- Run
pre-commit run --all-filesto check all hooks - The configured hooks are:
ruff check --fix- Linting with auto-fixruff format- Code formattingmypy .- Type checking
- If any hook fails, fix the issues and re-run until all pass
- Run
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

