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: Option<ProviderName>,
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: Option<ProviderName>Provider name (from [[llm.providers]]) used for cluster distillation (HL-F4, #3345).
Falls back to the main provider when None or unresolvable.
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 more