Skip to main content

Module refine

Module refine 

Source

Structs§

DefaultSanitizer
Built-in sanitizer — wraps utils::sanitize().
DistillProvenance
DistilledChunk
HeuristicDistiller
Heuristic distiller: extracts chunks from log output / nomination fields.
NoopReranker
No-op reranker (default): preserves the incoming fused order. Used whenever no LLM is configured or the caller did not opt in.
NoopSanitizer
No-op sanitizer — passes content through unchanged (use to disable sanitization).
NullRefiner
No-op refiner (default): returns chunks unchanged, trim is unsupported.
ResilientDistiller
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.

Traits§

Distiller
Distiller — episodic logs → zero or more pending chunks per input log.
Refiner
Online refiner — trims or adapts recalled chunks.
Reranker
Reranker — part (d): an OPT-IN, OFFLINE reasoning pass over the top vector/lexical candidates. Returns the candidate ids in a new (more relevant) order. This is the “PageIndex-style reasoning over relevance” benefit applied as a re-ranker on a small shortlist, never in the latency-critical hook path (recall stays no-LLM unless a caller explicitly sets rerank=true). Errors must be non-fatal at the call site: recall falls back to the fused order so a flaky LLM never breaks retrieval.
Sanitizer
Replaceable sanitizer. Inject via KnowledgeBase::open_with. Default: DefaultSanitizer (wraps built-in heuristics).