---
name: benchmark-onboarder-0474fc70aff4
description: Onboard AI creativity benchmarks into HELM-compliant Scenario implementations. Use when asked to onboard a benchmark, create a HELM scenario, process a paper into evaluation code, convert a dataset to HELM format, or when the user mentions "creativity benchmark", "task.py", or "scenario.py".
allowed-tools: Read, Write, WebFetch, Grep, Glob, Bash, Task
user-invocable: true
---

# HELM Benchmark Onboarder

Transform creativity benchmark datasets into HELM Scenario implementations.

## Core Principles

1. **Dataset-first** - The dataset defines what's possible; the paper provides context
2. **Skip model outputs** - We want original prompts/stimuli, not what GPT-4 generated
3. **Verify everything** - Every field must map to real data

## Resources

- For HELM code patterns, see [helm-template.md](helm-template.md)
- For working examples, see [examples/](examples/)
  - [brainteaser.py](examples/brainteaser.py) - Multiple choice with distractor answers
  - [analobench.py](examples/analobench.py) - Analogical reasoning MC task
  - [riddlesense.py](examples/riddlesense.py) - Riddle QA with CommonsenseQA format
- For benchmark queue, see [benchmarks.json](benchmarks.json)
- For team-accumulated learnings, see [LEARNINGS.md](LEARNINGS.md)

## Tool Usage

- **WebFetch**: Read dataset documentation, READMEs, and papers
- **Read**: Examine dataset files, existing scenarios, and example code
- **Bash**: Load dataset samples to inspect field structure
- **Glob**: Find relevant files in benchmark repos
- **Task (Explore)**: For complex benchmarks, explore dataset structure first
- **Write**: Generate the final scenario.py

## When to Use

User says things like:
- "Onboard the BRAINTEASER benchmark"
- "Create a HELM scenario for this paper"
- "Process this benchmark into evaluation code"

## Workflow

### Step 1: Qualify the Benchmark

Before doing any work, check if this benchmark is suitable:

**Ask yourself:**
- Is this a creativity benchmark?
- Is there a publicly available dataset?
- Is there an evaluation method? (accuracy, human ratings, metrics)

If the answer to any is NO, tell the user why this benchmark doesn't qualify and stop.

**Focus on primary creativity tasks.** Some papers include multiple tasks or secondary experiments (e.g., MMLU baselines, general QA comparisons). Identify and implement only the core creativity evaluation tasks described in the paper.

### Handling Multi-Task Benchmarks

Some papers contain multiple tasks, not all creativity-related. When onboarding:

1. **Identify the primary creativity task(s)** - Read the paper abstract/introduction to understand the main contribution
2. **Skip secondary experimental tasks** - Papers often include baseline comparisons (e.g., MMLU, general QA) that aren't creativity benchmarks
3. **When unclear, ask the user** - If you can't determine which tasks are the main creativity evaluations, ask before proceeding

### Step 2: Examine the Dataset

Load a few examples and understand the structure:

```python
from datasets import load_dataset
ds = load_dataset("org/dataset-name", split="test")
print(ds[0])  # See field names and structure
```

**Identify fields:**
- **Stimulus/Question**: The input text (question, prompt, story, etc.)
- **Choices**: For MC tasks, the answer options
- **Answer/Label**: The correct answer or ground truth
- **Metadata**: Split info, IDs, categories

**Use judgment on fields:** Avoid fields that contain model-generated outputs (e.g., fields named "gpt_response" or containing experiment results). Long text fields may be legitimate inputs for evaluation tasks (e.g., stories to analyze, passages to read). When uncertain, check the paper to understand what each field represents.

### Step 3: Extract Task Instructions and Evaluation Setup

Read source materials **once** to extract both what goes into the Scenario and what's needed for evaluation configuration. This avoids redundant passes through papers.

#### 3a. Task Instructions (→ Scenario)

**Where to look (in order):**
1. Dataset README on HuggingFace/GitHub
2. Paper Methods section
3. Paper Appendix (often has exact prompts)
4. Codebase evaluation scripts (if available)

**What to capture:**
- Exact prompt wording given to models (if specified)
- Input formatting requirements
- Any few-shot examples used

**Priority:**
1. Explicit instructions from paper/README → use exactly as written, cite location
2. Standard format for task type → note "Standard MC format" in header
3. Unclear → ask user before proceeding

**Critical:** Never invent or paraphrase prompts. If the paper doesn't specify exact wording, use standard formatting and note this in the header.

#### 3b. Evaluation Setup (→ Companion files)

While reading source materials, identify the evaluation approach. In HELM, Scenarios just load data—metrics are configured separately in RunSpecs.

| Eval Type | HELM RunSpec Pattern | Additional Output |
|-----------|---------------------|-------------------|
| `exact_match` | `get_exact_match_metric_specs()` | None needed |
| `open_ended` | `get_open_ended_generation_metric_specs()` | None (includes BLEU-1, BLEU-4, ROUGE-L, F1) |
| `summarization` | `get_summarization_metric_specs()` | None needed |
| `llm_judge` | Custom with Annotator | `annotator_notes.md` |
| `custom` | Needs new metric implementation | `metric_notes.md` |

**For standard metrics (exact_match, open_ended, summarization):**

Just note the eval_type in benchmarks.json. The Scenario stays pure.

**For LLM-as-judge benchmarks, extract and output to `scenarios/benchmark_name/annotator_notes.md`:**

```markdown
# Annotator Requirements: BenchmarkName

Source: Paper Appendix B, Section 4.2

## Configuration for LLMAsJuryAnnotator

Judge model: GPT-4-turbo
Dimensions: novelty, feasibility, significance
Scale: 1-5 Likert per dimension

## Judge Prompt Template

Rate the following response on {dimension} from 1 to 5.

Question: {QUESTION}
Response: {RESPONSE}

Provide your rating as a single number.

## Notes
- Human correlation: 0.82 (Paper Table 3)
- Authors noted position bias in judge
```

**For custom metrics, output to `scenarios/benchmark_name/metric_notes.md`:**

Document what the paper measured and how, for future metric implementation.

**Update benchmarks.json:**
```json
{
  "name": "BenchmarkName",
  "eval_type": "open_ended|exact_match|llm_judge|custom",
  "notes": "any special considerations"
}
```

### Step 4: Generate the HELM Scenario

Follow HELM's standard Scenario structure:

```python
"""
HELM Scenario: BENCHMARK_NAME

Paper: [citation or URL]
Code: [GitHub repo if available]

Prompt format:
  Question: {question}
  A) {choice_a}  B) {choice_b}  C) {choice_c}  D) {choice_d}
  Answer:

Fields used: question, choices, answer
Fields skipped: gpt4_response (model output)
"""

from datasets import load_dataset
from helm.benchmark.scenarios.scenario import (
    Scenario, Instance, Input, Output, Reference,
    CORRECT_TAG, TEST_SPLIT
)

class BenchmarkScenario(Scenario):
    name = "benchmark_name"  # lowercase, underscores
    description = "org/dataset-name"  # data source, NOT task description
    tags = ["creativity", "relevant_tag"]

    def get_instances(self, output_path):
        dataset = load_dataset("org/dataset-name", split="test")

        instances = []
        for item in dataset:
            # Build prompt from dataset fields
            prompt = f"Question: {item['question']}\n"

            # Build references (all choices for MC, correct answer tagged)
            references = [...]

            instances.append(Instance(
                input=Input(text=prompt),
                references=references,
                split=TEST_SPLIT
            ))
        return instances
```

**Note:** Evaluation configuration (metrics, annotators) is NOT part of the Scenario. Document those separately per Step 3b.

**HELM conventions:**
- For multiple choice: ALL choices become References, only correct one gets CORRECT_TAG
- For binary (yes/no): Both options are References
- For open-ended: Reference can be empty or contain gold response
- `description` field = data source, not task description

### Step 5: Verify Before Finishing

Check these before delivering:

- [ ] Dataset loads without errors
- [ ] All template variables map to real data fields
- [ ] No model output fields used as inputs
- [ ] References have non-empty text (for MC/closed tasks)
- [ ] Correct split used (test if labels available, validation otherwise)
- [ ] Test with a few examples to confirm formatting

## Output

Create `scenario.py` with:
- Header comment noting prompt source, fields used/skipped, paper reference
- Clean, minimal code following HELM patterns

### Auto-Capture Notes to LEARNINGS.md

When you encounter issues or discover patterns, append directly to LEARNINGS.md (in this skill folder):

1. Read the current LEARNINGS.md file
2. Add your note to the appropriate section (Dataset Quirks table, Common Patterns, etc.)
3. Write the updated file

**Always capture notes for:**
- Split issues (test has no labels, etc.)
- Field name mismatches (docs say X, actual field is Y)
- Special loading requirements (trust_remote_code, config names)
- Skipped tasks (secondary experiments, non-creativity baselines, etc.)

This ensures team knowledge is captured immediately without manual intervention.

## Common Issues

| Problem | Solution |
|---------|----------|
| Test split has no labels | Use validation split instead (see riddlesense.py) |
| Dataset requires special loading | Add `trust_remote_code=True` to load_dataset() |
| Field names don't match docs | Print `ds[0]` to see actual field names |
| Empty references | Wrong answer field - check the schema |
| Very long prompts | Might be using wrong field (model outputs) |
| Multimodal benchmark | Include if there's a text evaluation component; note modality in tags |
| No explicit prompt in paper | Use standard formatting, note in header |

## Complex Benchmarks

For benchmarks with multiple subsets or complex evaluation:

1. Use **Task tool with Explore agent** to understand the dataset structure first
2. Break into sub-tasks if multiple scenario files are needed
3. Use `/compact` between benchmarks if onboarding multiple in one session

## Benchmarks with LLM-as-Judge Evaluation

In HELM's architecture:
- **Scenarios** load data and format prompts
- **Annotators** handle LLM-based judging (e.g., `LLMAsJuryAnnotator`)
- **Metrics** compute final scores from annotations

These are separate components. Your Scenario stays pure—evaluation config goes elsewhere.

**When you encounter an LLM-as-judge benchmark:**

1. **Create the Scenario as normal** — data loading, prompt formatting
2. **References may be empty** for open-ended generation tasks—that's fine
3. **Extract annotator requirements per Step 3b** → output to `annotator_notes.md`
4. **Flag in benchmarks.json** with `"eval_type": "llm_judge"`

The `annotator_notes.md` file documents what's needed to implement the `LLMAsJuryAnnotator` configuration (judge model, prompt template, dimensions, scale). This is a separate implementation task from Scenario creation.

## Examples

### Example A: Paper specifies instructions (ANALOBENCH)

1. **Qualify**: Creativity benchmark (analogical reasoning)? Yes. Dataset? Yes. Eval? Yes (accuracy).

2. **Examine dataset**:
   ```python
   ds = load_dataset("jhu-clsp/AnaloBench", "T1S1-Subset", split="train")
   print(ds[0].keys())  # ['Index', 'Sentence', 'Options', 'Label']
   ```

3. **Check instructions**: Paper Section 3 specifies "Which of the following is the most analogous story?" → use exactly

4. **Generate scenario**: Paper instruction + dataset fields, MC pattern

5. **Verify**: 340 examples, Labels are A/B/C/D

### Example B: Standard format (RiddleSense)

1. **Qualify**: Creativity benchmark (riddles + commonsense)? Yes. Dataset? Yes. Eval? Yes.

2. **Examine dataset**: Fields are `question`, `choices`, `answerKey`

3. **Check instructions**: No specific wording in paper → use standard MC format, note in header

4. **Generate scenario**: Standard "Question: X\n\nA. ..." format

5. **Verify**: Test split has no labels → switch to validation split


---
Source attribution: David-Li0406
Original project: https://github.com/David-Li0406/meta-skill-evloving/blob/ca3a335628981df10c36e00cb9850df2c247ab9a/skill-flow/data/skills-refined-36k/skillsmp/benchmark-onboarder/SKILL.md
License: Apache-2.0
License information: https://www.apache.org/licenses/LICENSE-2.0
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.



# Mega AI Hub resource metadata

Creator / publisher: David-Li0406
Original project: https://github.com/David-Li0406/meta-skill-evloving/blob/ca3a335628981df10c36e00cb9850df2c247ab9a/skill-flow/data/skills-refined-36k/skillsmp/benchmark-onboarder/SKILL.md
Attribution basis: Source repository record

Fields of work: Data & Analytics, Development & Engineering, Product Management
Roles: Data Scientist, ML / AI Engineer, Product Manager
Specialties: API
Tools: Helm
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 2dc96ffdf2f4366bd8e875dc608e322dc146dc8bc3af9f50b35d70ca1a88f40f
