# Risk tiers for public-sector AI: design, round 1

Committed before any assessment's text or outcome is opened. The frozen parameters are in `protocol-r1.json`, the rule in
`rule-r1.json`, the coder's text in `codebook-r1.md` and the predictions in `predictions-r1.json`. Where this note and the
JSON differ, the JSON wins. Any later change is a labelled "Change N to the protocol", committed before it is used, and a
change made after results are seen says so.

## Question

Does a short written risk-tier rule (what the system decides, who it affects, whether a person reviews each output, what
personal information it uses) sort real public-sector AI uses into the same review levels their own published assessments
reached, and where does it disagree?

## Overlap test (one question, one study)

The two nearest published studies are `ai-adoption-measurement` (how to measure and gate an AI assistant's adoption inside
customer companies, on synthetic accounts) and `what-ai-needs-from-company-data` (what a model needs before it answers from
company data, on synthetic bank tables and public trips). Neither asks which public uses of AI need which review, and neither
uses government assessments. Nearest others: `self-service-measurement` (judging an assistant by finished tasks). Question and
data both differ, so this is a new study, not a round of any of them.

## Data

Every record in the Government of Canada open data catalogue's Algorithmic Impact Assessment collection, one case per record,
leaving out the record that publishes the blank tool itself. The English assessment is the document read; separate peer review
reports are not read, because the coders must judge the system from the assessment. Licence: Open Government Licence - Canada,
checked record by record in the catalogue feed. The size of the sample is what has been published, about 39 cases; it is a
census of published assessments, not a random sample of public-sector AI.

The Government of Canada AI Register is read for one count only: how many listed systems also have a published assessment.

## What each reader knows

- The rule's author knew the tool's general design (four impact levels, a questionnaire, a mitigation section) and the
  catalogue's titles, and had opened no assessment. That prior knowledge is a limit and the page states it.
- The published level is extracted by `tools/seal_levels.py` into a sealed private file. It prints a hash and counts of how many
  levels it found, never a level. It is opened only by `tools/unseal.py`, which refuses to run until the codes of both coders are
  frozen by a commit and their hash is on record.
- The text a coder reads goes through `tools/redact.py`: overall level, scores, per-answer points and any sentence that names a
  level or its requirements are removed mechanically. A leak scan must return zero hits before any coder runs. Each coder also
  answers `saw_overall`.
- The coders answer the four questions, not the tier. They never see the tier lines, so they cannot steer toward a tier. The
  rule is applied afterwards by `tools/rule.py`.
- Each call is a separate process in an empty folder with one document and nothing else. The coders are two AI models from
  different makers, neither the rule's author. They never see each other's work. Web search is off where the route allows it, and
  each is told to answer from the document alone.

## Measures (per coder, never pooled)

Rule tier against published level: exact agreement and within-one agreement with Wilson 95% intervals; quadratic-weighted kappa
with a percentile bootstrap 95% interval (resampling cases, 20,000 draws, fixed seed); counts above and below; the agreement of
always naming the most common published level, as the baseline every figure is read against.

Coder against coder: the same statistics on the tier, and exact agreement and kappa on each of the four questions.

Disagreements: every case where a coder's rule tier differs from the published level is listed with its codes. The cause is
assigned mechanically, by the declared classes in the protocol: coder split; a single question whose answer would bring the
tier to the level; distance of the assessment's own score from the nearest band edge; how many answers were unstated.

Sensitivity: the rule's agreement with each question held out, and each question alone, to show which question drives it.

Controls: six made-up documents, mixed in unmarked, one correct answer each. A self-test of the plumbing.

Stability: one model call per case is one run of a noisy process, so 10 cases, chosen by the fixed seed, are coded a second time
by each coder, and the same-coder agreement is reported.

## What agreement cannot show

A rule can match a published level because both share the same blind spots. Both read the operating department's own account,
and neither is checked here against what happened to people. The study measures this limit in three ways, all declared now: how
many documents report a measured result (`measured`) or an outside finding (`outside`); how many of the tool's own questions ask
for a measured error rate or group difference, counted mechanically over the published question list; and how many systems on
the AI Register have a published assessment at all. Agreement is never presented as evidence that either scale is right.

## Output

The rule, the agreement tables, the disagreements and why, and a one-page template a city could adopt (intake questions, review
level, required safeguards, what is published). The template's page count is checked mechanically. Anything in it beyond the four
tested questions is marked as untested.

## Predictions

Eleven predictions, P1 to P11, in `predictions-r1.json`, each reported as held, missed or untestable. P11 is a safe bet.

## Fixed in advance

The worked example is the case with the largest gap between coder A's rule tier and the published level, ties broken by case id,
among cases where the two coders agree on the tier. If the two coders agree on no such case, it is the same selection on coder
A alone.
