pub struct SelectorInput<T> {
pub id: String,
pub content: T,
pub size: usize,
pub score: f32,
pub category: Option<String>,
pub information_gain: Option<f32>,
pub rank_score: Option<f64>,
}Expand description
A single input item to a selector operation.
Fields§
§id: StringStable string identifier for deterministic tie-breaking.
content: TThe item payload carried through selection.
size: usizeSize in the unit of the caller’s budget (tokens, bytes, count).
score: f32Pre-computed relevance score.
category: Option<String>Optional category for diversity and category-weight scoring.
information_gain: Option<f32>Pre-computed information gain (KL divergence proxy) for this candidate.
Defaults to 0.0 when None. Only affects selection when
SelectorWeights.epistemic_weight > 0.0. See
crates/khive-fold/docs/design.md#adr-024-bayesian-extensions-selector-budget-packing-and-precision-weighted-scoring
for why this is caller-supplied rather than computed by the Selector.
rank_score: Option<f64>Higher-precision pre-conversion effective score used for rank comparisons, when available.
When None, ranking widens score back to f64 via
DeterministicScore::from_f32. Does not affect min_score filtering,
which always operates on score. category_weights multipliers scale
rank_score by the same weight applied to score. See
crates/khive-fold/docs/api/selector.md#rank-score-precision-pr-535 for
why callers need this instead of relying on the narrowed score field.
Trait Implementations§
Source§impl<T: Clone> Clone for SelectorInput<T>
impl<T: Clone> Clone for SelectorInput<T>
Source§fn clone(&self) -> SelectorInput<T>
fn clone(&self) -> SelectorInput<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more