pub struct DistillPolicy {
pub require_success: bool,
pub min_tool_calls: usize,
pub min_distinct_tools: usize,
pub min_situation_chars: usize,
pub similarity_threshold: f32,
pub max_output_tokens: u32,
}Expand description
When the distiller is allowed to spend a model call.
Fields§
§require_success: boolOnly distil runs the host marked successful. Unknown counts as “no” —
see Episode::success.
min_tool_calls: usizeMinimum total tool calls. A run that answered from context reveals no procedure worth writing down.
min_distinct_tools: usizeMinimum distinct tools. Guards the degenerate case the raw count
misses: six shell calls in a row is one move repeated, not a
multi-step approach.
min_situation_chars: usizeMinimum trimmed length of the situation text.
similarity_threshold: f32Overlap-similarity above which an existing skill counts as “we already have this” — the defence against a chatty user accumulating 200 near-identical skills.
0.6 on [skillmd::overlap_similarity] means “60% of the shorter text’s
topical tokens also appear in the longer one”. Tuned against the
realistic lopsided pair (a one-sentence situation vs a routing-cue-padded
description); raise it toward 0.8 for a host that would rather have a
near-duplicate than miss a real skill.
max_output_tokens: u32Output-token ceiling for the single distillation call.