|
1 | | -# Benchmark Fetcher Skill - Implementation Complete |
| 1 | +# Benchmark evidence importer |
2 | 2 |
|
3 | | -## Status: ✅ READY FOR USE |
| 3 | +The importer applies reviewed evidence; it does not browse or scrape leaderboards. |
4 | 4 |
|
5 | | -The benchmark-fetcher skill has been successfully implemented and is ready to fetch benchmark data from 6 leaderboard websites. |
| 5 | +## Input format |
6 | 6 |
|
7 | | -## What's Been Implemented |
8 | | - |
9 | | -### 1. Core Infrastructure ✅ |
10 | | -- ✅ Skill structure with SKILL.md documentation |
11 | | -- ✅ Configuration system (config.mjs) |
12 | | -- ✅ Model name mapping with 3-tier fuzzy matching |
13 | | -- ✅ Atomic manifest updates with validation |
14 | | -- ✅ Comprehensive reporting system |
15 | | - |
16 | | -### 2. Benchmark Extractors ✅ |
17 | | -- ✅ **SWE-bench** - Fully implemented with regex parsing |
18 | | -- ✅ **TerminalBench** - Decimal format conversion (0-1 scale) |
19 | | -- ✅ **MMMU** - Dual benchmark extraction (MMMU + MMMU Pro) |
20 | | -- ✅ **SciCode** - Generic extraction pattern |
21 | | -- ✅ **LiveCodeBench** - Generic extraction pattern |
22 | | -- ✅ **WebDevArena** - Generic extraction pattern |
23 | | - |
24 | | -### 3. Model Name Mappings ✅ |
25 | | -Pre-configured mappings for: |
26 | | -- Claude models (Opus 4.5, Opus 4.1, Sonnet 4.5, Haiku 4.5) |
27 | | -- GPT models (GPT-5, GPT-5.1, GPT-5-Codex, GPT-4o, GPT-4.1) |
28 | | -- Gemini models (Gemini 3 Pro, Gemini 2.5 Pro, Gemini 2.5 Flash) |
29 | | -- DeepSeek models (DeepSeek R1, DeepSeek V3) |
30 | | -- Other models (GLM 4.6, Grok 4, Grok Code Fast 1) |
31 | | - |
32 | | -## Quick Start |
33 | | - |
34 | | -### Test with Dry Run |
35 | | -```bash |
36 | | -node .claude/skills/benchmark-fetcher/scripts/fetch-benchmarks.mjs --dry-run |
37 | | -``` |
38 | | - |
39 | | -### Fetch All Benchmarks |
40 | | -```bash |
41 | | -node .claude/skills/benchmark-fetcher/scripts/fetch-benchmarks.mjs |
42 | | -``` |
43 | | - |
44 | | -### Fetch Specific Benchmarks |
45 | | -```bash |
46 | | -# Just SWE-bench and TerminalBench |
47 | | -node .claude/skills/benchmark-fetcher/scripts/fetch-benchmarks.mjs --benchmarks swebench,terminalBench |
48 | | -``` |
49 | | - |
50 | | -### Update Specific Models Only |
51 | | -```bash |
52 | | -# Just update Claude Sonnet 4.5 and GPT-4o |
53 | | -node .claude/skills/benchmark-fetcher/scripts/fetch-benchmarks.mjs --models claude-sonnet-4-5,gpt-4o |
| 7 | +```json |
| 8 | +{ |
| 9 | + "records": [ |
| 10 | + { |
| 11 | + "modelId": "exact-existing-manifest-id", |
| 12 | + "modelLabel": "Exact label shown by the leaderboard", |
| 13 | + "benchmark": "sweBench", |
| 14 | + "benchmarkVersion": "SWE-bench Verified, leaderboard/harness version", |
| 15 | + "evaluation": "Agent scaffold, reasoning setting, pass@k, tool policy, or other conditions", |
| 16 | + "score": 74.4, |
| 17 | + "sourceUrl": "https://authoritative.example/leaderboard", |
| 18 | + "sourceTitle": "Official leaderboard title", |
| 19 | + "observedAt": "2026-07-21", |
| 20 | + "verifiedBy": "github-handle-or-agent-id" |
| 21 | + } |
| 22 | + ] |
| 23 | +} |
54 | 24 | ``` |
55 | 25 |
|
56 | | -## File Structure |
57 | | - |
58 | | -``` |
59 | | -.claude/skills/benchmark-fetcher/ |
60 | | -├── SKILL.md # Complete documentation |
61 | | -├── README.md # This file |
62 | | -├── references/ |
63 | | -│ └── model-name-mappings.json # Model name mappings (58 mappings) |
64 | | -└── scripts/ |
65 | | - ├── fetch-benchmarks.mjs # Main entry point |
66 | | - └── lib/ |
67 | | - ├── config.mjs # Configuration |
68 | | - ├── model-name-mapper.mjs # 3-tier fuzzy matching |
69 | | - ├── benchmark-extractors.mjs # 6 website extractors |
70 | | - ├── manifest-updater.mjs # Atomic updates |
71 | | - └── report-generator.mjs # Formatted reporting |
72 | | -``` |
73 | | - |
74 | | -## Key Features |
75 | | - |
76 | | -### Intelligent Model Name Mapping |
77 | | -The skill uses a 3-tier fallback strategy to map website model names to manifest IDs: |
78 | | -1. **Exact match** (case-sensitive) |
79 | | -2. **Case-insensitive match** |
80 | | -3. **Fuzzy match** (normalized - removes spaces, hyphens, special chars) |
81 | | - |
82 | | -### Special Handling |
83 | | - |
84 | | -**TerminalBench Decimal Format:** |
85 | | -- Website displays: "63.1%" |
86 | | -- Stored as: `0.631` (decimal 0-1 scale) |
87 | | -- ✅ Automatic conversion implemented |
88 | | - |
89 | | -**MMMU Dual Benchmarks:** |
90 | | -- Single website visit extracts both MMMU and MMMU Pro scores |
91 | | -- Updates two separate manifest fields |
92 | | -- ✅ Fully implemented |
93 | | - |
94 | | -### Error Resilience |
95 | | -- 3-attempt retry with exponential backoff |
96 | | -- Graceful degradation (continues on errors) |
97 | | -- Debug screenshots saved to `/tmp/benchmark-fetcher-debug/` |
98 | | -- Comprehensive error reporting |
99 | | - |
100 | | -### Atomic Updates |
101 | | -- Validates JSON structure |
102 | | -- Writes to temporary file |
103 | | -- Atomic rename (no partial updates) |
104 | | -- All-or-nothing per manifest |
105 | | - |
106 | | -## What Happens When You Run It |
| 26 | +Supported benchmark keys are the exact manifest fields: `sweBench`, `terminalBench`, `mmmu`, `mmmuPro`, `webDevArena`, `sciCode`, and `liveCodeBench`. |
107 | 27 |
|
108 | | -1. **Loads Configuration** |
109 | | - - Reads model-name-mappings.json |
110 | | - - Loads all model manifests from manifests/models/ |
| 28 | +Every descriptive field is required so the generated source title retains the evaluation context that the scalar benchmark schema cannot otherwise represent. |
111 | 29 |
|
112 | | -2. **Visits Each Website** |
113 | | - - Navigates using Chrome DevTools MCP |
114 | | - - Waits for content to load |
115 | | - - Takes accessibility tree snapshot |
116 | | - - Parses leaderboard data |
| 30 | +## Commands |
117 | 31 |
|
118 | | -3. **Maps Model Names** |
119 | | - - Attempts 3-tier matching |
120 | | - - Logs unmapped models for manual addition |
121 | | - |
122 | | -4. **Updates Manifests** |
123 | | - - Always overwrites existing benchmark values |
124 | | - - Preserves all other manifest fields |
125 | | - - Uses atomic file writes |
126 | | - |
127 | | -5. **Generates Report** |
128 | | - - Shows successful/failed benchmarks |
129 | | - - Lists all manifest updates |
130 | | - - Reports unmapped models |
131 | | - - Provides next steps |
132 | | - |
133 | | -## Expected Output Example |
134 | | - |
135 | | -``` |
136 | | -📊 Benchmark Fetch Report |
137 | | -================================ |
138 | | -
|
139 | | -✅ Successfully Fetched (6/6 benchmarks) |
140 | | - ✓ SWE-bench (swebench.com) - 15 models |
141 | | - ✓ TerminalBench (tbench.ai) - 20 models |
142 | | - ✓ MMMU + MMMU Pro (mmmu-benchmark.github.io) - 8 models |
143 | | - ✓ SciCode (scicode-bench.github.io) - 5 models |
144 | | - ✓ LiveCodeBench (livecodebench.github.io) - 12 models |
145 | | - ✓ WebDevArena (web.lmarena.ai) - 3 models |
146 | | -
|
147 | | -📝 Manifest Updates |
148 | | -
|
149 | | -✅ Updated: 12 manifests |
150 | | - • claude-sonnet-4-5: 4 benchmarks updated |
151 | | - - sweBench: null → 70.6 |
152 | | - - terminalBench: null → 0.428 |
153 | | - - sciCode: null → 4.6 |
154 | | - - liveCodeBench: 47.1 → 52.3 |
| 32 | +```bash |
| 33 | +# Preview; never writes |
| 34 | +node .agents/skills/benchmark-fetcher/scripts/fetch-benchmarks.mjs /path/to/evidence.json |
155 | 35 |
|
156 | | -⚠️ Unmapped Models |
157 | | - Add these to model-name-mappings.json |
| 36 | +# Apply additions or null-to-score changes |
| 37 | +node .agents/skills/benchmark-fetcher/scripts/fetch-benchmarks.mjs /path/to/evidence.json --apply |
158 | 38 |
|
159 | | -📈 Statistics |
160 | | - Execution time: 45.2s |
| 39 | +# Explicitly allow replacement of an existing non-null score |
| 40 | +node .agents/skills/benchmark-fetcher/scripts/fetch-benchmarks.mjs /path/to/evidence.json --apply --replace |
161 | 41 | ``` |
162 | 42 |
|
163 | | -## Next Steps After Running |
164 | | - |
165 | | -1. **Review Updates** |
166 | | - - Check manifests/models/*.json for changes |
167 | | - - Verify benchmark values look correct |
168 | | - |
169 | | -2. **Add Unmapped Models** |
170 | | - - Update references/model-name-mappings.json |
171 | | - - Re-run to fetch their data |
172 | | - |
173 | | -3. **Validate** |
174 | | - ```bash |
175 | | - npm run test:validate |
176 | | - ``` |
177 | | - |
178 | | -4. **Commit Changes** |
179 | | - ```bash |
180 | | - git add manifests/models/ |
181 | | - git commit -m "Update benchmark data from leaderboards" |
182 | | - ``` |
183 | | - |
184 | | -## Troubleshooting |
185 | | - |
186 | | -### Extractor Fails for a Benchmark |
187 | | -- Check `/tmp/benchmark-fetcher-debug/` for screenshots |
188 | | -- Website structure may have changed |
189 | | -- Update extractor logic in benchmark-extractors.mjs |
190 | | - |
191 | | -### Model Not Updating |
192 | | -- Verify model exists in manifests/models/ |
193 | | -- Check if model name is in mappings |
194 | | -- Look for "unmapped" warnings in output |
195 | | - |
196 | | -### TerminalBench Shows Wrong Format |
197 | | -- Verify values are < 1.0 (decimal format) |
198 | | -- Check conversion logic in extractTerminalBench() |
199 | | - |
200 | | -## Implementation Notes |
201 | | - |
202 | | -### What Works Well |
203 | | -- SWE-bench and TerminalBench extractors are fully tested |
204 | | -- Model name fuzzy matching handles variations |
205 | | -- Atomic updates prevent corruption |
206 | | -- Comprehensive error handling |
207 | | - |
208 | | -### What May Need Refinement |
209 | | -- MMMU, SciCode, LiveCodeBench, WebDevArena extractors use generic patterns |
210 | | -- These may need adjustment based on actual page structures |
211 | | -- Model name mappings will grow as new models appear |
212 | | - |
213 | | -### How to Improve Extractors |
214 | | -1. Run with `--dry-run` to see what's extracted |
215 | | -2. Check debug screenshots if extraction fails |
216 | | -3. Examine page snapshots to understand structure |
217 | | -4. Update extractor logic to match patterns |
218 | | -5. Test and iterate |
219 | | - |
220 | | -## Success Criteria ✅ |
221 | | - |
222 | | -- [x] Visits all 6 benchmark websites |
223 | | -- [x] Extracts model performance data |
224 | | -- [x] Maps model names correctly using configuration |
225 | | -- [x] Updates model manifests with new values |
226 | | -- [x] TerminalBench uses decimal format (0-1) |
227 | | -- [x] MMMU updates both fields |
228 | | -- [x] Generates comprehensive reports |
229 | | -- [x] Handles errors gracefully with retry logic |
230 | | -- [x] All manifests pass JSON schema validation |
231 | | -- [x] Unmapped models are reported |
232 | | - |
233 | | -## Ready to Use! 🚀 |
234 | | - |
235 | | -The skill is fully functional and ready to fetch benchmark data. Start with a dry run to see what it will do, then run without `--dry-run` to update the manifests. |
| 43 | +The importer validates exact model IDs, score ranges, dates, HTTPS sources, duplicate records, and overwrite conflicts. It also adds field-scoped source provenance and updates verification metadata. Always inspect the Git diff afterward. |
0 commit comments