# Adaptive RAG strategy with Gemini and Qdrant: n8n workflow

> Started by someone opening a chat with it, and works across Qdrant. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply...

Source: https://millionrounds.com/workflow/adaptive-rag-strategy-with-gemini-and-qdrant (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [AI assistants](https://millionrounds.com/workflows?category=AI+assistants#library)

# Adaptive RAG strategy with Gemini and Qdrant

Started by someone opening a chat with it, and works across Qdrant. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 30 steps, 1 branch: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fadaptive-rag-strategy-with-gemini-and-qdrant)

**30 steps** Large: read it before trusting it with anything live

**1** Branch: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 3 Model 19 Logic 7 Service 1

The steps in the order they run, from what starts it.

- 1 **Chat** Chat trigger *Starts it*
- 2 **Gemini Classification** Lm Chat Google Gemini *Model*
- 3 **Gemini Factual** Lm Chat Google Gemini *Model*
- 4 **Gemini Analytical** Lm Chat Google Gemini *Model*
- 5 **Chat Buffer Memory Analytical** Memory Buffer Window *Model*
- 6 **Chat Buffer Memory Factual** Memory Buffer Window *Model*
- 7 **Gemini Opinion** Lm Chat Google Gemini *Model*
- 8 **Chat Buffer Memory Opinion** Memory Buffer Window *Model*
- 9 **Gemini Contextual** Lm Chat Google Gemini *Model*
- 10 **Chat Buffer Memory Contextual** Memory Buffer Window *Model*
- 11 **Embeddings** Embeddings Google Gemini *Model*
- 12 **Gemini Answer** Lm Chat Google Gemini *Model*
- 13 **Chat Buffer Memory** Memory Buffer Window *Model*
- 14 **When Executed by Another Workflow** Execute Workflow trigger *Starts it*
- 15 **Combined Fields** Set *Logic*
- 16 **Query Classification** Agent *Model*
- 17 **Factual Strategy - Focus on Precision** Agent *Model*
- 18 **Analytical Strategy - Comprehensive Coverage** Agent *Model*
- 19 **Opinion Strategy - Diverse Perspectives** Agent *Model*
- 20 **Contextual Strategy - User Context Integration** Agent *Model*
- 21 **Retrieve Documents from Vector Store** Vector Store Qdrant *Model*
- 22 **Answer** Agent *Model*
- 23 **Switch** Switch *Logic*
- 24 **Factual Prompt and Output** Set *Logic*
- 25 **Analytical Prompt and Output** Set *Logic*
- 26 **Opinion Prompt and Output** Set *Logic*
- 27 **Contextual Prompt and Output** Set *Logic*
- 28 **Concatenate Context** Summarize *Service*
- 29 **Respond to Webhook** Respond To Webhook *Starts it*
- 30 **Set Prompt and Output** Set *Logic*

## How it's built

- **Starts on:** Someone opening a chat with it
- **Steps:** 30, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Qdrant
- **Model:** Gemini
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Qdrant account, and a key for Gemini. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone opening a chat with it.

Does it use AI?

Yes. It calls Gemini. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 30 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 30 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fadaptive-rag-strategy-with-gemini-and-qdrant)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Qdrant](https://millionrounds.com/workflows?service=Qdrant#library)

## Workflows like it

Also ai assistants, with the same services where possible, closest in size first.

- [**Adaptive RAG with Gemini and Qdrant:** 30 steps · calls a model · Qdrant](https://millionrounds.com/workflow/adaptive-rag-with-gemini-and-qdrant)
- [**Create adaptive RAG chat agent with Gemini and Qdrant** 30 steps · calls a model · Qdrant](https://millionrounds.com/workflow/create-adaptive-rag-chat-agent-with-gemini-and-qdrant)
- [**Bitrix24 AI-Powered RAG Chatbot for Open Line Channels** 33 steps · calls a model · Qdrant](https://millionrounds.com/workflow/bitrix24-ai-powered-rag-chatbot-for-open-line-channels)
- [**Vision RAG and image embeddings with Cohere Command-A** 27 steps · calls a model · Qdrant](https://millionrounds.com/workflow/vision-rag-and-image-embeddings-with-cohere-command-a)
- [**Voice AI chatbot with OpenAI and RAG** 27 steps · calls a model · Google Drive, Qdrant](https://millionrounds.com/workflow/voice-ai-chatbot-with-openai-and-rag)
- [**Build a self-updating RAG system with OpenAI and Qdrant** 25 steps · calls a model · Google Drive, Qdrant](https://millionrounds.com/workflow/build-a-self-updating-rag-system-with-openai-and-qdrant)
