pub struct RecallConfig {
pub bm25_weight: f32,
pub vector_weight: f32,
pub importance_weight: f32,
pub graph_weight: f32,
pub trust_weight: f32,
pub corroboration_weight: f32,
pub conformal_alpha: Option<f32>,
pub cache_embeddings: bool,
pub max_cache_entries: usize,
pub writer_heap_size: usize,
pub promotion_on_read: bool,
pub association_rerank: bool,
}Expand description
Configuration for the recall engine.
Fields§
§bm25_weight: f32Weight for BM25 text score (default 0.5).
vector_weight: f32Weight for vector cosine similarity (default 0.3).
importance_weight: f32Weight for memory importance (default 0.2).
graph_weight: f32Post-fusion graph-traversal boost multiplier (V8 S6, default 0.0 =
OFF — evidence-gated like trust weighting). NOT part of the
normalized fusion sum: when > 0, the top fused seeds are expanded
one hop through association edges, neighbors are injected or
boosted by seed_score * edge_weight * graph_weight, and results
carry the contribution in RecallResult::graph_score.
trust_weight: f32Post-fusion trust multiplier (V8 S8, default 0.0 = OFF).
Like the graph weight, deliberately OUTSIDE the normalized fusion
sum: when > 0, every fused score is scaled by
1 + weight * (source_trust − 0.7) (user-confirmed ranks up,
tool-ingested 0.7 unchanged, low trust down), and the factor is
disclosed per-result in RecallResult::trust_factor.
corroboration_weight: f32Post-fusion corroboration multiplier (bridging counter, default 0.0
= OFF). Like trust, deliberately OUTSIDE the normalized fusion sum:
when > 0, every fused score is scaled by the saturating
corroboration_boost over the distinct-session count, and the count
is disclosed per-result in RecallResult::corroboration.
conformal_alpha: Option<f32>Conformal-set miscoverage level (V8 S8, default None = OFF). When
set in (0, 1), fused results are graded against a calibrated
prediction set and the search carries a ConformalSetInfo
disclosure — active with a real threshold, or uncalibrated
until feedback samples exist.
cache_embeddings: boolWhether to cache embeddings (default true).
max_cache_entries: usizeMaximum cache entries (default 1000).
writer_heap_size: usizeTantivy IndexWriter heap size in bytes (default 50MB). Note: writer is now owned by SearchEngine; this field is kept for API compatibility.
promotion_on_read: boolPost-fusion promotion-on-read (S5 promotion-on-read, default false = OFF).
When enabled (via WM_PROMOTION_ON_READ=1 or config), top recall hits trigger
Memory::recall(), updating accessed_at, access_count, recall_count, and
applying Hebbian neuro_score boosting + novelty decay.
association_rerank: boolAssociation-weighted recall reranking (S10, default false = OFF). When enabled (via WM_ASSOCIATION_RERANK=1 or config), candidate recall scores receive an association connectivity boost based on active edges.
Implementations§
Source§impl RecallConfig
impl RecallConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create config from environment variables.
Weights are clamped to [0.0, 1.0] and normalized to sum to 1.0. NaN and Infinity values are rejected (default is kept).
Sourcepub fn weights_normalized(&self) -> bool
pub fn weights_normalized(&self) -> bool
Validate that weights sum to approximately 1.0.
Trait Implementations§
Source§impl Clone for RecallConfig
impl Clone for RecallConfig
Source§impl Debug for RecallConfig
impl Debug for RecallConfig
Auto Trait Implementations§
impl Freeze for RecallConfig
impl RefUnwindSafe for RecallConfig
impl Send for RecallConfig
impl Sync for RecallConfig
impl Unpin for RecallConfig
impl UnsafeUnpin for RecallConfig
impl UnwindSafe for RecallConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for 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