Skip to content

learning

learning

Learning, grounding, and checkpoint configuration models.

Defines models for the learning system, exploration budget, entropy response, autonomous pattern application, grounding hooks, and proactive checkpoints.

Classes

ExplorationBudgetConfig

Bases: BaseModel

Configuration for dynamic exploration budget (v23 Evolution).

Maintains a budget for exploratory pattern usage that prevents convergence to zero, preserving diversity in the learning system.

The budget adjusts dynamically based on pattern entropy: - When entropy drops below threshold: budget increases (boost) - When entropy is healthy: budget decays toward floor - Budget never drops below floor (prevents extinction of exploration)

EntropyResponseConfig

Bases: BaseModel

Configuration for automatic entropy response (v23 Evolution).

When pattern entropy drops below threshold, automatically injects diversity through budget boosts and quarantine revisits.

This completes the observe-respond cycle for entropy (v21 added observation).

AutoApplyConfig

Bases: BaseModel

Configuration for autonomous pattern application.

v22 Evolution: Trust-Aware Autonomous Application - enables Marianne to autonomously apply high-trust patterns without human confirmation.

Uses existing trust scoring (v19) to identify patterns safe for autonomous application. When enabled, patterns meeting the trust threshold are automatically included in prompts without escalation.

Example YAML

learning: auto_apply: enabled: true trust_threshold: 0.85 max_patterns_per_sheet: 3 require_validated_status: true

LearningConfig

Bases: BaseModel

Configuration for learning and outcome tracking (Phase 2).

Controls outcome recording, confidence thresholds, and escalation behavior. Learning Activation adds global learning store integration and time-aware scheduling.

GroundingHookConfig

Bases: BaseModel

Configuration for a single grounding hook.

Grounding hooks validate sheet outputs against external sources. Each hook type has specific configuration options.

Example

grounding: hooks: - type: file_checksum expected_checksums: "output.txt": "abc123..."

GroundingConfig

Bases: BaseModel

Configuration for external grounding hooks.

Grounding hooks validate sheet outputs against external sources (APIs, databases, file checksums) to prevent model drift and ensure output quality.

Example

grounding: enabled: true hooks: - type: file_checksum expected_checksums: "critical_file.py": "sha256hash..."

CheckpointTriggerConfig

Bases: BaseModel

Configuration for a proactive checkpoint trigger.

v21 Evolution: Proactive Checkpoint System - enables pre-execution checkpoints.

Example

checkpoints: enabled: true triggers: - name: high_risk_sheet sheet_nums: [5, 6] message: "These sheets modify production files" - name: deployment_keywords prompt_contains: ["deploy", "production", "delete"] requires_confirmation: true

CheckpointConfig

Bases: BaseModel

Configuration for proactive checkpoints.

v21 Evolution: Proactive Checkpoint System - enables asking for confirmation BEFORE dangerous operations, complementing reactive escalation.

Example

checkpoints: enabled: true triggers: - name: production_warning prompt_contains: ["production", "deploy"] message: "This sheet may affect production systems"