Answer document questions with Ollama and Qdrant retrieval chat bot

Go to Workflow
0 views
Built by Akash Narayan Akash Narayan
Created on August 03, 2026

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
Receives a user question from the n8n chat trigger.
Retrieves the most relevant document chunks from a Qdrant vector collection using an Ollama-powered embedding model.
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.
Uses the Ollama chat model (qwen2.5:7b) to generate a concise answer grounded in the retrieved context.

Setup
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.
Start Ollama locally and pull the required models (qwen2.5:7b and nomic-embed-text:latest).
Create n8n credentials for your local Ollama service and your Qdrant instance.
Set the Qdrant collection name to match the one used during indexing (for example, "handbook").
If recall is too narrow for multi-fact questions, increase the retriever Top K setting to fetch more chunks.

Requirements
Ollama installed and running locally with qwen2.5:7b and nomic-embed-text:latest pulled
A Qdrant instance, self-hosted or cloud, with a collection already populated by the companion Index workflow
n8n credentials set up for your local Ollama service and your Qdrant instance

Customization
Swap qwen2.5:7b for a different Ollama chat model if you want to trade speed for stronger reasoning
Raise the Vector Store Retriever's Top K setting to pull in more chunks for multi-fact questions
Edit the QA chain prompt to change tone, add source citations, or make refusals stricter on out of scope questions

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.

Categories

AI Langchain

Nodes Used (5)

Embeddings Ollama
@n8n/n8n-nodes-langchain.embeddingsOllama
Ollama Chat Model
@n8n/n8n-nodes-langchain.lmChatOllama
Qdrant Vector Store
@n8n/n8n-nodes-langchain.vectorStoreQdrant
Question and Answer Chain
@n8n/n8n-nodes-langchain.chainRetrievalQa
Vector Store Retriever
@n8n/n8n-nodes-langchain.retrieverVectorStore