docs: KNOWLEDGE §7 — skim, reading in passing for the goal

Run G (log-10, Italy discharge) failed honestly-empty with the data in
hand: Q1 ingested the length table of List of rivers of Italy and threw
away the same article's 27-row discharge table (Po 1540, Tiber 239, Adige
235); Q5/Q6 re-searched from scratch, missed (the article says "flow",
never "discharge"; Adige/Tiber carry the value only in infobox templates),
and died on Drava/Inn fetches.

§7 names the mechanism Emili steered: the SKIM — every fetched article is
read structurally in passing (headings, table captions/headers, infobox
keys, quantity-unit patterns), oriented to the current question AND the
goal. Goal-relevant table rows are ingested opportunistically (zero LLM);
prose leads are recorded, never preventively extracted; the router learns
what was seen; a seen-articles index is consulted before network search;
the persistent cache checks freshness by revision id.

RUNLOG Run G records the failure chain (rebuilt against code + live
Wikipedia) and the three-PR build order.
This commit is contained in:
2026-10-20 14:48:42 +02:00
parent 06124a0198
commit b85f196cbe
2 changed files with 104 additions and 3 deletions
+63 -3
View File
@@ -110,7 +110,67 @@ budget, never inside a serving run.
- Entity resolution is conservative (name-equality only in the draft); distinct nodes for
"Einstein" the person and near-miss names remain distinct until a measured linker
exists.
- Freshness: access dates are provenance; re-fetch policy is future work (a source older
than its field's decay rate should be re-consulted).
- Freshness: access dates are provenance; the re-fetch policy is the revision-id
check of the skim cache (§7) — deferred with the mechanism named, not a guess.
- The KG is floop's memory, not a world model: it holds what floop has had reason to
fetch, verify and keep.
fetch, verify and keep.
## 7. Skim — reading in passing, for the goal (2026-10-20)
A knowledge call answers its own subquestion, but the articles it fetches contain far
more than that answer. The skim is the fast, structural read of every fetched article
that happens **in passing** during the gather — oriented to the current question AND to
the run's overall goal — so that information seen along the way is not thrown away
when the call returns.
**Why it exists (the Italy run, verified live).** Q1 ingested the 22-row length table
of "List of rivers of Italy" and early-exited; the same article's second table —
"Rivers of Italy above 50 m3/s of average flow at the mouth", 27 rows, with every
discharge value the goal needed — was discarded unread. Q5/Q6 then re-searched from
scratch with no "discharge" vocabulary match (the article says "flow", 0 "discharge"
occurrences) and failed honestly-empty. The data was in floop's hands at minute 2.
**The skim sheet (per article, deterministic, zero LLM).** Built from material
`fetch_rich` already downloads — no extra network calls:
- section headings and their term-hit counts;
- per table: caption, headers, row count;
- infobox parameter keys (and values for quantity params, units resolved);
- a term-hit map: question stems + goal stems + evidence entities + **quantity-unit
patterns** (`50 m3/s` is a goal-relevant signal even where the words never appear —
the section heading "List of Italian rivers above 50 m3/s" found the discharge table
where keyword search could not);
- links to other articles inside goal-relevant regions (harvest candidates, capped).
**Harvest policy (the budget law).**
- Relevant to the **current question** → the existing extract path, with chunks
RANKED by the skim instead of first-N-in-document-order.
- Relevant to the **goal but not the current question** → typed table rows are
ingested opportunistically (membership-grade ingestion, zero LLM: subject = entity
column, relation = the value column's header, object = value + unit, quote = the
stored row line, containment against the stored table text); prose leads are
**recorded, never preventively extracted** — a later step pays only if it asks.
- Ambiguous side-tables → ONE bounded LLM call over the compact skim sheet (titles,
captions, keys — never the article body). Deterministic detection first, LLM fallback
only on ambiguity.
**Notification (the loop knows what was seen).** Every knowledge row's payload carries
a compact `skim` notice — what other goal-relevant material the fetched articles
contained and where it lives — rendered to the router's context and the run notes.
Later steps route with this knowledge instead of re-searching blind; the seen-articles
index is consulted before any network search. Hops still live in the plan (a seen lead
is a pointer, not an opened subquestion — the law stands).
**Skim cache (per-run now, persistent later).** The seen-articles index is per-run in
v0.1; the store's documents table (url, sha256, fetched_at) is the natural base for a
persistent article cache with skim sheets. Freshness check on access: one cheap
revision-id call (`rvprop=ids`, no content) — revid changed → re-fetch and re-skim;
unchanged → serve the cache. Zero staleness heuristics: the revision id is the
source's own version counter.
**Not in v0.1 (name it, don't hide it).** Embedding similarity for lead detection
(deferred until lexical + structural skim recall is measured, like PPR); persistent
cross-run cache (the schema base exists, the policy is §7's revision check);
LLM-written summaries of skimmed articles (a summary is paraphrase — it can never be
stored, only rendered for a call's context).