pub struct RecallConfig {Show 14 fields
pub relevance_weight: f64,
pub salience_weight: f64,
pub temporal_weight: f64,
pub reranker_weights: HashMap<String, f64>,
pub temporal_half_life_days: f64,
pub decay_model: DecayModel,
pub candidate_multiplier: u32,
pub candidate_limit: Option<u32>,
pub fuse_strategy: FusionStrategy,
pub min_score: f64,
pub min_salience: f64,
pub include_breakdown: bool,
pub scoring: Option<ScoringConfig>,
pub brain_profile: Option<BrainProfileHint>,
}Expand description
Configuration for the recall scoring pipeline. All fields have sensible defaults matching current behavior.
Fields§
§relevance_weight: f64Weight of RRF/fusion score. Default 0.70.
salience_weight: f64Weight of decay-adjusted salience. Default 0.20.
temporal_weight: f64Weight of pure recency. Default 0.10.
reranker_weights: HashMap<String, f64>Per-reranker weights, keyed by reranker name. Missing keys → 0.0 (disabled). v1 built-in names: “cross_encoder”, “salience”, “graph_proximity”.
temporal_half_life_days: f64Days for temporal score to halve. Default 30.0.
decay_model: DecayModelDecay model to apply to salience. Default Exponential.
candidate_multiplier: u32Candidates per retrieval path before fusion = limit × this. Default 20.
candidate_limit: Option<u32>Explicit max candidates per retrieval path before fusion. When None, candidate_multiplier keeps the legacy behavior.
fuse_strategy: FusionStrategyStrategy used to fuse retrieval-source candidate lists. Default RRF k=60.
min_score: f64Minimum composite score to include in results. Default 0.0.
min_salience: f64Minimum raw salience to include in results. Default 0.0.
include_breakdown: boolInclude per-component score breakdowns in recall responses. Default false.
scoring: Option<ScoringConfig>Optional full archive scoring config override. When provided, handle_recall
uses calculate_score + all archive pipeline features (MMR, supersedes
suppression, CJK routing, entity boost) instead of the legacy additive formula.
ScoringConfig::default() is used when this is None and the caller provides
entity_names or sets use_archive_scoring = true.
brain_profile: Option<BrainProfileHint>Optional brain profile hint for score boosting.
When set, handle_recall fetches the named brain profile’s entity
posteriors and applies a salience multiplier to results whose note id
or source entity appears in the profile’s high-posterior set.
Integration point: after ranked is populated, iterate results and
multiply rank_score by brain_profile_boost for IDs whose
Beta posterior mean exceeds brain_profile_threshold.
Implementations§
Source§impl RecallConfig
impl RecallConfig
Sourcepub fn validate(&self) -> Result<(), RuntimeError>
pub fn validate(&self) -> Result<(), RuntimeError>
Validate that the config is internally consistent.
Rejects:
- Negative weights (base or reranker)
- All three base weights summing to zero (no scoring signal)
- Non-positive temporal half-life
Trait Implementations§
Source§impl Clone for RecallConfig
impl Clone for RecallConfig
Source§fn clone(&self) -> RecallConfig
fn clone(&self) -> RecallConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RecallConfig
impl Debug for RecallConfig
Source§impl Default for RecallConfig
impl Default for RecallConfig
Source§impl<'de> Deserialize<'de> for RecallConfigwhere
RecallConfig: Default,
impl<'de> Deserialize<'de> for RecallConfigwhere
RecallConfig: Default,
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>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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