{
  "id": "2Eba0OHGtOmoTWOU",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "RAG AI Agent with Milvus and Cohere",
  "tags": [
    {
      "id": "yj7cF3GCsZiargFT",
      "name": "rag",
      "createdAt": "2025-05-03T17:14:30.099Z",
      "updatedAt": "2025-05-03T17:14:30.099Z"
    }
  ],
  "nodes": [
    {
      "id": "361065cc-edbf-47da-8da7-c59b564db6f3",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        0,
        320
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "a01b9512-ced1-4e28-a2aa-88077ab79d9a",
      "name": "Embeddings Cohere",
      "type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
      "position": [
        -140,
        320
      ],
      "parameters": {
        "modelName": "embed-multilingual-v3.0"
      },
      "credentials": {
        "cohereApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1da6ea4b-de88-44d3-a215-78c55b5592a2",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -800,
        520
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "23004477-3f6d-4909-a626-0eba0557a5bd",
      "name": "Watch New Files",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -800,
        100
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "15gjDQZiHZuBeVscnK8Ic_kIWt3mOaVfs",
          "cachedResultUrl": "https://drive.google.com/drive/folders/15gjDQZiHZuBeVscnK8Ic_kIWt3mOaVfs",
          "cachedResultName": "RAG template"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "001fbdbe-dfcb-4552-bf09-de416b253389",
      "name": "Download New",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -580,
        100
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "c1116cba-beb9-4d28-843d-c5c21c0643de",
      "name": "Insert into Milvus",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreMilvus",
      "position": [
        -124,
        100
      ],
      "parameters": {
        "mode": "insert",
        "options": {
          "clearCollection": false
        },
        "milvusCollection": {
          "__rl": true,
          "mode": "list",
          "value": "collectionName",
          "cachedResultName": "collectionName"
        }
      },
      "credentials": {
        "milvusApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "2dbc7139-46f6-41d8-8c13-9fafad5aec55",
      "name": "RAG Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -540,
        520
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.8
    },
    {
      "id": "a103506e-9019-41f2-9b0d-9b831434c9e9",
      "name": "Retrieve from Milvus",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreMilvus",
      "position": [
        -340,
        740
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "topK": 10,
        "toolName": "vector_store",
        "toolDescription": "You are an AI agent that responds based on information received from a vector database.",
        "milvusCollection": {
          "__rl": true,
          "mode": "list",
          "value": "collectionName",
          "cachedResultName": "collectionName"
        }
      },
      "credentials": {
        "milvusApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "74ccdff1-b976-4e1c-a2c4-237ffff19e34",
      "name": "OpenAI 4o",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -580,
        740
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "36e35eaf-f723-4eeb-9658-143d5bc390a0",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -460,
        740
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "ec7b6b92-065c-455c-a3f0-17586d9e48d7",
      "name": "Cohere embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
      "position": [
        -220,
        900
      ],
      "parameters": {
        "modelName": "embed-multilingual-v3.0"
      },
      "credentials": {
        "cohereApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3c3a8900-0b98-4479-8602-16b21e011ba1",
      "name": "Set Chunks",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        80,
        480
      ],
      "parameters": {
        "options": {},
        "chunkSize": 700,
        "chunkOverlap": 60
      },
      "typeVersion": 1
    },
    {
      "id": "3a43bf1a-7e22-4b5e-bbb1-6bb2c1798c07",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -360,
        100
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "e0c9d4d7-5e3e-4e47-bb1f-dbdca360b20a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        120
      ],
      "parameters": {
        "color": 2,
        "width": 540,
        "height": 600,
        "content": "## \uc65c Milvus\uc778\uac00\n\ube44\uad50\uc640 \uc0ac\uc6a9\uc790 \ud53c\ub4dc\ubc31\uc5d0 \uae30\ubc18\ud558\uc5ec, **Milvus\ub294 Supabase\uc5d0 \ube44\ud574 \ub354 \uc6b0\uc218\ud55c \uc131\ub2a5\uacfc \ud655\uc7a5\uc131\uc744 \uac00\uc9c4 \ubca1\ud130 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc194\ub8e8\uc158\uc73c\ub85c \uac04\uc8fc\ub418\ub294 \uacbd\uc6b0\uac00 \ub9ce\uc2b5\ub2c8\ub2e4**, \ud2b9\ud788 \ub300\uaddc\ubaa8 \ub370\uc774\ud130\uc14b, \uace0\ubd80\ud558 \ubca1\ud130 \uac80\uc0c9 \uc791\uc5c5, \ub2e4\uad6d\uc5b4 \uc9c0\uc6d0\uc774 \uc694\uad6c\ub418\ub294 demanding\ud55c \uc6a9\ub3c4\uc5d0 \uc801\ud569\ud569\ub2c8\ub2e4.\n\n### \uc694\uad6c\uc0ac\ud56d\n- [Zilliz](https://zilliz.com/)\uc5d0\uc11c \uacc4\uc815\uc744 \uc0dd\uc131\ud558\uc5ec Milvus \ud074\ub7ec\uc2a4\ud130\ub97c \uc0dd\uc131\ud558\uc138\uc694. \n- Docker \ucee8\ud14c\uc774\ub108\ub97c \uc0dd\uc131\ud558\uac70\ub098 \uc790\uccb4 \uc778\uc2a4\ud134\uc2a4\ub97c \ub9cc\ub4e4 \ud544\uc694\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. Zilliz\uac00 \ud074\ub77c\uc6b0\ub4dc \uc778\ud504\ub77c\ub97c \uc81c\uacf5\ud558\uc5ec \uc27d\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n- Drive, Milvus (Zilliz), \ubc0f [Cohere](https://cohere.com)\uc5d0\uc11c \uc790\uaca9 \uc99d\uba85\uc744 \uc900\ube44\ud558\uc138\uc694.\n\n### \uc0ac\uc6a9\ubc95\n\uc0c8\ub85c\uc6b4 PDF\uac00 Drive \ud3f4\ub354\uc5d0 \ucd94\uac00\ub420 \ub54c\ub9c8\ub2e4, \ud574\ub2f9 PDF\ub294 Milvus Vector Store\uc5d0 \uc0bd\uc785\ub418\uc5b4 RAG \uc5d0\uc774\uc804\ud2b8\uc640\uc758 \uc0c1\ud638\uc791\uc6a9\uc744 \uba87 \ucd08 \ub9cc\uc5d0 \uac00\ub2a5\ud558\uac8c \ud569\ub2c8\ub2e4.\n\n## \ud68c\uc0ac RAG \ube44\uc6a9 \uacc4\uc0b0\ud558\uae30\n\n\uc790\uccb4 \uc11c\ubc84\uc5d0\uc11c n8n\uc73c\ub85c Milvus\ub97c \uc2e4\ud589\ud558\uace0 \uc2f6\uc73c\uc2e0\uac00\uc694? Zilliz\uac00 \ud6cc\ub96d\ud55c [\ube44\uc6a9 \uacc4\uc0b0\uae30](https://zilliz.com/rag-cost-calculator/)\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.\n\n### \ubb38\uc758\ud558\uae30\n\ud68c\uc0ac\uc5d0 RAG AI \uc5d0\uc774\uc804\ud2b8\ub97c \uad6c\ud604\ud558\uace0 \uc2f6\uc73c\uc2e0\uac00\uc694? [\uba54\uc2dc\uc9c0\ub97c \ubcf4\ub0b4\uc8fc\uc138\uc694](https://1node.ai)"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8b5fc2b8-50f7-425c-8fc8-94ba4f76ecf3",
  "connections": {
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI 4o": {
      "ai_languageModel": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set Chunks": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Download New": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Watch New Files": {
      "main": [
        [
          {
            "node": "Download New",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cohere embeddings": {
      "ai_embedding": [
        [
          {
            "node": "Retrieve from Milvus",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Cohere": {
      "ai_embedding": [
        [
          {
            "node": "Insert into Milvus",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Insert into Milvus",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Insert into Milvus",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve from Milvus": {
      "ai_tool": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "RAG Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}