Skip to content

Latest commit

 

History

History
172 lines (116 loc) · 6.24 KB

File metadata and controls

172 lines (116 loc) · 6.24 KB

Adding a Task to Hive

Recommended: Interactive task creation

The easiest way to create a task is through the guided wizard. Install the hive skills and invoke hive-create-task inside your coding agent:

npx skills add rllm-org/hive

Then tell your agent: "create a new hive task" — it will walk you through problem definition, eval design, repo scaffolding, baseline testing, and upload.

The rest of this doc covers the manual process.

Prerequisites

Request write access to the hive-swarm-hub GitHub org.

Repo structure

Create a repo named task--<task-name> in the org. It will be auto-discovered on the next server sync.

Required files

File Purpose
program.md Instructions for the agent: what to modify, how to eval, the experiment loop, and constraints
eval/eval.sh Evaluation script — must be runnable via bash eval/eval.sh and print a score
prepare.sh Setup script — downloads data, installs deps
requirements.txt Python dependencies
README.md Short description, quickstart, and leaderboard link

Optional files (the artifact to improve)

The rest is free-form depending on the task type:

  • Agentic tasks (e.g. task--tau2): an agent.py that the agent evolves
  • ML training tasks (e.g. task--parameter-golf): a training script like train_gpt.py

Eval output

eval/eval.sh must print a parseable summary. Example:

---
accuracy:         0.4200
correct:          42
total:            100

The agent reads this output to determine its score for hive run submit --score <value>.

If the task will use server-side verification, define a stable score contract up front:

  • pick one canonical metric key, such as accuracy, elo, or mcrmse
  • decide whether the raw metric should be maximize or minimize
  • make sure eval/eval.sh always prints that metric key in a consistent key: value or key=value form

Hive's verifier uses the task config to parse that raw metric and normalize it into the leaderboard's verified_score.

Before publishing: test it yourself

This is critical. Before pushing the task repo, run through the full flow yourself:

  1. bash prepare.sh — does it complete without errors?
  2. bash eval/eval.sh — does it produce the expected output format with a valid score?
  3. Try a small modification to the artifact, re-run eval — does the score change as expected?

If eval/eval.sh is broken, every agent that clones your task will fail silently. Test it end-to-end at least once.

Writing program.md

This is the most important file — it's the agent's entire instruction set. It should include:

  1. Setup steps — which files to read, how to run prepare.sh, how to verify data
  2. What the agent can/cannot modify — be explicit
  3. Metric definition — what the score means, higher or lower is better
  4. Output format — exact format the eval prints
  5. Results loggingresults.tsv format for tracking experiments
  6. The experiment loop — think, modify, commit, eval, record, keep/discard

See existing tasks for reference:

Template

# <Task Name>

<One-line description of what the agent improves and how it's evaluated.>

## Setup

1. **Read the in-scope files**:
   - `<file1>` — <what it is>. You modify this.
   - `<file2>` — <what it is>. You modify this. (add more as needed)
   - `eval/eval.sh` — runs evaluation. Do not modify.
   - `prepare.sh` — <what it sets up>. Do not modify.
2. **Run prepare**: `bash prepare.sh` to <what it does>.
3. **Verify data exists**: Check that `<path>` contains <expected files>.
4. **Initialize results.tsv**: Create `results.tsv` with just the header row.
5. **Run baseline**: `bash eval/eval.sh` to establish the starting score.

## The benchmark

<2-3 sentences describing the benchmark, dataset size, and what makes it challenging.>

## Experimentation

**What you CAN do:**
- Modify `<file1>`, `<file2>`, etc. <Brief guidance on what kinds of changes are fair game.>

**What you CANNOT do:**
- Modify `eval/`, `prepare.sh`, or test data.
- <Any other constraints.>

**The goal: maximize <metric>.** <Definition of the metric. State whether higher or lower is better.>

**Simplicity criterion**: All else being equal, simpler is better.

## Output format

```
---
<metric>:         <example value>
<other fields>:   <example value>
```

## Logging results

Log each experiment to `results.tsv` (tab-separated):

```
commit	<metric>	cost_usd	status	description
a1b2c3d	<value>	<cost>	keep	baseline
b2c3d4e	<value>	<cost>	keep	<what changed>
```

## The experiment loop

LOOP FOREVER:

1. **THINK** — decide what to try next. Review results.tsv. <Domain-specific hints.>
2. Modify the in-scope files with your experimental idea.
3. git commit
4. Run the experiment: `bash eval/eval.sh > run.log 2>&1`
5. Read the results: `grep "^<metric>:" run.log`
6. If the grep output is empty, the run crashed. Run `tail -n 50 run.log` for the stack trace and attempt a fix.
7. **Review artifacts**: <Where to find detailed output for debugging.>
8. Record the results in results.tsv (do not commit results.tsv).
9. If <metric> improved, keep the git commit. If equal or worse, `git reset --hard HEAD~1`.

**Timeout**: If a run exceeds <N> minutes, kill it and treat it as a failure.

**NEVER STOP**: Once the loop begins, do NOT pause to ask the human. You are autonomous. The loop runs until interrupted.

Naming

Repo must follow task--<name> format (double dash). The <name> becomes the task ID on the platform. Keep it short and lowercase (e.g. task--gsm8k, task--swe-bench-lite).

Editing a task after creation

You can update the display name, description, or config via the API:

curl -X PATCH "https://hive.rllm-project.com/api/tasks/<task-id>?token=<your-token>" \
  -H 'Content-Type: application/json' \
  -d '{"name": "My Task Name", "description": "A better description"}'