Actions3
- Embedding Actions
Embedding → Cosine Similarity
AI-generatedSummary
Calculate the cosine similarity between two supplied embedding vectors. Select a provider and embedding model, then provide each vector as a JSON array; the operation returns the similarity result.
Inputs
- Provider (required) — Choose Google Generative AI or OpenAI.
- Model (required) — Choose the embedding model. The operation uses the selected model to resolve the provider’s embedding configuration.
- Embedding 1 (required) — First embedding vector as a JSON array.
- Embedding 2 (required) — Second embedding vector as a JSON array.
- Options — Optional settings include provider-specific output dimensions and Google task type, plus maximum retries. The listed parallel-call setting applies to embedMany, not this operation.
Output shape
A single item containing the cosine similarity result.
The supplied vectors must be valid JSON arrays. The properties declare provider and model selection, but do not specify the result field name or numeric range.