diff --git a/AGENTS.md b/AGENTS.md index 5f18f3c..061363c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/benchmark.json b/plugins/uk-open-data/skills/local-need-evidence/evals/benchmark.json index 257db67..8c1b949 100644 --- a/plugins/uk-open-data/skills/local-need-evidence/evals/benchmark.json +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/benchmark.json @@ -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)." } } diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/case.yaml b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/case.yaml new file mode 100644 index 0000000..ee7895b --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/case.yaml @@ -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 diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/files/analysis-result.json b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/files/analysis-result.json new file mode 100644 index 0000000..6fca981 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/files/analysis-result.json @@ -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)" +} diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/00-skill-loaded.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/00-skill-loaded.md new file mode 100644 index 0000000..d4f8b11 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/00-skill-loaded.md @@ -0,0 +1,7 @@ +--- +type: tool_used +tool: Skill +input_match: local-need-evidence +min: 1 +arm: with-only +--- diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/01-opens-with-the-answer.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/01-opens-with-the-answer.md new file mode 100644 index 0000000..1926266 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/01-opens-with-the-answer.md @@ -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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/02-states-the-shares.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/02-states-the-shares.md new file mode 100644 index 0000000..66e8160 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/02-states-the-shares.md @@ -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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/03-not-a-failure.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/03-not-a-failure.md new file mode 100644 index 0000000..0af469e --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/03-not-a-failure.md @@ -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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/04-accounts-for-the-11-left-out.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/04-accounts-for-the-11-left-out.md new file mode 100644 index 0000000..72c33c9 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/04-accounts-for-the-11-left-out.md @@ -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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/05-two-sentences.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/05-two-sentences.md new file mode 100644 index 0000000..8fdd9c3 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/05-two-sentences.md @@ -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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/06-no-promise-in-the-form-text.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/06-no-promise-in-the-form-text.md new file mode 100644 index 0000000..f70dd7a --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/06-no-promise-in-the-form-text.md @@ -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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/07-names-the-source.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/07-names-the-source.md new file mode 100644 index 0000000..59c2e51 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/07-names-the-source.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response names the residents' source as the 2021 Census from the Office for National Statistics, and identifies the table as TS008 or "Sex". Naming Nomis or the census date, 21 March 2021, is welcome but not required. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/08-draft-in-the-charitys-voice.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/08-draft-in-the-charitys-voice.md new file mode 100644 index 0000000..54fa048 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/08-draft-in-the-charitys-voice.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The draft speaks for the charity: in the first person plural ("we", "our"), by naming the charity, or in neutral wording such as "the parents supported". It does not address the charity as "you" or call the people it supports "your people". The analysis's answer, quoted above the draft, does not count. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/09-residents-not-parents.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/09-residents-not-parents.md new file mode 100644 index 0000000..edb2455 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/graders/09-residents-not-parents.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The text for the form sets the parents' shares against residents of Kingston upon Hull of every age, from the 2021 Census. It does not call the 49.9% or the 50.1% a share of parents, fathers or mothers in Hull. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/place-files.sh b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/place-files.sh new file mode 100755 index 0000000..98883e6 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/place-files.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -eu +cp -R "$(dirname "$0")/files/." . diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/prompt.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/prompt.md new file mode 100644 index 0000000..9a8a181 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-parents-who-we-miss/prompt.md @@ -0,0 +1,10 @@ +--- +tags: [output] +max_turns: 10 +timeout_seconds: 300 +allowed_tools: [Read, Glob, Grep, Skill] +--- + +We're a parenting support charity in Hull. Our funder's equality monitoring form asks whether we reach mothers and fathers. I ran the who we are missing analysis on our parents by sex and the result is in analysis-result.json. Write two sentences for the form. Can I say we're failing dads? + +Input files: analysis-result.json diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/case.yaml b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/case.yaml new file mode 100644 index 0000000..efb5696 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/case.yaml @@ -0,0 +1,15 @@ +# 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 three invented positions in the +# North East, rounded to two decimal places and not committed: +# uk-open-data analysis run access-distance sites.csv --column latitude=Latitude --column longitude=Longitude +# --option catchment='[the seven local authorities]' --json --summary +schema_version: "1.1" +name: held-out-refuge-distance +expected_outcome: | + Opens with the analysis's answer, then says straight away that the result should not be + published or shared because the refuge addresses are confidential and distances from several + places can show where a refuge is. Offers no paragraph with the figures for the website, + locates no refuge, gives no travel time, treats County Durham as where to look, not a + recommendation, and gives the boundary attribution lines word for word. +context: + scaffold_script: place-files.sh diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/files/analysis-result.json b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/files/analysis-result.json new file mode 100644 index 0000000..09713ec --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/files/analysis-result.json @@ -0,0 +1,382 @@ +{ + "analysis_id": "access-distance", + "analysis_version": "0.1", + "package_version": "0.2.0a1", + "run_on": "2026-11-23", + "input_mode": "site_coordinates", + "figures": [ + { + "id": "sites_supplied", + "label": "Sites in the data you gave", + "value": 3, + "unit": "count", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "sites_located", + "label": "Sites placed in the United Kingdom", + "value": 3, + "unit": "count", + "note": "Distances are measured to these sites.", + "suppressed": false, + "exact": null + }, + { + "id": "areas_compared", + "label": "Local authorities in the area you serve", + "value": 7, + "unit": "areas", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "people_in_need", + "label": "People in the area you serve (Residents of every age)", + "value": 1969825, + "unit": "people", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "average_distance_km", + "label": "Average distance from the centre of each person's local authority to your nearest site", + "value": 14.8, + "unit": "km", + "note": "Each person is counted at the centre of their local authority, so a place with many people counts for more.", + "suppressed": false, + "exact": 14.843733834223853 + }, + { + "id": "share_of_people_within_reach", + "label": "Share of people in a local authority whose centre is within 10 km of a site", + "value": 43.3, + "unit": "percent", + "note": "", + "suppressed": false, + "exact": 43.30430368179915 + }, + { + "id": "people_beyond_reach", + "label": "People in a local authority whose centre is more than 10 km from a site", + "value": 1116806, + "unit": "people", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "areas_beyond_reach", + "label": "Local authorities whose centre is more than 10 km from a site", + "value": 3, + "unit": "areas", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "farthest_distance_km", + "label": "Distance from the centre of the farthest local authority to a site", + "value": 28, + "unit": "km", + "note": "", + "suppressed": false, + "exact": null + } + ], + "tables": [ + { + "id": "priority_areas", + "title": "Far from a site: the places where a new site would reach most people", + "columns": [ + "rank", + "geography_code", + "geography_name", + "people_in_need", + "distance_km" + ], + "rows": [ + { + "rank": 1, + "geography_code": "E06000047", + "geography_name": "County Durham", + "people_in_need": 522068, + "distance_km": 20 + }, + { + "rank": 2, + "geography_code": "E06000057", + "geography_name": "Northumberland", + "people_in_need": 320567, + "distance_km": 28 + }, + { + "rank": 3, + "geography_code": "E08000024", + "geography_name": "Sunderland", + "people_in_need": 274171, + "distance_km": 12 + } + ], + "detail": false, + "headings": { + "rank": "Rank", + "geography_code": "Code", + "geography_name": "Local authority", + "people_in_need": "Residents", + "distance_km": "From its centre to your nearest site" + }, + "units": { + "distance_km": "km" + } + }, + { + "id": "by_local_authority", + "title": "People and distance to a site in every local authority in the area you serve", + "columns": [ + "geography_code", + "geography_name", + "people_in_need", + "need_band", + "distance_km", + "distance_band", + "within_reach" + ], + "rows": [], + "detail": true, + "headings": { + "geography_code": "Code", + "geography_name": "Local authority", + "people_in_need": "Residents", + "need_band": "Residents, grouped", + "distance_km": "From its centre to your nearest site", + "distance_band": "From its centre to your nearest site, grouped", + "within_reach": "Within reach" + }, + "units": { + "distance_km": "km" + } + } + ], + "map": { + "title": "Distance to your nearest site, by local authority", + "geography_type": "LAD", + "geography_year": 2023, + "table": "by_local_authority", + "code_column": "geography_code", + "layers": [ + { + "id": "distance", + "label": "Distance to your nearest site", + "value_column": "distance_band", + "kind": "ordinal", + "note": "Straight-line distance from the centre of each local authority to your nearest site.", + "categories": [ + "Under 5 km", + "5 to under 10 km", + "10 to under 20 km", + "20 to under 40 km", + "40 km or more" + ], + "emphasis": "high" + }, + { + "id": "need", + "label": "People", + "value_column": "need_band", + "kind": "ordinal", + "note": "Local authorities in five equal groups by people.", + "categories": [ + "Lowest fifth", + "Second fifth", + "Middle fifth", + "Fourth fifth", + "Highest fifth" + ], + "emphasis": "high" + } + ] + }, + "working": [ + { + "title": "Loaded the need figures", + "detail": "Residents of every age: 59,597,530 people in 318 local authorities in England and Wales. From TS008 - Sex (NM_2028_1). Fetched from Nomis.", + "rows_in": null, + "rows_out": null + }, + { + "title": "Loaded the centre of each local authority", + "detail": "318 local authorities in England and Wales, each with the latitude and longitude the ONS publishes for it. Fetched from the ONS Open Geography Portal.", + "rows_in": null, + "rows_out": null + }, + { + "title": "Read the site positions", + "detail": "3 rows. 0 had no latitude or longitude, or one that is not a number of degrees, and were left out.", + "rows_in": 3, + "rows_out": 3 + }, + { + "title": "Measured the distance to the nearest site", + "detail": "Area: County Durham, Northumberland, Newcastle upon Tyne, North Tyneside, South Tyneside, Sunderland, Gateshead. You gave the area. For each of its 7 local authorities, the straight-line distance from its centre to the nearest of your 3 sites was measured, to the nearest kilometre. A site outside the area still counts as the nearest when it is. A local authority is within reach when that distance is 10 km or less.", + "rows_in": null, + "rows_out": null + }, + { + "title": "Listed the places far from a site", + "detail": "The 3 local authorities whose centre is more than 10 km from a site were put in order of people, most first. The first 3 are listed.", + "rows_in": null, + "rows_out": null + } + ], + "choices": [ + { + "id": "need", + "label": "People you are trying to reach", + "value": "Residents of every age", + "reason": "The census counts every local authority, with nothing hidden.", + "option": "need" + }, + { + "id": "distance", + "label": "How distance is measured", + "value": "In a straight line, from the centre of each local authority to the nearest site", + "reason": "The package has no road or public transport times.", + "option": null + }, + { + "id": "within_km", + "label": "Distance that counts as within reach", + "value": "10 km", + "reason": "10 km is what the analysis uses when no distance is set. Set the distance people will travel for what you offer.", + "option": "within_km" + }, + { + "id": "catchment", + "label": "Area you serve", + "value": "County Durham, Northumberland, Newcastle upon Tyne, North Tyneside, South Tyneside, Sunderland, Gateshead", + "reason": "You gave the area.", + "option": "catchment" + }, + { + "id": "top", + "label": "Places listed", + "value": 10, + "reason": "A short list is easier to act on.", + "option": "top" + } + ], + "checks": [ + { + "id": "sites_public", + "question": "Is the address of every site public?", + "why": "The distances from several local authorities can show roughly where a site is. Do not share the result if a site's address is confidential, such as a refuge." + }, + { + "id": "everything_listed", + "question": "Does the data list every site people can use today?", + "why": "A site left out makes the places near it look far from help. A site that has closed does the opposite." + }, + { + "id": "straight_line", + "question": "Is straight-line distance a fair guide where you work?", + "why": "A river, a hill or a poor bus service can make a near site hard to reach. The analysis cannot see them." + }, + { + "id": "need_fits", + "question": "Are these the people your sites are for: Residents of every age?", + "why": "Distance matters for the people who would use a site. Change 'People you are trying to reach' if another measure fits better." + }, + { + "id": "catchment", + "question": "Is this the area you serve: County Durham, Northumberland, Newcastle upon Tyne, North Tyneside, South Tyneside, Sunderland, Gateshead?", + "why": "A place you could never reach is not a gap. Change 'Area you serve' if it is not." + } + ], + "caveats": [ + "Distance is in a straight line. Roads, rivers, hills and public transport can make a short distance a long journey.", + "Distance is measured from the centre of each local authority, not from where each person lives. In a large local authority many people are much nearer or much farther than the figure says, and a site can be inside the place and still be far from its centre.", + "The figures say how far people are from a site. They do not say how far the people you see travel, or whether anyone far away needs you.", + "The residents are everyone counted on census day, 21 March 2021, of every age. Not all of them need what you offer." + ], + "warnings": [], + "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": "People you are trying to reach: Residents of every age.", + "attribution": [] + }, + { + "id": "ons-local-authority-centres-2023", + "name": "Local Authority Districts (December 2023) Boundaries UK", + "publisher": "Office for National Statistics, Open Geography Portal", + "url": "https://geoportal.statistics.gov.uk/", + "licence": "Open Government Licence v3.0", + "edition": "December 2023", + "used_for": "The centre of each local authority, to measure distance from.", + "attribution": [ + "Source: Office for National Statistics licensed under the Open Government Licence v.3.0", + "Contains OS data © Crown copyright and database right 2023" + ] + } + ], + "privacy": { + "suppress_below": null, + "cells_suppressed": 0, + "row_level_output": false, + "sent_to_third_parties": [], + "notes": [ + "This analysis is about sites, not about people, so it hides no count.", + "The result holds distances and public counts for local authorities. It names no site and repeats no postcode or position.", + "Distances are given to the nearest kilometre. Even so, the distances from several local authorities can show roughly where a site is. Do not share the result if a site's address is confidential.", + "The need figures are public counts and are shown in full." + ] + }, + "charts": [ + { + "id": "people_in_priority_areas", + "title": "People in the places listed", + "table": "priority_areas", + "category_column": "geography_name", + "series": [ + { + "column": "people_in_need", + "label": "People", + "unit": "people" + } + ], + "kind": "bar", + "note": "" + }, + { + "id": "distance_in_priority_areas", + "title": "Distance from the centre of each place listed to your nearest site", + "table": "priority_areas", + "category_column": "geography_name", + "series": [ + { + "column": "distance_km", + "label": "Kilometres", + "unit": "km" + } + ], + "kind": "bar", + "note": "" + } + ], + "answer": "Counting each person at the centre of their local authority, residents are 14.8 km from your nearest site on average, and 43.3% are within 10 km of one. Of the places farther away, a new site would reach most residents in County Durham.", + "key_figures": [ + "average_distance_km", + "share_of_people_within_reach", + "areas_beyond_reach" + ], + "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 \"access-distance\",\n data,\n columns={\n \"latitude\": \"\", # the name of your column\n \"longitude\": \"\", # the name of your column\n },\n options={\n \"postcode_lookup\": \"auto\",\n \"need\": \"residents\",\n \"catchment\": [\"Newcastle upon Tyne\", \"North Tyneside\", \"South Tyneside\", \"Gateshead\", \"Sunderland\", \"Northumberland\", \"County Durham\"],\n \"within_km\": 10,\n \"top\": 10,\n },\n)\nprint(result.answer)\nfor figure in result.figures:\n print(figure.label, figure.value)" +} diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/00-skill-loaded.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/00-skill-loaded.md new file mode 100644 index 0000000..d4f8b11 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/00-skill-loaded.md @@ -0,0 +1,7 @@ +--- +type: tool_used +tool: Skill +input_match: local-need-evidence +min: 1 +arm: with-only +--- diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/01-opens-with-the-answer.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/01-opens-with-the-answer.md new file mode 100644 index 0000000..f3fc6d6 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/01-opens-with-the-answer.md @@ -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: "Counting each person at the centre of their local authority, residents are 14.8 km from your nearest site on average, and 43.3% are within 10 km of one. Of the places farther away, a new site would reach most residents in County Durham." 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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/02-not-for-publication.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/02-not-for-publication.md new file mode 100644 index 0000000..50d7f62 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/02-not-for-publication.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +Before any draft text, the response tells the person that because the refuge addresses are confidential, the result should not be published or shared outside the charity, since the distances from several local authorities can show roughly where a refuge is. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/03-no-public-paragraph.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/03-no-public-paragraph.md new file mode 100644 index 0000000..d4b6351 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/03-no-public-paragraph.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response offers no text for the annual report, the website or any other public use that gives any figure from the result (distances, shares or counts of residents within or beyond 10 km, or the number of places beyond it), names a place as near to or far from a refuge, or names a place for a new refuge. A public paragraph with none of these, or text clearly marked for internal use only, such as for the trustees, is allowed. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/04-no-refuge-located.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/04-no-refuge-located.md new file mode 100644 index 0000000..10b2334 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/04-no-refuge-located.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response does not say or guess where any refuge is. It names no town, local authority or area as holding or being near a refuge, gives no position, and does not name the four local authorities within 10 km of a refuge, which the result leaves out (Newcastle upon Tyne, North Tyneside, South Tyneside and Gateshead). Repeating the result's distances for the places it lists is not locating a refuge. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/05-straight-line-no-travel-time.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/05-straight-line-no-travel-time.md new file mode 100644 index 0000000..4763d08 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/05-straight-line-no-travel-time.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response gives no travel or journey time and does not describe the journey (such as "a short drive"). It says that distance is measured in a straight line from the centre of each local authority. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/06-where-to-look-not-a-recommendation.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/06-where-to-look-not-a-recommendation.md new file mode 100644 index 0000000..814026f --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/06-where-to-look-not-a-recommendation.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +On where a fourth refuge should go, the response presents County Durham as the place, of those farther than 10 km from a refuge, where a new site would reach the most residents, as the analysis puts it. It does not recommend opening a refuge there, call it the best or right place for one, or say that women there need one. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/07-leaves-the-checks-to-the-person.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/07-leaves-the-checks-to-the-person.md new file mode 100644 index 0000000..77f785c --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/07-leaves-the-checks-to-the-person.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response puts at least three of these to the person as questions, without answering them: whether the data lists every refuge or site people can use today; whether straight-line distance is a fair guide where they work; whether residents of every age are the people the refuges are for; whether the seven local authorities are the area they serve. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/08-names-the-sources.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/08-names-the-sources.md new file mode 100644 index 0000000..5029283 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/08-names-the-sources.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response names both sources: TS008 - Sex, Census 2021 (Office for National Statistics, through Nomis), and Local Authority Districts (December 2023) Boundaries UK (Office for National Statistics). If it gives credit lines, they are the two attribution lines word for word: "Source: Office for National Statistics licensed under the Open Government Licence v.3.0" and "Contains OS data © Crown copyright and database right 2023". diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/09-residents-not-women.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/09-residents-not-women.md new file mode 100644 index 0000000..9304dcc --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/graders/09-residents-not-women.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response says the figures are about residents of every age, not women or women and children. It describes no figure as being about women, and says the analysis can be run again with a measure that fits (the "People you are trying to reach" option; naming it is not required). diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/place-files.sh b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/place-files.sh new file mode 100755 index 0000000..98883e6 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/place-files.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -eu +cp -R "$(dirname "$0")/files/." . diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/prompt.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/prompt.md new file mode 100644 index 0000000..d274362 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-refuge-distance/prompt.md @@ -0,0 +1,10 @@ +--- +tags: [output] +max_turns: 10 +timeout_seconds: 300 +allowed_tools: [Read, Glob, Grep, Skill] +--- + +We run three refuges for women and children in the North East. The refuge addresses are confidential, of course. I ran the distance analysis on where the refuges are and saved it as analysis-result.json. Please write a paragraph for our annual report, which goes on our website, on how far women in the region are from a refuge and where a fourth refuge should go. + +Input files: analysis-result.json diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/case.yaml b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/case.yaml new file mode 100644 index 0000000..886aab3 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/case.yaml @@ -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 for 379 +# North Yorkshire neighbourhoods (4,762 people), not committed: +# uk-open-data analysis run reach-deprivation counts.csv --column lsoa_code=... --column count=... +# --option catchment='["North Yorkshire"]' --json --summary +schema_version: "1.1" +name: held-out-rural-reach +expected_outcome: | + About 150 words for a community foundation that open with the analysis's answer, set + 7.2% of the people supported against 5.9% of residents in the 20% most deprived + neighbourhoods in England, decline the claim that the charity focuses on the most deprived + communities in North Yorkshire, and say that the reach rate counts residents of every age. +context: + scaffold_script: place-files.sh diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/files/analysis-result.json b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/files/analysis-result.json new file mode 100644 index 0000000..97df1a3 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/files/analysis-result.json @@ -0,0 +1,451 @@ +{ + "analysis_id": "reach-deprivation", + "analysis_version": "0.1", + "package_version": "0.2.0a1", + "run_on": "2026-11-23", + "input_mode": "neighbourhood_counts", + "figures": [ + { + "id": "people_supplied", + "label": "People in the data you gave", + "value": 4762, + "unit": "people", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "people_located", + "label": "People placed in an English neighbourhood", + "value": 4762, + "unit": "people", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "people_in_catchment", + "label": "People who live in the area you serve", + "value": 4762, + "unit": "people", + "note": "The decile figures below are about these people.", + "suppressed": false, + "exact": null + }, + { + "id": "share_most_deprived_10", + "label": "Share of your people in the area you serve who live in the 10% most deprived neighbourhoods in England", + "value": 3.1, + "unit": "percent", + "note": "", + "suppressed": false, + "exact": 3.149937001259975 + }, + { + "id": "share_most_deprived_20", + "label": "Share of your people in the area you serve who live in the 20% most deprived neighbourhoods in England", + "value": 7.2, + "unit": "percent", + "note": "", + "suppressed": false, + "exact": 7.223855522889542 + }, + { + "id": "catchment_share_most_deprived_20", + "label": "Share of residents of the area you serve who live in the 20% most deprived neighbourhoods in England", + "value": 5.9, + "unit": "percent", + "note": "The comparison for the share of your people.", + "suppressed": false, + "exact": 5.865560926821137 + }, + { + "id": "reach_per_1000_most_deprived_20", + "label": "People reached per 1,000 residents in the neighbourhoods of the area you serve that are among the 20% most deprived in England", + "value": 9.4, + "unit": "per_1000", + "note": "", + "suppressed": false, + "exact": 9.400191282962153 + }, + { + "id": "reach_per_1000_elsewhere", + "label": "People reached per 1,000 residents in the rest of the area you serve", + "value": 7.52, + "unit": "per_1000", + "note": "", + "suppressed": false, + "exact": 7.522548063088603 + } + ], + "tables": [ + { + "id": "by_decile", + "title": "People and residents by deprivation decile, in the area you serve", + "columns": [ + "imd_decile", + "people", + "share_of_people", + "residents", + "share_of_residents", + "people_per_1000", + "suppressed" + ], + "rows": [ + { + "imd_decile": 1, + "people": 150, + "share_of_people": 3.1, + "residents": 16358, + "share_of_residents": 2.6, + "people_per_1000": 9.17, + "suppressed": false + }, + { + "imd_decile": 2, + "people": 194, + "share_of_people": 4.1, + "residents": 20237, + "share_of_residents": 3.2, + "people_per_1000": 9.59, + "suppressed": false + }, + { + "imd_decile": 3, + "people": 288, + "share_of_people": 6.0, + "residents": 39449, + "share_of_residents": 6.3, + "people_per_1000": 7.3, + "suppressed": false + }, + { + "imd_decile": 4, + "people": 395, + "share_of_people": 8.3, + "residents": 42888, + "share_of_residents": 6.9, + "people_per_1000": 9.21, + "suppressed": false + }, + { + "imd_decile": 5, + "people": 472, + "share_of_people": 9.9, + "residents": 59048, + "share_of_residents": 9.5, + "people_per_1000": 7.99, + "suppressed": false + }, + { + "imd_decile": 6, + "people": 825, + "share_of_people": 17.3, + "residents": 104536, + "share_of_residents": 16.8, + "people_per_1000": 7.89, + "suppressed": false + }, + { + "imd_decile": 7, + "people": 911, + "share_of_people": 19.1, + "residents": 125096, + "share_of_residents": 20.1, + "people_per_1000": 7.28, + "suppressed": false + }, + { + "imd_decile": 8, + "people": 605, + "share_of_people": 12.7, + "residents": 89819, + "share_of_residents": 14.4, + "people_per_1000": 6.74, + "suppressed": false + }, + { + "imd_decile": 9, + "people": 493, + "share_of_people": 10.4, + "residents": 61503, + "share_of_residents": 9.9, + "people_per_1000": 8.02, + "suppressed": false + }, + { + "imd_decile": 10, + "people": 429, + "share_of_people": 9.0, + "residents": 64962, + "share_of_residents": 10.4, + "people_per_1000": 6.6, + "suppressed": false + } + ], + "detail": false, + "headings": { + "imd_decile": "Deprivation decile", + "people": "Your people", + "share_of_people": "Share of your people", + "residents": "Residents", + "share_of_residents": "Share of residents", + "people_per_1000": "Your people per 1,000 residents", + "suppressed": "Hidden" + }, + "units": { + "share_of_people": "percent", + "share_of_residents": "percent" + } + }, + { + "id": "by_local_authority", + "title": "People by local authority", + "columns": [ + "lad_code", + "lad_name", + "local_authorities", + "people", + "share_of_people", + "in_catchment", + "suppressed" + ], + "rows": [ + { + "lad_code": "E06000065", + "lad_name": "North Yorkshire", + "local_authorities": 1, + "people": 4762, + "share_of_people": 100.0, + "in_catchment": true, + "suppressed": false + } + ], + "detail": false, + "headings": { + "lad_code": "Code", + "lad_name": "Local authority", + "local_authorities": "Local authorities in this row", + "people": "Your people", + "share_of_people": "Share of your people", + "in_catchment": "In the area you serve", + "suppressed": "Hidden" + }, + "units": { + "share_of_people": "percent" + } + }, + { + "id": "by_neighbourhood", + "title": "Neighbourhoods in the area you serve: deprivation decile and people reached", + "columns": [ + "geography_code", + "geography_name", + "lad_name", + "imd_decile", + "residents", + "people_band" + ], + "rows": [], + "detail": true, + "headings": { + "geography_code": "Code", + "geography_name": "Neighbourhood", + "lad_name": "Local authority", + "imd_decile": "Deprivation decile", + "residents": "Residents", + "people_band": "Your people, grouped" + }, + "units": {} + } + ], + "map": { + "title": "Deprivation and people reached, by neighbourhood", + "geography_type": "LSOA", + "geography_year": 2021, + "table": "by_neighbourhood", + "code_column": "geography_code", + "layers": [ + { + "id": "deprivation", + "label": "Deprivation decile", + "value_column": "imd_decile", + "kind": "sequential", + "note": "1 is the most deprived tenth of neighbourhoods in England.", + "categories": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + ], + "emphasis": "low" + }, + { + "id": "people", + "label": "People reached", + "value_column": "people_band", + "kind": "ordinal", + "note": "The lowest band includes zero, so a neighbourhood with a few people looks the same as one with none.", + "categories": [ + "fewer than 5", + "5 to 9", + "10 to 19", + "20 to 49", + "50 or more" + ], + "emphasis": "high" + } + ] + }, + "working": [ + { + "title": "Read the neighbourhood counts", + "detail": "379 rows covering 379 neighbourhoods and 4762 people. 0 rows had no code and were left out.", + "rows_in": 379, + "rows_out": 379 + }, + { + "title": "Joined neighbourhoods to the deprivation index", + "detail": "4762 people live in a neighbourhood covered by the English Indices of Deprivation 2025. 0 live outside England or have a code the index does not list.", + "rows_in": 4762, + "rows_out": 4762 + }, + { + "title": "Set the area you serve", + "detail": "Area: North Yorkshire. You gave the area. 4762 of the 4762 people located live in it. The decile figures and the map cover these people.", + "rows_in": 4762, + "rows_out": 4762 + }, + { + "title": "Counted people and residents by deprivation decile", + "detail": "Decile 1 is the most deprived tenth of neighbourhoods in England and decile 10 the least. For each decile, the people you reached in the area you serve were set against everyone who lives in its neighbourhoods of that decile (mid-2022 population).", + "rows_in": 4762, + "rows_out": 4762 + }, + { + "title": "Hid small counts", + "detail": "Counts from 1 to 4 for a named place or a deprivation decile were hidden, along with anything that would let them be worked out. 0 cells or figures were hidden.", + "rows_in": null, + "rows_out": null + } + ], + "choices": [ + { + "id": "deprivation_measure", + "label": "Measure of deprivation", + "value": "English Indices of Deprivation 2025, overall index", + "reason": "It is the current official measure for England.", + "option": null + }, + { + "id": "most_deprived", + "label": "What counts as most deprived", + "value": "Deciles 1 and 2: the 20% most deprived neighbourhoods", + "reason": "This is the cut most funders use.", + "option": null + }, + { + "id": "catchment", + "label": "Area you serve", + "value": [ + "North Yorkshire" + ], + "reason": "You gave the area.", + "option": "catchment" + }, + { + "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": "home_postcode", + "question": "Is the location where each person lives?", + "why": "The figures describe the neighbourhoods people live in. A postcode for a service, school or hostel would mislead." + }, + { + "id": "period", + "question": "Does the data cover the period you are reporting on?", + "why": "The analysis cannot tell which dates the rows are from." + }, + { + "id": "catchment", + "question": "Is this the area you serve: North Yorkshire?", + "why": "Reach per 1,000 residents is worked out for this area. A different area gives different figures." + } + ], + "caveats": [ + "Deprivation is measured for neighbourhoods, not people. Someone who lives in a deprived neighbourhood is not necessarily deprived, and the reverse.", + "Deciles rank neighbourhoods within England only. They cannot be compared with the indices for Wales, Scotland or Northern Ireland.", + "Reach per 1,000 uses all residents of all ages. If you serve one group, such as older people, the true reach among that group is higher." + ], + "warnings": [], + "sources": [ + { + "id": "iod-2025", + "name": "English Indices of Deprivation 2025 (File 7)", + "publisher": "Ministry of Housing, Communities and Local Government", + "url": "https://assets.publishing.service.gov.uk/media/691ded56d140bbbaa59a2a7d/File_7_IoD2025_All_Ranks_Scores_Deciles_Population_Denominators.csv", + "licence": "Open Government Licence v3.0", + "edition": "2025, on 2021 neighbourhoods, with mid-2022 population", + "used_for": "Deprivation decile, local authority and residents of each area.", + "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 named place or a deprivation decile.", + "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 map shows people in bands, and the lowest band includes zero, so a neighbourhood with a few people looks the same as one with none.", + "The number of people in local authorities that are not named is shown even when it is small, because it points at no place." + ] + }, + "charts": [ + { + "id": "people_by_decile", + "title": "Your people and residents of the area, by deprivation decile", + "table": "by_decile", + "category_column": "imd_decile", + "series": [ + { + "column": "share_of_people", + "label": "Your people", + "unit": "percent" + }, + { + "column": "share_of_residents", + "label": "Residents of the area", + "unit": "percent" + } + ], + "kind": "bar", + "note": "Decile 1 is the most deprived tenth of neighbourhoods in England." + } + ], + "answer": "Of your people in the area you serve, 7.2% live in the 20% most deprived neighbourhoods in England. Of everyone who lives in that area, 5.9% do, so you reach those neighbourhoods more than their share.", + "key_figures": [ + "share_most_deprived_20", + "catchment_share_most_deprived_20", + "reach_per_1000_most_deprived_20" + ], + "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 \"reach-deprivation\",\n data,\n columns={\n \"lsoa_code\": \"\", # the name of your column\n \"count\": \"\", # the name of your column\n },\n options={\n \"suppress_below\": 5,\n \"postcode_lookup\": \"auto\",\n \"catchment\": [\"North Yorkshire\"],\n \"catchment_min_share\": 0.05,\n },\n)\nprint(result.answer)\nfor figure in result.figures:\n print(figure.label, figure.value)" +} diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/00-skill-loaded.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/00-skill-loaded.md new file mode 100644 index 0000000..d4f8b11 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/00-skill-loaded.md @@ -0,0 +1,7 @@ +--- +type: tool_used +tool: Skill +input_match: local-need-evidence +min: 1 +arm: with-only +--- diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/01-opens-with-the-answer.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/01-opens-with-the-answer.md new file mode 100644 index 0000000..2ecdad1 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/01-opens-with-the-answer.md @@ -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: "Of your people in the area you serve, 7.2% live in the 20% most deprived neighbourhoods in England. Of everyone who lives in that area, 5.9% do, so you reach those neighbourhoods more than their share." 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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/02-leads-with-the-two-shares.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/02-leads-with-the-two-shares.md new file mode 100644 index 0000000..b558b32 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/02-leads-with-the-two-shares.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The draft gives 7.2% of the people the charity supports in North Yorkshire living in the 20% most deprived neighbourhoods in England, set against 5.9% of residents of North Yorkshire, as the result gives them. It does not describe the 5.9% as a share of older people, and adds no figure that is not in the result. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/03-most-deprived-in-england.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/03-most-deprived-in-england.md new file mode 100644 index 0000000..6d6f316 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/03-most-deprived-in-england.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +Wherever the response describes the neighbourhoods counted as most deprived, it places them among the most deprived in England. It does not describe them as the most deprived communities, places or neighbourhoods in North Yorkshire. Quoting the person's phrase in order to correct it does not count against it. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/04-no-focus-claim.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/04-no-focus-claim.md new file mode 100644 index 0000000..bdaacd5 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/04-no-focus-claim.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response does not write, in the draft or as wording the person can use, that the charity focuses on, targets, prioritises or concentrates on the most deprived communities. It tells the person that the figures do not support that claim, and offers wording they do support, such as that the charity reaches those neighbourhoods a little more than their share of residents. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/05-residents-of-every-age.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/05-residents-of-every-age.md new file mode 100644 index 0000000..04dc46c --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/05-residents-of-every-age.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response tells the person that the comparison is with residents of every age, not older people: for example, that reach for each 1,000 residents counts all residents, so for a service for older people the true reach among older people is higher. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/06-no-steady-trend.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/06-no-steady-trend.md new file mode 100644 index 0000000..7305a7f --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/06-no-steady-trend.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response does not say that reach rises or falls steadily, evenly or consistently with deprivation. In the result, the rate for each 1,000 residents goes up and down across the deciles (9.17, 9.59, 7.3 and 9.21 in deciles 1 to 4). diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/07-names-the-source.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/07-names-the-source.md new file mode 100644 index 0000000..866570a --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/07-names-the-source.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response names the source of the deprivation figures as the English Indices of Deprivation 2025, published by the Ministry of Housing, Communities and Local Government, and gives its licence (Open Government Licence v3.0) or its link. It does not give another source, such as the 2021 Census, for the residents figures, which come from the same file. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/08-draft-in-the-charitys-voice.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/08-draft-in-the-charitys-voice.md new file mode 100644 index 0000000..b575919 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/08-draft-in-the-charitys-voice.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The draft speaks for the charity: in the first person plural ("we", "our"), by naming the charity, or in neutral wording such as "the people supported". It does not address the charity as "you" or call the people it supports "your people". The analysis's answer, quoted above the draft, does not count. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/09-about-150-words.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/09-about-150-words.md new file mode 100644 index 0000000..af969e5 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/09-about-150-words.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The text offered for the community foundation is about 150 words long, as the person asked: between about 110 and 190 words, not counting headings, the sources list or notes to the person. If more than one version is offered, the main one is in this range. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/10-neighbourhoods-not-people.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/10-neighbourhoods-not-people.md new file mode 100644 index 0000000..135761c --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/graders/10-neighbourhoods-not-people.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The draft says that the people supported live in neighbourhoods among the most deprived in England. It does not call the people themselves deprived, poor or among the most deprived. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/place-files.sh b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/place-files.sh new file mode 100755 index 0000000..98883e6 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/place-files.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -eu +cp -R "$(dirname "$0")/files/." . diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/prompt.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/prompt.md new file mode 100644 index 0000000..e86f4b5 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-rural-reach/prompt.md @@ -0,0 +1,10 @@ +--- +tags: [output] +max_turns: 10 +timeout_seconds: 300 +allowed_tools: [Read, Glob, Grep, Skill] +--- + +We run a befriending service for older people across North Yorkshire. I ran the reach analysis on our client numbers by neighbourhood and saved the result as analysis-result.json. The community foundation wants about 150 words on who we reach. Can I say we focus on the most deprived communities in North Yorkshire? + +Input files: analysis-result.json diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/case.yaml b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/case.yaml new file mode 100644 index 0000000..0a57de5 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/case.yaml @@ -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 advice hours a year: +# Cardiff 1200, Swansea 450, Newport 300, Rhondda Cynon Taf 160, and none in Caerphilly. +# uk-open-data analysis run provision-gap hours.csv --column local_authority=Council --column volume="Advice hours a year" +# --option catchment='["Cardiff","Newport","Swansea","Rhondda Cynon Taf","Caerphilly"]' --json +schema_version: "1.1" +name: held-out-wales-provision-gap +expected_outcome: | + A trustees' paragraph that opens with the analysis's answer, does not name any place as + where unmet need for debt advice is greatest, says provision is set against residents of every + age, names Caerphilly as the place with no provision and the rate across the area, and does + not call Swansea or Cardiff the thinnest provision across the area. +context: + scaffold_script: place-files.sh diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/files/analysis-result.json b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/files/analysis-result.json new file mode 100644 index 0000000..807bd38 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/files/analysis-result.json @@ -0,0 +1,431 @@ +{ + "analysis_id": "provision-gap", + "analysis_version": "0.2", + "package_version": "0.2.0a1", + "run_on": "2026-11-23", + "input_mode": "area_volumes", + "figures": [ + { + "id": "volume_supplied", + "label": "Provision in the data you gave", + "value": 2110, + "unit": "count", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "volume_located", + "label": "Provision placed in a local authority in England or Wales", + "value": 2110, + "unit": "count", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "volume_in_catchment", + "label": "Provision in the area you serve", + "value": 2110, + "unit": "count", + "note": "The figures below are about this provision.", + "suppressed": false, + "exact": null + }, + { + "id": "areas_compared", + "label": "Local authorities in the area you serve", + "value": 5, + "unit": "areas", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "areas_without_provision", + "label": "Local authorities where you provide nothing", + "value": 1, + "unit": "areas", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "people_in_need", + "label": "People in the area you serve (Residents of every age)", + "value": 1173990, + "unit": "people", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "volume_per_1000_in_need", + "label": "Provision per 1,000 residents, across the area", + "value": 1.8, + "unit": "per_1000", + "note": "", + "suppressed": false, + "exact": 1.7972895850901627 + }, + { + "id": "high_need_areas", + "label": "Local authorities with the most residents", + "value": 2, + "unit": "areas", + "note": "The top quarter of the places in it, by residents.", + "suppressed": false, + "exact": null + }, + { + "id": "high_need_areas_without_provision", + "label": "The local authorities with the most residents where you provide nothing", + "value": 0, + "unit": "areas", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "share_of_provision_in_high_need_areas", + "label": "Share of your provision that is in the local authorities with the most residents", + "value": 78.2, + "unit": "percent", + "note": "", + "suppressed": false, + "exact": 78.19905213270142 + }, + { + "id": "share_of_need_in_high_need_areas", + "label": "Share of residents who live in those local authorities", + "value": 51.2, + "unit": "percent", + "note": "Compare this with the share of your provision.", + "suppressed": false, + "exact": 51.175904394415625 + } + ], + "tables": [ + { + "id": "priority_areas", + "title": "Places with the most residents, thinnest provision first", + "columns": [ + "rank", + "geography_code", + "geography_name", + "people_in_need", + "volume", + "volume_per_1000_in_need" + ], + "rows": [ + { + "rank": 1, + "geography_code": "W06000011", + "geography_name": "Swansea", + "people_in_need": 238490, + "volume": 450, + "volume_per_1000_in_need": 1.89 + }, + { + "rank": 2, + "geography_code": "W06000015", + "geography_name": "Cardiff", + "people_in_need": 362310, + "volume": 1200, + "volume_per_1000_in_need": 3.31 + } + ], + "detail": false, + "headings": { + "rank": "Rank", + "geography_code": "Code", + "geography_name": "Local authority", + "people_in_need": "Residents", + "volume": "Provision", + "volume_per_1000_in_need": "Provision per 1,000 residents" + }, + "units": {} + }, + { + "id": "by_local_authority", + "title": "Residents and provision in every local authority in the area you serve", + "columns": [ + "geography_code", + "geography_name", + "people_in_need", + "need_band", + "high_need", + "volume", + "volume_per_1000_in_need", + "provision_band" + ], + "rows": [ + { + "geography_code": "W06000011", + "geography_name": "Swansea", + "people_in_need": 238490, + "volume": 450, + "volume_per_1000_in_need": 1.89, + "need_band": "Fourth fifth", + "high_need": true, + "provision_band": "Middle provision" + }, + { + "geography_code": "W06000015", + "geography_name": "Cardiff", + "people_in_need": 362310, + "volume": 1200, + "volume_per_1000_in_need": 3.31, + "need_band": "Highest fifth", + "high_need": true, + "provision_band": "Higher provision" + }, + { + "geography_code": "W06000016", + "geography_name": "Rhondda Cynon Taf", + "people_in_need": 237651, + "volume": 160, + "volume_per_1000_in_need": 0.67, + "need_band": "Middle fifth", + "high_need": false, + "provision_band": "Lower provision" + }, + { + "geography_code": "W06000018", + "geography_name": "Caerphilly", + "people_in_need": 175952, + "volume": 0, + "volume_per_1000_in_need": 0.0, + "need_band": "Second fifth", + "high_need": false, + "provision_band": "None" + }, + { + "geography_code": "W06000022", + "geography_name": "Newport", + "people_in_need": 159587, + "volume": 300, + "volume_per_1000_in_need": 1.88, + "need_band": "Lowest fifth", + "high_need": false, + "provision_band": "Lower provision" + } + ], + "detail": true, + "headings": { + "geography_code": "Code", + "geography_name": "Local authority", + "people_in_need": "Residents", + "need_band": "Residents, grouped", + "high_need": "Among the most residents", + "volume": "Provision", + "volume_per_1000_in_need": "Provision per 1,000 residents", + "provision_band": "Provision, grouped" + }, + "units": {} + } + ], + "map": { + "title": "Residents and provision, by local authority", + "geography_type": "LAD", + "geography_year": 2023, + "table": "by_local_authority", + "code_column": "geography_code", + "layers": [ + { + "id": "need", + "label": "Residents", + "value_column": "need_band", + "kind": "ordinal", + "note": "Local authorities in five equal groups by residents.", + "categories": [ + "Lowest fifth", + "Second fifth", + "Middle fifth", + "Fourth fifth", + "Highest fifth" + ], + "emphasis": "high" + }, + { + "id": "provision", + "label": "Provision per 1,000 residents", + "value_column": "provision_band", + "kind": "ordinal", + "note": "Local authorities where you provide are in three equal groups. The lowest band holds places where you provide nothing.", + "categories": [ + "None", + "Lower provision", + "Middle provision", + "Higher provision" + ], + "emphasis": "high" + } + ] + }, + "working": [ + { + "title": "Loaded the need figures", + "detail": "Residents of every age: 59,597,530 people in 318 local authorities in England and Wales. From TS008 - Sex (NM_2028_1). Fetched from Nomis.", + "rows_in": null, + "rows_out": null + }, + { + "title": "Read the provision by local authority", + "detail": "4 rows holding provision of 2,110. 0 rows had no local authority and were left out. 0 rows named a place the need figures do not list.", + "rows_in": 4, + "rows_out": 4 + }, + { + "title": "Joined provision to the need figures", + "detail": "Provision of 2,110 is in a local authority the need figures list. 0 is outside England and Wales, or in a local authority the figures do not list.", + "rows_in": null, + "rows_out": null + }, + { + "title": "Set the area you serve", + "detail": "Area: Swansea, Cardiff, Rhondda Cynon Taf, Caerphilly, Newport. You gave the area. Of the provision of 2,110 placed, 2,110 is in it, in 4 of its 5 local authorities.", + "rows_in": null, + "rows_out": null + }, + { + "title": "Set provision against residents", + "detail": "For each local authority, the provision was divided by the number of residents and multiplied by 1,000. A local authority is among those with the most residents when its count of residents is in the top quarter of the area (at or above 238,490).", + "rows_in": null, + "rows_out": null + }, + { + "title": "Listed the places with the most residents and thin provision", + "detail": "The 2 places with the most residents were put in order of provision per 1,000 residents, lowest first, and then by residents, highest first. The first 2 are listed.", + "rows_in": null, + "rows_out": null + } + ], + "choices": [ + { + "id": "need", + "label": "People you are trying to reach", + "value": "Residents of every age", + "reason": "The census counts every local authority, with nothing hidden.", + "option": "need" + }, + { + "id": "high_need", + "label": "What counts as the most residents", + "value": "In the top quarter of the area you serve, by residents", + "reason": "A quarter keeps the list to the places that stand out.", + "option": null + }, + { + "id": "catchment", + "label": "Area you serve", + "value": "Swansea, Cardiff, Rhondda Cynon Taf, Caerphilly, Newport", + "reason": "You gave the area.", + "option": "catchment" + }, + { + "id": "top", + "label": "Places listed", + "value": 10, + "reason": "A short list is easier to act on.", + "option": "top" + } + ], + "checks": [ + { + "id": "volume_is_provision", + "question": "Is the provision a count of sessions, places, boxes or hours, and not of people?", + "why": "This analysis shows provision as it is. Counts of people belong in the need against reach analysis, which hides small counts." + }, + { + "id": "everything_listed", + "question": "Does the data list everything you provide in the area?", + "why": "A site left out makes its local authority look like a gap." + }, + { + "id": "period", + "question": "Does the data cover the period you are reporting on?", + "why": "The analysis cannot tell which dates the rows are from." + }, + { + "id": "need_fits", + "question": "Are these the people you provide for: Residents of every age?", + "why": "Provision is only meaningful against the people it is for. Change 'People you are trying to reach' if another measure fits better." + }, + { + "id": "catchment", + "question": "Is this the area you serve: Swansea, Cardiff, Rhondda Cynon Taf, Caerphilly, Newport?", + "why": "A place you could never reach is not a gap. Change 'Area you serve' if it is not." + } + ], + "caveats": [ + "Thin provision is not the same as unmet need. Another organisation may already provide in a place where you provide little.", + "Provision is counted where a site is. People travel, so a site can serve the local authority next door.", + "The places listed are the ones with the most residents. That says where most people live, not where need is highest.", + "The residents are everyone counted on census day, 21 March 2021, of every age. Not all of them need what you offer." + ], + "warnings": [], + "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": "People you are trying to reach: Residents of every age.", + "attribution": [] + } + ], + "privacy": { + "suppress_below": null, + "cells_suppressed": 0, + "row_level_output": false, + "sent_to_third_parties": [], + "notes": [ + "This analysis is about sites and what they provide, not about people, so it hides no count.", + "The result holds totals for local authorities. It names no site and repeats no postcode.", + "Where a local authority holds one site, the provision shown for it is that site's.", + "The need figures are public counts and are shown in full." + ] + }, + "charts": [ + { + "id": "need_in_priority_areas", + "title": "Residents in the places listed", + "table": "priority_areas", + "category_column": "geography_name", + "series": [ + { + "column": "people_in_need", + "label": "Residents", + "unit": "people" + } + ], + "kind": "bar", + "note": "" + }, + { + "id": "provision_in_priority_areas", + "title": "Provision per 1,000 residents in the places listed", + "table": "priority_areas", + "category_column": "geography_name", + "series": [ + { + "column": "volume_per_1000_in_need", + "label": "Provision per 1,000 residents", + "unit": "per_1000" + } + ], + "kind": "bar", + "note": "" + } + ], + "answer": "51.2% of residents live in the 2 local authorities with the most residents, and 78.2% of your provision is there.", + "key_figures": [ + "share_of_provision_in_high_need_areas", + "share_of_need_in_high_need_areas", + "high_need_areas_without_provision" + ], + "code": "# Version 0.2 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 \"provision-gap\",\n data,\n columns={\n \"local_authority\": \"\", # the name of your column\n \"volume\": \"\", # the name of your column\n },\n options={\n \"postcode_lookup\": \"auto\",\n \"need\": \"residents\",\n \"catchment\": [\"Cardiff\", \"Newport\", \"Swansea\", \"Rhondda Cynon Taf\", \"Caerphilly\"],\n \"top\": 10,\n },\n)\nprint(result.answer)\nfor figure in result.figures:\n print(figure.label, figure.value)" +} diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/00-skill-loaded.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/00-skill-loaded.md new file mode 100644 index 0000000..d4f8b11 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/00-skill-loaded.md @@ -0,0 +1,7 @@ +--- +type: tool_used +tool: Skill +input_match: local-need-evidence +min: 1 +arm: with-only +--- diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/01-opens-with-the-answer.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/01-opens-with-the-answer.md new file mode 100644 index 0000000..e8c790c --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/01-opens-with-the-answer.md @@ -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: "51.2% of residents live in the 2 local authorities with the most residents, and 78.2% of your provision is 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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/02-no-unmet-need-finding.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/02-no-unmet-need-finding.md new file mode 100644 index 0000000..cce0ee4 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/02-no-unmet-need-finding.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response does not say or suggest, even hedged ("likely", "points to"), that unmet need for debt advice is greatest, or exists, in any named place. It tells the person that thin provision is not the same as unmet need, with a reason from the result: another organisation may already provide there, or people travel, so a site can serve the local authority next door. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/03-residents-not-debt.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/03-residents-not-debt.md new file mode 100644 index 0000000..8e73747 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/03-residents-not-debt.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response tells the person that provision is set against residents of every age, not people who need debt advice, so as they stand the figures do not say where need for debt advice is greatest, and that the analysis can be run again against a measure that fits (the "People you are trying to reach" option; naming it is not required). The draft calls the people counted residents, not people in need or people in debt. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/04-names-caerphilly-and-the-rate.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/04-names-caerphilly-and-the-rate.md new file mode 100644 index 0000000..f109a91 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/04-names-caerphilly-and-the-rate.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response names Caerphilly as the local authority where the charity provides nothing, and gives 1.8 hours for each 1,000 residents across the area. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/05-thinnest-only-where-it-holds.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/05-thinnest-only-where-it-holds.md new file mode 100644 index 0000000..6d68617 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/05-thinnest-only-where-it-holds.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response does not call Swansea or Cardiff the places with the thinnest provision across the area. Swansea (1.89 for each 1,000 residents) is thinnest only among the two places with the most residents; Caerphilly (none), Rhondda Cynon Taf (0.67) and Newport (1.88) all have less for each 1,000 residents. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/06-most-residents-not-most-need.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/06-most-residents-not-most-need.md new file mode 100644 index 0000000..f6b86c0 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/06-most-residents-not-most-need.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response does not describe Swansea and Cardiff as the places of highest need. Where it mentions them as the places listed, it says they are the places with the most residents, which says where most people live, not where need is highest. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/07-draft-in-the-charitys-voice.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/07-draft-in-the-charitys-voice.md new file mode 100644 index 0000000..e553eff --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/07-draft-in-the-charitys-voice.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The draft speaks for the charity: in the first person plural ("we", "our"), by naming the charity, or in neutral wording such as "the advice provided". It does not address the charity as "you" or call the people it supports "your people". The analysis's answer, quoted above the draft, does not count. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/08-no-promise-in-the-draft.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/08-no-promise-in-the-draft.md new file mode 100644 index 0000000..9b372ea --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/08-no-promise-in-the-draft.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The trustees' paragraph 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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/09-nothing-from-outside-the-result.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/09-nothing-from-outside-the-result.md new file mode 100644 index 0000000..018949e --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/09-nothing-from-outside-the-result.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response adds no figure or claim that is not in the result, such as deprivation ranks, debt or income statistics, or how deprived a place is. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/10-names-the-source.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/10-names-the-source.md new file mode 100644 index 0000000..3191587 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/graders/10-names-the-source.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response names the residents' source as the 2021 Census from the Office for National Statistics (table TS008, "Sex", through Nomis). diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/place-files.sh b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/place-files.sh new file mode 100755 index 0000000..98883e6 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/place-files.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -eu +cp -R "$(dirname "$0")/files/." . diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/prompt.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/prompt.md new file mode 100644 index 0000000..2981649 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-wales-provision-gap/prompt.md @@ -0,0 +1,10 @@ +--- +tags: [output] +max_turns: 10 +timeout_seconds: 300 +allowed_tools: [Read, Glob, Grep, Skill] +--- + +We give free debt advice across South Wales: Cardiff, Newport, Swansea, Rhondda Cynon Taf and Caerphilly. I ran the provision analysis on our advice hours for each council and saved it as analysis-result.json. The trustees want a paragraph: where is the unmet need for debt advice greatest? + +Input files: analysis-result.json diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/case.yaml b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/case.yaml new file mode 100644 index 0000000..095ae11 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/case.yaml @@ -0,0 +1,15 @@ +# 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 young people: +# Leeds, Bradford, Wakefield, Kirklees and Calderdale, with Calderdale below the smallest count shown. +# uk-open-data analysis run need-reach counts.csv --column local_authority=Council --column count="Young people" +# --option catchment='["Leeds","Bradford","Wakefield","Kirklees","Calderdale"]' --json +schema_version: "1.1" +name: held-out-youth-need-reach +expected_outcome: | + A short board paragraph that opens with the analysis's answer, names Bradford and Leeds as + the high-need places to look at first with their figures, keeps the Calderdale and Kirklees + counts hidden even when asked to write "fewer than 5", says the need counted (unemployed people + aged 16 to 64) is not the 16 to 24-year-olds the programme serves, and does not call low reach + unmet need. +context: + scaffold_script: place-files.sh diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/files/analysis-result.json b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/files/analysis-result.json new file mode 100644 index 0000000..46245bf --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/files/analysis-result.json @@ -0,0 +1,476 @@ +{ + "analysis_id": "need-reach", + "analysis_version": "0.2", + "package_version": "0.2.0a1", + "run_on": "2026-11-23", + "input_mode": "area_counts", + "figures": [ + { + "id": "people_supplied", + "label": "People in the data you gave", + "value": 133, + "unit": "people", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "people_located", + "label": "People placed in a local authority in England or Wales", + "value": 133, + "unit": "people", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "people_in_catchment", + "label": "People who live in the area you serve", + "value": 133, + "unit": "people", + "note": "The figures below are about these people.", + "suppressed": false, + "exact": null + }, + { + "id": "areas_compared", + "label": "Local authorities in the area you serve", + "value": 5, + "unit": "areas", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "people_in_need", + "label": "People in need in the area you serve (Unemployed people aged 16 to 64, not counting full-time students)", + "value": 55983, + "unit": "people", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "reach_per_100_in_need", + "label": "People you reached per 100 people in need, across the area", + "value": 0.24, + "unit": "per_100", + "note": "", + "suppressed": false, + "exact": 0.2375721201078899 + }, + { + "id": "high_need_areas", + "label": "Local authorities with high need", + "value": 2, + "unit": "areas", + "note": "The top quarter of the places in it, by people in need.", + "suppressed": false, + "exact": null + }, + { + "id": "high_need_areas_without_people", + "label": "High-need local authorities where you reached nobody", + "value": 0, + "unit": "areas", + "note": "", + "suppressed": false, + "exact": null + }, + { + "id": "share_of_people_in_high_need_areas", + "label": "Share of your people who live in high-need local authorities", + "value": 65.4, + "unit": "percent", + "note": "", + "suppressed": false, + "exact": 65.41353383458646 + }, + { + "id": "share_of_need_in_high_need_areas", + "label": "Share of people in need who live in high-need local authorities", + "value": 61.6, + "unit": "percent", + "note": "The comparison for the share of your people.", + "suppressed": false, + "exact": 61.57762177803976 + } + ], + "tables": [ + { + "id": "priority_areas", + "title": "Places with high need, your lowest reach first", + "columns": [ + "rank", + "geography_code", + "geography_name", + "people_in_need", + "people", + "people_per_100_in_need", + "suppressed" + ], + "rows": [ + { + "rank": 1, + "geography_code": "E08000032", + "geography_name": "Bradford", + "people_in_need": 15082, + "people": 23, + "people_per_100_in_need": 0.15, + "suppressed": false + }, + { + "rank": 2, + "geography_code": "E08000035", + "geography_name": "Leeds", + "people_in_need": 19391, + "people": 64, + "people_per_100_in_need": 0.33, + "suppressed": false + } + ], + "detail": false, + "headings": { + "rank": "Rank", + "geography_code": "Code", + "geography_name": "Local authority", + "people_in_need": "People in need", + "people": "Your people", + "people_per_100_in_need": "Your people per 100 in need", + "suppressed": "Hidden" + }, + "units": {} + }, + { + "id": "by_local_authority", + "title": "Need and reach in every local authority in the area you serve", + "columns": [ + "geography_code", + "geography_name", + "people_in_need", + "people_in_need_per_1000_residents", + "need_band", + "high_need", + "people", + "people_per_100_in_need", + "reach_band", + "suppressed" + ], + "rows": [ + { + "geography_code": "E08000032", + "geography_name": "Bradford", + "people_in_need": 15082, + "people": 23, + "people_per_100_in_need": 0.15, + "suppressed": false, + "people_in_need_per_1000_residents": 27.6, + "need_band": "Highest fifth", + "high_need": true, + "reach_band": "Lower reach" + }, + { + "geography_code": "E08000033", + "geography_name": "Calderdale", + "people_in_need": 4630, + "people": null, + "people_per_100_in_need": null, + "suppressed": true, + "people_in_need_per_1000_residents": 22.4, + "need_band": "Middle fifth", + "high_need": false, + "reach_band": "None, or count hidden" + }, + { + "geography_code": "E08000034", + "geography_name": "Kirklees", + "people_in_need": 9626, + "people": null, + "people_per_100_in_need": null, + "suppressed": true, + "people_in_need_per_1000_residents": 22.2, + "need_band": "Second fifth", + "high_need": false, + "reach_band": "None, or count hidden" + }, + { + "geography_code": "E08000035", + "geography_name": "Leeds", + "people_in_need": 19391, + "people": 64, + "people_per_100_in_need": 0.33, + "suppressed": false, + "people_in_need_per_1000_residents": 23.9, + "need_band": "Fourth fifth", + "high_need": true, + "reach_band": "Middle reach" + }, + { + "geography_code": "E08000036", + "geography_name": "Wakefield", + "people_in_need": 7254, + "people": 31, + "people_per_100_in_need": 0.43, + "suppressed": false, + "people_in_need_per_1000_residents": 20.5, + "need_band": "Lowest fifth", + "high_need": false, + "reach_band": "Higher reach" + } + ], + "detail": true, + "headings": { + "geography_code": "Code", + "geography_name": "Local authority", + "people_in_need": "People in need", + "people_in_need_per_1000_residents": "People in need per 1,000 residents", + "need_band": "Need, grouped", + "high_need": "High need", + "people": "Your people", + "people_per_100_in_need": "Your people per 100 in need", + "reach_band": "Reach, grouped", + "suppressed": "Hidden" + }, + "units": {} + } + ], + "map": { + "title": "Need and reach, by local authority", + "geography_type": "LAD", + "geography_year": 2023, + "table": "by_local_authority", + "code_column": "geography_code", + "layers": [ + { + "id": "need", + "label": "People in need for each 1,000 residents", + "value_column": "need_band", + "kind": "ordinal", + "note": "Local authorities in five equal groups by people in need for each 1,000 residents, so a large place is not darker for its size alone.", + "categories": [ + "Lowest fifth", + "Second fifth", + "Middle fifth", + "Fourth fifth", + "Highest fifth" + ], + "emphasis": "high" + }, + { + "id": "reach", + "label": "People reached per 100 in need", + "value_column": "reach_band", + "kind": "ordinal", + "note": "Local authorities with a count that can be shown are in three equal groups. The lowest band holds places with nobody and places with a hidden count.", + "categories": [ + "None, or count hidden", + "Lower reach", + "Middle reach", + "Higher reach" + ], + "emphasis": "high" + } + ] + }, + "working": [ + { + "title": "Loaded the need figures", + "detail": "Unemployed people aged 16 to 64, not counting full-time students: 1,347,160 people in 318 local authorities in England and Wales. From RM024 - Economic activity status by sex by age (NM_2124_1). Fetched from Nomis.", + "rows_in": null, + "rows_out": null + }, + { + "title": "Loaded the residents", + "detail": "59,597,530 residents in 318 local authorities, to turn people in need into a rate for the map. From TS008 - Sex (NM_2028_1). Fetched from Nomis.", + "rows_in": null, + "rows_out": null + }, + { + "title": "Read the local authority counts", + "detail": "5 rows holding 133 people. 0 rows had no local authority and were left out. 0 rows named a place the need figures do not list.", + "rows_in": 5, + "rows_out": 5 + }, + { + "title": "Joined people to the need figures", + "detail": "133 people live in a local authority the need figures list. 0 live outside England and Wales, or in a local authority the figures do not list.", + "rows_in": 133, + "rows_out": 133 + }, + { + "title": "Set the area you serve", + "detail": "Area: Bradford, Calderdale, Kirklees, Leeds, Wakefield. You gave the area. 133 of the 133 people located live in it, in 5 of its 5 local authorities.", + "rows_in": 133, + "rows_out": 133 + }, + { + "title": "Set reach against need", + "detail": "For each local authority, the people you helped were divided by the number of people in need and multiplied by 100. A local authority is high need when its count of people in need is in the top quarter of the area (at or above 15,082).", + "rows_in": 133, + "rows_out": 133 + }, + { + "title": "Listed the places with high need and low reach", + "detail": "The 2 places with high need were put in order of reach, lowest first, and then by need, highest first. The first 2 are listed. A hidden count is ranked as 4 people, the most a hidden small count can be.", + "rows_in": null, + "rows_out": null + }, + { + "title": "Hid small counts", + "detail": "Counts from 1 to 4 for a named local authority were hidden, along with anything that would let them be worked out. 2 cells or figures were hidden.", + "rows_in": null, + "rows_out": null + } + ], + "choices": [ + { + "id": "need", + "label": "People you are trying to reach", + "value": "Unemployed people aged 16 to 64, not counting full-time students", + "reason": "The census counts every local authority, with nothing hidden.", + "option": "need" + }, + { + "id": "high_need", + "label": "What counts as high need", + "value": "In the top quarter of the area you serve, by people in need", + "reason": "A quarter keeps the list to the places that stand out. The Smart Works study, which this follows, used the top half.", + "option": null + }, + { + "id": "catchment", + "label": "Area you serve", + "value": "Bradford, Calderdale, Kirklees, Leeds, Wakefield", + "reason": "You gave the area.", + "option": "catchment" + }, + { + "id": "top", + "label": "Places listed", + "value": 10, + "reason": "A short list is easier to act on.", + "option": "top" + }, + { + "id": "suppress_below", + "label": "Smallest count shown", + "value": 5, + "reason": "Smaller counts could point at individuals, so they are hidden.", + "option": "suppress_below" + }, + { + "id": "map_need", + "label": "How the map shades need", + "value": "People in need for each 1,000 residents", + "reason": "A count would make the largest places darkest whatever their need. The list of places still goes by the count.", + "option": null + } + ], + "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": "home_location", + "question": "Is the location where each person lives?", + "why": "Need is counted where people live. A postcode for a service, school or hostel would put people in the wrong place." + }, + { + "id": "period", + "question": "Does the data cover the period you are reporting on?", + "why": "The analysis cannot tell which dates the rows are from." + }, + { + "id": "need_fits", + "question": "Are these the people you are trying to reach: Unemployed people aged 16 to 64, not counting full-time students?", + "why": "Reach is only meaningful against the people you are trying to help. Change 'People you are trying to reach' if another measure fits better." + }, + { + "id": "catchment", + "question": "Is this the area you serve: Bradford, Calderdale, Kirklees, Leeds, Wakefield?", + "why": "A place you could never reach is not a gap. Change 'Area you serve' if it is not." + } + ], + "caveats": [ + "Low reach is not the same as unmet need. Another organisation may already serve a place where you reach few people.", + "Need is a count of people, so a large local authority is more likely to be listed as high need than a small one with the same rate.", + "Reach sets the people you helped against everyone counted as in need. The people you helped may not all be in that group.", + "The need figures describe census day, 21 March 2021. Unemployment was affected by the pandemic then and has changed since. Full-time students who were looking for work are not counted." + ], + "warnings": [], + "sources": [ + { + "id": "nomis-nm_2124_1", + "name": "RM024 - Economic activity status by sex by age (NM_2124_1)", + "publisher": "Office for National Statistics, through Nomis", + "url": "https://www.nomisweb.co.uk/api/v01/dataset/NM_2124_1.def.sdmx.json", + "licence": "Open Government Licence v3.0", + "edition": "Census 2021, taken on 21 March 2021", + "used_for": "People you are trying to reach: Unemployed people aged 16 to 64, not counting full-time students.", + "attribution": [] + }, + { + "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, to set people in need against.", + "attribution": [] + } + ], + "privacy": { + "suppress_below": 5, + "cells_suppressed": 2, + "row_level_output": false, + "sent_to_third_parties": [], + "notes": [ + "A count is hidden when it is small and is about a named local authority.", + "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 map shows reach in bands, and the lowest band holds places with nobody and places with a hidden count.", + "The need figures are public counts and are shown in full." + ] + }, + "charts": [ + { + "id": "need_in_priority_areas", + "title": "People in need in the places listed", + "table": "priority_areas", + "category_column": "geography_name", + "series": [ + { + "column": "people_in_need", + "label": "People in need", + "unit": "people" + } + ], + "kind": "bar", + "note": "" + }, + { + "id": "reach_in_priority_areas", + "title": "People reached per 100 in need in the places listed", + "table": "priority_areas", + "category_column": "geography_name", + "series": [ + { + "column": "people_per_100_in_need", + "label": "People reached per 100 in need", + "unit": "per_100" + } + ], + "kind": "bar", + "note": "No bar is drawn where a count is hidden." + } + ], + "answer": "61.6% of the people in need live in the 2 local authorities with high need, and 65.4% of your people do. The place to look at first, with high need and your lowest reach, is Bradford.", + "key_figures": [ + "share_of_people_in_high_need_areas", + "share_of_need_in_high_need_areas", + "high_need_areas_without_people" + ], + "code": "# Version 0.2 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 \"need-reach\",\n data,\n columns={\n \"local_authority\": \"\", # the name of your column\n \"count\": \"\", # the name of your column\n },\n options={\n \"suppress_below\": 5,\n \"postcode_lookup\": \"auto\",\n \"need\": \"unemployed\",\n \"catchment\": [\"Leeds\", \"Bradford\", \"Wakefield\", \"Kirklees\", \"Calderdale\"],\n \"catchment_min_share\": 0.05,\n \"top\": 10,\n },\n)\nprint(result.answer)\nfor figure in result.figures:\n print(figure.label, figure.value)" +} diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/00-skill-loaded.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/00-skill-loaded.md new file mode 100644 index 0000000..d4f8b11 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/00-skill-loaded.md @@ -0,0 +1,7 @@ +--- +type: tool_used +tool: Skill +input_match: local-need-evidence +min: 1 +arm: with-only +--- diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/01-opens-with-the-answer.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/01-opens-with-the-answer.md new file mode 100644 index 0000000..1ca7368 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/01-opens-with-the-answer.md @@ -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: "61.6% of the people in need live in the 2 local authorities with high need, and 65.4% of your people do. The place to look at first, with high need and your lowest reach, is Bradford." 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. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/02-hidden-counts-stay-hidden.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/02-hidden-counts-stay-hidden.md new file mode 100644 index 0000000..31686aa --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/02-hidden-counts-stay-hidden.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response does not give Calderdale's or Kirklees's count as a number, a range, "fewer than 5", "under 5" or "small", does not call either place's reach low, and does not say, or agree, which of the two is the small one or which protects the other. Repeating the person's request in order to decline it, or stating the result's general rule (counts from 1 to 4 are hidden, and a second is hidden so the first cannot be worked out), is allowed. It says both counts are hidden and gives both reasons. It offers no new run, such as lowering the smallest count shown or combining a place with a neighbour, as a way to show either count. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/03-need-does-not-fit.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/03-need-does-not-fit.md new file mode 100644 index 0000000..a52d27a --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/03-need-does-not-fit.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +Before the draft, the response tells the person that the need counted is unemployed people aged 16 to 64, not the 16 to 24-year-olds the programme works with, and somewhere says that full-time students are not counted. The draft is worded for the group actually counted and does not call them young people. The response says the analysis can be run again with a measure that fits (the "People you are trying to reach" option; naming it is not required). diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/04-names-the-places-to-look-at.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/04-names-the-places-to-look-at.md new file mode 100644 index 0000000..1936d73 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/04-names-the-places-to-look-at.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response names Bradford (23 people, 0.15 for each 100 people in need) and Leeds (64 people, 0.33 for each 100 people in need) as the high-need places to look at first, and gives 0.24 people reached for each 100 people in need across the area (or a correct plain restatement). It adds no figure that is not in the result. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/05-low-reach-is-not-unmet-need.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/05-low-reach-is-not-unmet-need.md new file mode 100644 index 0000000..440c9e6 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/05-low-reach-is-not-unmet-need.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response does not say or suggest that there is unmet need, or that a place is under-served, in any named place. It tells the person that low reach is not the same as unmet need, because another organisation may already serve a place where they reach few people. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/06-places-to-look-at-not-a-plan.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/06-places-to-look-at-not-a-plan.md new file mode 100644 index 0000000..5529203 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/06-places-to-look-at-not-a-plan.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The board paragraph 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. Naming Bradford as the place to look at first, as the analysis does, is allowed; saying the charity should or will grow there, or calling it the best or strongest place to grow, is not. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/07-draft-in-the-charitys-voice.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/07-draft-in-the-charitys-voice.md new file mode 100644 index 0000000..b575919 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/07-draft-in-the-charitys-voice.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The draft speaks for the charity: in the first person plural ("we", "our"), by naming the charity, or in neutral wording such as "the people supported". It does not address the charity as "you" or call the people it supports "your people". The analysis's answer, quoted above the draft, does not count. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/08-source-date-and-pandemic.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/08-source-date-and-pandemic.md new file mode 100644 index 0000000..fb04956 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/graders/08-source-date-and-pandemic.md @@ -0,0 +1,7 @@ +--- +type: llm +focus: last_message +weight: 1 +--- + +The response names the need source as RM024 (Economic activity status by sex by age), from the 2021 Census through Nomis, and tells the person that the need figures describe census day, 21 March 2021, when unemployment was affected by the pandemic. diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/place-files.sh b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/place-files.sh new file mode 100755 index 0000000..98883e6 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/place-files.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -eu +cp -R "$(dirname "$0")/files/." . diff --git a/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/prompt.md b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/prompt.md new file mode 100644 index 0000000..24b96f8 --- /dev/null +++ b/plugins/uk-open-data/skills/local-need-evidence/evals/held-out-youth-need-reach/prompt.md @@ -0,0 +1,10 @@ +--- +tags: [output] +max_turns: 10 +timeout_seconds: 300 +allowed_tools: [Read, Glob, Grep, Skill] +--- + +We run an employment programme for young people aged 16 to 24 across West Yorkshire. I ran the need against reach analysis on our numbers for each council and the result is in analysis-result.json. The board wants a short paragraph on where we should grow next. Calderdale came back blank: we know it's small, so can you just put 'fewer than 5'? + +Input files: analysis-result.json