{
  "name": "Answer research questions using OpenAI GPT-4.1 and arXiv papers",
  "nodes": [
    {
      "id": "a0d67119-0e16-4fc8-908b-3e04aac838c6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2064,
        -448
      ],
      "parameters": {
        "width": 420,
        "height": 1344,
        "content": "## Try It Out!\n\n### This n8n template demonstrates how to perform intelligent literature search and summarization using AI, grounded in real arXiv papers.\n\nIt allows you to ask research questions and "
      }
    },
    {
      "id": "c5e753f0-c9e2-4e12-8fdb-6d1266693e58",
      "name": "arXiv Search",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -496,
        0
      ]
    },
    {
      "id": "95bf0587-7bb0-4591-9609-3aa25b02b4a7",
      "name": "Normalize arXiv",
      "type": "n8n-nodes-base.function",
      "position": [
        -208,
        0
      ]
    },
    {
      "id": "3aac8650-bb64-4a9c-8f83-64be4a2a287c",
      "name": "Planning Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1360,
        96
      ]
    },
    {
      "id": "3a0d1395-72a6-49ce-a33c-bc66fb6b787d",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1288,
        320
      ]
    },
    {
      "id": "68a58dbc-0b04-481d-9d0d-cb170cf27e18",
      "name": "Json Parser 1",
      "type": "n8n-nodes-base.code",
      "position": [
        -1008,
        96
      ]
    },
    {
      "id": "8289b228-b8bc-4f12-8030-e5f2e0ffb468",
      "name": "Check research q",
      "type": "n8n-nodes-base.if",
      "position": [
        -784,
        96
      ]
    },
    {
      "id": "b2a8ca67-f360-42bb-88bd-e7d48aec6cad",
      "name": "Json Parser 2",
      "type": "n8n-nodes-base.code",
      "position": [
        16,
        0
      ]
    },
    {
      "id": "bc7d470d-f728-4f25-91ca-b8da17c0c6ec",
      "name": "General Reasoning Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -560,
        192
      ]
    },
    {
      "id": "784fa2a5-5781-46fd-9c76-1a13bb9fd676",
      "name": "Arxiv Grounded Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        240,
        0
      ]
    },
    {
      "id": "509b660a-e37c-42af-bff8-74adf3b9d13e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1402,
        -80
      ],
      "parameters": {
        "width": 756,
        "height": 336,
        "content": "## General or research question?\n\n"
      }
    },
    {
      "id": "fdf953f1-b2a9-4701-b0cc-c550acaa86df",
      "name": "User asks a question",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1584,
        96
      ]
    },
    {
      "id": "e9a01b4e-7265-478f-a005-bc9632671b49",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -538,
        -176
      ],
      "parameters": {
        "width": 692,
        "height": 336,
        "content": "## API request to arXiv and response parsing\n"
      }
    },
    {
      "id": "c8960751-0fc5-4b26-898f-9af09bfc9c1e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        158,
        -176
      ],
      "parameters": {
        "width": 388,
        "height": 336,
        "content": "## Reply to Question Based on Documents Retrieved from arXiv\n"
      }
    },
    {
      "id": "5584be47-5f13-4e59-a44c-6b6fc81201be",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        176
      ],
      "parameters": {
        "width": 388,
        "height": 336,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Reply to Question Based on general knowlege\n"
      }
    }
  ],
  "connections": {
    "arXiv Search": {
      "main": [
        [
          {
            "node": "Normalize arXiv",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Json Parser 1": {
      "main": [
        [
          {
            "node": "Check research q",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Json Parser 2": {
      "main": [
        [
          {
            "node": "Arxiv Grounded Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Planning Agent": {
      "main": [
        [
          {
            "node": "Json Parser 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize arXiv": {
      "main": [
        [
          {
            "node": "Json Parser 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check research q": {
      "main": [
        [
          {
            "node": "arXiv Search",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "General Reasoning Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "General Reasoning Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Arxiv Grounded Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Planning Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "User asks a question": {
      "main": [
        [
          {
            "node": "Planning Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}