check_embedding_drift
Detect silent embedding provider model swaps by pinning a canary and comparing cosine distances. First call saves baseline; later calls flag drift beyond a threshold.
Instructions
Pin and re-check a 16-string canary against the active embedding provider. Catches silent provider model swaps (OpenAI/Voyage/etc.) that quietly degrade hybrid retrieval. First call (or with capture=true) saves the baseline; subsequent calls report max cosine distance vs baseline. Read-only or write-only (capture). Returns JSON: { status, message, max_distance?, mean_distance?, per_string? }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| capture | No | Force a fresh baseline capture, overwriting any existing canary file. | |
| threshold | No | Cosine-distance threshold for flagging drift (default 0.05). |