pub struct TieredRetrievalConfig {
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,
}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 = 5Fields§
§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).
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