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.
31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
# floop draft config — see README.md
|
|
lm:
|
|
# provider selected by FLOOP_LM env var (local | ollama-cloud), default below
|
|
default: local
|
|
local:
|
|
base_url: http://127.0.0.1:11435/v1
|
|
model: qwen3.8:27b
|
|
max_tokens: 4096
|
|
temperature: 0.0
|
|
ollama-cloud:
|
|
base_url: https://ollama.com/v1
|
|
model: glm-5.3-flash
|
|
max_tokens: 4096
|
|
temperature: 0.0
|
|
api_key_env: OLLAMA_API_KEY
|
|
|
|
budget:
|
|
max_llm_calls: 40 # per FLOOP run (children get a slice)
|
|
min_child_budget: 6
|
|
max_depth: 2 # recursion cap (PIPELINE.md §8.4)
|
|
max_retries: 3 # bounded self-refinement on unparseable LLM output
|
|
missing_extensions: 1 # how many times "what is still missing?" may reopen questions per run
|
|
|
|
knowledge:
|
|
enabled: true # real KG pipeline for the knowledge expert; false -> baseline LLM
|
|
kb_path: knowledge_store/kg.sqlite
|
|
max_articles: 3 # per knowledge call
|
|
max_search_results: 4 # candidates considered
|
|
max_chunks_extracted: 6 # per call (lexical gate decides which)
|
|
chunk_chars_target: 32000
|
|
chunk_chars_cap: 48000 |