Repository navigation
fix(semantic): compact judge and contradiction verifier - #102
Conversation
Add verdict, confidence, discard, stop-reason, and output-length breakdowns; record failed/timeout dispatch receipts; compute repair rate and p95 from actual calls; document that the judge returned no contradictions.
Add a compact per-candidate output format, server-side evidence anchoring, general family evidence gates, a fail-closed contradiction verifier, and evidence-identity dedupe. Public held-out-3 gains +3 localized/+2 type-present at 1.0 precision; baseline/#72/held-out-2 do not yet pass the lift/control gates, so activation remains off.
VerifiedOrganic
left a comment
There was a problem hiding this comment.
Changes requested. Three correctness issues need fixes: Unicode evidence anchoring, invalidation of pre-verifier cache entries, and deduplication of distinct canon violations sharing evidence. Reviewed head 8444ebf against base c3c5915. Static review only; no project programs or tests were run and the checkout was not modified.
Map normalized byte offsets to original UTF-8 bytes, include the judge-policy revision in the semantic cache identity, and keep canon/subject identity in evidence dedupe so distinct violations sharing a quote survive.
VerifiedOrganic
left a comment
There was a problem hiding this comment.
Approved; ready. Reviewed head 1c32dd0 against base c3c5915 and checked the changes since the previous review. All three findings are addressed: normalized evidence offsets now map bytes correctly, cache identity includes a judge-policy revision, and shared-evidence deduplication includes canon and subject identity. Regression tests cover Unicode evidence and distinct canon references sharing a quote. No further required findings. Static review only; tests were not run and the checkout was not modified.
VerifiedOrganic
left a comment
There was a problem hiding this comment.
Approved; ready. Reviewed head 020b114 against base c3c5915, including the measurement/documentation changes since the previously approved revision. Implementation and fixes are unchanged. The refreshed reports support the documented recall/precision results and the decision to keep the lane off by default; no required findings.
Optional documentation cleanup: remove the duplicated section 4.3 heading, and clarify the held-out-2 parity sentence: its would-be warning totals are 1 vs 1, so any claimed mismatch must refer to warning identity rather than counts.
Static review only; no tests or project programs were run and the checkout was not modified.
Diagnosis (public sets only; held-out-4 untouched)
Measured with the pre-fix judge (
ollama:gemma4:31b) on #72 and held-out-3. Reports:evals/results/semantic_p4_held-out-72.json,evals/results/semantic_p4_held-out-3.json.not_contradiction200not_contradiction119One sentence: zero findings reached even info because the judge never returned a contradiction verdict; every validated judgment was compatible or insufficient at high confidence, so policy had nothing to promote, downgrade, or discard.
No evidence-anchor, canon-ref, threshold, or dedupe discards were recorded. The dominant failure was output shape/length: 52/97 #72 calls and 75/106 held-out-3 calls truncated at the 1,200-token cap while emitting the verbose report contract.
Root causes and fixes
conflictandevidence_quote; the server expands it into the existing validated report contract. Truncation fell to zero on the measured sets.Stronger model check (one model, same sample)
ollama:deepseek-v4.1-flashwas tried on the same #72/held-out-3 sample. It was not an improvement: 111/120 #72 calls and 121/125 held-out-3 calls truncated at the 1,200-token cap, with zero findings and ~8-9 s p95 latency. It is not being adopted; the operator still chooses the judge model.Results (same head, gemma4:31b)
Held-out-3 gains +3 localized/+2 type-present with 1.0 precision, no control rise, evidence validity 1.0, and 4.2% shadow repair. #72's warnings are true positives but duplicate already-detected plants, so they add no recall. Baseline and held-out-2 still emit false-positive control warnings. Shadow/on would-be counts match on baseline and held-out-3 but differ by one on #72 (8 vs 9). The four-set lift/control gates do not pass on this head; the lane stays off by default. Held-out-4 remains sealed.
Gates
--semantic offunchanged: baseline 28/28 (3 controls), feat(evals): held-out continuity contradiction corpus #72 54/56 (0), held-out-2 55/56 + 56/56 type (0), held-out-3 26/56 + 28/56 type (0 control warnings).-D warnings, fmt: pass.Gates
--semantic offunchanged: baseline 28/28 (3 controls), feat(evals): held-out continuity contradiction corpus #72 54/56 (0), held-out-2 55/56 + 56/56 type (0), held-out-3 26/56 + 28/56 type (0 control warnings).-D warnings, fmt: pass.Gates
PENDING final measurements; CI/review pending. The default remains off.