pub struct MemoryRecallPipeline { /* private fields */ }Expand description
Composable scoring pipeline for memory recall candidates.
Wraps a WeightedObjective<NoteCandidate> with the three standard memory
scoring components (RRF relevance, amplified salience, temporal recency)
weighted by the recall config parameters. Pack code uses this type to avoid
a direct dependency on khive-fold.
Implementations§
Source§impl MemoryRecallPipeline
impl MemoryRecallPipeline
Sourcepub fn new(
relevance_weight: f64,
salience_weight: f64,
temporal_weight: f64,
half_life_days: f64,
salience_alpha: f64,
) -> Self
pub fn new( relevance_weight: f64, salience_weight: f64, temporal_weight: f64, half_life_days: f64, salience_alpha: f64, ) -> Self
Build a pipeline from explicit component weights and temporal half-life.
relevance_weight, salience_weight, temporal_weight correspond to
RecallConfig’s three weight fields. half_life_days drives
TemporalRecencyObjective. salience_alpha is the amplification exponent
for AmplifiedDecayAwareSalienceObjective (default 1.5).
Sourcepub fn default_memory() -> Self
pub fn default_memory() -> Self
Build a pipeline using the standard memory recall defaults.
Weights: relevance=0.70, salience=0.20, temporal=0.10; half_life=30 days; alpha=1.5.
Sourcepub fn score(&self, candidate: &NoteCandidate) -> f64
pub fn score(&self, candidate: &NoteCandidate) -> f64
Score a NoteCandidate through the pipeline.
The result is in [0.0, 1.0]. The NoteCandidate.rrf_score field should
carry the pre-normalized relevance (output of normalize_relevance / RrfFusionObjective).