Adaptive RAG with Google Gemini & Qdrant: context-aware query answering
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Query Classification (v1.8), Factual Strategy - Focus on Precision (v1.7), Analytical Strategy - Comprehensive Coverage (v1.7), Opinion Strategy - Diverse Perspectives (v1.7), Contextual Strategy - User Context Integration (v1.7), Answer (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (11)
- AI Agent
@n8n/n8n-nodes-langchain.agent - Switch
n8n-nodes-base.switch - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Embeddings Google Gemini
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - Summarize
n8n-nodes-base.summarize - Qdrant Vector Store
@n8n/n8n-nodes-langchain.vectorStoreQdrant - Respond to Webhook
n8n-nodes-base.respondToWebhook - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger
What it does
Description This workflow automatically classifies user queries and retrieves the most relevant information based on the query type. 🌟 It uses adaptive strategies like; Factual, Analytical, Opinion, and Contextual to deliver more precise and meaningful responses by leveraging n8n's flexibility. Integrated with Qdrant vector store and Google Gemini, it processes each query faster and more effectively. 🚀 How It Works? Query Reception: A user query is triggered (e.g., through a chatbot interface). 💬 Classification: The query is classified into one of four categories: Factual: Queries seeking verifiable information. Analytical: Queries that require in-depth analysis or explanation. Opinion: Queries looking for different perspectives or subjective viewpoints. Contextual: Queries specific to the user or certain contextual conditions. Adaptive Strategy Application: Based on classification, the query is restructured using the relevant strategy for better results. Response Generation: The most relevant documents and context are used to generate a tailored response. 🎯 Set Up Steps Estimated Time: ⏳ 10-15 minutes Prerequisites: You need an n8n account and a Qdrant vector store connection. Steps: Import the n8n workflow: Load the workflow into your n8n instance. Connect Google Gemini and Qdrant: Link these tools for query processing and data retrieval. Connect the Trigger Interface: Integrate with a chatbot or API to trigger the workflow. Customize: Adjust settings based on the query types you want to handle and the output format. 🔧 For more detailed instructions, please check the sticky notes inside the workflow. 📌