diff --git a/KNOWLEDGE.md b/KNOWLEDGE.md index fd64e25..a049e54 100644 --- a/KNOWLEDGE.md +++ b/KNOWLEDGE.md @@ -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. \ No newline at end of file + 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). \ No newline at end of file diff --git a/RUNLOG.md b/RUNLOG.md index db64e2a..b07d2d2 100644 --- a/RUNLOG.md +++ b/RUNLOG.md @@ -377,3 +377,44 @@ count, and the corroborating sentence must be cited in the payload. machine-checked — the synthesizer wrote it, no prover validated it. - VERIFY adds exactly one LLM call per LIST ingest (budget 4→5, 8→9). NOQUOTE → count_corroborated=false → row stays unverified: honest, no loop. + + +--- + +# Run G — the discharge miss and the skim design (2026-10-20) + +**Goal (Emili's machine, log-10):** `What is the total water flow considering +the three longest rivers of Italy?` — decomposition and fan-out worked +(Q1 → 22 rivers ingested, rank-ordered slice to Po/Adige/Tiber; Q4 Po +1,460 m3/s from the Europe list), Q5 (Adige) and Q6 (Tiber) returned +UNKNOWN and the run finished honestly-empty. Budget: 77 LLM calls, 20 min. + +**Failure chain (rebuilt against code + live Wikipedia, not the log alone):** + +- The discharge table EXISTS in "List of rivers of Italy" — table 2, + "Rivers of Italy above 50 m3/s of average flow at the mouth", 27 rows: + Po 1540, Ticino 350, Tiber 239, Adige 235. Q1's LIST ingest read table 1 + and early-exited; the sibling was discarded unread. +- Q5/Q6 re-searched from scratch. "Adige river average annual discharge" + never surfaces the Italy list: the article's wikitext contains 0 + occurrences of "discharge" (7 of "flow") — lexical search cannot cross + the vocabulary gap; 2 of 3 fetch slots burned on Drava/Inn. +- The Adige article itself has the value ONLY in the infobox template + (`| discharge1_avg = {{convert|235|m3/s|cuft/s|abbr=on}}`) — invisible to + both the plain-text extract (0 hits for discharge/m3/s) and parse_tables + (the infobox is a template, not a {| |} table). Tiber: prose has only + the seasonal range (30–300 m3/s); the 239 is infobox-only. +- Po (Q4) succeeded by luck: the Europe list article carries + "Po - 1,460 m3/s (52,000 cu ft/s) (largest river in Italy)" in prose. + +**Design outcome:** SKIM (KNOWLEDGE.md §7, Emili's steer): a knowledge call +harvests, in passing, goal-relevant material seen in the articles it already +fetches — structural skim sheet (headings, table captions/headers, infobox +keys, quantity-unit patterns — `== List of Italian rivers above 50 m3/s == +` found the table no keyword could), opportunistic typed ingestion of +goal-relevant table rows (zero LLM), prose leads recorded-not-extracted, +notices to the router, seen-articles index before network. Build order: +PR-1 skim surfaces + unit-pattern signals + chunk ranking + {{cvt}} unit +fix; PR-2 opportunistic harvest + seen-index + link queue; PR-3 skim +notices to the machine. The lucky same-article case is NOT the design +target — the goal-aware harvest is.