onibot efd539c128 knowledge+llm: dst-first ablation mask (run L) + re-ask budget meter
Two fixes from his 22/10 re-run log, both small and deterministic:

1. THE ABLATION MASK WAS QUOTE-BLINDED (run L: Q1 stayed silent over
   the Pedro page that run J flags). The Pedro paragraph interleaves
   all three readings in ONE quote ('...Secretary-General ... ninth
   president of Socialist International...'), and _carries matched
   the picked value by substring over dst OR quote — so masking SI's
   support masked the PM/PSOE rows too; round 1 answered UNKNOWN and
   the audit died silent. The DST-FIRST LAW: when a row has a
   meaningful dst (non-empty, non-numeric) it is the VALUE BEARER and
   the mask matches IT; the quote is a fallback only for
   empty/numeric dsts. Same law in _carries_target for each round's
   surviving value, with one addition: the judge's round value may be
   an OFFICE DESCRIPTION ('prime minister of Spain') while the row's
   dst is the ENTITY ('Spain') — resolve by reciprocal token
   containment, or the loop dies after one alternative.

2. THE ADAPTER RE-ASK WAS INVISIBLE TO THE BUDGET (run L: prompts #9
   and #10 were both ANSWER — #10 5 chars shorter, 340s, the
   ChatAdapter's JSON-fallback second wire call after a parse
   failure; llm_calls said 9/80 while 10 hit the wire). THE METER:
   the prompt-log callback already sees every LM call — a second LM
   call with NO new module forward between them is the adapter
   fallback re-firing inside the same Predict. Count it, log the
   line, and charge the budget through a meter hook the machine
   wires at construction. A re-ask at the ceiling does not kill the
   run (the call already happened). dspy's BEHAVIOUR IS UNTOUCHED —
   his call: the fallback stays, it is future self-improvement
   signal (which prompts the model formats badly), not a bug.

Tests: knowledge/tests/ablation.py +3 — run-L regression (interleaved
one-paragraph quote flags all three readings), office-description
resolution, numeric-dst quote fallback. tests/reask_meter.py +3 —
fallback detected and charged on the REAL adapter path (custom engine
returning raw text, marker-less first response), separate forwards NOT
flagged (the ablation-rounds shape), ceiling charge survives. Suite
12/12 files green (74 tests). Live smokes: the run-L interleaved-quote
page flags SI+PM+SG through the full pipeline; the run-J
separate-quotes smoke still passes.
2026-10-22 11:21:25 +02:00

floop

Fractal loop. An AI built on one division of labour: LLMs do the language (translating, decomposing, composing prose), algorithms do the thinking (solvers, provers, planners, retrieval — deterministic computation decides, checks and stops), and knowledge is verified and stored on disk (extracted from trusted sources, checked, persisted — never trusted from model "memory"). The same loop — translate → compute → verify — runs inside every expert, at the orchestration level, and on floop's own behaviour. floop is aware of the loop it is running, and studies its own past runs to improve the process that produced them.

From the outside, floop acts as an LLM: messages + system + tools in → text or tool_call out, OpenAI-compatible. A Hermes agent — or any harness — can point its model provider at floop and get a reasoner whose steps are typed, evidenced and auditable. Answering questions is one use case; acting with tools, holding a conversation and managing itself are others.

Documents

File Contents
ARCHITECTURE.md The system and its laws: division of labour, LLM calls as function calls, context as a per-call budget, intake and the language boundary (English inside, any language outside), the evidence table, the interface contract, tools, the fleet, guarantees, risks, v1→v2.
ALGORITHM.md The machine in words: the general loop for any goal, tool action as loop output, the generic expert, recursion, stopping, backtracking, per-call context composition.
KNOWLEDGE.md The knowledge substrate: verified facts on disk, the knowledge graph, extraction and its checks.
META.md The two meta levels: in-run self-awareness; offline self-analysis and learning.
GAPS.md Design-gap log of the walkthrough replays (closed — resolutions merged into the docs above).
RUNLOG.md Run log: virtual walkthrough, executable runs.
code/ v0.1 draft (dspy); code/README.md maps real vs stub per stage.

Status

Design docs v0.3 (full rewrite, 2026-10-13). Executable draft: the loop runs on dspy LLM calls — INIT / ROUTE / EXPERT / MISSING / ANSWER as Signatures, the machine as fixed code — with formal checks, prover and expert engines stubbed, so every output is honestly Unverified. Next: real check layer, the knowledge vertical (code/knowledge/), the prover (clingo/Z3), the OpenAI-compatible endpoint.

Lineage

floop's parts have measured prior art; the composition is ours. Logic-LM (arXiv:2305.12295) — lm→solver with self-refinement (+39% on logic benchmarks). ReWOO (arXiv:2305.18323) — plan on slots, decouple execution (5× token efficiency). LLM-Modulo (arXiv:2402.01817) — LLMs propose, external verifiers decide. LLM+P (arXiv:2304.11477) — NL→PDDL→classical planner. POMDP-Coder (arXiv:2505.02216) — the LLM writes the model, a solver plans. HippoRAG (arXiv:2405.14831) — knowledge graph + PPR as memory (+20% multi-hop QA, 10–30× cheaper than iterative retrieval). GraphRAG (arXiv:2404.16130) — LLM-extracted graphs for global questions. Rational metareasoning (Russell & Wefald 1991; arXiv:2410.05563) — the value of computation decides what to do next (v2's router).

S
Description
floop - fractal loop: neuro-symbolic reasoning pipeline (design docs + v0.1 dspy draft)
Readme
2.9 MiB
Languages
Python 100%