Skip to main content

Create adaptive RAG chat agent with Google Gemini and Qdrant

Workflow preview

Workflow preview
100%
Create adaptive RAG chat agent with Google Gemini and Qdrant preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Unlock adaptive, context aware AI chat in your automations—no coding required! This template is a plug and play n8n workflow that transforms how your chatbots, support agents, and knowledge systems...

Best for

  • Support Chatbot automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.agent, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.chattrigger, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.embeddingsgooglegemini, n8n-nodes-base.stickynote

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Create adaptive RAG chat agent with Google Gemini and Qdrant
Workflow name
Create adaptive RAG chat agent with Google Gemini and Qdrant

Unlock adaptive, context-aware AI chat in your automations—no coding required!

This template is a plug-and-play n8n workflow that transforms how your chatbots, support agents, and knowledge systems respond to users. Powered by Google Gemini and a Qdrant vector database, it automatically classifies every incoming query and applies a tailor-made strategy for Factual, Analytical, Opinion, or Contextual requests—delivering the right answer, every time.

🛠️ Key Features Automatic Query Classification: Seamlessly detects whether the user wants facts, a deep analysis, opinions, or context—then routes each input to the best answering strategy.

Four Dynamic Retrieval Modes:

  1. Factual: Delivers precise, accurate information
  2. Analytical: Breaks down complex topics for deep dives
  3. Opinion: Surfaces diverse viewpoints and perspectives
  4. Contextual: Connects the dots using implied or user-specific context

End-to-End RAG Pipeline: Uses Gemini to classify and answer, while Qdrant powers fast, smart knowledge retrieval.

No-Code Visual Editing: Import into n8n, connect your LLM and vector database credentials, and you’re live—customize, extend, and scale with zero backend code.

Reusable in Any Project: Perfect for customer support, research, onboarding bots, internal knowledgebases, or any adaptive AI chat interface.

🚀 How it Works

  1. User submits a query (via chat or API)
  2. Query is auto-classified as Factual, Analytical, Opinion, or Contextual
  3. Adaptive retrieval strategy is triggered (each with its own prompt logic and memory buffer)
  4. Smart knowledge search is performed using Gemini and Qdrant
  5. Response is generated and sent back to the user—tailored to the query type!

🧩 What’s Included

  • Full n8n workflow (.json)
  • Step-by-step setup instructions
  • Sample prompts and system messages for each strategy
  • Lifetime updates (as the workflow evolves)

💡 Use Cases

  • Chatbots that adapt to every user’s intent
  • Internal/external FAQ and helpdesk automations
  • AI research and summarization agents
  • Product support and onboarding flows

Any scenario where smarter, more relevant answers = better user experience

Ready to build smarter automations? Import this template, connect your Gemini & Qdrant accounts, and let your AI agent adapt to every conversation.

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 - Query Classification

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 2 - Switch

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

Block 3 - Factual Strategy - Focus on Precision

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 4 - Analytical Strategy - Comprehensive Coverage

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 5 - Opinion Strategy - Diverse Perspectives

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 6 - Contextual Strategy - User Context Integration

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 7 - Chat

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

Block 8 - Factual Prompt and Output

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

Block 9 - Contextual Prompt and Output

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

Block 10 - Opinion Prompt and Output

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

Block 11 - Analytical Prompt and Output

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

Block 12 - Gemini Classification

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

Block 13 - Gemini Factual

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

Block 14 - Gemini Analytical

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

Block 15 - Chat Buffer Memory Analytical

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

Block 16 - Chat Buffer Memory Factual

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

Block 17 - Gemini Opinion

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

Block 18 - Chat Buffer Memory Opinion

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

Block 19 - Gemini Contextual

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

Block 20 - Chat Buffer Memory Contextual

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

Block 21 - Embeddings

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

Block 22 - Sticky Note

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

Block 23 - Sticky Note1

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

Block 24 - Sticky Note2

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

Showing the first 24 of 40 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Create adaptive RAG chat agent with Google Gemini and Qdrant
Complexity advanced
Nodes 40
Categories Support Chatbot, AI RAG
Author Brandon Crenshaw
Published 22 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5111/5111.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 Create adaptive RAG chat agent with Google Gemini and Qdrant do?

Unlock adaptive, context aware AI chat in your automations—no coding required! This template is a plug and play n8n workflow that transforms how your chatbots, support agents, and knowledge systems...

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 Support Chatbot, AI RAG use case.