pub struct LearningConfig {Show 43 fields
pub enabled: bool,
pub auto_activate: bool,
pub min_failures: u32,
pub improve_threshold: f64,
pub rollback_threshold: f64,
pub min_evaluations: u32,
pub max_versions: u32,
pub cooldown_minutes: u64,
pub correction_detection: bool,
pub correction_confidence_threshold: f32,
pub detector_mode: DetectorMode,
pub judge_model: String,
pub feedback_provider: ProviderName,
pub judge_adaptive_low: f32,
pub judge_adaptive_high: f32,
pub correction_recall_limit: u32,
pub correction_min_similarity: f32,
pub auto_promote_min_uses: u32,
pub auto_promote_threshold: f64,
pub auto_demote_min_uses: u32,
pub auto_demote_threshold: f64,
pub cross_session_rollout: bool,
pub min_sessions_before_promote: u32,
pub min_sessions_before_demote: u32,
pub max_auto_sections: u32,
pub domain_success_gate: bool,
pub arise_enabled: bool,
pub arise_min_tool_calls: u32,
pub arise_trace_provider: ProviderName,
pub stem_enabled: bool,
pub stem_min_occurrences: u32,
pub stem_min_success_rate: f64,
pub stem_provider: ProviderName,
pub stem_retention_days: u32,
pub stem_pattern_window_days: u32,
pub erl_enabled: bool,
pub erl_extract_provider: ProviderName,
pub erl_max_heuristics_per_skill: u32,
pub erl_dedup_threshold: f32,
pub erl_min_confidence: f64,
pub d2skill_enabled: bool,
pub d2skill_max_corrections: u32,
pub d2skill_provider: ProviderName,
}Expand description
Self-learning and skill evolution configuration, nested under [skills.learning] in TOML.
When enabled = true, Zeph tracks skill performance and can automatically improve or roll
back skill definitions based on usage outcomes (ARISE, STEM, D2Skill pipelines).
§Example (TOML)
[skills.learning]
enabled = true
auto_activate = false
min_failures = 3Fields§
§enabled: boolEnable self-learning pipelines. Default: false.
auto_activate: boolAutomatically activate improved skill versions without user confirmation. Default: false.
min_failures: u32§improve_threshold: f64§rollback_threshold: f64§min_evaluations: u32§max_versions: u32§cooldown_minutes: u64§correction_detection: bool§correction_confidence_threshold: f32§detector_mode: DetectorModeDetector strategy: “regex” (default) or “judge”.
judge_model: StringModel for the judge detector (e.g. “claude-sonnet-4-6”). Empty = use primary provider.
feedback_provider: ProviderNameProvider name from [[llm.providers]] for detector_mode = "model" (LlmClassifier).
Empty = use the primary provider. Named but not found in registry = log warning, degrade to regex-only. Never fails startup.
judge_adaptive_low: f32Regex confidence below this value is treated as “not a correction” — judge not invoked.
judge_adaptive_high: f32Regex confidence at or above this value is accepted without judge confirmation.
correction_recall_limit: u32§correction_min_similarity: f32§auto_promote_min_uses: u32§auto_promote_threshold: f64§auto_demote_min_uses: u32§auto_demote_threshold: f64§cross_session_rollout: boolWhen true, auto-promote and auto-demote decisions require the skill to have been used
across at least min_sessions_before_promote (for promotion) or
min_sessions_before_demote (for demotion) distinct conversation sessions.
Prevents trust transitions from a single long session.
min_sessions_before_promote: u32Minimum number of distinct conversation_id values in skill_outcomes before
auto-promotion is eligible. Only checked when cross_session_rollout = true.
min_sessions_before_demote: u32Minimum distinct sessions before auto-demotion when cross_session_rollout = true.
Default 1 (demotion can happen after a single bad session by default). Separate from
min_sessions_before_promote because demotion should be fast (low threshold) while
promotion benefits from conservative validation (higher threshold).
max_auto_sections: u32Maximum number of top-level content sections (markdown H2 headers) allowed in
auto-generated skill bodies. Bodies exceeding this limit are rejected by
validate_body_sections().
domain_success_gate: boolWhen true, auto-generated skill versions must pass a domain-conditioned evaluation before promotion. If the improved body drifts from the original skill’s domain, activation is skipped (the version is still saved for manual review).
arise_enabled: boolEnable ARISE trace-based skill improvement (disabled by default).
arise_min_tool_calls: u32Minimum tool calls in a turn to trigger ARISE trace improvement.
arise_trace_provider: ProviderNameProvider name from [[llm.providers]] for ARISE trace summarization.
Empty = fall back to primary provider.
stem_enabled: boolEnable STEM automatic tool pattern detection and skill generation (disabled by default).
stem_min_occurrences: u32Minimum occurrences of a tool sequence before generating a skill candidate.
stem_min_success_rate: f64Minimum success rate of the pattern before generating a skill candidate.
stem_provider: ProviderNameProvider name from [[llm.providers]] for STEM skill generation.
Empty = fall back to primary provider.
stem_retention_days: u32Days to retain rows in skill_usage_log before pruning.
stem_pattern_window_days: u32Window in days for pattern detection queries (limits scan cost on large tables).
erl_enabled: boolEnable ERL post-task heuristic extraction (disabled by default).
erl_extract_provider: ProviderNameProvider name from [[llm.providers]] for ERL heuristic extraction.
Empty = fall back to primary provider.
erl_max_heuristics_per_skill: u32Maximum heuristics prepended per skill at match time.
erl_dedup_threshold: f32Text similarity threshold (Jaccard) for heuristic deduplication.
When exact text match exceeds this, increment use_count instead of inserting.
erl_min_confidence: f64Minimum confidence to include a heuristic at match time.
d2skill_enabled: boolEnable D2Skill step-level error correction (disabled by default).
Requires arise_enabled = true to populate corrections from ARISE traces.
If d2skill_enabled = true and arise_enabled = false, existing corrections
are still applied but no new ones are generated via ARISE.
d2skill_max_corrections: u32Maximum corrections to inject per failure event.
d2skill_provider: ProviderNameProvider name from [[llm.providers]] for correction extraction from ARISE traces.
Empty = fall back to primary provider.
Trait Implementations§
Source§impl Clone for LearningConfig
impl Clone for LearningConfig
Source§fn clone(&self) -> LearningConfig
fn clone(&self) -> LearningConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more