Add pgvector embeddings on cards, server-side cohere/embed-v4.0 via AI Gateway, kNN identify route, and L0→L1→L2 client orchestration with empty-index fast escalate and id-cursor backfill job. Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
533 B
Markdown
23 lines
533 B
Markdown
---
|
|
convoy: scan-visual-catalog-search
|
|
brief_number: 1
|
|
depends_on: []
|
|
recommended_model: composer-2.5
|
|
model_tier: standard
|
|
files:
|
|
- migrations/1782000000001_add-card-embeddings.js
|
|
- docs/SCHEMA_MAP.md
|
|
---
|
|
|
|
# Brief 1: pgvector migration + SCHEMA_MAP
|
|
|
|
## Goal
|
|
|
|
Add `vector(1024)` embedding column + HNSW index on `cards`.
|
|
|
|
## Acceptance criteria
|
|
|
|
- [ ] `CREATE EXTENSION IF NOT EXISTS vector`
|
|
- [ ] `cards.embedding`, `cards.embedded_at`
|
|
- [ ] `idx_cards_embedding_hnsw` partial index
|
|
- [ ] SCHEMA_MAP documents layer 0 + pgvector
|