Embeddings
An embedding turns a piece of text into a list of numbers that captures its meaning. Two texts that mean similar things get similar numbers, so you can compare meaning directly instead of matching keywords. That is what powers semantic search, grouping related items, and spotting near-duplicates that are worded differently.
The Embeddings block generates those numbers using OpenAI, Google Gemini, Cohere, or Mistral. Pick a provider, pick one of its models, pass in text, and get a vector back — one vector per input, in the order you supplied them. You can embed a single string or a list of strings in one call.
Models differ in what they are good at and what they cost. text-embedding-3-small is the cost-efficient general choice, gemini-embedding-001 gives the highest retrieval quality, embed-v4.0 handles multilingual content, and codestral-embed is tuned for source code. Some models also let you trade vector size against quality, and some accept a task type so the vector is conditioned for how it will be used — the block only offers those controls for the models that actually support them.
Two things worth knowing before you build on it. Vectors are only comparable when they come from the same model at the same size, so changing either means re-embedding everything you intend to compare. And input longer than the model's limit is shortened to fit rather than rejected, with a warning in the run, so chunk long documents yourself when the tail matters.
Sim's knowledge bases embed separately, at a fixed vector width and from a smaller set of models. This block is for embedding text yourself inside a workflow.
Usage Instructions
Turn text into embedding vectors for semantic search, clustering, and similarity. Supports OpenAI, Google Gemini, Cohere, and Mistral embedding models.
Actions
OpenAI Embeddings
Generate embeddings from text using OpenAI's embedding models
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Text to embed, or an array of texts to embed in one call |
model | string | No | Embedding model to use |
taskType | string | No | What the embedding is for, when the model supports task conditioning: document, query, similarity, classification, or clustering |
dimensions | number | No | Output dimensions, when the model supports truncation. Defaults to native. |
apiKey | string | Yes | API key for the selected embedding provider |
Output
| Parameter | Type | Description |
|---|---|---|
embeddings | json | Generated embeddings |
model | string | Model used |
provider | string | Provider used |
dimensions | number | Dimensionality of each vector |
usage | json | Token usage |
Gemini Embeddings
Generate embeddings from text using Google's Gemini embedding models
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Text to embed, or an array of texts to embed in one call |
model | string | No | Embedding model to use |
taskType | string | No | What the embedding is for, when the model supports task conditioning: document, query, similarity, classification, or clustering |
dimensions | number | No | Output dimensions, when the model supports truncation. Defaults to native. |
apiKey | string | Yes | API key for the selected embedding provider |
Output
| Parameter | Type | Description |
|---|---|---|
embeddings | json | Generated embeddings |
model | string | Model used |
provider | string | Provider used |
dimensions | number | Dimensionality of each vector |
usage | json | Token usage |
Cohere Embeddings
Generate embeddings from text using Cohere's embedding models
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Text to embed, or an array of texts to embed in one call |
model | string | No | Embedding model to use |
taskType | string | No | What the embedding is for, when the model supports task conditioning: document, query, similarity, classification, or clustering |
dimensions | number | No | Output dimensions, when the model supports truncation. Defaults to native. |
apiKey | string | Yes | API key for the selected embedding provider |
Output
| Parameter | Type | Description |
|---|---|---|
embeddings | json | Generated embeddings |
model | string | Model used |
provider | string | Provider used |
dimensions | number | Dimensionality of each vector |
usage | json | Token usage |
Mistral Embeddings
Generate embeddings from text using Mistral's embedding models
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Text to embed, or an array of texts to embed in one call |
model | string | No | Embedding model to use |
taskType | string | No | What the embedding is for, when the model supports task conditioning: document, query, similarity, classification, or clustering |
dimensions | number | No | Output dimensions, when the model supports truncation. Defaults to native. |
apiKey | string | Yes | API key for the selected embedding provider |
Output
| Parameter | Type | Description |
|---|---|---|
embeddings | json | Generated embeddings |
model | string | Model used |
provider | string | Provider used |
dimensions | number | Dimensionality of each vector |
usage | json | Token usage |