semantic_search
Semantic search over the CWI catalog embedding matrix: cosine similarity against 384-dim bge-small-en-v1.5 vectors (55 tracks). The query is embedded at request time with Workers AI @cf/baai/bge-small-en-v1.5 — the same model that produced the matrix, so catalog and query vectors are directly cosine-comparable. No inference needed on your side; just call this tool. FALLBACK (documented, never silent): if the Workers AI [ai] binding is unavailable at runtime, the tool DEGRADES to keyword scoring over the matrix text fields and says so in its response (method "fallback:keyword", plus a fallback_note). Fallback scores are keyword weights (title 3x, genre/descriptor 2x, mood 1x) — they are NOT cosine similarity and are never presented as semantic scores.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Natural-language music query, e.g. "dark cyberpunk rap for a film scene". Truncated at 500 characters. | |
| limit | No | Max results, 1-20 (default 5). |