pub enum MemorySource {
User,
UserInferred,
Assistant,
External,
Derived,
}Expand description
Provenance source for a memory claim.
Per spec §provenance-filter, source is a first-class ranking signal.
The v1 retrieval Tier 1 pipeline applies a source-weighted multiplier
to the final RRF score so assistant-authored facts don’t drown out
user-authored claims.
Variants§
User
User explicitly stated the claim (highest trust).
UserInferred
Extractor confidently inferred from user signals.
Assistant
Assistant authored — heavy penalty at retrieval.
External
Imported from another system (e.g. Mem0, ChatGPT, Claude memory).
Derived
Computed (digests, summaries, consolidation).
Implementations§
Source§impl MemorySource
impl MemorySource
Sourcepub fn from_str_lossy(s: &str) -> MemorySource
pub fn from_str_lossy(s: &str) -> MemorySource
Case-insensitive parser that returns a fallback for unknown input.
Returns MemorySource::UserInferred for any unrecognised string. This
choice matches the retrieval Tier 1 policy for legacy claims without a
source field — they receive a moderate fallback weight rather than
being penalised as hard as assistant or promoted as high as user.
Trait Implementations§
Source§impl Clone for MemorySource
impl Clone for MemorySource
Source§fn clone(&self) -> MemorySource
fn clone(&self) -> MemorySource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more