Semantic similarity ranking
similarityRanks up to 15 candidate texts by cosine similarity to a query, using @cf/baai/bge-base-en-v1.5 embeddings. Returns { model, ranked: [{ index, score }] (highest first), scores: number[] (input order) } Price: 3 credits (1 credit = 1 CAD cent) per successful call; input that does not match the schema is rejected before billing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Query text, up to 2000 characters. | |
| candidates | Yes | 1 to 15 candidate texts, each up to 2000 characters. |