--- license: mit language: - en tags: - Benchmark - Inserloft pretty_name: Rockman configs: - config_name: benchmark data_files: - split: rockman path: benchmark.csv --- # Rockman Benchmark v0.2 > **A comprehensive, contamination-resistant benchmark for evaluating LLMs on code generation, debugging, optimization, and software engineering tasks.** [![Benchmark Version](https://img.shields.io/badge/version-v0.2-blue)](https://github.com/InserLoft/Rockman) [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE) [![Hugging Face Dataset](https://img.shields.io/badge/πŸ€—%20Hugging%20Face-Rockman-yellow)](https://huggingface.co/datasets/Inserloft/Rockman) [![Python](https://img.shields.io/badge/python-3.8+-blue)](https://python.org) --- ## 🎯 Overview Rockman is a **production-ready benchmark** designed to rigorously evaluate Large Language Models on realistic software engineering tasks. Unlike simple code generation benchmarks, Rockman covers the full spectrum of developer workflows: | Task Type | Description | Examples | |-----------|-------------|----------| | **Generation** | Implement function from signature + docstring | "Implement Dijkstra's algorithm" | | **Debugging** | Fix bugs in provided code | Off-by-one, edge cases, infinite loops | | **Optimization** | Meet specific complexity targets | O(n log n), O(1) space | | **Stateful** | Classes with persistent state | LRU cache, banking ledger, event processor | | **Multi-step** | Parse β†’ Build β†’ Solve pipelines | Parse graph β†’ build adjacency β†’ find path | --- ## πŸ“Š Benchmark Composition (v0.2) | Split | Tasks | Hidden Tests | Purpose | |-------|-------|--------------|---------| | **Public** | 154 | ❌ | Development, debugging | | **Private** | 44 | βœ… (encrypted) | Official evaluation | | **Hidden** | 22 | βœ… (never published) | Final leaderboard integrity | | Category | Tasks | Difficulty Range | |----------|-------|------------------| | Fundamentals | 60 | 1–3 | | Data Structures | 50 | 2–4 | | Algorithms | 50 | 2–5 | | Graphs | 60 | 3–6 | | Trees | 40 | 3–5 | | Math | 40 | 2–5 | | **Debugging** | 50 | 2–4 | | **Complexity** | 30 | 3–5 | | **Software Engineering** | 40 | 3–5 | | **Stateful Systems** | 30 | 4–6 | | **Multi-step** | 30 | 4–6 | | **Total** | **520** | **1–7** | **Difficulty Levels:** 1=Introductory β†’ 7=Research --- ## πŸ” Contamination Prevention Rockman implements **six layers** of contamination protection: | Layer | Mechanism | |-------|-----------| | **1. Canary Strings** | Unique `ROCKMAN_CANARY_` per task | | **2. Content Hashing** | SHA256 of prompt + tests for integrity | | **3. Split Isolation** | Public/Private/Hidden with zero overlap | | **4. Encrypted Hidden Tests** | AES-256-GCM, keys held by evaluator only | | **5. Source Attribution** | `source_type`, `source_url`, `derived_from` metadata | | **6. Temporal Controls** | Creation/publication dates, embargo periods | **Verification:** Run `rockman verify --dataset rockman_v0.2.jsonl` to audit integrity. --- ## πŸš€ Quick Start ### Installation ```bash git clone https://github.com/InserLoft/Rockman cd Rockman pip install -e . pip install matplotlib # for PNG reports ``` ### Run Baseline Evaluation ```bash # Phase 1: Reference baselines (always works offline) python phase1_evaluate_baselines.py # Phase 2: Model evaluation via OpenRouter python phase2_evaluate_openrouter.py ``` ### Programmatic Usage ```python from rockman import ( Evaluator, Problem, load_problems_from_jsonl, RockmanResultsReporter, generate_benchmark_dataset ) # Load dataset problems = load_problems_from_jsonl("rockman_v0.2_private.jsonl") # Evaluate model evaluator = Evaluator(benchmark_version="v0.2") completions = {p.task_id: [your_model(p.prompt)] for p in problems} results = evaluator.evaluate_dataset(problems, completions, k=1) # Generate reports reporter = RockmanResultsReporter("results") reporter.generate_full_report(leaderboard, detailed_results) ``` --- ## πŸ“ˆ Evaluation Protocol | Parameter | Value | Description | |-----------|-------|-------------| | **Temperature** | 0.0 | Deterministic generation | | **Top-p** | 1.0 | No nucleus sampling | | **Max Tokens** | 4096 | Sufficient for complex tasks | | **k (Pass@k)** | 1 | Single sample per task | | **Timeout** | 2.0s | Per-task execution limit | | **Memory** | 256 MB | Per-task memory limit | | **Sandbox** | Containerized | Docker (or local fallback) | ### Required Metadata per Evaluation ```json { "model_name": "user/model", "model_version": "model-version", "provider": "provider", "temperature": 0.0, "top_p": 1.0, "max_tokens": 4096, "k": 1, "hardware": "example-cloud", "date": "2024-09-20T01:48:31Z", "evaluator_version": "0.2.0", "benchmark_version": "v0.2" } ``` ### API Error Handling **Critical:** Network/API errors are **not** counted as code failures. | Error Type | Recorded As | Counted as Failure | |------------|-------------|-------------------| | Code assertion failure | `FAIL` | βœ… Yes | | Runtime error | `FAIL` | βœ… Yes | | Timeout | `TIMEOUT` | βœ… Yes | | **API 429 (rate limit)** | `RATE_LIMITED` | ❌ No | | **API 402/400 (payment)** | `API_ERROR` | ❌ No | | **API 404/500** | `API_ERROR` | ❌ No | --- ## πŸ“Š Official Reports Every evaluation automatically generates: | Format | Description | |--------|-------------| | **`results/*.csv`** | Complete breakdown: overall, difficulty, category, task type, language, per-problem | | **`results/*.png`** | Professional charts (black bg, white primary): leaderboard, difficulty bars, category bars, task type donut | ### Sample Leaderboard Output ``` ROCKMAN BENCHMARK v0.2 Private Evaluation β€” 44 Tasks Model Pass@1 Solved ------------------------------------------------ Template 13.64% 6/44 Heuristic 0.00% 0/44 Random 0.00% 0/44 ``` --- ## πŸ—οΈ Architecture ``` rockman/ β”œβ”€β”€ benchmark/ # Core evaluation engine β”‚ β”œβ”€β”€ schema.py # Problem, Score, Result dataclasses β”‚ β”œβ”€β”€ evaluator.py # Unified evaluator (all task types) β”‚ β”œβ”€β”€ metrics.py # Pass@k, Wilson CI, statistical tests β”‚ β”œβ”€β”€ runners/ # Language runners (Py, C++, Java, JS, TS, Rust, Go) β”‚ β”œβ”€β”€ sandbox.py # Docker sandbox + local fallback β”‚ β”œβ”€β”€ encryption.py # AES-256-GCM hidden test encryption β”‚ β”œβ”€β”€ versioning.py # Immutable version registry β”‚ └── determinism.py # Reproducibility tracking β”œβ”€β”€ dataset/ # Dataset generation & management β”‚ β”œβ”€β”€ generator.py # Template-based task generation β”‚ β”œβ”€β”€ categories.py # 12 categories, 50+ subcategories β”‚ β”œβ”€β”€ validators.py # 13 validation checks (incl. negative testing) β”‚ └── splits.py # Public/Private/Hidden splits + canaries β”œβ”€β”€ tasks/ # Specialized task types β”‚ β”œβ”€β”€ debugging.py # Bug injection (8 bug types) β”‚ β”œβ”€β”€ complexity.py # Performance test generation β”‚ β”œβ”€β”€ stateful.py # LRU, banking, event processor, etc. β”‚ └── multi_step.py # Parseβ†’Buildβ†’Solve pipelines β”œβ”€β”€ baselines/ # Reference baselines β”‚ β”œβ”€β”€ calibration.py # Difficulty calibration β”‚ β”œβ”€β”€ human_baseline.py # Human evaluation framework β”‚ └── reference_models.py # Random, Heuristic, Template β”œβ”€β”€ reports/ # Report generation β”‚ └── generate.py # Markdown/HTML/JSON reports β”œβ”€β”€ visualization/ # CSV + PNG report generation β”‚ └── results_reporter.py # Black-theme professional charts β”œβ”€β”€ cli/ # CLI commands (generate, eval, leaderboard, publish) β”œβ”€β”€ docs/ # Methodology, scoring, security, contamination β”‚ β”œβ”€β”€ methodology.md β”‚ β”œβ”€β”€ scoring.md β”‚ β”œβ”€β”€ security.md β”‚ └── contamination.md β”œβ”€β”€ phase1_evaluate_baselines.py β”œβ”€β”€ phase2_evaluate_openrouter.py β”œβ”€β”€ freeze_v0.2.py β”œβ”€β”€ rockman_benchmark.py # Backward-compatible facade β”œβ”€β”€ rockman_cli.py └── rockman_v0.2_manifest.json ``` --- ## πŸ”§ CLI Commands ```bash # Generate dataset rockman generate --count 500 --encrypt-hidden --output rockman_v0.2.jsonl # Evaluate model rockman evaluate --dataset rockman_v0.2_private.jsonl --completions-file model_outputs.json --k 1 # Generate leaderboard rockman leaderboard --results-file eval_results.json # Publish dataset rockman publish --dataset rockman_v0.2.jsonl --public-output public.jsonl --private-output private.jsonl # Validate dataset rockman validate --dataset rockman_v0.2.jsonl --solutions-file refs.json ``` --- ## πŸ“¦ Dataset Access | Platform | Link | Access | |----------|------|--------| | **Hugging Face** | [Inserloft/Rockman](https://huggingface.co/datasets/Inserloft/Rockman) | `datasets.load_dataset("Inserloft/Rockman")` | | **GitHub** | [InserLoft/Rockman](https://github.com/InserLoft/Rockman) | `git clone` + releases | ```python from datasets import load_dataset ds = load_dataset("Inserloft/Rockman", split="private") # Note: Private split requires authentication + master secret for hidden tests ``` --- ## πŸ“œ License MIT License β€” see [LICENSE](LICENSE) for details. Dataset splits: - **Public**: CC-BY-4.0 - **Private/Hidden**: Restricted (evaluation only) --- ## 🏷️ Citation ```bibtex @misc{rockman2024, title={Rockman: A Comprehensive Benchmark for Code Generation and Software Engineering}, author={Inserloft}, year={2026}, version={v0.2}, url={https://github.com/InserLoft/Rockman} } ``` --- ## 🀝 Contributing 1. Fork the repository 2. Create a feature branch 3. Add tasks via `rockman generate` or PR new task templates 4. Ensure all 13 validation checks pass 5. Submit PR with validation report --- ## πŸ“ž Contact | Platform | Link | |----------|------| | **Website** | [Inserloft.com](https://Inserloft.com) | | **Benchmarks** | [Inserloft.com/benchmarks/RockMan](https://Inserloft.com/benchmarks/RockMan) | | **GitHub** | [InserLoft/Rockman](https://github.com/InserLoft/Rockman) | | **Hugging Face** | [Inserloft/Rockman](https://huggingface.co/datasets/Inserloft/Rockman) | --- **[Inserloft](https://Inserloft.com)** β€” Advancing the science of code intelligence evaluation.