{
  "name": "Basic RAG",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "id": "chat-trigger",
      "name": "Chat Trigger",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        240,
        300
      ],
      "webhookId": "basic-rag-trigger"
    },
    {
      "parameters": {
        "model": "gpt-4",
        "options": {
          "temperature": 0.3,
          "maxTokens": 1000
        }
      },
      "id": "openai-model",
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        640,
        300
      ],
      "credentials": {
        "openAiApi": {
          "id": "openai-api-credential",
          "name": "OpenAI API"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=## Basic RAG Agent\n\nYou are a helpful assistant.\n\n### User question:\n{{ $('Chat Trigger').item.json.chatInput }}\n\n### Your task:\nAnswer the user's question helpfully.\n\n### Response format:\n**Answer:**\n[Your answer]",
        "options": {
          "systemMessage": "=You are a helpful assistant. Answer questions clearly and concisely."
        }
      },
      "id": "rag-agent",
      "name": "RAG Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        840,
        300
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "Chat Trigger": {
      "main": [
        [
          {
            "node": "RAG Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "basic-rag-v1",
  "meta": {
    "templateId": "basic-rag",
    "templateCredsSetupCompleted": false,
    "instanceId": "basic-rag-instance"
  },
  "id": "BasicRAG",
  "tags": ["rag", "ai", "basic"]
}



