Repository navigation
spike(s3): citations and faithfulness — cites valid, contradictions ~1 in 7, no cheap flag works - #33
Merged
Merged
Conversation
…vel packets and flag eval Copied from spikes/s2-llm-notes and adapted: time-stamped transcript lines, span-shaped note output, map cap 3072, sentence-level blind packets, lexical + NLI flag evaluation. Four new fictional transcripts (test set) with >=3 traps of every kind and omission facts; S2's two transcripts kept as the tuning set.
…es, blind sentence packets Sectioned notes (map cap 3072, 8 threads, CPU only, seed 42, temp 0.2) for qwen3-4b and qwen3.5-4b on the 2 tuning + 4 test transcripts: raw JSONL with every map call's output, notes and span-shaped notes, per-sentence lexical support and cite checks, NLI (cross-encoder/nli-deberta-v3-small) scores, and 16 blind judge packets with _key.json.
- Read and write every harness file as UTF-8 (Windows Python otherwise uses the locale's code page, turning £ into £ before it reaches the model). - os.getloadavg() does not exist on Windows; log the load inside the try so the server is always stopped. - Refuse to start when the port is already taken, and check the launched llama-server is still alive once /health answers, so output from another server is never recorded under this model's name.
Codex review of PR #33. - collect and flag.py eval stop if a verdict misses a sentence or fact, uses an unknown label, cites_support value or trap id, or belongs to a sentence whose text or cites changed since its packet was written (_key.json now fingerprints each sentence). Re-running packets moves the verdict of a changed packet aside to <id>.verdict.stale.json. The committed verdicts pass all of this unchanged. - Fact recall is computed over the transcript's checklist, not over whatever ids the judge returned. - A sentence may hit several traps: the verdict's trap field takes a list (single ids still accepted). - out_of_part_cites is null, not 0, when a note can't be matched to its map calls; only a note's latest attempt in the run JSONL is used. - flag.py eval: citation validity and the lexical flag use every judged sentence; NLI and combined flags need full NLI coverage (NLI rows now carry the sentence fingerprint). Thresholds are chosen on exact metrics, not ones rounded to 3 places. - Lexical support is 0 with no valid cite even when the sentence has no content words; the median is the true median. - stamp_data --check checks every line's own interval and applies the test-set rules from run.TEST. Regenerated outputs: two lexical medians move in the third decimal (housing 0.385 -> 0.38, planning 0.545 -> 0.542 for Qwen3-4B); the verdicts file now has traps lists. Labels, fact recall and the chosen flag thresholds are unchanged.
…example Codex review of PR #33. - 1 in 7 sentences is unsupported; 1 in 10 contradicts the transcript (114 of 1,099), not 1 in 7. - The plan's citation criterion is that the span exists and supports the sentence. Lines exist for 100%, but cited lines fully support only 67% (test) / 72% (tuning): Fail, not Borderline. - The 2024 year error accounts for 17 of the 28 contradictions in Qwen3.5-4B's legal-interview note (no note had 19). - The transcripts do mention the year in passing; the recording date is what's never given. - Confounds: 2 of 1,099 note items hold two sentences; judges could record one trap per sentence.
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.
Spike S3 from
docs/spikes/next-phase-spikes.md: can a small local model cite transcript time spans for every note sentence, and how often does it state things that were never said? Write-up:docs/spikes/s3-citations.md.Verdict: no-go as specified, with a clear way forward
What the errors are:
Recommendations:
Neither finalist is clearly better here; S4 decides.
What's in this PR
spikes/s3-citations/, a harness built on S2's:{start, end}spans;flag.py, the lexical and NLI flag evaluation.Results for both finalists × 6 transcripts:
Docs:
docs/spikes/s3-citations.md, plus the S3 row innext-phase-spikes.md.Caveats