knowledge: answer-level count corroboration (DESIGN §12) — LIST rows verified via prose

- VerifyCountSignature: LLM finds ONE verbatim sentence in the article prose
  (tables excluded by construction) stating the set's count
- _verify_count: code checks containment + digit equality — no LLM compares
  numbers; NOQUOTE -> count_corroborated=false (honest, one call, never loops)
- row verified <=> complete_per_source AND count_corroborated
- DESIGN §12 documents now vs deferred (extension, criteria, cross-article)
- live: EU question cold — E1 (50) + E2 (27) both corroborated with quotes,
  23 computed; 25/25 tests
This commit is contained in:
2026-10-19 14:47:18 +02:00
parent b14915079e
commit 852db78c99
6 changed files with 235 additions and 10 deletions
+60 -1
View File
@@ -311,4 +311,63 @@ document artifact for audit.
calls (2 + retries); ingestion and aggregation are free. A 500-row table
costs the same LLM budget as a 5-row one — the cost of an enumeration is
O(1) in the size of the list.
confirm or set preferred numbers.
## 12. Answer-level verification — the CHECK step for answers (2026-10-19)
Emili's case: the EU member list is 27 rows ingested from a table, AND the
same article's prose says "a supranational union of 27 member states" — two
independent statements of the same count. When the corroborating sentence
exists, the count is not just complete-per-source; it is **corroborated**.
The LIST path now runs this check (one bounded LLM call, never a loop):
```
ingested N members from table T (coverage: complete_per_source)
│
▼ VERIFY COUNT (LLM): given set_name + N + the article PROSE (the extract
│ text — tables live in a separate structure, so the source table is
│ excluded BY CONSTRUCTION), find ONE verbatim sentence stating the
│ count of that set. NOQUOTE if none exists.
▼ CHECK (code): containment of the sentence in the prose (same law as
every quote) AND the digits the sentence states == N. No LLM ever
compares numbers.
│
▼ verified row ⇔ complete_per_source AND count_corroborated
```
**Law split, again.** The LLM finds language (one sentence); fixed code
decides validity. `count_corroborated=False` is an HONEST state, not an
error: many lists have no prose count, and floop must never loop looking
for one. The row's payload carries the flag + the corroborating quote, so
the synthesizer can say "50, corroborated by the article's own prose" vs
"27, no independent count statement found".
**What this is NOT (scope honesty).** Same-article prose and table often
derive from the same primary data — corroboration here is *structural
independence* (two statements in different forms), not *source
independence*. Cross-article corroboration (fetch a second article and
find the same count) is future work: it costs another gather round and
most questions will never have the redundancy for it. We do not pretend
to strictness we do not have. Not every question will have a Wikipedia
page, let alone redundant sources — the design target is honest answers
grounded in fetched sources, not strict verification everywhere.
### Deferred (name it, don't hide it)
- **Extension verification** (proving exactly WHICH members, not just how
many): needs per-member confirmation, expensive; only when a question
asks "which ones" and stakes justify it.
- **Definitional criteria** (the 46/48/50 Europe case): when an independent
counter disagrees with our count, the LLM extracts the *criterion* each
citation uses, code compares the numbers, and a criterion-mismatch is a
*definition-dependent count* answer ("50 per the EOC definition, 46 per
the Council of Europe") — NOT a conflict row. Same criterion + different
number → conflict row, surfaced.
- **Prose-list completeness** (lists with no dedicated page, assembled from
prose extraction): a corroborating count is the only signal that says
"you missed members"; a mismatch means `partial`, a legitimate honest
state. Negative knowledge ("this list is not exhaustive") is itself a
verbatim quotable claim.
- **Cross-article corroboration** as a second, stronger check level.
Build order: count-corroboration now (cheap, saves the EU case), criteria
later (needs the extractor to output criterion labels), extension last.