{
  "name": "Iterative content refinement with GPT-4 multi-agent feedback system",
  "nodes": [
    {
      "id": "74337855-c422-4186-9510-ce899d67e39f",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1180,
        240
      ]
    },
    {
      "id": "e056b2fa-3e6f-4fa7-b908-dba91d01ec61",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -780,
        240
      ]
    },
    {
      "id": "f7c4971f-1ea8-4448-ab73-35d945d76604",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -360,
        360
      ]
    },
    {
      "id": "b8c57f43-6f23-4e05-81c0-6c1db0264f18",
      "name": "Critic Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -120,
        420
      ]
    },
    {
      "id": "cdcab121-8082-4295-aa7f-475bde50414e",
      "name": "Refiner Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        320,
        520
      ]
    },
    {
      "id": "9a63dab8-269c-4073-bdf5-8661fcbfdc82",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -560,
        360
      ]
    },
    {
      "id": "cdf532b0-6dd9-43e6-a1b2-76edb177e9fa",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        1180,
        880
      ]
    },
    {
      "id": "6d853089-99d1-4ee9-bd80-34ebcc2fd5a3",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        1400,
        880
      ]
    },
    {
      "id": "3702b8fc-61e2-4d01-aa10-0ddb5bff48c7",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -100,
        800
      ]
    },
    {
      "id": "17809998-4a9c-41d9-984e-c17cc24e7769",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        880,
        820
      ]
    },
    {
      "id": "b47e29f2-bd26-4e9f-813f-2983b1841d33",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1360,
        240
      ]
    },
    {
      "id": "7d996197-5542-4d89-8c58-ced050c7fffc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        120
      ],
      "parameters": {
        "width": 3920,
        "height": 1160,
        "content": "# ⚙️ Setup Guide\n## This is a workflow for user's customization.\n### 🧑‍💻 Author: [Sebastian/OptiLever](www.linkedin.com/in/sebastian-9ab9b9242)\n\n### 🚀 Prerequisite:\n\n**1. Connect to Openai API account"
      }
    },
    {
      "id": "d64015c8-17f1-4fcc-a12f-f29d2ac0aa75",
      "name": "Evaluation agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        700,
        640
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [],
        [
          {
            "node": "Critic Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Critic Agent": {
      "main": [
        [
          {
            "node": "Refiner Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Refiner Agent": {
      "main": [
        [
          {
            "node": "Evaluation agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evaluation agent": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Critic Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Refiner Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Evaluation agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Evaluation agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}