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 moreSource§impl Debug for TieredRetrievalConfig
impl Debug for TieredRetrievalConfig
Source§impl Default for TieredRetrievalConfig
impl Default for TieredRetrievalConfig
Source§fn default() -> TieredRetrievalConfig
fn default() -> TieredRetrievalConfig
Source§impl<'de> Deserialize<'de> for TieredRetrievalConfigwhere
TieredRetrievalConfig: Default,
impl<'de> Deserialize<'de> for TieredRetrievalConfigwhere
TieredRetrievalConfig: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TieredRetrievalConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TieredRetrievalConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for TieredRetrievalConfig
impl Serialize for TieredRetrievalConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for TieredRetrievalConfig
impl RefUnwindSafe for TieredRetrievalConfig
impl Send for TieredRetrievalConfig
impl Sync for TieredRetrievalConfig
impl Unpin for TieredRetrievalConfig
impl UnsafeUnpin for TieredRetrievalConfig
impl UnwindSafe for TieredRetrievalConfig
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request