AutomationFlowsAI & RAG › AI Chat with Vector Store

AI Chat with Vector Store

Original n8n title: Prototype

prototype. Uses vectorStoreInMemory, documentDefaultDataLoader, embeddingsHuggingFaceInference, readWriteFile. Event-driven trigger; 12 nodes.

Event trigger★★★☆☆ complexityAI-powered12 nodesIn-Memory Vector StoreDocument Default Data LoaderEmbeddings Hugging Face InferenceRead Write FileChat TriggerText Splitter Recursive Character Text SplitterAgentGroq Chat
AI & RAG Trigger: Event Nodes: 12 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "prototype",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -16,
        -192
      ],
      "id": "9a52fa86-2416-41c0-aa1d-e11a061af744",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "parameters": {
        "mode": "insert",
        "memoryKey": {
          "__rl": true,
          "mode": "list",
          "value": "vector_store_key"
        },
        "clearStore": true
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "typeVersion": 1.3,
      "position": [
        480,
        -192
      ],
      "id": "4e25c07d-8d42-4bdb-8d76-94e0d9b54a5a",
      "name": "Simple Vector Store"
    },
    {
      "parameters": {
        "dataType": "binary",
        "loader": "textLoader",
        "textSplittingMode": "custom",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        640,
        -16
      ],
      "id": "fa06b79c-8371-4ce6-93b3-823b4cd220b2",
      "name": "Default Data Loader"
    },
    {
      "parameters": {
        "modelName": "intfloat/multilingual-e5-large",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsHuggingFaceInference",
      "typeVersion": 1,
      "position": [
        480,
        -16
      ],
      "id": "f2c2dd98-63ba-4c54-aa04-7ffd44e5f557",
      "name": "Embeddings HuggingFace Inference",
      "credentials": {
        "huggingFaceApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fileSelector": "/home/node/.n8n-files/base_de_conhecimento.txt",
        "options": {}
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1.1,
      "position": [
        208,
        -192
      ],
      "id": "ccb1ad29-7793-4d6c-8a13-031489d31cd8",
      "name": "Read/Write Files from Disk"
    },
    {
      "parameters": {
        "public": true,
        "options": {
          "allowedOrigins": "*"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.4,
      "position": [
        -144,
        528
      ],
      "id": "c2401a5d-e897-4c60-845b-6c11441e98a1",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "modelName": "intfloat/multilingual-e5-large",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsHuggingFaceInference",
      "typeVersion": 1,
      "position": [
        256,
        848
      ],
      "id": "3a8e085c-a935-46a6-88ef-aed9b766f8fd",
      "name": "Embeddings HuggingFace Inference1",
      "credentials": {
        "huggingFaceApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "chunkSize": 500,
        "chunkOverlap": 50,
        "options": {
          "splitCode": "markdown"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        640,
        144
      ],
      "id": "102dc052-8df7-4439-9cf2-47b913ff880b",
      "name": "Recursive Character Text Splitter"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "Voc\u00ea \u00e9 um assistente virtual. Para responder d\u00favidas sobre a empresa, voc\u00ea DEVE usar a ferramenta 'busca_manual'. N\u00e3o tente responder da sua pr\u00f3pria cabe\u00e7a se a informa\u00e7\u00e3o for espec\u00edfica sobre a TechNova."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        16,
        528
      ],
      "id": "cb10f69a-8ef5-43d1-90e1-91931c7b69a8",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": "llama-3.1-8b-instant",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "typeVersion": 1,
      "position": [
        16,
        704
      ],
      "id": "c998762a-27d7-4c75-91c9-b7f27a90ca58",
      "name": "Groq Chat Model",
      "credentials": {
        "groqApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        128,
        704
      ],
      "id": "d83e8919-1874-42eb-bb1a-6759e069ec39",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "\u00datil para responder perguntas sobre TI, RH e pol\u00edticas da TechNova. O input deve ser a pergunta do usu\u00e1rio em portugu\u00eas.",
        "memoryKey": {
          "__rl": true,
          "mode": "list",
          "value": "vector_store_key"
        },
        "includeDocumentMetadata": false
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "typeVersion": 1.3,
      "position": [
        256,
        704
      ],
      "id": "e3092acc-1c6d-4815-b717-4124b7d1125c",
      "name": "busca_manual"
    }
  ],
  "connections": {
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Simple Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings HuggingFace Inference": {
      "ai_embedding": [
        [
          {
            "node": "Simple Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk": {
      "main": [
        [
          {
            "node": "Simple Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings HuggingFace Inference1": {
      "ai_embedding": [
        [
          {
            "node": "busca_manual",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "busca_manual": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate"
  },
  "versionId": "872d1e28-5b66-488c-99be-e486ad2f54c9",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "jly6jvAtFdf2ntfj",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

prototype. Uses vectorStoreInMemory, documentDefaultDataLoader, embeddingsHuggingFaceInference, readWriteFile. Event-driven trigger; 12 nodes.

Source: https://github.com/FabricioLR/chatbot_prototype/blob/master/prototype_workflow.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

An on-premises, domain-specific AI assistant for Kaggle (tested on binary disaster-tweet classification), combining LLM, an n8n workflow engine, and Qdrant-backed Retrieval-Augmented Generation (RAG).

Local File Trigger, Document Default Data Loader, Text Splitter Recursive Character Text Splitter +10
AI & RAG

Turn documents into an AI-powered knowledge base.

Form Trigger, In-Memory Vector Store, Document Default Data Loader +6
AI & RAG

This workflow demonstrates a simple Retrieval-Augmented Generation (RAG) pipeline in n8n, split into two main sections:

Text Splitter Recursive Character Text Splitter, Document Default Data Loader, Chain Retrieval Qa +6
AI & RAG

This template is a complete, hands-on tutorial for building a RAG (Retrieval-Augmented Generation) pipeline. In simple terms, you'll teach an AI to become an expert on a specific topic—in this case, t

Memory Buffer Window, Document Default Data Loader, Text Splitter Recursive Character Text Splitter +7
AI & RAG

This workflow implements a complete Retrieval-Augmented Generation (RAG) knowledge assistant with built-in document ingestion, conversational AI, and automated analytics using n8n, OpenAI, and Pinecon

Form Trigger, Data Table, Text Splitter Recursive Character Text Splitter +8