Datasets:
Publish the verified benchmark: corrected answers, extra books, synthetic problems
Browse files- ANSWER_AUDIT.md +1 -1
- BENCHMARKING.md +25 -0
- evaluate_benchmark.py +15 -0
ANSWER_AUDIT.md
CHANGED
|
@@ -274,7 +274,7 @@ out of the scored split as well.
|
|
| 274 |
## Reproducing the audit
|
| 275 |
|
| 276 |
```bash
|
| 277 |
-
python verify_all3.py 12 dataset/
|
| 278 |
python reverify_books2.py bookv15 # the additional books
|
| 279 |
python build_benchmark.py # assemble + split
|
| 280 |
python audit_pairing.py hf_dataset/benchmark_full.jsonl # question/answer integrity
|
|
|
|
| 274 |
## Reproducing the audit
|
| 275 |
|
| 276 |
```bash
|
| 277 |
+
python verify_all3.py 12 dataset/core_math_dataset_v2.jsonl v15 # the core book
|
| 278 |
python reverify_books2.py bookv15 # the additional books
|
| 279 |
python build_benchmark.py # assemble + split
|
| 280 |
python audit_pairing.py hf_dataset/benchmark_full.jsonl # question/answer integrity
|
BENCHMARKING.md
CHANGED
|
@@ -42,6 +42,20 @@ before.
|
|
| 42 |
|
| 43 |
---
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
## 1. What the dataset is
|
| 46 |
|
| 47 |
`ORCHORDS/dgn-math-problems` is an **English-language mathematics benchmark**
|
|
@@ -345,6 +359,17 @@ Three tiers are tried in order. Each tier returns *accept*, *reject* or
|
|
| 345 |
The tier order is significant and is configurable with `--tiers`. The default
|
| 346 |
is `exact,numeric,symbolic`.
|
| 347 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 348 |
### 3.3 Answer shapes the dataset forces you to handle
|
| 349 |
|
| 350 |
The gold answers are not all single numbers. The harness handles these shapes
|
|
|
|
| 42 |
|
| 43 |
---
|
| 44 |
|
| 45 |
+
This document describes what the dataset contains, how the scoring harness
|
| 46 |
+
(`evaluate_benchmark.py`) decides that an answer is correct, and how to run and
|
| 47 |
+
report results. It is written for an engineer who has not seen this project
|
| 48 |
+
before.
|
| 49 |
+
|
| 50 |
+
---
|
| 51 |
+
|
| 52 |
+
This document describes what the dataset contains, how the scoring harness
|
| 53 |
+
(`evaluate_benchmark.py`) decides that an answer is correct, and how to run and
|
| 54 |
+
report results. It is written for an engineer who has not seen this project
|
| 55 |
+
before.
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
## 1. What the dataset is
|
| 60 |
|
| 61 |
`ORCHORDS/dgn-math-problems` is an **English-language mathematics benchmark**
|
|
|
|
| 359 |
The tier order is significant and is configurable with `--tiers`. The default
|
| 360 |
is `exact,numeric,symbolic`.
|
| 361 |
|
| 362 |
+
**A response that reproduces the gold answer in full is accepted before the
|
| 363 |
+
tiers run.** The extractor can pick a fragment out of a correct answer — a
|
| 364 |
+
single number, or the tail after a comma — and a fragment is then compared
|
| 365 |
+
against the *whole* gold string, which would mark a verbatim-correct answer
|
| 366 |
+
wrong. So the harness first compares the entire response, cleaned and
|
| 367 |
+
normalised, with the gold answer; if the two are identical the item is
|
| 368 |
+
accepted at the `exact` tier, whatever fragment the extractor happened to
|
| 369 |
+
choose. The same normalised form is used, so `x=2` and `x = 2` still match.
|
| 370 |
+
This rule only ever accepts an answer that is *equal* to the gold answer, so
|
| 371 |
+
it cannot make a wrong answer score as correct.
|
| 372 |
+
|
| 373 |
### 3.3 Answer shapes the dataset forces you to handle
|
| 374 |
|
| 375 |
The gold answers are not all single numbers. The harness handles these shapes
|
evaluate_benchmark.py
CHANGED
|
@@ -1015,6 +1015,21 @@ def score_answer(pred_text, gold_text, tiers):
|
|
| 1015 |
return out
|
| 1016 |
out["unparsed"] = not is_parseable(pred)
|
| 1017 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1018 |
last = None
|
| 1019 |
for tier in tiers:
|
| 1020 |
last = tier
|
|
|
|
| 1015 |
return out
|
| 1016 |
out["unparsed"] = not is_parseable(pred)
|
| 1017 |
|
| 1018 |
+
# A response that reproduces the gold answer in full is correct, even when
|
| 1019 |
+
# the extractor picks a fragment out of it -- a single number, or the tail
|
| 1020 |
+
# after a comma. Without this check a verbatim-correct answer is scored
|
| 1021 |
+
# wrong, because the fragment is compared against the whole gold string.
|
| 1022 |
+
if "exact" in tiers:
|
| 1023 |
+
whole = clean_candidate(pred_text)
|
| 1024 |
+
if whole and norm_exact(gold) and norm_exact(whole) == norm_exact(gold):
|
| 1025 |
+
out["correct"] = True
|
| 1026 |
+
out["tier"] = "exact"
|
| 1027 |
+
out["reason"] = "accepted"
|
| 1028 |
+
out["pred"] = whole
|
| 1029 |
+
out["unparsed"] = not is_parseable(whole)
|
| 1030 |
+
out["extract"] = method + "+whole"
|
| 1031 |
+
return out
|
| 1032 |
+
|
| 1033 |
last = None
|
| 1034 |
for tier in tiers:
|
| 1035 |
last = tier
|