🔍 Index legal documents for hybrid search with Qdrant, OpenAI & BM25

2,511 views · 🔍 AI RAG & Knowledge Retrieval

Description

This pipeline is the first part of “Hybrid Search with Qdrant & n8n, Legal AI”.
The second part, “Hybrid Search with Qdrant & n8n, Legal AI: Retrieval”, covers retrieval and simple evaluation.

Overview

This pipeline transforms a Q&A legal corpus from Hugging Face (isaacus) into vector representations and indexes them to Qdrant, providing the foundation for running Hybrid Search, combining:

After running this pipeline, you will have a Qdrant collection with your legal dataset ready for hybrid retrieval on BM25 and dense embeddings: either mxbai-embed-large-v1 or text-embedding-3-small.

Options for Embedding Inference

This pipeline equips you with two approaches for generating dense vectors:

  1. Using Qdrant Cloud Inference, conversion to vectors handled directly in Qdrant;
  2. Using external provider, e.g. OpenAI for generating embeddings.

Prerequisites

P.S.

🔗 Nodes Used

HTTP Request, Summarize

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup