Ollama Embeddings Tool icon

Ollama Embeddings Tool

Generate text embeddings using Ollama models (Qwen, EmbeddingGemma, Nomic, etc.) as a tool

Generate Batch Embeddings

AI-generated

Summary

Generates an embedding vector for each text using the selected model through the configured Ollama API. For each incoming item, it returns one output item containing the batch results in the chosen format.

Inputs

  • Model (required) — Select an embedding model available from the configured API; if none is selected, the implementation falls back to Qwen/Qwen3-Embedding-0.6B.
  • Texts (required) — Texts to embed. The value may be an array or a JSON string encoding an array; a plain string is treated as one text. Blank entries are removed, and the batch must contain at least one nonblank text.
  • Performance Mode — Choose GPU defaults (30-second timeout, 2 retries), CPU defaults (120-second timeout, 3 retries), or custom timeout and retry values.
  • Custom Timeout (Ms) — Request timeout used in Custom performance mode; defaults to 30000 ms.
  • Max Retries — Retry attempts used in Custom performance mode; defaults to 2.
  • Compact Format — Adds semicolon-separated embedding values as text fields; for batches, vectors are separated by newlines.
  • Context Prefix — Prepends this string and a space to each text before sending it for embedding.
  • Dimensions — Sets the output vector length: vectors are truncated or zero-padded to this length. 0 uses the length returned by the model; requests above the model-family limit are capped.
  • Include Metadata — In Full Response format, adds the prefix, instruction, timestamp, and batch size to metadata.
  • Instruction Type — Prepends a query or document instruction to each text, or leaves text unmodified when set to None.
  • Return Format — Full Response includes embeddings and texts, Embedding Only returns embeddings, and Simplified returns vectors with a count and dimensions.

Output shape

One output item per incoming item, containing results for all valid texts in that input item's batch.

Full Response returns embeddings, texts, count, dimensions, and model, plus an items array pairing each text with its embedding; optional compact fields and metadata are also included. Embedding Only returns embeddings, while Simplified returns vectors, count, and dimensions. The node calls the API once per text and preserves input-item pairing. Empty batches and API failures raise errors unless Continue On Fail is enabled, in which case an error item is returned.

Examples

Example 1:

Links

Discussion