docs: contradiction taxonomy for the KG; INTAKE component
KNOWLEDGE.md/DESIGN.md: new data contradicting or refining old data is normal operation, classified deterministically - temporal change (qualifiers, both coexist), supersession (subsumption test, supersedes link), real contradiction (conflict row, surfaced, never auto-resolved), retraction (TMS flag). Untyped qualifiers default to exposed conflict. Schema gains ref_date/supersedes/preferred/retraction_reason. ARCHITECTURE.md/ALGORITHM.md: INTAKE - the boundary before the loop; floop may accept 1M-token inputs over a 64k-window model: original stored whole on disk, deterministic format detection, structural splitting for known formats, staged LLM compression for unknown, goal separated from material early. Reception typing now operates on clean typed state.
This commit is contained in:
@@ -74,6 +74,38 @@ be far larger than any window. What is bounded is **each call's input**.
|
||||
used by the composer; prompt-assembly failures are visible (logged, budgeted retries),
|
||||
not silent.
|
||||
|
||||
### Intake — composing the boundary (the first call's window)
|
||||
|
||||
floop may receive an input far larger than the window of the model it runs: as a drop-in
|
||||
LLM it can accept a context of, say, 1M tokens while the model it calls has 64k — and the
|
||||
input is free text of unknown format: JSON, markdown, or a huge document with a question
|
||||
at the end. The **INTAKE** component resolves this before anything else runs:
|
||||
|
||||
1. **Keep the original whole, on disk.** The machine's memory is unlimited; the input is
|
||||
stored verbatim as a run artifact and becomes machine state, referenced by id. No LLM
|
||||
ever needs to see all of it at once.
|
||||
2. **Deterministic format detection first, always.** Fixed code probes for known formats:
|
||||
JSON (parse it), markdown/XML (structure), code (fences, shebang), plain text. Format
|
||||
detection is a computation, not a judgement — no LLM in it.
|
||||
3. **Known format → structural splitting.** JSON walks the object; markdown splits at
|
||||
headings; documents split at section/sentence boundaries. Structure discovered by code
|
||||
is trusted and typed into rows, each carrying a pointer into the stored original.
|
||||
4. **Unknown or unstructured → staged LLM compression.** When no structure is found, the
|
||||
input is compressed in stages: chunked summarization (chunks sized to the model's
|
||||
window, map-reduce over them), optionally fronted by a cheaper model with a larger
|
||||
window for the first pass if one is configured. Each stage's output is checked and
|
||||
typed; because the original stays on disk, compression is always re-derivable —
|
||||
lossless at the source, lossy only in what the LLM kept, and logged as such.
|
||||
5. **Extract the goal early.** On every path, one bounded early task separates the
|
||||
request itself (the question at the end of the document, the instruction in the
|
||||
message) from the material it refers to: the goal drives the loop, the material
|
||||
becomes typed evidence rows.
|
||||
|
||||
Intake's output is typed machine state — the goal statement plus rows pointing into the
|
||||
stored original — and from there per-call context composition (above) governs every call.
|
||||
Intake is logged like everything else, and it is the same law at the boundary as inside:
|
||||
the LLM sees a purpose-built context; the machine holds the whole.
|
||||
|
||||
## 4. The evidence table — the machine's working memory
|
||||
|
||||
One table per run, append-only, visible to every component. Each row: an id, a type, a
|
||||
|
||||
Reference in New Issue
Block a user