Expand description
Post-turn verification — “generate first, heal second”.
Alternative to mid-decode Webizen Sentinel gating: run the LLM at full resident speed (like Ollama), then verify and self-heal the completed draft against the quant-graph fact table and a lightweight CML-shaped claim extract before finalising the turn.
§Why this exists
Mid-token governance (Phase-8 rings) is architecturally important for hard fail-closed signals, but continuous logit inspection is not what makes Qualia slower than Ollama — the GPU GEMV path is. Post-turn verify still earns its keep: it recovers quality from aggressive INT4 without taxing every token, and produces an auditable HTML/CML surface for the principal.
§Pipeline
- LLM emits plain draft (no mid-decode interrupt).
- Extract crude claims / capital-style facts from draft + prompt.
quant_graph_groundingrepair when high-stakes needles mismatch.- Emit
VerifiedTurnwith plain final text + HTML presentation + CML Turtle.
Structs§
- Verified
Turn - Result of post-turn verification / self-heal.
- Verify
Check - One atomic check against the local fact / ontology surface.
Functions§
- maybe_
verify_ turn - When FastVerify (or quant-graph post path) is active, heal draft → final presentation.
- return_
html_ as_ text - Env: return HTML as the primary
textfield from the agent when FastVerify is on. - verify_
and_ heal_ turn - Full post-turn pass: graph ground + claim checks + HTML/CML packaging.