pub struct ResilientDistiller { /* private fields */ }Expand description
Resilient distiller — wraps a primary distiller (e.g. the LLM HttpDistiller)
with a deterministic fallback (e.g. HeuristicDistiller) so knowledge
creation never depends on the primary staying available.
Policy (see docs/Innate-设计-确定性兜底蒸馏-v1.md): the primary gets the
first llm_attempt_budget attempts at a log — measured by the log’s
distill_attempts counter, which only increments on a failed terminal
state. While attempts remain, a primary error is propagated so the
existing failed → recover → retry machinery gives the primary another
chance (preserving quality). Once distill_attempts >= llm_attempt_budget,
a primary error triggers the deterministic fallback instead of failing the
log (guaranteeing eventual capture). A primary success — including a valid
empty result (nothing worth distilling) — is always used as-is and never
falls back.
This is not a second LLM: the fallback is a deterministic, local pass, so it stays within the single-LLM fault-tolerance contract.