{
  "name": "My workflow",
  "nodes": [
    {
      "parameters": {
        "model": "hf.co/Qwen/Qwen3-Embedding-0.6B-GGUF:F16"
      },
      "id": "6c41eb53-9824-4a6b-8542-e2286c66c873",
      "name": "Embeddings Ollama",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "position": [
        272,
        384
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "content": "## Data Ingestion\n**Add data to the semantic database",
        "height": 636,
        "width": 632,
        "color": 3
      },
      "id": "d3d5fdd8-9d14-42a3-8241-d2ec07b43dc5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        64
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "cf2e6e0f-4fba-49cd-b816-f7162dc2b584",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        752,
        368
      ],
      "webhookId": "5e56a263-3a40-44bd-bc9d-1cfb3bc2a87d",
      "typeVersion": 1.1
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are a helpful assistant. You have access to a tool to retrieve data from a vectorstore to get the context to the users question. Answer the question based on the retrieved context. Do not hallucinate. Always call the "
        }
      },
      "id": "48becb0d-6f75-46e2-8952-43f046279cc6",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1008,
        160
      ],
      "typeVersion": 2
    },
    {
      "parameters": {
        "model": "hf.co/unsloth/Qwen3-0.6B-GGUF:Q4_K_M",
        "options": {}
      },
      "id": "e569a792-f55c-47f1-a345-900ebbcf49fd",
      "name": "Ollama Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        960,
        384
      ],
      "typeVersion": 1
    },
    {
      "parameters": {},
      "id": "fe190a99-09fd-4796-8553-4a3f22f7031f",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1088,
        384
      ],
      "typeVersion": 1.3
    },
    {
      "parameters": {
        "content": "## RAG Chatbot\n**Chat with your data",
        "height": 636,
        "width": 752,
        "color": 4
      },
      "id": "fd256e8c-8795-4e0c-9580-0afebd9acd8f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        64
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "mode": "insert",
        "memoryKey": {
          "__rl": true,
          "mode": "list",
          "value": "vector_store_key"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "typeVersion": 1.3,
      "position": [
        320,
        160
      ],
      "id": "3f0e6b12-29b8-46fb-9aaf-0a80bc0eb429",
      "name": "Simple Vector Store"
    },
    {
      "parameters": {
        "textSplittingMode": "custom",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        416,
        384
      ],
      "id": "be461d8b-24f6-4df1-b6a6-02faa165fcd8",
      "name": "Default Data Loader"
    },
    {
      "parameters": {
        "model": "hf.co/Qwen/Qwen3-Embedding-0.6B-GGUF:F16"
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "typeVersion": 1,
      "position": [
        1280,
        560
      ],
      "id": "31d6d2ce-89eb-4c3c-93b3-4f60d562ebc1",
      "name": "Embeddings Ollama2"
    },
    {
      "parameters": {
        "chunkOverlap": 50,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        496,
        560
      ],
      "id": "2afd1619-197b-469a-aec4-aaf5505fd4a7",
      "name": "Recursive Character Text Splitter"
    },
    {
      "parameters": {
        "formTitle": "Add your file here",
        "formFields": {
          "values": [
            {
              "fieldLabel": "File",
              "fieldType": "file",
              "acceptFileTypes": ".pdf",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "id": "33ac6fed-47d7-4456-8ab9-210b16c8e0ca",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        96,
        160
      ],
      "webhookId": "4e1e20d4-f759-42c8-8439-87b93f43aa7c",
      "typeVersion": 2.2
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "Calling this tool with the user's query will return context on the query.",
        "memoryKey": {
          "__rl": true,
          "mode": "list",
          "value": "vector_store_key"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "typeVersion": 1.3,
      "position": [
        1200,
        384
      ],
      "id": "c7c70bd3-6e4f-4332-af54-441d3c2c26c4",
      "name": "Vectorstore"
    }
  ],
  "pinData": {},
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Ollama": {
      "ai_embedding": [
        [
          {
            "node": "Simple Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Simple Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Ollama2": {
      "ai_embedding": [
        [
          {
            "node": "Vectorstore",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Simple Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Vectorstore": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "6734fac4-3a55-42c2-974e-0ec55b85a988",
  "meta": {
    "instanceId": "c8a824c157ff196caa09d472644cb60de783d2fd5a6fabd45a3ebf6d393cbd11"
  },
  "id": "iMpwJbSCCt7MjnIj",
  "tags": []
}