Skip to content

Ollama Embeddings

The Ollama Embeddings node converts text into numerical vectors (embeddings) that capture meaning and context. Think of it as creating a “fingerprint” for text that allows AI to understand similarity and relationships between different pieces of content.

This is the foundation for building smart document search systems and AI knowledge bases that work completely locally on your machine.

Illustration of text being converted into searchable vector embeddings

The node takes your text content and uses a local Ollama model to convert it into a list of numbers (vectors) that represent the meaning of the text. These vectors can then be used to find similar content or build searchable databases.

graph LR
  Text[Your Text] --> Ollama[Ollama Model]
  Ollama --> Vectors[Number Vectors]
  Vectors --> Search[Searchable Database]
  style Ollama fill:#6d28d9,stroke:#fff,color:#fff
  1. Install Ollama: Download and install Ollama on your computer from ollama.com.

  2. Download Embedding Model: Run ollama pull nomic-embed-text to get a good embedding model.

  3. Start Ollama Server: Run ollama serve to start the local server.

  4. Configure Node: Set the Ollama URL and model name in your workflow.

Practical example: Building searchable knowledge base

Section titled “Practical example: Building searchable knowledge base”

Let’s convert website content into searchable vectors for a knowledge base.

Option 1: Basic Setup

  • Server: http://localhost:11434
  • Model: nomic-embed-text
  • Content: The single text block you want to process.

Option 2: Batch Processing

  • Goal: Process multiple texts at once for speed.
  • Input: List of text strings.
  • Batch Size: 5 items at a time.

Option 3: Custom Configuration

  • Normalize: Enable to improve vector math consistency.
  • Timeout: 30 seconds (give it more time for longer texts).
Local Embeddings (Ollama)Cloud Embeddings
Complete privacy - data never leaves your machineData sent to external servers
No ongoing costsPay per API call
Works offlineRequires internet connection
No rate limitsAPI rate limits apply
Full control over modelsLimited model choices
ModelBest ForSizeSpeed
nomic-embed-textGeneral purpose, good quality~270MBFast
all-minilmLightweight, fast processing~90MBVery Fast
bge-largeHigh quality, detailed embeddings~1.3GBSlower

Create embeddings to find similar documents:

Input: "How to optimize website performance"
Output: [0.123, -0.456, 0.789, ...] (768 numbers)
Use: Find documents with similar vector patterns

Convert company docs into searchable format:

Process: Company policies → Ollama Embeddings → Local Knowledge
Result: Smart search through all company documentation

Find related articles or content:

Process: User reads article → Get embedding → Find similar embeddings
Result: "You might also like these articles"
  • “Connection failed” errors: Make sure Ollama is running (ollama serve) and the URL is correct.
  • “Model not found” errors: Download the model first with ollama pull nomic-embed-text.
  • Slow processing: Try a smaller/faster model like all-minilm or reduce batch size.
  • Out of memory errors: Use smaller batch sizes or try a lighter embedding model.