Ollama Embeddings Tool icon

Ollama Embeddings Tool

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

Generate Embedding

AI-generated

Summary

Generate an embedding vector for the required text by sending it to the configured Ollama-compatible API. Optional settings add a context prefix or query/document instruction, adjust vector length, control retries, and choose the output format.

Inputs

  • Model (required) — Select an embedding model available from the configured API.
  • Text (required) — The single text to embed. The node trims whitespace and rejects empty input.
  • Options — Optional settings: GPU mode uses a 30-second timeout and 2 retries; CPU mode uses 120 seconds and 3 retries; Custom lets you set timeout and retries. A context prefix and query/document instruction are prepended to the text before embedding. Dimensions can truncate or zero-pad the returned vector; 0 keeps the API vector length. Choose whether to include metadata and select Full Response, Embedding Only, or Simplified output. Compact Format adds the vector as semicolon-separated text.

Output shape

One n8n item per input item, with a JSON object containing the embedding result.

Full Response returns embedding, dimensions, processed text, and model; optional metadata contains the prefix, instruction, and timestamp. Embedding Only returns embedding, and Simplified returns text, vector, and dimensions. Compact Format adds embeddingCompact or vectorCompact. With Continue On Fail enabled, failed inputs produce an item containing error and itemIndex.

Links

Discussion