Commit Graph
17 Commits
Author SHA1 Message Date
onibot 852db78c99 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
2026-10-19 14:47:18 +02:00
onibot b14915079e store: auto-migrate old KGs (edges.origin_question); machine: abort honestly on dead LM
- KnowledgeStore._migrate(): idempotent additive migration on open — a
  pre-2026-10-19 KG no longer crashes the set gate with 'no such column'
- _lm_dead(): transport/timeout deaths abort the run with notes (no answer
  beats a made-up one); code bugs still crash loudly
- tests: migration from a hand-built old-schema store; LM-death abort (24/24)
2026-10-19 12:11:59 +02:00
onibot e5482bd092 feat(logic): setop engine + set gate — the Europe count computed end-to-end
A) SET GATE: enumerations are answered only from membership sets, never from mention rows (the probe early-exit that served 'Armenia, Cyprus, Georgia, Turkey' to 'what countries are in Europe' is dead). Sets carry origin_question; the gate matches stem-Jaccard>=0.5 so a set is served to its own question only. B) SETOP ENGINE: logic's first real engine — a count over list rows is computed (difference/intersection/count over norm_name'd items, table markers 'Austria*' == 'Austria'), before ROUTE, zero LLM calls, verified=True because the computation IS the check. C) Catalog honesty: knowledge 'lists are ONE fetch', logic 'how-many over lists in evidence', floop 'NOT mere size'. Plus four substrate bugs the live runs exposed: LM-proxy prompt cache (instant answers are cache hits, never trust zero latency), _context rendering list rows as scalars ('E1: 50' routed 'those countries' to user), <br> concatenation in multi-value name cells, multi-line refs leaking into values ('franceincludes the 101 departments' -> France dropped from EU -> 24 not 23). Cold E2E: Q1 50 states ingested, Q2 27 EU members ingested, Q3 difference computed = 23, cited over E1/E2. 22/22 tests.
2026-10-18 19:49:24 +02:00
onibot 6fcb3c0a86 feat(knowledge): LIST answer path — full table ingestion, typed list payloads
Part 1 of the lists design (DESIGN.md §11): mechanical full ingestion, separated from epistemic answer-completeness. parse_tables rewritten as a GRID parser: cells accumulate until |- (both layouts), empty cells kept as placeholders (image cells clean to ''; dropping them shifted France rows to start at 'FRA'), rowspan/colspan expanded at placement, total_rows is the computed extent — no truncation. _clean_cell: refs/sup/File links dropped, citation templates (cref2/efn...) resolve empty, links take display text, attrs split first. LIST path in expert.py: deterministic enumeration detection OR planner-declared LIST; SELECT TABLE (one LLM call over table metadata, never rows); ingest ALL rows as member_of edges (quote = full row line, containment against stored table text); aggregate via len() — no LLM. AnswerType.LIST added; evidence payloads carry list_items + coverage. Verified live cold: 50 sovereign states from the Europe article table (51 rows - Total footer), every member with verbatim quote. 19/19 tests.
2026-10-18 16:53:10 +02:00
emili a78f65de2c Added config model 2026-10-18 10:13:32 +02:00
onibot bdc5aa0556 docs: language boundary — English working language, any language outside
ARCHITECTURE.md §3: new subsection. Inbound: input artifact never translated; goal statement English-ized after typing, source_language flagged. Inside: everything English — subquestions, routing, KG, quotes (containment would break if translated). Outbound: English response composed first, then one render pass into source_language. ALGORITHM.md: §1 boundary task wired to typing pass; §8 render step; §9 who-does-what updated. README doc map updated.
2026-10-17 14:17:28 +02:00
onibot 6db05fef48 fix(knowledge): cold-start gather — vertical tables, global rank, early exit
Emili's home run failed where the VPS seemed to work: warm-KG illusion; cold path never validated. Reproduced with a wiped KG. Fixes: (1) tables_as_text parses BOTH wikitext layouts (horizontal pipes and one-cell-per-line with row separators) + _clean_cell drops attrs/links/templates; (2) gather searches all queries, dedupes, ranks globally by title relevance, fetches ONE article at a time with EARLY EXIT when the KG answers; (3) hybrid order keeps each query's top-1 slot guaranteed (title relevance buries entity pages like 'Loire'). Also: NameError from refactor caught by baseline fallback; counters accumulate. Cold E2E verified: France (table quote) -> Loire (early exit, 1 article) in 2hops. RUNLOG Run D.
2026-10-17 10:39:34 +02:00
onibot 9094b2aec0 feat(knowledge): real Wikipedia vertical with containment-checked KG
knowledge/: wiki.py (official MediaWiki API, own session+UA; fetch_rich appends wikitext tables as text - plain extracts drop them), chunker.py (section-aware, level paths), checks.py (verbatim containment, quote-aware), store.py (SQLite append-only, 4 contradiction cases, probe by entity AND relation with stemming), extract.py (dspy Signatures: TRANSLATE resolves pronouns from context and emits queries+entities, EXTRACT per chunk, ANSWER from KG rows), expert.py (the pipeline: KG-first probe -> gap -> translate -> search -> fetch_rich -> chunk -> gate -> extract -> check -> merge -> re-probe -> answer). Wiring: KnowledgeEngine in floop/engine.py (machine injects charge+modules at call time; baseline fallback on pipeline failure), machine routes knowledge questions to it, config.yaml knowledge: block. E2E verified live: Loire length answered from KG with zero network; the 2-hop EU-river question resolved France (population table row quote) -> Loire (KG hit) in 12 calls/75s. Six live-run bugs closed (wiki lib 403/HTML, dropped tables, pipes-in-quotes parse, gate stemming, relation probe, pronoun context). RUNLOG Run C added; code/README honest map updated. Tests 17/17.
2026-10-16 23:19:09 +02:00
onibot aecaac01eb feat: baseline experts + --baseline A/B mode (raw LLM)
Per Emili 2026-10-16: the draft experts are baseline experts - the LLM answers each subquestion directly from its own knowledge (no verification yet; engines replace the baseline path per expert later). ExpertSignature no longer forbids weights-based answers; source_quote now means verbatim from GIVEN evidence, empty when answering from weights. Evidence rows record source: model_weights | given_evidence. --baseline mode: the same LM answers the whole question in ONE raw call - the A/B control against the loop's many small directed calls. Also: pyproject fixed (name floop, hatchling backend, package floop/) - uv_build expected src/ layout; runner docs now uv-first; uv.lock regenerated.
2026-10-16 16:51:25 +02:00
onibot b627c34967 docs: INTAKE harness templates (Hermes first) + session caching design
Known harnesses get a deterministic digest template - Hermes Agent first since it is what runs today. Unrecognized shapes fall back to the generic intake path. Sessions cache digested material by content hash and process only the delta per call; pending, designed-in now.
2026-10-16 15:55:51 +02:00
onibot 36a74770e6 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.
2026-10-14 18:20:11 +02:00
onibot 67f466bd84 docs: full rewrite from a clean slate (v0.3)
The idea is now clear, so the docs are rewritten from zero around it: LLMs do language, algorithms do thinking, verified knowledge lives on disk. New set: ARCHITECTURE (system + laws: division of labour, LLM calls as typed function calls via dspy Signatures, context as a per-call budget over unlimited machine state, evidence table laws, interface contract, tools as loop output, fleet, guarantees, v1->v2), ALGORITHM (general loop for any goal: reception/typing, main loop, tool action, generic expert, recursion, backtracking, per-call context composition), KNOWLEDGE (substrate: store, gather, checks, probe, offline growth), META (two levels: in-run self-awareness; offline self-analysis, lessons bank, prompt optimization, fine-tuning, v2 router). PIPELINE.md and SCOPE.md removed - superseded; GAPS.md closed with a merge map. Code untouched.
2026-10-14 10:28:21 +02:00
onibot e8fa401597 docs(SCOPE): intent gate types the response; tool_call is a loop output
Emili's correction: the gate annotates the goal with the expected response type (answer/tool_call/chat/meta/plan_only); it never chooses paths, tools or experts. Deciding the next step is reasoning and goes through the loop (subquestions, ROUTE, experts, prover). tool_schema rows in, tool_call row out with provenance, tool_result as user-side observation, iterate like ReAct with evidenced steps. GAPS.md GAP-11/12 corrected in place.
2026-10-13 23:17:40 +02:00
onibot 6733cb660e feat(stream): thinking + run log for CLI (GAP-13 CLI part)
RunStreams: run.log always (flushed, tail -f-able) with full technical detail; thinking stream to screen under --verbose (flushed, [T] lines, > depth prefixes). Machine hooks on INIT/MISSING/ROUTE/EXPERT/ANSWER + budget ticks; child runs share the parent's stream; engine emits its raw output. Verified live: 8-call train run inline, fresh-question run 69.6s (proxy caches identical temp-0 prompts; noted).
2026-10-13 17:50:57 +02:00
onibot 550128c9bb docs: SCOPE.md - floop beyond Q&A (GAP-11..14)
Reposition floop as a drop-in harness LLM (intent layer, tool_call flow and tool_result epistemics, progress streaming for CLI, offline self-analysis meta level feeding dspy prompt improvement and the v2 router). Design only, no code - per Emili's request. GAP-11..14 added to GAPS.md.
2026-10-13 17:31:16 +02:00
emili 66f124a4a5 add uv project: pyproject.toml, uv.lock and .python-version 2026-10-13 17:16:55 +02:00
onibot d0942bdc69 floop v0.1: design docs + executable dspy draft
Root: README, PIPELINE, ALGORITHM, GAPS, RUNLOG (design + first executable runs). code/: v0.1 draft on dspy 3.4 (INIT/ROUTE/EXPERT/MISSING/ANSWER as dspy calls, machine as fixed code, stub engines — honest Unverified). knowledge/: DESIGN.md for the KG-first knowledge expert (pre-implementation).
2026-10-13 13:39:31 +02:00