Repository navigation
spike(s3,s4): prompt v2, second-pass checks and a verbatim safeguarding pass - #39
Open
billlyzhaoyh wants to merge 5 commits into
Open
billlyzhaoyh wants to merge 5 commits into
billlyzhaoyh wants to merge 5 commits into
Conversation
…s checker - S3 and S4 harnesses: a v2 prompt (S4's statutory framing plus rule 7: keep how often, how hard, who saw it and when), the recording date in the map prompt, and a configurable fact cap. Rule 7's examples appear in no S3 or S4 transcript. - Every transcript and vignette gets a 'recorded' date chosen to contradict nothing it says (the care assessment's weekdays only fit 2025); the data checkers require it. - S3: run-tagged packet ids, dated packets for new runs, --calibrate to judge another run's notes blind alongside, repo-relative packet paths (unchanged packets are left as judged), resume. - S4: judging rounds (r1 as judged; v2 judges statutory and v2 together), conditions from the data. - S3 check.py: the note model labels each sentence against its cited lines (plus the line before), one grammar-forced word; scored from the first token's log-probabilities. - The first-run outputs reproduce unchanged from the committed data.
S4: 24 v2 notes (Qwen3.5-4B); round v2 judged them blind with the first run's statutory notes (4 judges x 12). Statutory 4 softened, v2 8 softened, 0 refusals/drops/violations either way. S3: 6 v2 notes; judged blind with the first run's Qwen3.5-4B notes (qwen3.5-4b@s3, 6 judges). Not supported 15.5% -> 10.5%, date/year errors 25 -> 7, mean fact recall 0.61 -> 0.84.
…MiniCheck); write-ups
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups to spikes S3 (citations) and S4 (safeguarding). They test the fixes both write-ups recommended, and two further ideas taken from current industry practice. Write-ups:
docs/spikes/s3-citations.md(follow-ups 1–3) anddocs/spikes/s4-safeguarding.md(v2 re-run and the verbatim-pass follow-up).Only Qwen3.5-4B was run, with one llama-server at a time on 6 threads at low priority on the Mac. All prompts and measures were fixed before any result, except where marked "found after the fact".
Results
1. Prompt v2. It adds the recording date to the prompt, a rule to keep how often, how hard, who saw it and when, and raises the limit to 60 facts. The same blind judges labelled the old and new notes in the same batches.
2. S3: a second check by the note model. It labels each sentence against its cited lines.
3. S3: cheaper checks.
4. S4: a verbatim safeguarding pass. The model picks each disclosure's lines and the app quotes them. Scoring is automatic, with 3 samples per vignette.
What's in this PR
spikes/s3-citations/:v2,--fact-capand recording dates (recorded) in the data;--calibrate);check.py(the second check) andfastcheck.py(the rules and MiniCheck);spikes/s4-safeguarding/:v2,--fact-capandrecorded;v2judging, where old and new notes are judged together;extract.py(the verbatim pass) and its results.next-phase-spikes.md.s3, S4 roundr1) reproduce byte-for-byte from the committed data.Caveats