Skip to main content

Build hybrid RAG search over PDFs with Qdrant and Ollama

Workflow preview

Workflow preview
100%
Build hybrid RAG search over PDFs with Qdrant and Ollama preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow ingests a local PDF into Qdrant with Ollama embeddings, then supports hybrid retrieval by querying Qdrant with both dense vectors and BM25 sparse vectors from an n8n ch...

Best for

  • Document Extraction automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.extractfromfile, n8n-nodes-base.readwritefile, n8n-nodes-qdrant.qdrant, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.embeddingsollama, @n8n/n8n-nodes-langchain.vectorstoreqdrant, @n8n/n8n-nodes-langchain.documentdefaultdataloader

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Christo.

Original n8n.io source

1.1 Workflow description

Title
Build hybrid RAG search over PDFs with Qdrant and Ollama
Workflow name
Build hybrid RAG search over PDFs with Qdrant and Ollama

Quick overview

This workflow ingests a local PDF into Qdrant with Ollama embeddings, then supports hybrid retrieval by querying Qdrant with both dense vectors and BM25 sparse vectors from an n8n chat trigger.

How it works

  1. Starts manually to read a PDF from disk and extract its text content.
  2. Checks whether the Qdrant collection exists and creates it with a 768-dimension dense vector and a BM25-based sparse vector field if needed.
  3. Splits the extracted text into chunks, adds metadata, generates dense embeddings with Ollama (nomic-embed-text), and inserts the documents into the Qdrant vector store.
  4. Scrolls all stored points from Qdrant, builds a per-point BM25 sparse vector payload from each point’s content, and updates Qdrant vectors without overwriting existing fields.
  5. Triggers on an incoming chat message, generates an embedding for the query via Ollama’s embeddings HTTP API, and runs a Qdrant hybrid search that fuses dense and BM25 results using RRF.

Setup

  1. Configure Qdrant credentials (REST API and Vector Store) and ensure the workflow points to the correct Qdrant URL/collection name (default: collection "testing").
  2. Set up Ollama credentials and ensure the nomic-embed-text:latest model is available, and update the embeddings endpoint URL if your Ollama host is not http://host.docker.internal:11434.
  3. Place the source PDF on the n8n host and update the file path in the disk read step (default: /tmp/n8n_Self_Hosted_Enterprise_Terms_and_Conditions.pdf).
  4. Enable the chat trigger and use its webhook/chat entry point to send queries into the workflow.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Extract from File

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1.1

Block 3 - Read/Write Files from Disk

Type / Role
n8n-nodes-base.readWriteFile - readWriteFile
Config choices
Version 1.1

Block 4 - Check If Collection Exists

Type / Role
n8n-nodes-qdrant.qdrant - qdrant
Config choices
Version 1

Block 5 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 6 - Create Collection

Type / Role
n8n-nodes-qdrant.qdrant - qdrant
Config choices
Version 1

Block 7 - Embeddings Ollama

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOllama - embeddingsOllama
Config choices
Version 1

Block 8 - Qdrant Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreQdrant - vectorStoreQdrant
Config choices
Version 1.3

Block 9 - Default Data Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1.1

Block 10 - Recursive Character Text Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 11 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 12 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.4

Block 13 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 14 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 15 - Update Vectors

Type / Role
n8n-nodes-qdrant.qdrant - qdrant
Config choices
Version 1

Block 16 - Get All Points

Type / Role
n8n-nodes-qdrant.qdrant - qdrant
Config choices
Version 1

Block 17 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 18 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Generate the embeddings of the query

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 21 - Query Points (using the embeddings)

Type / Role
n8n-nodes-qdrant.qdrant - qdrant
Config choices
Version 1

Block 22 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Extract sparse from Qdrant

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

3. Summary Table

Workflow Build hybrid RAG search over PDFs with Qdrant and Ollama
Complexity advanced
Nodes 23
Categories Document Extraction, AI RAG
Author Christo
Published 31 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16040/16040.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build hybrid RAG search over PDFs with Qdrant and Ollama do?

Quick overview This workflow ingests a local PDF into Qdrant with Ollama embeddings, then supports hybrid retrieval by querying Qdrant with both dense vectors and BM25 sparse vectors from an n8n ch...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI RAG use case.