File size: 4,713 Bytes
de8aebd
 
 
 
 
 
1474160
 
 
 
 
 
 
 
 
de8aebd
 
 
 
 
1474160
 
 
 
 
 
 
 
 
 
de8aebd
 
1474160
 
 
 
 
de8aebd
1474160
 
 
 
de8aebd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
626027d
de8aebd
 
1474160
 
 
de8aebd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cc-by-sa-4.0
language:
  - en
task_categories:
  - text-generation
annotations_creators:
  - expert-generated
source_datasets:
  - original
multilinguality:
  - monolingual
pretty_name: jq-bench
size_categories:
  - n<1K
tags:
  - jq
  - json
  - benchmark
  - evaluation
  - execution-benchmark
  - code-generation
  - text-to-jq
  - natural-language-to-code
  - stackoverflow
configs:
  - config_name: human
    data_files:
      - split: test
        path: humana.jsonl
---

# jq-bench — execution-verified benchmark for natural language → jq

*Part of the **jq-coder** project — [all artifacts](https://huggingface.co/collections/DominuZ/jq-coder-natural-language-to-jq-offline-6a582d4af58d35f838b45d80) ·
[jq-coder-0.6B model](https://huggingface.co/DominuZ/jq-coder-0.6B) ·
[`jqc` CLI](https://github.com/EdelmarSchneider/jq-coder-cli)*

**A benchmark for natural-language-to-jq translation built from real questions asked by
real people — not from a synthetic grammar.** 30 hand-curated tasks derived from real
StackOverflow questions, with gold filters and gold outputs **verified by executing real
jq** — no LLM-as-judge anywhere: scoring is *run the filter, diff the canonical output*.

It is the canonical evaluation set of
[**jq-coder-0.6B**](https://huggingface.co/DominuZ/jq-coder-0.6B), but it is
model-agnostic: any system that turns a natural-language request (+ a JSON sample)
into a jq filter can be scored on it.

## Why a human slice

Synthetic benchmarks generated by the same grammar that generated the training data
measure in-distribution memorization, not competence. This slice is **independent of
any generation grammar by construction**: every item comes from a real question asked
by a real person, and questions that seeded the jq-coder training grammar (the
top-voted tier) are explicitly excluded. The items favor constructs and compositions
that synthetic grammars tend to miss: `del`, `with_entries`, compound `to_entries`,
`index`, `first`/`last`, descending `sort_by`, regex `test`, `if-has-else`, update
assignment `|=`, array subtraction, `join`, `keys`, recursive merge `*`, `+=` on
nested paths, `group_by` into a dynamic-key object, `map_values`, and hyphenated-key
projection (`.stuff["info-spec"]`).

## Format

One JSON object per line in `humana.jsonl`:

| Field | Meaning |
|---|---|
| `pedido_nl` | The natural-language request (the question author's intent, tool mentions removed) |
| `programa` | Gold jq filter (accepted answer, adapted to a pure filter — no `-r`/`-s`/shell flags) |
| `familia` | `humana/Q<question_id>` — unique per item |
| `idioma` | Request language (`en`) |
| `documentos` | ≥2 input JSON documents: the original from the question plus a variant with the same skeleton |
| `saidas` | Gold outputs, one per document, canonical `jq -cS` |
| `origem` | Provenance: StackOverflow `question_id`, `url`, `titulo`, `autor`, `votos`, `licenca` |

Every gold output was computed by running the gold filter with real jq (1.8) and is
re-validated automatically by the project's test suite — curation you can re-execute,
not curation you have to trust.

## Scoring

Run the candidate filter against **every** document of the item and diff the canonical
output (`jq -cS`) against gold. Two published metrics:

- **strict** — byte-identical to gold on all documents;
- **task-solved** — additionally accepts equivalent output shapes (stream vs. array
  wrapper and similar convention differences).

An item only counts if all its documents pass — a filter that hardcodes values from
the sample fails the variant document.

## Baseline

| Model | strict | task-solved |
|---|---|---|
| [jq-coder-0.6B](https://huggingface.co/DominuZ/jq-coder-0.6B) (v14, Q8_0) | 10/30 | 11/30 |
| [jq-coder-0.6B](https://huggingface.co/DominuZ/jq-coder-0.6B) (v13, Q8_0) | 9/30 | 10/30 |

Yes, the human slice is hard — that is the point: these are compositions real people
actually needed, not grammar samples. Reference scores for frontier models and for the
base model (zero-shot) are on the roadmap.

## License and attribution

StackOverflow content is **CC BY-SA 4.0**; this dataset is redistributed under the
same license. Each item carries per-item attribution in `origem`: the question URL,
the author's display name, and the vote count at collection time. The gold programs
are adapted from the accepted answers of the linked questions.

If you use jq-bench, please cite:

```bibtex
@misc{jqbench2026,
  title   = {jq-bench: an execution-verified benchmark for natural-language-to-jq translation},
  author  = {Edelmar Schneider},
  year    = {2026},
  url     = {https://huggingface.co/datasets/DominuZ/jq-bench}
}
```