session_backfill_embeddings
Repair missing vector embeddings in ledger entries after API outages to ensure full semantic search coverage.
Instructions
Repair ledger entries that are missing vector embeddings. This can happen if the Gemini API was temporarily unavailable when the entry was saved.
How it works:
Scans for active ledger entries where embedding IS NULL
Generates embeddings via Gemini text-embedding-004
Patches each row with the generated embedding
Run this periodically or after known API outages to ensure full semantic search coverage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum entries to repair in one call (default: 20, max: 50). Keeps API costs predictable. | |
| dry_run | No | If true, only count missing embeddings without generating them. Default: false. | |
| project | No | Optional: repair only a specific project. If omitted, repairs all projects. |