check_embedding_drift
Monitors embedding drift by re-embedding saved strings and reporting cosine drift. Alarms when max drift exceeds threshold (default 0.05), catching silent model changes.
Instructions
Embedding-drift canary. Without args, re-embeds the saved CANARY_STRINGS and reports per-canary cosine drift; alarm fires when max_drift > threshold (default 0.05 ≈ cosine<0.95). Pass capture=true to seed the snapshot first (idempotent unless force=true). Catches silent provider model upgrades that would otherwise corrupt index recall without changing dim.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| capture | No | Embed CANARY_STRINGS and persist the snapshot. | |
| force | No | With capture=true, overwrite an existing snapshot. | |
| threshold | No | Max allowed drift (1 - cosine). Default 0.05. |