check_embedding_drift
Detect changes in embedding provider models by monitoring cosine drift of saved canary strings. Alarm triggers when drift exceeds a configurable threshold to prevent corrupting index recall.
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. |