{
  "name": "Intelligent web query and semantic re-ranking flow using Brave and Google Gemini",
  "nodes": [
    {
      "id": "8e7dc5cb-6822-4ef6-9e5a-2b350a1526bf",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -620
      ],
      "parameters": {
        "width": 1172,
        "height": 970,
        "content": "\n## Step 1. Set Up a Free Brave Web Search Query API Key\n\nTo attain the free web search API tier from Brave, follow these steps:\n\n1. Visit api.search.brave.com\n2. Create an account\n3. Subscribe to the"
      }
    },
    {
      "id": "5bb3e68f-7693-4d4b-b794-843f2c3535e0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1580,
        -420
      ],
      "parameters": {
        "width": 680,
        "height": 360,
        "content": "## If you require to change this Node to Webhook Or any Other Item:\n\n- In case you want to change the input type from Webhook to any other item, Make sure to go to the Query 1 and Query 1 Ranker and r"
      }
    },
    {
      "id": "f2fc02f9-a78a-4e87-be85-0032492a9f3f",
      "name": "Date & Time",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        -820,
        -240
      ]
    },
    {
      "id": "6f18ebbd-83db-4900-bc2e-0a9f23d6e8c8",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1340,
        -240
      ]
    },
    {
      "id": "ba5ea83e-1b47-475b-863f-269ae293729a",
      "name": "Auto-fixing Output Parser6",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        180,
        -140
      ]
    },
    {
      "id": "ca426b6d-5412-4c5b-a55c-009a47c59a81",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        -580,
        -140
      ]
    },
    {
      "id": "501d5390-5317-4973-a3e9-b0f502399c2b",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -460,
        -60
      ]
    },
    {
      "id": "a27e75c7-0307-4d71-9266-5a56b297a6e3",
      "name": "Query-1 Combined",
      "type": "n8n-nodes-base.code",
      "position": [
        -80,
        -240
      ]
    },
    {
      "id": "acbdbe94-b5a7-4ec9-9fc8-c3ab147f42fa",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        640,
        -240
      ]
    },
    {
      "id": "b8b6ae73-586a-406f-9641-57e2625f800c",
      "name": "Semantic Search - Result Re-Ranker",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        100,
        -240
      ]
    },
    {
      "id": "a1ca671d-0b0c-4717-9def-93fdb965de8d",
      "name": "Query",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -240,
        -240
      ]
    },
    {
      "id": "d3cc4e7c-3ead-4d38-9b51-a11cd9d7faeb",
      "name": "Webhook Call",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -180,
        1040
      ]
    },
    {
      "id": "6931404b-94d6-4b9d-9f0a-124012212eb5",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        420
      ],
      "parameters": {
        "width": 1180,
        "height": 840,
        "content": "## Step 2. Setup the Webhook Call Node\n\n**Instructions for Setting Up the Webhook Call and Using It in Your Workflow**\n\nThis node is designed to send a **web search query** to the workflow (partly bui"
      }
    },
    {
      "id": "01d73f91-1dd6-4b80-951c-9f944ea9d992",
      "name": "Semantic Search -Query Maker",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -560,
        -240
      ]
    },
    {
      "id": "696b4f97-ad29-406b-9157-44ad9d05c9cd",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        740,
        180
      ]
    },
    {
      "id": "82f25610-8b70-4aee-ad90-2616d3389f15",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        900,
        180
      ]
    },
    {
      "id": "f230bdf0-4a22-4abf-96cd-47f309f0c514",
      "name": "Structured Output Parser2",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        260,
        -60
      ]
    },
    {
      "id": "3421ebe5-6a86-435e-b9c6-e3dcf6dd7833",
      "name": "Parser Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -180,
        180
      ]
    },
    {
      "id": "fd19e9f6-d8c7-45df-93d9-ecf7956b461f",
      "name": "Agent Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -180,
        -20
      ]
    },
    {
      "id": "156e83ff-928a-4aca-af8b-0c0fa51acd56",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -20
      ],
      "parameters": {
        "width": 712,
        "height": 370,
        "content": "\n## Customized Models to Replace\n\nIn case you rather to use another LLM Model to Perform the Semantic Search and Re-Ranking, These nodes below are Optimized based on the LLM Structure of OpenAI GPT4o "
      }
    }
  ],
  "connections": {
    "Query": {
      "main": [
        [
          {
            "node": "Query-1 Combined",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Date & Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent Model": {
      "ai_languageModel": [
        [
          {
            "node": "Semantic Search - Result Re-Ranker",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Semantic Search -Query Maker",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Date & Time": {
      "main": [
        [
          {
            "node": "Semantic Search -Query Maker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parser Model": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser6",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Query-1 Combined": {
      "main": [
        [
          {
            "node": "Semantic Search - Result Re-Ranker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        []
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        []
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Semantic Search -Query Maker",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser2": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser6",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser6": {
      "ai_outputParser": [
        [
          {
            "node": "Semantic Search - Result Re-Ranker",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Semantic Search -Query Maker": {
      "main": [
        [
          {
            "node": "Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Semantic Search - Result Re-Ranker": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}