agentleFS
groqgroq/openbench/CLAUDE.md

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
  1. Very specific:

    Always source the virtual environment before running Python commands: source .venv/bin/activate

    line 6
  2. Very specific:

    Dependency management: When adding dependencies with UV, use >= constraints (e.g., uv add "package>=1.2.3")

    line 8
  3. Distinctive:

    Use the latest stable version as the minimum to keep dependencies healthy and secure

    line 10
  4. Very specific:

    Check latest versions with uv pip list --outdated or on PyPI

    line 11
  5. Distinctive:

    Inspect AI framework: All evaluations extend Inspect AI's task/solver pattern

    line 107
  6. Very specific:

    Create evaluation file in src/openbench/evals/

    line 133
  7. Very specific:

    Add metadata to config.py

    line 134
  8. Distinctive:

    Follow existing patterns for dataset loading and scoring

    line 135
  9. Distinctive:

    Use type hints for all functions

    line 138
  10. Distinctive:

    Follow conventional commits (feat, fix, docs, etc.)

    line 139
  11. Distinctive:

    Test new features with both unit and integration tests

    line 141
  12. Very specific:

    Run pre-commit run --all-files to check all hooks

    line 143
  13. Distinctive:

    If any hook fails, fix the issues and re-run until all pass

    line 148

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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-ai must 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 --outdated or on PyPI

Key Commands

Development Setup

# Initial setup
uv venv && uv sync --dev
source .venv/bin/activate

Running 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=openbench

Code Quality

# Format code
ruff format .

# Lint code
ruff check .

# Type checking
mypy .

# Run all pre-commit hooks
pre-commit run --all-files

Using 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 view

Installing 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-groups

Publishing to PyPI

# Build the package
uv build

# Publish to PyPI (requires PyPI API token)
uv publish

Architecture Overview

Project Structure

  • src/openbench/ - Main package directory
    • _cli/ - CLI commands implementation
    • datasets/ - Dataset loaders (MMLU, GPQA, HumanEval, SimpleQA)
    • evals/ - Benchmark implementations built on Inspect AI
    • metrics/ - Custom scoring metrics
    • scorers/ - Scoring functions used across benchmarks
    • utils/ - Shared utilities
    • _registry.py - Dynamic task loading system
    • config.py - Benchmark metadata and configuration

Key Patterns

  1. Registry-based loading: Benchmarks are dynamically loaded via _registry.py
  2. Inspect AI framework: All evaluations extend Inspect AI's task/solver pattern
  3. Provider-agnostic: Uses Inspect AI's model abstraction for 15+ providers
  4. 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 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.

Adding New Benchmarks

  1. Create evaluation file in src/openbench/evals/
  2. Add metadata to config.py
  3. 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-files to check all hooks
    • The configured hooks are:
      1. ruff check --fix - Linting with auto-fix
      2. ruff format - Code formatting
      3. mypy . - Type checking
    • If any hook fails, fix the issues and re-run until all pass

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.