Adaptive RAG

Adaptive RAG

Complex
High
39
Nodes
Complex
Trigger
High
Complexity
7/22/2025
Added

Workflow Overview

Total Nodes
39
Node Types
12

Node Types

agent
Query Classification, Factual Strategy - Focus on Precision, Analytical Strategy - Comprehensive Coverage, Opinion Strategy - Diverse Perspectives, Contextual Strategy - User Context Integration, Answer
6 nodes
switch
Switch
1 node
chat Trigger
Chat
1 node
set
Factual Prompt and Output, Contextual Prompt and Output, Opinion Prompt and Output, Analytical Prompt and Output, Set Prompt and Output, Combined Fields
6 nodes
lm Chat Google Gemini
Gemini Classification, Gemini Factual, Gemini Analytical, Gemini Opinion, Gemini Contextual, Gemini Answer
6 nodes
memory Buffer Window
Chat Buffer Memory Analytical, Chat Buffer Memory Factual, Chat Buffer Memory Opinion, Chat Buffer Memory Contextual, Chat Buffer Memory
5 nodes
embeddings Google Gemini
Embeddings
1 node
sticky Note
Sticky Note, Sticky Note1, Sticky Note2, Sticky Note3, Sticky Note4, Sticky Note5, Sticky Note6, Sticky Note7, Sticky Note8
9 nodes
summarize
Concatenate Context
1 node
vector Store Qdrant
Retrieve Documents from Vector Store
1 node
respond To Webhook
Respond to Webhook
1 node
execute Workflow Trigger
When Executed by Another Workflow
1 node

Workflow JSON

36.44 KB
{
  "id": "cpuFyJYHKmjHTncz",
  "meta": {
    "instanceId": "2cb7a61f866faf57392b91b31f47e08a2b3640258f0abd08dd71f087f3243a5a",
    "templateCredsSetupCompleted": true
  },
  "name": "Adaptive RAG",
  "tags": [],
  "nodes": [
    {
      "id": "856bd809-8f41-41af-8f72-a3828229c2a5",
      "name": "Query Classification",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "notes": "Classify a query into one of four categories: Factual, Analytical, Opinion, or Contextual.\n        \nReturns:\nstr: Query category",
      "position": [
        380,
        -20
      ],
      "parameters": {
        "text": "=Classify this query: {{ $('Combined Fields').item.json.user_query }}",
        "options": {
          "systemMessage": "You are an expert at classifying questions. \n\nClassify the given query into exactly one of these categories:\n- Factual: Queries seeking specific, verifiable information.\n- Analytical: Queries requiring comprehensive analysis or explanation.\n- Opinion: Queries a...

Showing first 1000 characters. Click "Expand" to view the full JSON.