Adjust the SONA learning rate based on recent prediction accuracy. Reduce rate when converging (accurate), increase when exploring (inaccurate). Update sona-config.json. Triggers: learning rate, adjust rate, sona config, convergence, exploration rate
memory/sona-config.json exists (create with defaults if not)logs/claude_log.mdRead memory/sona-config.json:
{
"learning_rate": 0.05,
"min_rate": 0.01,
"max_rate": 0.15,
"accuracy_window": 10,
"last_adjusted": "[ISO timestamp]",
"adjustment_history": []
}
If the file does not exist, create it with the defaults above.
Review the last N pattern-use events (where N = accuracy_window):
logs/claude_log.md for "Pattern Scored" entriesaccuracy = successes / total_eventsApply the adaptive rule:
| Accuracy | Action | Rationale |
|---|---|---|
| >= 0.8 | Decrease rate by 20% | Patterns are reliable — converge, reduce volatility |
| 0.5–0.8 | No change | Normal operating range |
| < 0.5 | Increase rate by 30% | Patterns are unreliable — explore, allow faster adaptation |
Calculate new rate:
new_rate = current_rate * 0.8new_rate = current_rate * 1.3new_rate = max(min_rate, min(max_rate, new_rate))The learning rate controls how much confidence changes on each pattern scoring event:
+learning_rate (default +0.05)-learning_rate * 2 (default -0.10)+learning_rate * 0.4 (default +0.02)These deltas are used by neural-pattern-score when adjusting pattern confidence.
Write the updated values to memory/sona-config.json:
{
"learning_rate": [new_rate],
"min_rate": 0.01,
"max_rate": 0.15,
"accuracy_window": 10,
"last_adjusted": "[current ISO timestamp]",
"adjustment_history": [
...previous,
{
"timestamp": "[ISO]",
"accuracy": [value],
"old_rate": [old],
"new_rate": [new],
"direction": "[converge/explore/hold]"
}
]
}
Ensure that neural-pattern-score reads the current learning_rate from sona-config.json rather than using hardcoded deltas. The playbook for neural-pattern-score references fixed values as defaults — the config file overrides them.
Append to logs/claude_log.md:
### Learning Rate Adjusted — [timestamp]
- Accuracy (last [N] events): [x.xx]
- Direction: [converge/explore/hold]
- Rate: [old] → [new]
- Confidence deltas: success=[+x.xx], failure=[-x.xx], partial=[+x.xx]
memory/sona-config.json with new learning rate and historylogs/claude_log.md