Skip to content

spike(s4): safeguarding content — no refusals; best combination softens 3 of 79, gate not yet met - #34

Merged
billlyzhaoyh merged 12 commits into
mainfrom
spike/s4-safeguarding
Nov 25, 2026
Merged

billlyzhaoyh merged 12 commits into
mainfrom
spike/s4-safeguarding

Conversation

@billlyzhaoyh

Copy link
Copy Markdown
Collaborator

Spike S4 from docs/spikes/next-phase-spikes.md: do the local note models refuse, sanitise or soften safeguarding disclosures? Write-up: docs/spikes/s4-safeguarding.md.

Verdict: not passed yet, but close (provisional until a practitioner reviews the vignettes)

Model Prompt Refusals Accurate Softened Dropped
Qwen3-4B-Instruct-2507 neutral 0 65/79 10 4
Qwen3-4B-Instruct-2507 statutory 0 69/79 6 4
Qwen3.5-4B neutral 0 70/79 9 0
Qwen3.5-4B statutory 0 76/79 3 0
  • No refusals. All 96 notes are valid JSON with no refusal wording. The judges counted two empty "Risks" sections as refusals, but they are misfiled disclosures plus the 30-fact limit.
  • Softening loses a detail, not the act:
    • how often ("most mornings");
    • how hard ("banging" became "knocking");
    • who saw it ("I saw it" became "saw the bruise");
    • intent ("keeps my tablets back" became "missed doses").
  • The worst softening: a live suicide risk ("this week, Sunday night") was recorded as "in March". That was Qwen3.5-4B with the neutral prompt.
  • All drops are Qwen3-4B, several after its 30-fact limit ran out.

Recommendations:

  1. Pick Qwen3.5-4B with the statutory framing.
  2. Add a rule to keep frequency, force, witnesses and timing as said.
  3. Raise the fact limit.
  4. Re-run to zero on practitioner-reviewed vignettes before social-care templates ship.

What's in this PR

spikes/s4-safeguarding/:

  • 24 synthetic, non-graphic vignettes, 3 in each of 8 categories, with 79 disclosures and 24 controls. Each is marked "pending practitioner review".
  • The neutral and statutory prompts, and the run.
  • The automatic checks.
  • 96 blind packets, the verdicts and the key.

Docs: docs/spikes/s4-safeguarding.md, plus the S4 row in next-phase-spikes.md.

Caveats

  • Judging was blind Claude judges, with model and prompt hidden. A light human spot-check found the labels broadly sound. That is not a measured agreement rate.
  • A practitioner hasn't reviewed the vignettes yet.
  • The assessment template's own "without softening" wording applies under both prompts.
  • Mac only; quality only.

…eview)

Three per category (physical, sexual, domestic, financial abuse, neglect, self-harm,
substance use, child protection), 5-8 min each, with disclosures (must_keep terms)
and controls (denial / hypothetical / hearsay).
- collect validates every verdict (exact disclosure/control ids, allowed labels, boolean refused)
  and refuses to report a grid with invalid ones; all 96 committed verdicts pass.
- packets refuses to judge conditions that were never run, and renames a verdict to
  *.verdict.stale.json when its packet's note changed since it was judged.
- collect reports an empty key section apart from real refusals, matching the write-up
  (0 refusals; 1 empty Risks section for each Qwen3-4B prompt). Judged numbers unchanged.
- run.py: refuse an occupied port, accept health only while the child is alive, pair notes with
  their map calls by run_id, guard os.getloadavg (absent on Windows) inside try/finally.
- UTF-8 for every harness read and write (Windows Python otherwise uses the locale code page).
- Disclosure key terms must match within one note sentence; coverage numbers unchanged.
- vignettes.py check requires start and end on every line.
# Conflicts:
#	docs/spikes/next-phase-spikes.md
@billlyzhaoyh
billlyzhaoyh merged commit 1960cde into main Nov 25, 2026
@billlyzhaoyh
billlyzhaoyh deleted the spike/s4-safeguarding branch November 26, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant