check_embedding_drift
Detects embedding drift by comparing current embeddings of canary strings against saved snapshots. Alerts when maximum cosine drift exceeds threshold, catching silent model upgrades that degrade retrieval accuracy.
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 |
|---|---|---|---|
| force | No | With capture=true, overwrite an existing snapshot. | |
| capture | No | Embed CANARY_STRINGS and persist the snapshot. | |
| threshold | No | Max allowed drift (1 - cosine). Default 0.05. |