Templates / Adaptive RAG with Google Gemini & Qdrant: context-aware query answering

Adaptive RAG with Google Gemini & Qdrant: context-aware query answering

Needs changes

by Nisa · 4,677 views · created 2025-05-14 · Internal Wiki, AI RAG

Needs 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 this workflow does

This AI workflow has 30 nodes and runs when another workflow calls it (plus 1 other trigger). Along the way it connects Google Gemini Chat Model, Embeddings Google Gemini and Qdrant Vector Store.

How it runs

Trigger: When another workflow calls it (plus 1 other trigger).

  1. Combined Fields (Edit Fields (Set)): sets 3 fields: user_query, chat_memory_key, vector_store_id
  2. Query Classification (AI Agent): runs an AI agent, with model: Gemini Classification
  3. Switch: routes items into 4 branches
  4. Factual Strategy - Focus on Precision (AI Agent): runs an AI agent, with model: Gemini Factual; memory: Chat Buffer Memory Factual
  5. Analytical Strategy - Comprehensive Coverage (AI Agent): runs an AI agent, with model: Gemini Analytical; memory: Chat Buffer Memory Analytical
  6. Opinion Strategy - Diverse Perspectives (AI Agent): runs an AI agent, with model: Gemini Opinion; memory: Chat Buffer Memory Opinion
  7. Contextual Strategy - User Context Integration (AI Agent): runs an AI agent, with model: Gemini Contextual; memory: Chat Buffer Memory Contextual
  8. Factual Prompt and Output (Edit Fields (Set)): sets 2 fields: output, prompt
  9. Analytical Prompt and Output (Edit Fields (Set)): sets 2 fields: output, prompt
  10. Opinion Prompt and Output (Edit Fields (Set)): sets 2 fields: output, prompt

…plus 6 more steps. See the full node list below.

Services it uses

Google Gemini Chat ModelEmbeddings Google GeminiQdrant Vector Store

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in Query Classification (v1.8), Factual Strategy - Focus on Precision (v1.7), Analytical Strategy - Comprehensive Coverage (v1.7)…: replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Removed in 3.0Replace 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)

From the author

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…

Excerpt from Nisa's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.