File size: 10,500 Bytes
5a67d67 05fb4fc 5a67d67 b9c2fa3 ac769c2 b9c2fa3 ac769c2 b9c2fa3 5a67d67 b9c2fa3 5a67d67 b9c2fa3 5a67d67 b9c2fa3 5a67d67 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | ---
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.**
[](https://github.com/InserLoft/Rockman)
[](LICENSE)
[](https://huggingface.co/datasets/Inserloft/Rockman)
[](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_<hash>` 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. |