πŸ“– Answer document questions with Ollama and Qdrant retrieval chat bot

⚑ 88 views Β· πŸ“– Internal Wiki & Knowledge Base

Description

Quick overview

This workflow provides a local RAG chatbot in n8n that answers chat questions using context retrieved from a Qdrant collection, generating responses with a local Ollama chat model and Ollama embeddings.

How it works

  1. Receives a user question from the n8n chat trigger.
  2. Retrieves the most relevant document chunks from a Qdrant vector collection using an Ollama-powered embedding model.
  3. Injects the retrieved context into a retrieval QA prompt that instructs the assistant to answer only from the provided passages and to decline when information is missing.
  4. Uses the Ollama chat model (qwen2.5:7b) to generate a concise answer grounded in the retrieved context.

Setup

  1. Run the companion indexing workflow first (Index local documents for RAG using Ollama embeddings and Qdrant, https://creators.n8n.io/workflows/17764) to embed your document content into Qdrant.
  2. Start Ollama locally and pull the required models (qwen2.5:7b and nomic-embed-text:latest).
  3. Create n8n credentials for your local Ollama service and your Qdrant instance.
  4. Set the Qdrant collection name to match the one used during indexing (for example, β€œhandbook”).
  5. If recall is too narrow for multi-fact questions, increase the retriever Top K setting to fetch more chunks.

Requirements

Customization

Additional info

Companion workflow, run this one first: Index local documents for RAG using Ollama embeddings and Qdrant, https://creators.n8n.io/workflows/17764

Runs 100 percent locally with no OpenAI API keys, so documents never leave your machine. Good fit for clients who care about data residency or privacy.

πŸ”— Nodes Used

Question and Answer Chain, Ollama Chat Model, Vector Store Retriever, Chat Trigger, Qdrant Vector Store, Embeddings Ollama

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup