workflows.fit
Back to n8n workflows
n8n templateFreeBy Davide Boizza

Build a RAG system with automatic citations using Qdrant, Gemini & OpenAI

This workflow implements a Retrieval-Augmented Generation (RAG) system that: Stores vectorized documents in Qdrant, Retrieves relevant content based on user input, Generates AI answers using Google Gemini, Automatical...

DevelopmentCore NodesData & StorageAILangchainManual TriggerEmbeddings Open AiDocument Default Data Loader
Loading interactive preview...

Template notes

This workflow implements a Retrieval-Augmented Generation (RAG) system that:

Stores vectorized documents in Qdrant, Retrieves relevant content based on user input, Generates AI answers using Google Gemini, Automatically cites the document sources (from Google Drive).

---

Workflow Steps

1. Create Qdrant Collection A REST API node creates a new collection in Qdrant with specified vector size (1536) and cosine similarity.

2. Load Files from Google Drive The workflow lists all files in a Google Drive folder, downloads them as plain text, and loops through each.

3. Text Preprocessing & Embedding

Documents are split into chunks (500 characters, with 50-character overlap). Embeddings are created using OpenAI embeddings (text-embedding-3-small assumed). Metadata (file name and ID) is attached to each chunk.