File size: 4,830 Bytes
3617bce | 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 | ---
license: mit
task_categories:
- text-generation
language:
- en
tags:
- agents
- agentic-benchmark
- evaluation
- pinchbench
size_categories:
- n<1K
configs:
- config_name: default
data_files:
- split: train
path: data/train-*.parquet
---
# PinchBench (nearai-bench packaging)
A **flat, self-contained repackaging** of the upstream
[PinchBench](https://pinchbench.com) skill suite (147 tasks,
BENCHMARK_VERSION 2.0.0) for agent-harness consumption. Task content is
**unmodified** — ids, filenames, prompts, rubrics and graders are byte-identical
to upstream, so scores stay comparable to the
[pinchbench.com](https://pinchbench.com) leaderboard.
## Why this exists
Upstream ships tasks as a directory of markdown files plus a separate asset pool
that has to be fetched with a shell script (and Git LFS). That is awkward for an
eval/RL harness that wants to stream tasks across workers. Here, each task is
**one row**: the verbatim markdown in `task_md`, and every asset the task
references as a deterministic `tar.gz` in `assets_tar`. No clone, no LFS, no
fetch script.
```python
from datasets import load_dataset
ds = load_dataset("NEAR-AI/pinchbench", split="train")
```
## Columns
| Column | Type | Notes |
|---|---|---|
| `task_id` | string | Upstream task id, matches the upstream filename stem |
| `name` | string | Human-readable title |
| `category` | string | One of the 11 upstream categories |
| `grading_type` | string | `automated` \| `llm_judge` \| `hybrid` |
| `timeout_seconds` | int64 | Upstream per-task budget |
| `prompt` | string | `## Prompt` section |
| `expected_behavior` | string | `## Expected Behavior` section |
| `automated_checks` | string | `## Automated Checks` — Python `grade(transcript, workspace_path)` |
| `llm_judge_rubric` | string | `## LLM Judge Rubric`, empty when the task has none |
| `grading_criteria` | string | `## Grading Criteria`; upstream judge falls back to this when the rubric is empty |
| `grading_weights` | string (JSON) | `{"automated": w, "llm_judge": w}`; `{}` ⇒ upstream 0.5/0.5 default |
| `multi_session` | bool | Multi-turn dialogue task |
| `sessions` | string (JSON) | Session definitions for multi-session tasks |
| `prerequisites` | string (JSON) | External tooling the task needs, e.g. `["cli:gh"]` |
| `workspace_files` | string (JSON) | Upstream `workspace_files` verbatim — inline `content` entries and `source`/`dest` asset refs |
| `asset_paths` | string (JSON) | Asset paths bundled in `assets_tar` |
| `assets_tar` | string | base64(tar.gz) of this task's assets; `""` when the task has none |
| `task_md` | string | **The verbatim upstream markdown file**, frontmatter included |
## Reconstructing an on-disk task
`task_md` + `assets_tar` reproduce the upstream layout byte-for-byte, which is
what keeps grading identical:
```python
import base64, io, json, tarfile, pathlib
def materialize(row, out_dir):
out = pathlib.Path(out_dir); out.mkdir(parents=True, exist_ok=True)
(out / f"{row['task_id']}.md").write_text(row["task_md"])
if row["assets_tar"]:
blob = base64.b64decode(row["assets_tar"])
with tarfile.open(fileobj=io.BytesIO(blob), mode="r:gz") as tar:
tar.extractall(out / "assets")
return out
```
Then seed a task workspace from `workspace_files`: entries with `path` +
`content` are written inline; entries with `source` + `dest` are copied from the
extracted `assets/` tree.
## Grading
Upstream's three modes, unchanged:
- **automated** — run the Python `grade()` in `automated_checks` over the agent
transcript and workspace; task score is the arithmetic mean of the returned
criterion scores.
- **llm_judge** — score against `llm_judge_rubric` (or `grading_criteria` when
the rubric is absent); the judge's `total` is the task score.
- **hybrid** — weighted combination using `grading_weights`, defaulting to
0.5/0.5.
A reference implementation of all three (a faithful port of upstream
`lib_grading.py`) lives in
[`nearai/benchmarks`](https://github.com/nearai/benchmarks) at
`src/adapters/pinchbench.rs`.
## Caveats
- 4 tasks (`gws_*`, `gh_issue_triage`) declare `prerequisites` — npm
`@juppytt/fws`, the `gh`/`gws` CLIs — that no loader installs for you. They
score near zero without that tooling (and without a mock backend for the
live services they drive).
- Assets are scoped to what the 147 upstream tasks actually reference.
## Provenance & license
- **Upstream**: <https://github.com/pinchbench/skill> — MIT, by
[Kilo Code](https://kilo.ai) (@olearycrew, @arpitg1991, @DJRHails,
@evanjacobson, @iJaack).
- **This repackaging**: MIT, same terms. Task content unmodified; only the
container format changed.
- **Packaged by**: [NEAR AI](https://near.ai) for
[nearai-bench](https://github.com/nearai/benchmarks).
|