{
  "nodes": [
    {
      "id": "a3af309b-d24c-42fe-8bcd-f330927c7a3c",
      "name": "Local File Trigger",
      "type": "n8n-nodes-base.localFileTrigger",
      "position": [
        140,
        260
      ],
      "parameters": {
        "path": "/home/node/storynotes/context",
        "events": [
          "add"
        ],
        "options": {
          "usePolling": true,
          "followSymlinks": true
        },
        "triggerOn": "folder"
      },
      "typeVersion": 1
    },
    {
      "id": "048f9d67-6519-4dea-97df-aaddfefbfea2",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1300,
        720
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "project",
                "value": "={{ $('Settings').item.json.project }}"
              },
              {
                "name": "filename",
                "value": "={{ $('Settings').item.json.filename }}"
              }
            ]
          }
        },
        "jsonData": "={{ $json.data }}",
        "jsonMode": "expressionData"
      },
      "typeVersion": 1
    },
    {
      "id": "9e9047c9-4428-4afb-8c74-d6eb1075a65a",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        1300,
        860
      ],
      "parameters": {
        "options": {},
        "chunkSize": 2000
      },
      "typeVersion": 1
    },
    {
      "id": "e42e3f82-6cd9-40c4-9da2-8f87ee5b3956",
      "name": "Embeddings Mistral Cloud",
      "type": "@n8n/n8n-nodes-langchain.embeddingsMistralCloud",
      "position": [
        1180,
        720
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "578c63db-4f6e-4341-ab0d-111debd519be",
      "name": "Mistral Cloud Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        2660,
        840
      ],
      "parameters": {
        "model": "open-mixtral-8x7b",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c34adb3e-1fb9-4248-ae83-2bac34c8b0a4",
      "name": "Mistral Cloud Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        1200,
        400
      ],
      "parameters": {
        "model": "open-mixtral-8x7b",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "98e6dcc0-1e3a-4119-b657-0949f34ba525",
      "name": "Prep Incoming Doc",
      "type": "n8n-nodes-base.set",
      "position": [
        900,
        420
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "da64ffde-1e8f-478d-baea-59fc05e6d3ce",
              "name": "data",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "ab88cf9a-d310-4bef-9280-8b23729e7cc9",
      "name": "Settings",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        260
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "df327b01-961c-4a49-8455-58c3fbff111a",
              "name": "project",
              "type": "string",
              "value": "={{ $json.path.split('/').slice(0, 4)[3] }}"
            },
            {
              "id": "6b7d26f9-3a38-417e-85d0-4e9d42476465",
              "name": "path",
              "type": "string",
              "value": "={{ $json.path }}"
            },
            {
              "id": "bb4471c7-d894-4739-99a6-4be247794ffa",
              "name": "filename",
              "type": "string",
              "value": "={{ $json.path.split('/').last() }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "35c6b678-e6e9-4adf-a904-909fa2401d5e",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1600,
        420
      ],
      "parameters": {
        "mode": "chooseBranch"
      },
      "typeVersion": 2.1
    },
    {
      "id": "0fa13be8-8500-486c-a1c6-cc1df00a4947",
      "name": "Get Doc Types",
      "type": "n8n-nodes-base.set",
      "position": [
        2000,
        420
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "{\n  \"docs\": [\n    {\n      \"filename\": \"study_guide.md\",\n      \"title\": \"Study Guide\",\n      \"description\": \"A Study Guide is a consolidated resource designed to aid learning. This guide includes three key elements: * A short answer quiz accompanied by an answer key to test comprehension. * A curated list of long-form essay questions to encourage deeper analysis and synthesis of the material. * A glossary of key terms to reinforce understanding of important concepts.\"\n    },\n    {\n      \"filename\": \"timeline.md\",\n      \"title\": \"Timeline\",\n      \"description\": \"A Timeline organizes all significant events described in the sources you have uploaded in chronological order. This ordered list makes it easier to understand the sequence of events and their connection to the broader context of your sources. In addition to the list of events, the Timeline also provides a \u201ccast of characters,\u201d which comprises short biographical sketches of all the important people mentioned in your uploaded sources. These short biographies can help you quickly grasp the roles of various individuals involved in the events described by the Timeline.\"\n    },\n    {\n      \"filename\": \"briefing_doc.md\",\n      \"title\": \"Briefing Doc\",\n      \"description\": \"A Briefing Doc identifies and presents the most important facts and insights from the sources in an easy-to-understand outline format. This format is designed to provide a concise overview of the key takeaways from the uploaded materials.\"\n    }\n  ]\n}\n"
      },
      "executeOnce": true,
      "typeVersion": 3.3
    },
    {
      "id": "e3469368-f214-4549-844e-7febfbbf0202",
      "name": "Split Out Doc Types",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2160,
        420
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "docs"
      },
      "typeVersion": 1
    },
    {
      "id": "df401e9e-2f70-4079-969b-6b61142fca37",
      "name": "For Each Doc Type...",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2340,
        420
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "c334b546-8e11-424d-bdd5-006e7086f24b",
      "name": "Item List Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserItemList",
      "position": [
        2840,
        840
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "4267c2b5-f1cd-4df7-84ee-be01a643a1c1",
      "name": "Vector Store Retriever",
      "type": "@n8n/n8n-nodes-langchain.retrieverVectorStore",
      "position": [
        3200,
        840
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "abf833ec-8a6d-4e13-a526-0ea6b80d578f",
      "name": "Embeddings Mistral Cloud1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsMistralCloud",
      "position": [
        3200,
        1060
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a0e50185-6662-4b11-9922-59e8b06e4967",
      "name": "Qdrant Vector Store1",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        3200,
        940
      ],
      "parameters": {
        "qdrantCollection": {
          "__rl": true,
          "mode": "list",
          "value": "storynotes",
          "cachedResultName": "storynotes"
        }
      },
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "20c5766a-d3ce-4c01-a76b-facf1a00abc2",
      "name": "Mistral Cloud Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        3100,
        840
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f049b7af-07f3-47e5-9476-68d73a387978",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2960,
        680
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "response"
      },
      "typeVersion": 1
    },
    {
      "id": "39042ae0-e17f-46cd-84be-728868950d84",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3400,
        680
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "response.text"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e3b900c8-515d-4ac7-88fa-c364134ba9f9",
      "name": "Mistral Cloud Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        3540,
        840
      ],
      "parameters": {
        "model": "open-mixtral-8x7b",
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "efb26a5d-6a61-44b2-ad99-6d1f8b48998d",
      "name": "Discover",
      "type": "@n8n/n8n-nodes-langchain.chainRetrievalQa",
      "position": [
        3100,
        680
      ],
      "parameters": {
        "text": "={{ $json.response }}",
        "promptType": "define"
      },
      "typeVersion": 1.3
    },
    {
      "id": "302b7523-898e-47af-8941-aa5f8a58fd9c",
      "name": "2secs",
      "type": "n8n-nodes-base.wait",
      "position": [
        3880,
        1060
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "007857b0-c12c-4c57-b07f-db30526cd747",
      "name": "Get Generated Documents",
      "type": "n8n-nodes-base.set",
      "position": [
        2680,
        240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b38546b2-47c4-4967-a2d7-98aebd589e95",
              "name": "data",
              "type": "string",
              "value": "={{ $json.text }}"
            },
            {
              "id": "a263519a-aa05-410a-b4f0-f5e22cc5058c",
              "name": "path",
              "type": "string",
              "value": "={{ $('Prep For AI').item.json.path }}"
            },
            {
              "id": "ec1687d6-0ea9-460f-b9d4-ae4a7e229e12",
              "name": "filename",
              "type": "string",
              "value": "={{ $('Prep For AI').item.json.name }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "36fac35f-df10-41ab-96a7-3a5e67f9d8df",
      "name": "Generate",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        3540,
        680
      ],
      "parameters": {
        "text": "=## Document\n{{ $json.text.join('\\n') }}",
        "messages": {
          "messageValues": [
            {
              "message": "=Your job is to create a {{ $('For Each Doc Type...').item.json.title }} for the given document. {{ $('For Each Doc Type...').item.json.description }}\n\nGenerate a  {{ $('For Each Doc Type...').item.json.title }} for the given document. If questions are generated, generate the answers alongside them. Format your response in markdown; use \"#\" to format headings, use \"*\" to format lists."
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.4
    },
    {
      "id": "b9a79cb0-bcc1-4d73-af93-5f8d7e2258a9",
      "name": "Prep For AI",
      "type": "n8n-nodes-base.set",
      "position": [
        1760,
        420
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5c864125-c884-4d33-b0ed-e3eecd354196",
              "name": "id",
              "type": "string",
              "value": "={{ $('Settings').first().json.filename.hash() }}"
            },
            {
              "id": "93ac14c1-ae97-4ef2-a66f-6c1110f3b0fc",
              "name": "project",
              "type": "string",
              "value": "={{ $('Settings').first().json.project }}"
            },
            {
              "id": "fafd16b9-0002-4f7c-89d0-29788f8ec472",
              "name": "path",
              "type": "string",
              "value": "={{ $('Settings').first().json.path }}"
            },
            {
              "id": "5a5860ba-918b-4fb8-b18c-96c1cd22091a",
              "name": "name",
              "type": "string",
              "value": "={{ $('Settings').first().json.filename }}"
            },
            {
              "id": "1a1caf65-85d8-4f74-a3be-503ccfc0b2c9",
              "name": "summary",
              "type": "string",
              "value": "={{ $('Summarization Chain').first().json.response.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "e40c7e99-9813-4f06-92bb-dfb2839f1037",
      "name": "To Binary",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        2860,
        240
      ],
      "parameters": {
        "options": {},
        "operation": "toText",
        "sourceProperty": "={{ $json.data }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "b55df916-7a51-4114-91b8-18a3c6ba2c56",
      "name": "Export to Folder",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        3020,
        240
      ],
      "parameters": {
        "options": {},
        "fileName": "={{\n  $('Get Generated Documents').item.json.path.replace(\n    $('Get Generated Documents').item.json.path.split('/').last(),\n    $('Get Generated Documents').item.json.filename.substring(0,21) + '...' + $('Split Out Doc Types').item.json.title + '.md'\n  )\n}}",
        "operation": "write"
      },
      "typeVersion": 1
    },
    {
      "id": "8490664e-0ca5-4839-ad03-d3f9706c99a3",
      "name": "Get FileType",
      "type": "n8n-nodes-base.switch",
      "position": [
        480,
        420
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "pdf",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.fileType }}",
                    "rightValue": "pdf"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "docx",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "3a5f509d-46fe-490c-95f0-35124873c63e",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.fileType }}",
                    "rightValue": "docx"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "everything else",
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "75188d2f-4bea-44ea-a579-9b9a1bd1ea93",
                    "operator": {
                      "type": "object",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "leftValue": "={{ $json }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "386f7aac-f3b9-4565-907f-687d48b00c52",
      "name": "Import File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        320,
        420
      ],
      "parameters": {
        "options": {},
        "fileSelector": "={{ $json.path }}"
      },
      "typeVersion": 1
    },
    {
      "id": "6ade93d5-61c3-450a-b78c-e210c18c0e70",
      "name": "Extract from PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        680,
        260
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "f413e139-3f9c-438f-8e82-824c38f09c6b",
      "name": "Extract from DOCX",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        680,
        420
      ],
      "parameters": {
        "options": {},
        "operation": "ods"
      },
      "typeVersion": 1
    },
    {
      "id": "455fadea-f5c7-4bea-983f-b06da4e57510",
      "name": "Extract from TEXT",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        680,
        580
      ],
      "parameters": {
        "options": {},
        "operation": "text"
      },
      "typeVersion": 1
    },
    {
      "id": "b2586011-4985-4075-b51c-90301b1a8cf9",
      "name": "Summarization Chain",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        1200,
        260
      ],
      "parameters": {
        "options": {},
        "chunkSize": 4000
      },
      "typeVersion": 2
    },
    {
      "id": "1502e72c-e97e-4148-8138-01818ab5b104",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        85.80882007954312
      ],
      "parameters": {
        "color": 7,
        "width": 995.1475972814769,
        "height": 694.0931000693263,
        "content": "## 1\ub2e8\uacc4. \ud3f4\ub354 \uac10\uc2dc \ubc0f \uc0c8 \ubb38\uc11c \uac00\uc838\uc624\uae30\n\n[\ub85c\uceec \ud30c\uc77c \ud2b8\ub9ac\uac70\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc77d\uae30](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.localfiletrigger)\n\nn8n\uc758 \ub85c\uceec \ud30c\uc77c \ud2b8\ub9ac\uac70\ub97c \uc0ac\uc6a9\ud558\uba74 \ub300\uc0c1 \ud3f4\ub354\uc5d0 \ud30c\uc77c\uc774 \uc0dd\uc131\ub420 \ub54c \uc6cc\ud06c\ud50c\ub85c\ub97c \ud2b8\ub9ac\uac70\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \ud2b8\ub9ac\uac70\ub294 \ud30c\uc77c\uc758 \uacbd\ub85c\ub9cc \uc81c\uacf5\ud558\ubbc0\ub85c \uc5ec\uc804\ud788 \uc774\ub97c \uac00\uc838\uc640\uc57c \ud569\ub2c8\ub2e4. \u201cExtract From\u201d \ub178\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud30c\uc77c\uc758 \ub0b4\uc6a9\uc744 \uac00\uc838\uc635\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "7b3afc2c-3fb8-4589-9475-78f5617009cc",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        82.96464765818223
      ],
      "parameters": {
        "color": 7,
        "width": 824.3300768713589,
        "height": 949.8141899605673,
        "content": "## 2\ub2e8\uacc4. \ubb38\uc11c \ub0b4\uc6a9\uc744 \uc694\uc57d\ud558\uace0 \ubca1\ud130\ud654\ud558\uae30\n\n[Qdrant VectorStore \uc0ac\uc6a9\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uae30](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreqdrant)\n\n\ubb38\uc11c\ub97c \uc6b0\ub9ac \ubca1\ud130 \uc800\uc7a5\uc18c\uc5d0 \ucea1\ucc98\ud558\ub294 \uac83\uc740 \ub098\uc911\uc5d0 \uc0ac\uc6a9\ud560 \uae30\uc220\uc778 Retrieval Augmented Generation \ub610\ub294 \uc904\uc5ec\uc11c \"RAG\"\uc5d0 \uc0ac\uc6a9\ud558\uae30 \uc704\ud55c \uac83\uc785\ub2c8\ub2e4. \uc6b0\ub9ac \uc2dc\ub098\ub9ac\uc624\uc5d0\uc11c, \uc774\ub294 LLM\uc774 \ucee8\ud14d\uc2a4\ud2b8\ub97c \ub354 \ud6a8\uc728\uc801\uc73c\ub85c \uac80\uc0c9\ud560 \uc218 \uc788\uac8c \ud558\uc5ec \ub354 \ub098\uc740 \uc751\ub2f5\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "74aabb02-ca5d-41ad-b84f-92d66428b774",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1940,
        156.7963650826494
      ],
      "parameters": {
        "color": 7,
        "width": 591.09953935829,
        "height": 485.0226378812345,
        "content": "## 3\ub2e8\uacc4. \ud15c\ud50c\ub9bf \ubc18\ubcf5\n\n\uc6b0\ub9ac\ub294 LLM\uc5d0\uac8c \uac00\uc838\uc628 \uc6d0\ubcf8 \ubb38\uc11c\uc5d0\uc11c 3\uac00\uc9c0 \uc720\ud615\uc758 \ub178\ud2b8\ub97c \uc0dd\uc131\ud558\ub3c4\ub85d \ub3c4\uc6b8 \uac83\uc744 \uc694\uccad\ud560 \uac83\uc785\ub2c8\ub2e4. \uc774 \ub178\ud2b8\ub4e4\uc740 \ub0b4\uc6a9\uc744 \ubd84\ud574\ud558\uc5ec \ub354 \ube60\ub978 \ud559\uc2b5\uc744 \uc704\ud55c \uac83\uc785\ub2c8\ub2e4. \uc774 \ub370\ubaa8\ub97c \uc704\ud55c \uc6b0\ub9ac\uc758 \ud15c\ud50c\ub9bf\uc740:\n(1) **\ud559\uc2b5 \uac00\uc774\ub4dc**\n(2) **\ube0c\ub9ac\ud551 \ubb38\uc11c**\n(3) **\ud0c0\uc784\ub77c\uc778**"
      },
      "typeVersion": 1
    },
    {
      "id": "b96f899d-4a44-491c-b164-a42feba129eb",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2560,
        480
      ],
      "parameters": {
        "color": 7,
        "width": 1500.7886103732135,
        "height": 806.6560661824452,
        "content": "## \ub2e8\uacc4 4. AI \uc5d0\uc774\uc804\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud15c\ud50c\ub9bf \ubb38\uc11c\ub97c \ucffc\ub9ac\ud558\uace0 \uc0dd\uc131\ud558\uae30  \n[Question & Answer Retrieval Chain \uc0ac\uc6a9\uc5d0 \ub300\ud574 \ub354 \uc77d\uae30](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa)  \n\nn8n\uc740 LLM\uc758 \uccb4\uc778\uc744 \uc5d0\uc774\uc804\ud2b8\ub85c \uc27d\uac8c \uc0ac\uc6a9\ud558\uc5ec \uc5b4\ub5a4 \uc791\uc5c5\ub3c4 \ud568\uaed8 \ucc98\ub9ac\ud560 \uc218 \uc788\uac8c \ud569\ub2c8\ub2e4!  \n\uc5ec\uae30\uc11c \uc5d0\uc774\uc804\ud2b8\ub4e4\uc740 \uc18c\uc2a4 \ubb38\uc11c\uc758 \ub0b4\uc6a9\uc744 \ud0d0\uc0c9\ud558\uae30 \uc704\ud574 \uc9c8\ubb38\uc744 \uc0dd\uc131\ud558\uace0, \ub2f5\ubcc0\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud15c\ud50c\ub9bf\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "77fda269-6877-422f-b6e6-4346bde862db",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2560,
        67.64523011966037
      ],
      "parameters": {
        "color": 7,
        "width": 771.8710855215123,
        "height": 384.22073222791266,
        "content": "## \ub2e8\uacc4 5: \uc0dd\uc131\ub41c \ud15c\ud50c\ub9bf\uc744 \ud3f4\ub354\ub85c \ub0b4\ubcf4\ub0b4\uae30  \n[\ub85c\uceec \ud30c\uc77c \uc2dc\uc2a4\ud15c\uc5d0 \uc4f0\uae30 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uae30](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.filesreadwrite)  \n\n\ub9c8\uce68\ub0b4, AI\ub85c \uc0dd\uc131\ub41c \ubb38\uc11c\ub97c \ub514\uc2a4\ud06c\ub85c \ub0b4\ubcf4\ub0bc \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \uc6cc\ud06c\ud50c\ub85c\uc6b0\ub294 \ub2e4\uc591\ud55c \uc18c\uc2a4 \uc790\ub8cc\uc5d0\uc11c \ubaa8\ub4e0 \uc885\ub958\uc758 \ubb38\uc11c\ub97c \uc27d\uac8c \uc0dd\uc131\ud560 \uc218 \uc788\uac8c \ud558\uba70, \uad50\uc721\uacfc \ud310\ub9e4\uc5d0 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "08839972-f0f4-4144-bf27-810664cbf828",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1200,
        560
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "qdrantCollection": {
          "__rl": true,
          "mode": "list",
          "value": "storynotes",
          "cachedResultName": "storynotes"
        }
      },
      "credentials": {
        "qdrantApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7e216411-83ee-4b82-9e00-285d4f2d3224",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        80
      ],
      "parameters": {
        "width": 390.63004227317265,
        "height": 401.0080676370763,
        "content": "## \uc9c1\uc811 \ud574\ubcf4\uc138\uc694!\n\n### \uc774 \uc6cc\ud06c\ud50c\ub85c\uc6b0\ub294 \uc18c\uc2a4 \ubb38\uc11c\uc5d0\uc11c \ub178\ud2b8\ub97c \uc790\ub3d9 \uc0dd\uc131\ud569\ub2c8\ub2e4.\n* \uc9c0\uc815\ub41c \ud3f4\ub354\ub97c \uac10\uc2dc\ud558\uc5ec \uc0c8\ub85c\uc6b4 \ud30c\uc77c\uc744 \uac10\uc9c0\ud569\ub2c8\ub2e4.\n* \uc0c8\ub85c\uc6b4 \ud30c\uc77c\uc774 \uac10\uc9c0\ub418\uba74 \ud30c\uc77c \ub0b4\uc6a9\uc744 \ubca1\ud130\uc2a4\ud1a0\uc5b4\uc5d0 \uc800\uc7a5\ud569\ub2c8\ub2e4.\n* \ud15c\ud50c\ub9bf \ubaa9\ub85d\uc5d0 \ub530\ub77c \ub2e4\uc218\uc758 AI \uc5d0\uc774\uc804\ud2b8\uac00 \ubbf8\ub9ac \uc815\ud574\uc9c4 \ub178\ud2b8\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n* \uc774\ub7ec\ud55c \ub178\ud2b8\ub294 \uc6d0\ubcf8 \uc18c\uc2a4 \ud30c\uc77c\uacfc \ud568\uaed8 \uc0ac\uc6a9\uc790\uc5d0\uac8c \ub0b4\ubcf4\ub0b4\uc9d1\ub2c8\ub2e4.\n\n### \ub3c4\uc6c0\uc774 \ud544\uc694\ud558\uc2e0\uac00\uc694?\n[Discord](https://discord.com/invite/XPKeKXeB7d)\uc5d0 \uac00\uc785\ud558\uac70\ub098 [Forum](https://community.n8n.io/)\uc5d0\uc11c \ubb38\uc758\ud558\uc138\uc694!\n\n\ud574\ud53c \ud574\ud0b9!"
      },
      "typeVersion": 1
    },
    {
      "id": "f2c363d3-a2bf-4468-ad54-f26649ce6ab8",
      "name": "Interview",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2660,
        680
      ],
      "parameters": {
        "text": "=## document summary\n {{ $('Prep For AI').item.json.summary }}",
        "messages": {
          "messageValues": [
            {
              "message": "=Given the following document summary, what questions would you ask to create a {{ $('For Each Doc Type...').item.json.title }} for the document? Generate 5 questions."
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.4
    },
    {
      "id": "ce3da55d-8c22-40bb-8781-63c2e6bcb824",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1960,
        380
      ],
      "parameters": {
        "width": 172.26820279743384,
        "height": 295.46359440513226,
        "content": "\uc5ec\uae30\uc5d0 \uc790\uc2e0\uc758 \ud15c\ud50c\ub9bf\uc744 \ucd94\uac00\ud558\uc138\uc694!"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "2secs": {
      "main": [
        [
          {
            "node": "For Each Doc Type...",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Prep For AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Discover": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate": {
      "main": [
        [
          {
            "node": "2secs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Settings": {
      "main": [
        [
          {
            "node": "Import File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Generate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Interview": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Discover",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "To Binary": {
      "main": [
        [
          {
            "node": "Export to Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Import File": {
      "main": [
        [
          {
            "node": "Get FileType",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep For AI": {
      "main": [
        [
          {
            "node": "Get Doc Types",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get FileType": {
      "main": [
        [
          {
            "node": "Extract from PDF",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract from DOCX",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract from TEXT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Doc Types": {
      "main": [
        [
          {
            "node": "Split Out Doc Types",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from PDF": {
      "main": [
        [
          {
            "node": "Prep Incoming Doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from DOCX": {
      "main": [
        [
          {
            "node": "Prep Incoming Doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from TEXT": {
      "main": [
        [
          {
            "node": "Prep Incoming Doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep Incoming Doc": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "main",
            "index": 0
          },
          {
            "node": "Summarization Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Local File Trigger": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split Out Doc Types": {
      "main": [
        [
          {
            "node": "For Each Doc Type...",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarization Chain": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "For Each Doc Type...": {
      "main": [
        [
          {
            "node": "Get Generated Documents",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Interview",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store1": {
      "ai_vectorStore": [
        [
          {
            "node": "Vector Store Retriever",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Vector Store Retriever": {
      "ai_retriever": [
        [
          {
            "node": "Discover",
            "type": "ai_retriever",
            "index": 0
          }
        ]
      ]
    },
    "Get Generated Documents": {
      "main": [
        [
          {
            "node": "To Binary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Item List Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Interview",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Mistral Cloud": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Interview",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Mistral Cloud1": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Summarization Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Discover",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Generate",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  }
}