check_embedding_drift
Detect embedding drift by re-embedding canary strings and comparing them to a stored snapshot. Alarm when cosine drift exceeds the threshold, catching silent model upgrades that corrupt 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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_embedding_drift"
}
}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. |