Automation library · AI assistants

Create adaptive RAG chat agent 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.

LargeCalls a model: GeminiRetrieval

30 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 3Model 19Logic 7Service 1

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

  1. 1ChatChat triggerStarts it
  2. 2Gemini ClassificationLm Chat Google GeminiModel
  3. 3Gemini FactualLm Chat Google GeminiModel
  4. 4Gemini AnalyticalLm Chat Google GeminiModel
  5. 5Chat Buffer Memory AnalyticalMemory Buffer WindowModel
  6. 6Chat Buffer Memory FactualMemory Buffer WindowModel
  7. 7Gemini OpinionLm Chat Google GeminiModel
  8. 8Chat Buffer Memory OpinionMemory Buffer WindowModel
  9. 9Gemini ContextualLm Chat Google GeminiModel
  10. 10Chat Buffer Memory ContextualMemory Buffer WindowModel
  11. 11EmbeddingsEmbeddings Google GeminiModel
  12. 12Gemini AnswerLm Chat Google GeminiModel
  13. 13Chat Buffer MemoryMemory Buffer WindowModel
  14. 14When Executed by Another WorkflowExecute Workflow triggerStarts it
  15. 15Combined FieldsSetLogic
  16. 16Query ClassificationAgentModel
  17. 17Factual Strategy - Focus on PrecisionAgentModel
  18. 18Analytical Strategy - Comprehensive CoverageAgentModel
  19. 19Opinion Strategy - Diverse PerspectivesAgentModel
  20. 20Contextual Strategy - User Context IntegrationAgentModel
  21. 21Retrieve Documents from Vector StoreVector Store QdrantModel
  22. 22AnswerAgentModel
  23. 23SwitchSwitchLogic
  24. 24Factual Prompt and OutputSetLogic
  25. 25Analytical Prompt and OutputSetLogic
  26. 26Opinion Prompt and OutputSetLogic
  27. 27Contextual Prompt and OutputSetLogic
  28. 28Concatenate ContextSummarizeService
  29. 29Respond to WebhookRespond To WebhookStarts it
  30. 30Set Prompt and OutputSetLogic

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.