pub struct RecallConfig {Show 16 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>,
pub fts_gather: RecallFtsGatherConfig,
pub ann_overfetch_max_rounds: Option<usize>,
}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 archive scoring config; enables MMR, supersedes suppression, CJK routing, entity boost.
brain_profile: Option<BrainProfileHint>Optional brain profile hint for post-recall score boosting.
fts_gather: RecallFtsGatherConfigControls the two-stage FTS gather path (default: disabled, existing behavior).
ann_overfetch_max_rounds: Option<usize>Maximum rounds for the ANN namespace over-fetch retry loop.
Round 1 is the initial over-fetch; rounds 2–N double the fetch window
until enough visible-namespace candidates are found or the corpus is
exhausted. When None, falls back to the ANN_OVERFETCH_MAX_ROUNDS
env var (default 3). Pass Some(1) to disable widening entirely.
Implementations§
Source§impl RecallConfig
impl RecallConfig
Sourcepub fn validate(&self) -> Result<(), RuntimeError>
pub fn validate(&self) -> Result<(), RuntimeError>
Validate config consistency: non-negative weights, positive weight sum, positive half-life.
Sourcepub fn try_from_value(v: Value) -> Result<Self, RuntimeError>
pub fn try_from_value(v: Value) -> Result<Self, RuntimeError>
Deserialize from a JSON value and validate in one step.
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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