pub struct SemanticConfig {
pub enabled: bool,
pub recall_limit: usize,
pub vector_weight: f64,
pub keyword_weight: f64,
pub temporal_decay_enabled: bool,
pub temporal_decay_half_life_days: u32,
pub mmr_enabled: bool,
pub mmr_lambda: f32,
pub importance_enabled: bool,
pub importance_weight: f64,
pub embedding_provider: Option<ProviderName>,
pub embed_timeout_secs: u64,
}Expand description
Semantic (vector) memory retrieval configuration, nested under [memory.semantic] in TOML.
Controls how memories are searched and ranked, including temporal decay, MMR diversity re-ranking, and hybrid BM25+vector weighting.
§Example (TOML)
[memory.semantic]
enabled = true
recall_limit = 5
vector_weight = 0.7
keyword_weight = 0.3
mmr_lambda = 0.7Fields§
§enabled: boolEnable vector-based semantic recall. Default: true.
recall_limit: usize§vector_weight: f64§keyword_weight: f64§temporal_decay_enabled: bool§temporal_decay_half_life_days: u32§mmr_enabled: bool§mmr_lambda: f32§importance_enabled: bool§importance_weight: f64§embedding_provider: Option<ProviderName>Name of a [[llm.providers]] entry to use exclusively for embedding calls during
memory write and backfill operations. A dedicated provider prevents embed_backfill
from contending with the guardrail at the API server level (rate limits, Ollama
single-model lock). Falls back to the main agent provider when None.
embed_timeout_secs: u64Timeout in seconds applied to every embed() call inside zeph-memory.
Applies to all embedding call sites: admission control, quality gate, recall,
summarization, graph retrieval, consolidation, and tree consolidation.
Set to a higher value when using slow remote embedding providers.
Default: 5.
Trait Implementations§
Source§impl Debug for SemanticConfig
impl Debug for SemanticConfig
Source§impl Default for SemanticConfig
impl Default for SemanticConfig
Source§fn default() -> SemanticConfig
fn default() -> SemanticConfig
Source§impl<'de> Deserialize<'de> for SemanticConfig
impl<'de> Deserialize<'de> for SemanticConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SemanticConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SemanticConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for SemanticConfig
impl Serialize for SemanticConfig
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 SemanticConfig
impl RefUnwindSafe for SemanticConfig
impl Send for SemanticConfig
impl Sync for SemanticConfig
impl Unpin for SemanticConfig
impl UnsafeUnpin for SemanticConfig
impl UnwindSafe for SemanticConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 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