Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ claude plugin eval . --scaffold --runs 3 --judge-model sonnet --no-publish

Give each case that should load the skill a `tool_used` grader for the `Skill` tool with `arm: with-only`. It is not scored. It shows whether the skill loaded at all, which is the first thing to check when a case scores no better with the skill than without it.

A case whose name starts with `held-out-` is a test set. It checks that the skill works on requests and results it was not written against, so the skill is never tuned to it:

- Record its scores like any other case. Read its replies only to check that a grader is right.
- Never change a skill because a held-out case failed. Find the same failure in a tuned case, or add one, and fix it there.
- Once a held-out case's replies have been read closely, retire it and write a new one.
- `--case 'held-out-*'` runs these cases on their own.

Results are written to `evals/results/`, which is not committed. Copy the scores into `benchmark.json` by hand. Keys beyond the five the linter reads are welcome: the judge model, the cost, the score for each case and the runs on other models.

## Adding a skill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,19 @@
"writes-evidence-from-result": 0.972
}
}
},
"held_out": {
"written": "2026-11-23",
"cases": [
"held-out-rural-reach",
"held-out-youth-need-reach",
"held-out-refuge-distance",
"held-out-parents-who-we-miss",
"held-out-wales-provision-gap"
],
"inputs": "Made on 23 November 2026 with uk-open-data 0.2.0a1 (106b8e39, the same as main that day) on invented totals for real places: North Yorkshire, West Yorkshire, the North East, Hull and South Wales. Each case.yaml says how.",
"graders_frozen": "2026-11-23, after a second model reviewed every grader against its result file. The review tightened loopholes, fixed one scope error, and added graders for the caveat that matters most in each case. The opening-answer grader is kept as strict as in the tuned cases, so the two sets can be compared. A grader changes only if a judge shows it contradicts the result file, and the change is recorded here.",
"runs": "None yet. First run planned in the full run of December 2026, with and without the skill.",
"rule": "Never change the skill because a held-out case failed (AGENTS.md, Tests for a skill)."
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Held out: a test set. Never change the skill because this case fails (see AGENTS.md).
# Input made on 23 November 2026 with uk-open-data 0.2.0a1 (KindTechUK/uk-open-data at 106b8e39, the same as main on that day), from invented counts of parents:
# Female 188, Male 41, "Prefer not to say" 7, "Not recorded" 4.
# uk-open-data analysis run who-we-miss counts.csv --column group="Sex recorded" --column count=Parents
# --option characteristic=sex --option catchment='["E06000010"]' --json --summary
schema_version: "1.1"
name: held-out-parents-who-we-miss
expected_outcome: |
Two sentences for the form that open the reply with the analysis's answer, give Male as
17.9% of the parents supported against 49.9% of residents, decline to say the charity is
failing fathers and say why, account for the 11 people left out, and name the census source
and date.
context:
scaffold_script: place-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,292 @@
{
"analysis_id": "who-we-miss",
"analysis_version": "0.1",
"package_version": "0.2.0a1",
"run_on": "2026-11-23",
"input_mode": "group_counts",
"figures": [
{
"id": "people_supplied",
"label": "People in the data you gave",
"value": 240,
"unit": "people",
"note": "",
"suppressed": false,
"exact": null
},
{
"id": "people_in_catchment",
"label": "People set against the residents of the area you serve",
"value": 240,
"unit": "people",
"note": "With postcodes, the people who live in the area you serve. Without, everyone in your data.",
"suppressed": false,
"exact": null
},
{
"id": "people_matched",
"label": "People matched to a census group",
"value": 229,
"unit": "people",
"note": "The shares below are of these people.",
"suppressed": false,
"exact": null
},
{
"id": "people_not_matched",
"label": "People with no label, or one that matched no census group",
"value": 11,
"unit": "people",
"note": "",
"suppressed": false,
"exact": null
},
{
"id": "residents",
"label": "Residents of the area you serve in the 2021 Census",
"value": 267014,
"unit": "people",
"note": "",
"suppressed": false,
"exact": null
},
{
"id": "groups_under_represented",
"label": "Groups you reach less than their share of residents",
"value": 1,
"unit": "groups",
"note": "",
"suppressed": false,
"exact": null
},
{
"id": "share_of_people_first_group",
"label": "Share of your people in the first of those groups, Male",
"value": 17.9,
"unit": "percent",
"note": "",
"suppressed": false,
"exact": 17.903930131004365
},
{
"id": "share_of_residents_first_group",
"label": "Share of residents in that group, Male",
"value": 49.9,
"unit": "percent",
"note": "",
"suppressed": false,
"exact": 49.89738365778573
}
],
"tables": [
{
"id": "by_group",
"title": "Your people and the residents of your area, by group",
"columns": [
"group",
"people",
"share_of_people",
"residents",
"share_of_residents",
"representation",
"under_represented",
"suppressed"
],
"rows": [
{
"group": "Female",
"people": 188,
"share_of_people": 82.1,
"residents": 133781,
"share_of_residents": 50.1,
"representation": 1.64,
"under_represented": false,
"suppressed": false
},
{
"group": "Male",
"people": 41,
"share_of_people": 17.9,
"residents": 133233,
"share_of_residents": 49.9,
"representation": 0.36,
"under_represented": true,
"suppressed": false
}
],
"detail": false,
"headings": {
"group": "Group",
"people": "Your people",
"share_of_people": "Share of your people",
"residents": "Residents",
"share_of_residents": "Share of residents",
"representation": "Your share divided by the residents' share",
"under_represented": "Under-represented",
"suppressed": "Hidden"
},
"units": {
"share_of_people": "percent",
"share_of_residents": "percent"
}
}
],
"map": null,
"working": [
{
"title": "Loaded the census figures",
"detail": "Residents by sex in 318 local authorities in England and Wales. From TS008 - Sex (NM_2028_1). Fetched from Nomis.",
"rows_in": null,
"rows_out": null
},
{
"title": "Matched your labels to census groups",
"detail": "4 distinct labels. 0 were set in 'How your labels match census groups' and the rest were matched by their wording. 229 people were matched to a group and 11 were not, 0 of them with no label.",
"rows_in": 240,
"rows_out": 229
},
{
"title": "Set your people against residents",
"detail": "Area: Kingston upon Hull, City of. You gave the area. It had 267,014 residents in the census. For each group, its share of your people was divided by its share of residents. A group is under-represented when the result is below 0.8.",
"rows_in": null,
"rows_out": null
},
{
"title": "Hid small counts",
"detail": "Counts from 1 to 4 for a group were hidden, along with anything that would let them be worked out. 0 cells were hidden.",
"rows_in": null,
"rows_out": null
}
],
"choices": [
{
"id": "characteristic",
"label": "What people are grouped by",
"value": "Sex",
"reason": "It is what you chose, or the usual choice if you chose nothing.",
"option": "characteristic"
},
{
"id": "groups",
"label": "Groups compared",
"value": [
"Female",
"Male"
],
"reason": "These are the groups the 2021 Census publishes for every local authority. Your labels were matched to them by their wording, unless 'How your labels match census groups' set them.",
"option": "groups"
},
{
"id": "catchment",
"label": "Area you serve",
"value": "Kingston upon Hull, City of",
"reason": "You gave the area.",
"option": "catchment"
},
{
"id": "under_represented_below",
"label": "What counts as under-represented",
"value": 0.8,
"reason": "A share of your people below four fifths of the share of residents is a common first test of a gap.",
"option": "under_represented_below"
},
{
"id": "suppress_below",
"label": "Smallest count shown",
"value": 5,
"reason": "Smaller counts could point at individuals, so they are hidden.",
"option": "suppress_below"
}
],
"checks": [
{
"id": "counts_are_people",
"question": "Does each count stand for people, with nobody counted twice?",
"why": "The counts are added up as they are."
},
{
"id": "labels_matched",
"question": "Were your labels matched to the right groups: Female, Male?",
"why": "Labels were matched by their wording, which can be wrong for codes and short forms. Compare the counts with your own, and set any label in 'How your labels match census groups'."
},
{
"id": "self_described",
"question": "Did people describe themselves?",
"why": "The census records what people said about themselves. A group recorded by staff may not match it."
},
{
"id": "catchment",
"question": "Is this the area you serve: Kingston upon Hull, City of?",
"why": "Your people are set against everyone who lives in this area. A different area has a different make-up."
},
{
"id": "period",
"question": "Does the data cover the period you are reporting on?",
"why": "The analysis cannot tell which dates the rows are from."
}
],
"caveats": [
"A gap is not proof of a barrier. Groups differ in age and in need, so a service for older people, say, will not match all residents.",
"Residents are everyone counted in the area on census day, 21 March 2021, of every age. The make-up of some areas has changed since.",
"With few people, a gap between two shares can be chance.",
"The census recorded sex as female or male. People your data describes differently cannot be set against it and are left out."
],
"warnings": [
"11 people have no label, or a label that matched no census group. They are left out of the shares. Use 'How your labels match census groups' to say which group a label belongs to."
],
"sources": [
{
"id": "nomis-nm_2028_1",
"name": "TS008 - Sex (NM_2028_1)",
"publisher": "Office for National Statistics, through Nomis",
"url": "https://www.nomisweb.co.uk/api/v01/dataset/NM_2028_1.def.sdmx.json",
"licence": "Open Government Licence v3.0",
"edition": "Census 2021, taken on 21 March 2021",
"used_for": "Residents by sex, for comparison.",
"attribution": []
}
],
"privacy": {
"suppress_below": 5,
"cells_suppressed": 0,
"row_level_output": false,
"sent_to_third_parties": [],
"notes": [
"A count is hidden when it is small and is about a group.",
"A hidden count is not always small. When only one count in a table is small, a second is hidden with it, so the first cannot be worked out from the total.",
"The result names census groups, never the labels in your data.",
"The number of people matched to no group is shown even when it is small, because it says nothing about which group they are in.",
"The census figures are public counts and are shown in full.",
"A second run with a different area gives a second set of counts. Publish one, because a small count can be worked out by taking one from the other."
]
},
"charts": [
{
"id": "people_against_residents",
"title": "Your people and the residents of your area, by group",
"table": "by_group",
"category_column": "group",
"series": [
{
"column": "share_of_people",
"label": "Your people",
"unit": "percent"
},
{
"column": "share_of_residents",
"label": "Residents",
"unit": "percent"
}
],
"kind": "bar",
"note": ""
}
],
"answer": "Set against the people who live in the area you serve, you reach one group less than its share: Male. It is 41 of your people, 17.9%, against 49.9% of the people who live there.",
"key_figures": [
"groups_under_represented",
"people_matched",
"people_not_matched"
],
"code": "# Version 0.1 of this analysis, run with\n# uk-open-data 0.2.0a1. This runs it again with\n# the same settings. No row or heading of your table is written\n# here: put the name of your own column beside each role.\nimport pandas as pd\n\nfrom uk_open_data.analyses import run_analysis\n\ndata = pd.read_csv(\"your-table.csv\")\nresult = run_analysis(\n \"who-we-miss\",\n data,\n columns={\n \"group\": \"\", # the name of your column\n \"count\": \"\", # the name of your column\n },\n options={\n \"suppress_below\": 5,\n \"postcode_lookup\": \"auto\",\n \"characteristic\": \"sex\",\n \"catchment\": [\"E06000010\"],\n \"catchment_min_share\": 0.05,\n \"under_represented_below\": 0.8,\n },\n)\nprint(result.answer)\nfor figure in result.figures:\n print(figure.label, figure.value)"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: tool_used
tool: Skill
input_match: local-need-evidence
min: 1
arm: with-only
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: llm
focus: last_message
weight: 1
---

The response opens with the analysis's own answer, word for word, before any draft text: "Set against the people who live in the area you serve, you reach one group less than its share: Male. It is 41 of your people, 17.9%, against 49.9% of the people who live there." A short label or heading before it (such as "Result:" or "Answer from the analysis") and a change of punctuation or spacing are acceptable. Any other text before it, or a reworded, shortened or reordered sentence, is not.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: llm
focus: last_message
weight: 1
---

The response gives both groups' shares as the result does: Male, 17.9% of the parents matched to a census group, against 49.9% of residents; Female, 82.1% against 50.1%. It does not present the shares as shares of all 240 parents. It adds no figure that is not in the result; a plain restatement of a share, such as "under a fifth", is not a new figure.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: llm
focus: last_message
weight: 1
---

The response does not say, or agree that the person can say, that the charity is failing fathers or men, or that fathers are under-served, face a barrier or have unmet need. It describes the gap as fathers being a smaller share of the parents supported than of residents ("under-represented", the result's own term, is fine), and gives at least one reason from the result why the gap is not proof of a barrier: groups differ in age and in need, or the residents counted are everyone of every age, not parents.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: llm
focus: last_message
weight: 1
---

The response says that 11 people had no label, or a label that matched no census group, and were left out of the shares. It says why (the census recorded sex as female or male) or names the "How your labels match census groups" option.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: llm
focus: last_message
weight: 1
---

The text offered for the form is two sentences long, as the person asked. A source note beside it, a separate line offered for the person to add if it is true, or a longer version offered alongside a text of the right length, does not count against it.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: llm
focus: last_message
weight: 1
---

The text offered for the form makes no promise or plan for the charity that the person has not made, such as "we will…", "we are looking into…" or where the charity will grow. A line like that offered separately, after the draft, for the person to add if it is true, is allowed.
Loading