pub struct TieredRetrievalConfig {Show 17 fields
pub enabled: bool,
pub classifier_provider: ProviderName,
pub validator_provider: ProviderName,
pub token_budget: usize,
pub validation_enabled: bool,
pub validation_threshold: f32,
pub max_escalations: u8,
pub classifier_timeout_secs: u64,
pub validator_timeout_secs: u64,
pub similarity_weight: f64,
pub recency_weight: f64,
pub recency_half_life_days: u32,
pub tfidf_weight: f64,
pub cognitive_signal_weight: f64,
pub tier_boost_weight: f64,
pub semantic_tier_boost: f64,
pub deep_reasoning_query_conditioned: bool,
}Expand description
MemFlow tiered intent-driven retrieval configuration.
Classifies each recall query into one of three intent tiers (ProfileLookup,
TargetedRetrieval, DeepReasoning) and dispatches to the cheapest sufficient backend.
An optional validation step can escalate to a heavier tier when evidence confidence is low.
§Example (TOML)
[memory.tiered_retrieval]
enabled = false
classifier_provider = ""
validator_provider = ""
token_budget = 4096
validation_enabled = false
validation_threshold = 0.6
max_escalations = 1
classifier_timeout_secs = 5
validator_timeout_secs = 5
# Signal weights (all default to 0.0; set to activate each signal)
similarity_weight = 1.0
recency_weight = 0.0
recency_half_life_days = 7
tfidf_weight = 0.0
cognitive_signal_weight = 0.0
tier_boost_weight = 0.0
semantic_tier_boost = 1.0Fields§
§enabled: boolEnable MemFlow tiered retrieval. Default: false.
classifier_provider: ProviderNameProvider name from [[llm.providers]] for intent classification.
When empty, the HeuristicRouter is used (no LLM call). When a provider
is set but the call fails, falls back to the heuristic (fail-open).
validator_provider: ProviderNameProvider name from [[llm.providers]] for evidence validation.
When empty or when validation_enabled = false, no validation call is made.
token_budget: usizeMaximum tokens to gather for evidence per query. Default: 4096.
validation_enabled: boolEnable evidence validation and tier escalation. Default: false.
validation_threshold: f32Confidence threshold below which validation triggers tier escalation. Default: 0.6.
max_escalations: u8Maximum tier escalations per query. Default: 1.
classifier_timeout_secs: u64Timeout in seconds for the classifier LLM call. Default: 5.
On timeout the pipeline falls back to the HeuristicRouter (fail-open).
validator_timeout_secs: u64Timeout in seconds for the validator LLM call. Default: 5.
On timeout the validator is treated as sufficient (fail-open).
similarity_weight: f64Weight applied to the raw similarity score from vector/keyword recall. Default: 1.0.
Set to 1.0 and all other weights to 0.0 to reproduce pre-signal behaviour.
recency_weight: f64Weight applied to the recency decay signal. Default: 0.0 (disabled).
recency_half_life_days: u32Half-life for recency decay in days. Default: 7.
A message that is recency_half_life_days old receives a recency score of 0.5.
Set recency_weight = 0.0 to disable recency scoring entirely.
tfidf_weight: f64Weight applied to the TF-IDF signal. Default: 0.0 (disabled).
cognitive_signal_weight: f64Weight applied to the cognitive signal (message access frequency). Default: 0.0 (disabled).
tier_boost_weight: f64Weight applied to the tier boost signal for consolidated/semantic entries. Default: 0.0 (disabled).
semantic_tier_boost: f64Additive score awarded to entries in the semantic tier when tier_boost_weight > 0. Default: 1.0.
The final contribution is tier_boost_weight * semantic_tier_boost for semantic entries
and 0.0 for episodic entries.
deep_reasoning_query_conditioned: boolRoute the DeepReasoning tier graph step through query-conditioned recall (#3994).
When true, the graph recall step for IntentClass::DeepReasoning uses
recall_graph_hela (HELA spreading activation) instead of static-weight BFS,
producing query-aligned results. Requires an embedding store. Default: false (opt-in).
Trait Implementations§
Source§impl Clone for TieredRetrievalConfig
impl Clone for TieredRetrievalConfig
Source§fn clone(&self) -> TieredRetrievalConfig
fn clone(&self) -> TieredRetrievalConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more