DominuZ commited on
Commit
de8aebd
·
verified ·
1 Parent(s): 5775eed

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +97 -0
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ language:
4
+ - en
5
+ task_categories:
6
+ - text-generation
7
+ tags:
8
+ - jq
9
+ - json
10
+ - benchmark
11
+ - code-generation
12
+ - evaluation
13
+ pretty_name: jq-bench (human slice)
14
+ size_categories:
15
+ - n<1K
16
+ ---
17
+
18
+ # jq-bench — human slice
19
+
20
+ **The first benchmark for natural-language-to-`jq` translation.** 30 hand-curated
21
+ tasks derived from real StackOverflow questions, with gold filters and gold outputs
22
+ **verified by executing real jq** — no LLM-as-judge anywhere.
23
+
24
+ It is the canonical evaluation set of
25
+ [**jq-coder-0.6B**](https://huggingface.co/DominuZ/jq-coder-0.6B), but it is
26
+ model-agnostic: any system that turns a natural-language request (+ a JSON sample)
27
+ into a jq filter can be scored on it.
28
+
29
+ ## Why a human slice
30
+
31
+ Synthetic benchmarks generated by the same grammar that generated the training data
32
+ measure in-distribution memorization, not competence. This slice is **independent of
33
+ any generation grammar by construction**: every item comes from a real question asked
34
+ by a real person, and questions that seeded the jq-coder training grammar (the
35
+ top-voted tier) are explicitly excluded. The items favor constructs and compositions
36
+ that synthetic grammars tend to miss: `del`, `with_entries`, compound `to_entries`,
37
+ `index`, `first`/`last`, descending `sort_by`, regex `test`, `if-has-else`, update
38
+ assignment `|=`, array subtraction, `join`, `keys`, recursive merge `*`, `+=` on
39
+ nested paths, `group_by` into a dynamic-key object, `map_values`, and hyphenated-key
40
+ projection (`.stuff["info-spec"]`).
41
+
42
+ ## Format
43
+
44
+ One JSON object per line in `humana.jsonl`:
45
+
46
+ | Field | Meaning |
47
+ |---|---|
48
+ | `pedido_nl` | The natural-language request (the question author's intent, tool mentions removed) |
49
+ | `programa` | Gold jq filter (accepted answer, adapted to a pure filter — no `-r`/`-s`/shell flags) |
50
+ | `familia` | `humana/Q<question_id>` — unique per item |
51
+ | `idioma` | Request language (`en`) |
52
+ | `documentos` | ≥2 input JSON documents: the original from the question plus a variant with the same skeleton |
53
+ | `saidas` | Gold outputs, one per document, canonical `jq -cS` |
54
+ | `origem` | Provenance: StackOverflow `question_id`, `url`, `titulo`, `autor`, `votos`, `licenca` |
55
+
56
+ Every gold output was computed by running the gold filter with real jq (1.8) and is
57
+ re-validated automatically by the project's test suite — curation you can re-execute,
58
+ not curation you have to trust.
59
+
60
+ ## Scoring
61
+
62
+ Run the candidate filter against **every** document of the item and diff the canonical
63
+ output (`jq -cS`) against gold. Two published metrics:
64
+
65
+ - **strict** — byte-identical to gold on all documents;
66
+ - **task-solved** — additionally accepts equivalent output shapes (stream vs. array
67
+ wrapper and similar convention differences).
68
+
69
+ An item only counts if all its documents pass — a filter that hardcodes values from
70
+ the sample fails the variant document.
71
+
72
+ ## Baseline
73
+
74
+ | Model | strict | task-solved |
75
+ |---|---|---|
76
+ | [jq-coder-0.6B](https://huggingface.co/DominuZ/jq-coder-0.6B) (v13, Q8_0) | 9/30 | 10/30 |
77
+
78
+ Yes, the human slice is hard — that is the point. Reference scores for frontier models
79
+ are on the roadmap.
80
+
81
+ ## License and attribution
82
+
83
+ StackOverflow content is **CC BY-SA 4.0**; this dataset is redistributed under the
84
+ same license. Each item carries per-item attribution in `origem`: the question URL,
85
+ the author's display name, and the vote count at collection time. The gold programs
86
+ are adapted from the accepted answers of the linked questions.
87
+
88
+ If you use jq-bench, please cite:
89
+
90
+ ```bibtex
91
+ @misc{jqbench2026,
92
+ title = {jq-bench: an execution-verified benchmark for natural-language-to-jq translation},
93
+ author = {Edelmar Schneider},
94
+ year = {2026},
95
+ url = {https://huggingface.co/datasets/DominuZ/jq-bench}
96
+ }
97
+ ```