pub struct ScoringConfig {Show 15 fields
pub weights: ScoringWeights,
pub min_raw_relevance: f32,
pub min_rrf_relevance: f32,
pub baseline_relevance: f32,
pub decay_cap: f32,
pub max_recall_candidates: usize,
pub default_recall_limit: usize,
pub default_token_budget: usize,
pub chars_per_token: usize,
pub mmr_penalty: f32,
pub mmr_prefix_len: usize,
pub enable_supersedes_suppression: bool,
pub enable_multilingual_routing: bool,
pub multilingual_model: Option<String>,
pub adjustments: Vec<ScoreAdjustment>,
}Expand description
Complete, tunable scoring configuration for the memory recall pipeline. DoS caps: max_recall_candidates≤500, default_token_budget≤16000, default_recall_limit≤200.
Fields§
§weights: ScoringWeights§min_raw_relevance: f32Minimum raw cosine similarity to include a vector hit. Hits below this are excluded before RRF fusion (#2272). Default: 0.10.
min_rrf_relevance: f32Minimum RRF score after fusion before normalization. Default: 0.0.
baseline_relevance: f32Relevance floor for the min-max normalization band. Default: 0.15.
decay_cap: f32Upper cap on per-entry decay_factor before temporal recency calculation. Default: 0.05.
max_recall_candidates: usizeMaximum search candidates to retrieve. Server-side cap: 500. Default: 200.
default_recall_limit: usizeDefault result limit when caller doesn’t specify. Server-side cap: 200. Default: 10.
default_token_budget: usizeDefault token budget (tokens). Server-side cap: 16000. Default: 4000.
chars_per_token: usizeApproximate characters per token (for token budget). Default: 4.
mmr_penalty: f32Score penalty applied to results whose first mmr_prefix_len characters
match an earlier result. Default: 0.1.
mmr_prefix_len: usizeCharacter prefix length used for MMR duplicate detection. Default: 100.
enable_supersedes_suppression: boolWhen true, suppress memories whose properties.supersedes value matches
the ID of another memory in the result set. Default: true.
enable_multilingual_routing: boolWhen true and a multilingual embedding model is registered, route non-ASCII-script queries (CJK, Cyrillic, Arabic, accented-Latin, …) to it as the primary dense model. Default: true.
multilingual_model: Option<String>Name of the multilingual embedding model to prefer for dense routing. When None, the handler checks registered model names for substrings “multilingual” or “paraphrase”. Default: None.
adjustments: Vec<ScoreAdjustment>Score adjustments applied after the base formula. Default: episodic bonus, semantic age penalty, entity boost.
Implementations§
Source§impl ScoringConfig
impl ScoringConfig
Sourcepub fn apply_dos_caps(&mut self)
pub fn apply_dos_caps(&mut self)
Clamp candidate, result, and token budgets to their server-side maximums.
Trait Implementations§
Source§impl Clone for ScoringConfig
impl Clone for ScoringConfig
Source§fn clone(&self) -> ScoringConfig
fn clone(&self) -> ScoringConfig
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 ScoringConfig
impl Debug for ScoringConfig
Source§impl Default for ScoringConfig
impl Default for ScoringConfig
Source§impl<'de> Deserialize<'de> for ScoringConfigwhere
ScoringConfig: Default,
impl<'de> Deserialize<'de> for ScoringConfigwhere
ScoringConfig: 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 ScoringConfig
impl RefUnwindSafe for ScoringConfig
impl Send for ScoringConfig
impl Sync for ScoringConfig
impl Unpin for ScoringConfig
impl UnsafeUnpin for ScoringConfig
impl UnwindSafe for ScoringConfig
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