Scoring guide
Construction Quantities Benchmark · edition 631c9e6dc3bd
How to score a model on construction quantities
Ask each question as written, read one number from the reply, and mark it against the band the item carries. The rules below make two people’s scores comparable; the code marks a whole run in a few lines.
- 1%Or the printed precision, whichever is wider
- 2Set-ups: closed book, or with tools
- 0Model results published by this site
This guide reports how to score, never a score
Craft Quantities has not run any company’s model on these questions and publishes no leaderboard. A score you produce is your claim about your run; say how you ran it, so a reader can repeat it. A high mark shows agreement with the calculators’ methods, not fitness to size, design or certify anything.
Before you start
Pick one set-up and keep to it
Scores from different set-ups answer different questions; never pool them.
Closed book
The model gets the prompt and nothing else. Many answers rest on conventions the calculator's page states but the prompt does not — the yield of a bag, a density, how waste is applied, where a count rounds up — so this measures whether a model knows the trade's conventions as well as its arithmetic.
With tools
The model may call calculators — this site's engine or any other — but must not see the benchmark file, its items or the pages that print them. Say which tools were available; a model that reaches the same calculator the item came from should match it, and the interest is in whether it finds and drives the right one.
Asking
Put each item to the model the same way
Send the prompt unchanged
prompt.metric or prompt.imperial, word for word. A wrapper that asks for a number only is fine; say what it was.
Choose the system per run
Run metric, US or both. Many items answer in different units in each — m³ against yd³, kg against lb — so the two halves test different habits.
Read one number
Take the figure the reply gives in the unit the prompt asks for. A reply in another unit, a range, or no number at all is unanswered, and counts against the score.
Mark, then look at the steps
A miss is easier to understand beside the item's steps: they show where the model's working parted from the calculator's.
Marking
Right is inside the item's band
The first rule is the benchmark's headline score; the second is for code, not for prose.
Within tolerance (the headline score)
An answer is right when it is a number in the unit the prompt asks for and |answer − value| ≤ tolerance, with value and tolerance from answer.metric or answer.imperial. The tolerance is half a unit in the last place the page prints, or 1% of the figure, whichever is larger — so a count must be the whole number, and a volume of 9.6 m³ (12.6 yd³) is right from 9.504 to 9.696 m³.
Exact to the vector (for implementations)
A result in the calculator's own unit is right when |result − canonical.value| < 0.5 × 10^−toleranceDecimalPlaces. This is how the site's own test suite holds each calculator; it is too strict for a model's prose answer, and meant for code that re-implements a calculator.
Worked on item concrete-calculator/1
Concrete Calculator: estimated concrete needed. The page prints 0.99 m³ for a metric reader and 1.29 yd³ for a US reader.
- metric — right from
- 0.9801 to 0.9999 m³
- US — right from
- 1.28192 to 1.30782 yd³
- vector — exact to
- 1.29 yd³, 1 decimal places
Scorer
Mark a whole run in a few lines
Put the model's answers in a JSON Lines file, one per item and system, beside the downloaded dataset. Both versions print the share within tolerance, overall and by category.
// Mark a model's answers against the benchmark.
// answers.jsonl: one {"id": "...", "system": "metric" | "imperial", "answer": 9.6} per line.
import { readFileSync } from "node:fs";
const items = new Map(
readFileSync("cqb-v1.jsonl", "utf8").trim().split("\n").map((line) => {
const item = JSON.parse(line);
return [item.id, item];
}),
);
let asked = 0, right = 0;
const byCategory = {};
for (const line of readFileSync("answers.jsonl", "utf8").trim().split("\n")) {
const { id, system, answer } = JSON.parse(line);
const item = items.get(id);
if (!item) continue;
const gold = item.answer[system];
const ok = typeof answer === "number" && Math.abs(answer - gold.value) <= gold.tolerance;
asked += 1;
if (ok) right += 1;
const row = (byCategory[item.calculator.category] ??= { asked: 0, right: 0 });
row.asked += 1;
if (ok) row.right += 1;
}
console.log(`${right} of ${asked} within tolerance`, byCategory);# Mark a model's answers against the benchmark.
# answers.jsonl: one {"id": "...", "system": "metric" | "imperial", "answer": 9.6} per line.
import json
from collections import defaultdict
with open("cqb-v1.jsonl", encoding="utf-8") as f:
items = {item["id"]: item for item in map(json.loads, f)}
asked = right = 0
by_category = defaultdict(lambda: [0, 0])
with open("answers.jsonl", encoding="utf-8") as f:
for line in f:
a = json.loads(line)
item = items.get(a["id"])
if item is None:
continue
gold = item["answer"][a["system"]]
ok = isinstance(a["answer"], (int, float)) and abs(a["answer"] - gold["value"]) <= gold["tolerance"]
asked += 1
right += ok
row = by_category[item["calculator"]["category"]]
row[0] += 1
row[1] += ok
print(f"{right} of {asked} within tolerance", dict(by_category))Publishing a score
What a reader needs to repeat it
- The dataset id, version and edition, exactly as the manifest gives them.
- The setup (closed book, or with tools and which ones) and the system asked (metric, US or both).
- The model, its version and its settings, and the exact prompt wrapper if any was added around the item's prompt.
- How many items were asked, how many answers could be read as a number, and how many were within tolerance — overall, per system and per category.
- Any items left out, by id, and why.
Where marks go
Six slips that put an answer outside the band
Each is a convention that differs between markets or trades. The engine's trade-word tool raises the same traps when a model asks it about a word.
The gallon in the question
Every US-unit prompt means the US gallon, 3.785 L. A model that reaches for the imperial gallon, 4.546 L, is a fifth out on any paint, sealer or water figure, and outside every band.
Tons and tonnes
A US prompt's ton is the short ton of 2,000 lb (907 kg); a metric prompt asks for tonnes of 1,000 kg. Mixing them is a tenth out, which no tolerance here forgives.
Rounding a count
Bags, sheets, studs and tiles are bought whole, and most calculators round the count up. A model that answers 13.4 bags where the page says 14 is marked wrong, because the band on a count is half a unit.
Waste already in the figure
Where an item has a waste or allowance input, the answer includes it; where allowance is not null, the calculator folded one in. Adding waste again, or leaving it off, is the commonest cause of a near miss.
A bag is not a converted bag
A metric prompt counts the bag a metric merchant sells (20, 25 or 30 kg) and a US prompt the bag a US store sells (40, 60 or 80 lb). The two answers differ by more than the unit, so convert neither into the other.
A yard of concrete
In a US prompt about concrete, gravel or soil, a yard is a cubic yard: 0.765 m³, or 27 ft³. Reading it as a linear or a square yard puts the answer orders of magnitude out.