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).
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryRecallPipeline
impl !UnwindSafe for MemoryRecallPipeline
impl Freeze for MemoryRecallPipeline
impl Send for MemoryRecallPipeline
impl Sync for MemoryRecallPipeline
impl Unpin for MemoryRecallPipeline
impl UnsafeUnpin for MemoryRecallPipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more