nexo_learning_apply_retroactively
Scan recent decisions for conflicts with a learning's prevention rule and create deterministic followups to retroactively apply the rule, correcting past mismatches.
Instructions
Scan recent decisions and surface those that conflict with a learning's prevention rule.
Closes Fase 2 item 3 of NEXO-AUDIT-2026-04-11. Use this when you add a new
rule and want to retroactively check whether past decisions still hold.
Creates deterministic NF-RETRO-L-D followups so the
helper is idempotent across reruns. nexo_learning_add invokes this
automatically when the new learning has a prevention field — call this
tool manually only when you want to re-scan with a longer window or a
different threshold.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| learning_id | Yes | ID of the learning to apply. | |
| lookback_days | No | How many days back to scan decisions (default 14). | |
| max_matches | No | Cap on followups created per call (default 5). | |
| min_score | No | Match threshold in [0.0, 1.0] (default 0.4). | |
| dry_run | No | If True, scores matches but does not create followups. |