Replaces PR-7's curated-vocab audit with his ablation design — his run-K log killed the vocabulary: all three alternatives rendered [prime minister], Rajoy (a person) was one, PSOE never appeared.
The ablation detector (_audit_ambiguity, zero new prompts — same AnswerFromKG judge):
After a scalar KG answer V, mask V's support rows (dst/quote carry it) from the view — store never mutated.
Re-ask the judge on the survivors. Different value = second defensible reading → record, mask its support, repeat (rounds cap 3, budget law). Same value = corroboration → silent. UNKNOWN → clean, byte-identical.
Run J: pick "Socialist International" → ablation surfaces "prime minister of Spain", then "secretary-general of PSOE". No role vocabulary anywhere — the semantics are the judge's own.
Removed PR-7 entirely: knowledge/ambiguity.py, its tests, the import, _maybe_ambig (3 call sites rewired to _audit_ambiguity(question, answer, rows, charge_llm)). Consumers render the simpler {value, quote, url} alternative shape.
Tests: knowledge/tests/ablation.py — 2 Pedro positives flag (2 alternatives each), EU + rivers counterexamples silent, corroboration silent, store unchanged after audit, single-source silent, rounds cap. Suite 70/70. Live smoke: full pipeline over the run-J page picks SI, flags PM+SG in 2 rounds; rivers silent over the same KG.
**Replaces PR-7's curated-vocab audit with his ablation design** — his run-K log killed the vocabulary: all three alternatives rendered `[prime minister]`, Rajoy (a person) was one, PSOE never appeared.
**The ablation detector** (`_audit_ambiguity`, zero new prompts — same `AnswerFromKG` judge):
- After a scalar KG answer V, mask V's support rows (dst/quote carry it) from the **view** — store never mutated.
- Re-ask the judge on the survivors. Different value = second defensible reading → record, mask its support, repeat (rounds cap 3, budget law). Same value = corroboration → silent. UNKNOWN → clean, byte-identical.
- Run J: pick "Socialist International" → ablation surfaces "prime minister of Spain", then "secretary-general of PSOE". No role vocabulary anywhere — the semantics are the judge's own.
**Removed** PR-7 entirely: `knowledge/ambiguity.py`, its tests, the import, `_maybe_ambig` (3 call sites rewired to `_audit_ambiguity(question, answer, rows, charge_llm)`). Consumers render the simpler `{value, quote, url}` alternative shape.
Tests: `knowledge/tests/ablation.py` — 2 Pedro positives flag (2 alternatives each), EU + rivers counterexamples silent, corroboration silent, store unchanged after audit, single-source silent, rounds cap. Suite **70/70**. Live smoke: full pipeline over the run-J page picks SI, flags PM+SG in 2 rounds; rivers silent over the same KG.
PR-7's audit (merged hours earlier) detected office ambiguity with a
curated role vocabulary (president, prime minister, ...) plus entity
and shape heuristics. His run-K log killed it: all three alternatives
came out '[prime minister]', Mariano Rajoy (a person, not an office)
was one, PSOE never appeared — the vocabulary could not see the
difference. His design replaces it, and it is better: instead of
listing what counts as a role, ask the judge whether the question
STILL answers once the support for the picked value is masked out.
_audit_ambiguity (knowledge/expert.py), zero new prompts:
- After a scalar KG answer V, find V's support rows (dst/quote carry
the value) and MASK them from the view — the store is never
mutated, the mask is a Python-level view.
- Re-ask the SAME judge (AnswerFromKG) on the surviving rows.
A DIFFERENT value = a second defensible reading -> record, mask
its support too, repeat (ambiguity_rounds=3, budget law).
- Same surviving value = corroboration -> silent stop.
- UNKNOWN -> clean answer, byte-identical to pre-audit behaviour.
- Run J: pick 'Socialist International' -> ablation surfaces
'prime minister of Spain' then 'secretary-general of PSOE' — the
third paragraph reading, no role vocabulary anywhere.
Removed: knowledge/ambiguity.py + knowledge/tests/ambiguity.py
(PR-7), the .ambiguity import, and _maybe_ambig at the three scalar
return paths — replaced by _audit_ambiguity(question, answer, rows,
charge_llm) at the same three sites.
Consumers (engine/machine) now render the simpler alternative shape
{value, quote, url} — no 'role' field exists to render.
Tests: knowledge/tests/ablation.py — the 4 agreed cases (2 Pedro
positives flag with 2 alternatives each, EU and rivers
counterexamples silent), corroboration-not-ambiguity, store
unchanged after audit (mask is a view), single-source silent, rounds
cap. Suite 70/70. Live smoke: full pipeline over the run-J page
picks SI and flags PM+SG via two ablation rounds; the rivers
question over the same KG stays silent.
onibot
merged commit 2de9aaa738 into main2026-10-21 23:42:29 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Replaces PR-7's curated-vocab audit with his ablation design — his run-K log killed the vocabulary: all three alternatives rendered
[prime minister], Rajoy (a person) was one, PSOE never appeared.The ablation detector (
_audit_ambiguity, zero new prompts — sameAnswerFromKGjudge):Removed PR-7 entirely:
knowledge/ambiguity.py, its tests, the import,_maybe_ambig(3 call sites rewired to_audit_ambiguity(question, answer, rows, charge_llm)). Consumers render the simpler{value, quote, url}alternative shape.Tests:
knowledge/tests/ablation.py— 2 Pedro positives flag (2 alternatives each), EU + rivers counterexamples silent, corroboration silent, store unchanged after audit, single-source silent, rounds cap. Suite 70/70. Live smoke: full pipeline over the run-J page picks SI, flags PM+SG in 2 rounds; rivers silent over the same KG.PR-7's audit (merged hours earlier) detected office ambiguity with a curated role vocabulary (president, prime minister, ...) plus entity and shape heuristics. His run-K log killed it: all three alternatives came out '[prime minister]', Mariano Rajoy (a person, not an office) was one, PSOE never appeared — the vocabulary could not see the difference. His design replaces it, and it is better: instead of listing what counts as a role, ask the judge whether the question STILL answers once the support for the picked value is masked out. _audit_ambiguity (knowledge/expert.py), zero new prompts: - After a scalar KG answer V, find V's support rows (dst/quote carry the value) and MASK them from the view — the store is never mutated, the mask is a Python-level view. - Re-ask the SAME judge (AnswerFromKG) on the surviving rows. A DIFFERENT value = a second defensible reading -> record, mask its support too, repeat (ambiguity_rounds=3, budget law). - Same surviving value = corroboration -> silent stop. - UNKNOWN -> clean answer, byte-identical to pre-audit behaviour. - Run J: pick 'Socialist International' -> ablation surfaces 'prime minister of Spain' then 'secretary-general of PSOE' — the third paragraph reading, no role vocabulary anywhere. Removed: knowledge/ambiguity.py + knowledge/tests/ambiguity.py (PR-7), the .ambiguity import, and _maybe_ambig at the three scalar return paths — replaced by _audit_ambiguity(question, answer, rows, charge_llm) at the same three sites. Consumers (engine/machine) now render the simpler alternative shape {value, quote, url} — no 'role' field exists to render. Tests: knowledge/tests/ablation.py — the 4 agreed cases (2 Pedro positives flag with 2 alternatives each, EU and rivers counterexamples silent), corroboration-not-ambiguity, store unchanged after audit (mask is a view), single-source silent, rounds cap. Suite 70/70. Live smoke: full pipeline over the run-J page picks SI and flags PM+SG via two ablation rounds; the rivers question over the same KG stays silent.