pub struct MemoryDecayConfig {
pub half_life_secs: f64,
pub lexical_weight: f64,
pub recency_weight: f64,
}Expand description
Decay-weighted memory retrieval configuration (#memgraphrag1).
Retrieval combines a lexical relevance component with a recency component
that decays exponentially in the age of each event. half_life_secs is the
age at which an event’s recency contribution halves; the two weights blend
the lexical and recency components into the final score.
Fields§
§half_life_secs: f64§lexical_weight: f64§recency_weight: f64Trait Implementations§
Source§impl Clone for MemoryDecayConfig
impl Clone for MemoryDecayConfig
Source§fn clone(&self) -> MemoryDecayConfig
fn clone(&self) -> MemoryDecayConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MemoryDecayConfig
Source§impl Debug for MemoryDecayConfig
impl Debug for MemoryDecayConfig
Source§impl Default for MemoryDecayConfig
impl Default for MemoryDecayConfig
Source§impl<'de> Deserialize<'de> for MemoryDecayConfig
impl<'de> Deserialize<'de> for MemoryDecayConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MemoryDecayConfig
impl PartialEq for MemoryDecayConfig
Source§fn eq(&self, other: &MemoryDecayConfig) -> bool
fn eq(&self, other: &MemoryDecayConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MemoryDecayConfig
impl Serialize for MemoryDecayConfig
impl StructuralPartialEq for MemoryDecayConfig
Auto Trait Implementations§
impl Freeze for MemoryDecayConfig
impl RefUnwindSafe for MemoryDecayConfig
impl Send for MemoryDecayConfig
impl Sync for MemoryDecayConfig
impl Unpin for MemoryDecayConfig
impl UnsafeUnpin for MemoryDecayConfig
impl UnwindSafe for MemoryDecayConfig
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
Mutably borrows from an owned value. Read more