pub struct HebbianConfig {Show 13 fields
pub enabled: bool,
pub hebbian_lr: f32,
pub consolidation_interval_secs: u64,
pub consolidation_threshold: f64,
pub consolidate_provider: String,
pub max_candidates_per_sweep: usize,
pub consolidation_cooldown_secs: u64,
pub consolidation_prompt_timeout_secs: u64,
pub consolidation_max_neighbors: usize,
pub spreading_activation: bool,
pub spread_depth: u32,
pub spread_edge_types: Vec<String>,
pub step_budget_ms: u64,
}Expand description
Hebbian edge-weight reinforcement and consolidation configuration (HL-F1/F2/F3/F4, #3344/#3345).
Controls opt-in Hebbian learning on knowledge-graph edges. When enabled, every
recall traversal increments the weight column of the traversed edges, building
a usage-frequency signal into the graph. The consolidation sub-feature (HL-F3/F4)
runs a background sweep that identifies high-traffic entity clusters and distills
them into graph_rules entries via an LLM.
Fields§
§enabled: boolMaster switch. When false, no weight updates are written to the database
and the consolidation loop does not start. Default: false.
hebbian_lr: f32Weight increment per co-activation (HL-F2, #3344).
Typical range: 0.01–0.5. A value of 0.0 is accepted but logs a WARN at
startup when enabled = true. Default: 0.1.
consolidation_interval_secs: u64How often the consolidation sweep runs, in seconds (HL-F3, #3345).
Set to 0 to disable the consolidation loop while keeping Hebbian updates active.
Default: 3600 (one hour).
consolidation_threshold: f64Minimum degree × avg_weight score for an entity to qualify as a consolidation
candidate (HL-F3, #3345). Default: 5.0.
consolidate_provider: StringProvider name (from [[llm.providers]]) used for cluster distillation (HL-F4, #3345).
Falls back to the main provider when empty or unresolvable. Default: "fast".
max_candidates_per_sweep: usizeMaximum number of candidates processed per sweep (HL-F3, #3345). Default: 10.
consolidation_cooldown_secs: u64Minimum seconds between consecutive consolidations of the same entity (HL-F3, #3345).
An entity is skipped if its consolidated_at timestamp is within this window.
Default: 86400 (24 hours).
consolidation_prompt_timeout_secs: u64LLM prompt timeout for a single distillation call, in seconds (HL-F4, #3345).
Default: 30.
consolidation_max_neighbors: usizeMaximum number of neighbouring entity summaries passed to the LLM per candidate
(HL-F4, #3345). Default: 20.
spreading_activation: boolEnable HL-F5 spreading activation from the top-1 ANN anchor (HL-F5, #3346).
When true and enabled = true, recall_graph_hela performs BFS from the
nearest entity anchor, scoring nodes by path_weight × cosine. Default: false.
spread_depth: u32BFS depth for HL-F5 spreading activation. Clamped to [1, 6]. Default: 2.
spread_edge_types: Vec<String>MAGMA edge-type filter for HL-F5 spreading activation.
Accepted values: "semantic", "temporal", "causal", "entity".
Empty = traverse all edge types. Default: [].
step_budget_ms: u64Per-step circuit-breaker timeout for HL-F5 in milliseconds.
Any internal step (anchor ANN, edges batch, vectors batch) that exceeds this
duration triggers an Ok(Vec::new()) fallback with a WARN. Default: 8.
Trait Implementations§
Source§impl Clone for HebbianConfig
impl Clone for HebbianConfig
Source§fn clone(&self) -> HebbianConfig
fn clone(&self) -> HebbianConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HebbianConfig
impl Debug for HebbianConfig
Source§impl Default for HebbianConfig
impl Default for HebbianConfig
Source§impl<'de> Deserialize<'de> for HebbianConfigwhere
HebbianConfig: Default,
impl<'de> Deserialize<'de> for HebbianConfigwhere
HebbianConfig: 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 HebbianConfig
impl RefUnwindSafe for HebbianConfig
impl Send for HebbianConfig
impl Sync for HebbianConfig
impl Unpin for HebbianConfig
impl UnsafeUnpin for HebbianConfig
impl UnwindSafe for HebbianConfig
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