8
n8n 中文网amn8n.com

使用 GPT-4、Claude 和 Apify 自动化网络研究,用于内容分析和洞察

高级

这是一个Market Research, AI RAG领域的自动化工作流,包含 42 个节点。主要使用 If, Set, Code, Merge, HttpRequest 等节点。 使用 GPT-4、Claude 和 Apify 自动化网络研究,用于内容分析和洞察

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
  • Anthropic API Key
  • Qdrant 服务器连接信息
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "6fb6c9a50faeb88c76c44b2fdb3a06e4272886afd55ba8d161b7b55a4373c282"
  },
  "nodes": [
    {
      "id": "896077ce-4f65-48ba-97d7-37acc18380be",
      "name": "RAG 网络浏览器",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2688,
        480
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/apify~rag-web-browser/run-sync-get-dataset-items",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ $json.output.apify_query }}",
        "sendBody": true,
        "sendQuery": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "memory",
              "value": "4096"
            },
            {
              "name": "timeout",
              "value": "500"
            }
          ]
        },
        "nodeCredentialType": "apifyApi"
      },
      "credentials": {
        "apifyApi": {
          "id": "h0YXN7yJFoEdC2YZ",
          "name": "Apify account"
        },
        "httpBearerAuth": {
          "id": "nTZj53tK0kH0omt5",
          "name": "Bearer Auth account"
        },
        "httpHeaderAuth": {
          "id": "2zSa7j9R3quiTmp0",
          "name": "Header Auth account"
        }
      },
      "executeOnce": true,
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "3cb7cf6d-6794-4f86-a92c-e0c0c03d3721",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -3536,
        576
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "712b058d-0182-4d0c-bb39-072eca45b712",
      "name": "当由另一个工作流执行时",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -3536,
        384
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "query"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "b9e3d2ca-958e-4de7-83ea-5cb27b55d552",
      "name": "设置节点",
      "type": "n8n-nodes-base.set",
      "position": [
        -3312,
        480
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1453fa8e-fff8-4380-a4d5-f8cc81d40cea",
              "name": "query",
              "type": "string",
              "value": "={{ $json.query }}"
            },
            {
              "id": "2df77d2d-3933-4e29-b73d-1144e78a9731",
              "name": "qdrant_url",
              "type": "string",
              "value": "http://qdrant:6333"
            },
            {
              "id": "d82929d0-f71f-45f3-b5d9-8e5b9ef95a9a",
              "name": "collection_name",
              "type": "string",
              "value": "web_pages"
            },
            {
              "id": "f5924297-071f-4997-a566-84f25142e680",
              "name": "max_results",
              "type": "number",
              "value": 10
            },
            {
              "id": "2b6cb255-15d8-4969-bfdf-a7e1412cf1b5",
              "name": "relevance_threshold",
              "type": "number",
              "value": 70
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7ba5e051-a0dd-4bd8-898b-19bbfa43b829",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -2896,
        704
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"primary_query\": \"string\",\n  \"alternative_queries\": [\"string\", \"string\"],\n  \"temporal_filter\": \"string or null\",\n  \"domain_context\": \"string\",\n  \"exclusion_terms\": [\"string\"],\n  \"search_filters\": {\n    \"inclusion_terms\": [\"string\"],\n    \"exclusion_terms\": [\"string\"],\n    \"site_filters\": {\n      \"include\": [\"site:...\"],\n      \"exclude\": [\"-site:...\"]\n    },\n    \"filetype_filters\": {\n      \"include\": [\"filetype:...\"],\n      \"exclude\": [\"-filetype:...\"]\n    }\n  },\n  \"advanced_search_suggestions\": {\n    \"boolean_operators\": \"string\",\n    \"proximity_search\": \"string\",\n    \"wildcard_usage\": \"string\",\n    \"date_range\": \"string\"\n  },\n  \"apify_query\": {\n    \"query\": \"FULL COMPOSED STRING\"\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "33edb913-0bfa-44e4-a81c-c1107e546c05",
      "name": "早期内容过滤器",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueRegularOutput",
      "position": [
        -1056,
        128
      ],
      "parameters": {
        "text": "=Research Query: {{ $json.query }}\n\nArticle to Evaluate:\n- Title: {{ $json.searchResult.title }}\n- URL: {{ $json.searchResult.url }}\n- Meta Description: {{ $json.searchResult.description }}\n\n- Content Preview: {{ $json.cleaned_text }}\n\nAssess this article for both relevance to the query and content quality.\n",
        "options": {
          "systemMessage": "You are a content evaluation specialist. Your job is to quickly assess whether scraped articles are worth processing for a research query.\n\nEvaluate both RELEVANCE and QUALITY simultaneously:\n\nRELEVANCE CRITERIA:\n- How well does the content address the research query?\n- Are key topics/entities from the query present?\n- Does the content provide actionable information for the query?\n\nQUALITY CRITERIA:\n- Content depth and substance (not just headlines/summaries)\n- Presence of facts, data, or expert insights\n- Source credibility indicators (author expertise, publication reputation)\n- Content freshness/recency if relevant to query\n- Proper article structure vs clickbait/listicle\n\nScore both aspects 0-100 and determine if content should proceed to full processing."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "e2cfb95e-6278-4daf-a73c-911fa7436510",
      "name": "结构化输出解析器1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -896,
        352
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"relevance\": {\n    \"score\": 85,\n    \"reasoning\": \"Directly addresses quantum computing threats mentioned in query\",\n    \"key_topics_matched\": [\"quantum computing\", \"encryption\", \"RSA\", \"2025\"],\n    \"query_coverage\": \"comprehensive\"\n  },\n  \"quality\": {\n    \"score\": 78,\n    \"content_depth\": \"substantial\",\n    \"has_citations\": true,\n    \"source_credibility\": \"high\",\n    \"content_type\": \"technical_analysis\",\n    \"freshness\": \"recent\"\n  },\n  \"decision\": {\n    \"process_further\": true,\n    \"combined_score\": 82,\n    \"reasoning\": \"High relevance with good quality sources and recent data\"\n  },\n  \"metadata\": {\n    \"article_type\": \"research_article\",\n    \"estimated_processing_value\": \"high\",\n    \"potential_issues\": []\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "b89271f7-7fe9-4d64-bf15-a239bd5bd6fc",
      "name": "重复检查",
      "type": "n8n-nodes-base.code",
      "position": [
        -1792,
        480
      ],
      "parameters": {
        "jsCode": "const qdrantUrl = $('Set Node').first().json.qdrant_url;\nconst collectionName = $('Set Node').first().json.collection_name;\n\nconst results = [];\n\nfor (const item of items) {\n  const url = item.json.searchResult.url;\n  let isDuplicate = false;\n  let duplicateType = null;\n  let existingDocId = null;\n  let skipProcessing = false;\n\n  try {\n    const response = await this.helpers.httpRequest({\n      method: 'POST',\n      url: `${qdrantUrl}/collections/${collectionName}/points/search`,\n      body: {\n        filter: {\n          must: [\n            {\n              key: \"metadata.doc_url\",\n              match: { value: url }\n            }\n          ]\n        },\n        limit: 1,\n        with_payload: true\n      },\n      headers: { 'Content-Type': 'application/json' }\n    });\n\n    if (response.result && response.result.length > 0) {\n      isDuplicate = true;\n      duplicateType = 'url';\n      existingDocId = response.result[0].payload.metadata.doc_id;\n      skipProcessing = true;\n    }\n  } catch (error) {\n    console.error('Error checking URL duplicates:', error);\n    // If error, just treat as not a duplicate\n  }\n\n  results.push({\n    json: {\n      ...item.json,\n      isDuplicate,\n      duplicateType,\n      existingDocId,\n      skipProcessing\n    }\n  });\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "703264ee-2dbc-4509-92e5-51bd437b43fc",
      "name": "标准化文本",
      "type": "n8n-nodes-base.code",
      "position": [
        -2016,
        480
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  const rawText = item.json.markdown;\n\n  // Clean up the text\n  let cleanedText = rawText\n    .replace(/!\\[.*?\\]\\(.*?\\)/g, '')      // Remove images\n    .replace(/\\[([^\\]]+)\\]\\(([^)]+)\\)/g, '$1 ($2)')  // [text](url) to text (url)\n    .replace(/^#+\\s?/gm, '')              // Remove headings\n    .replace(/\\*\\*|__|\\*|_/g, '')         // Remove bold/italic\n    .replace(/<[^>]+>/g, '')              // Remove HTML tags\n    .replace(/\\s+/g, ' ')\n    .trim();\n\n  // Normalize\n  let normalizedText = cleanedText\n    .toLowerCase()\n    .replace(/[^\\w\\s]/g, '')\n    .replace(/\\s+/g, ' ')\n    .trim();\n\n  // Copy everything but 'markdown'\n  const { markdown, ...rest } = item.json;\n\n  return {\n    json: {\n      ...rest,\n      cleaned_text: cleanedText,\n      normalized_text: normalizedText\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "94331904-b6d8-4852-af7b-c513f4ed0518",
      "name": "编辑字段5",
      "type": "n8n-nodes-base.set",
      "position": [
        -368,
        224
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8d439e60-244c-4cf9-8469-a3dfce3d3e87",
              "name": "title",
              "type": "string",
              "value": "={{ $('Processing').item.json.metadata.title }}"
            },
            {
              "id": "603bc577-9eb6-4d55-9f82-1efe561aa041",
              "name": "description",
              "type": "string",
              "value": "={{ $('Processing').item.json.metadata.description }}"
            },
            {
              "id": "9d6cd9da-8e47-4fba-a857-1f6144d9b96f",
              "name": "languageCode",
              "type": "string",
              "value": "={{ $('Processing').item.json.metadata.languageCode }}"
            },
            {
              "id": "12db9d37-690a-4448-8291-6751f8ace125",
              "name": "url",
              "type": "string",
              "value": "={{ $('Processing').item.json.metadata.url }}"
            },
            {
              "id": "f1f11539-fd23-4053-be01-c22191ca1151",
              "name": "resultType",
              "type": "string",
              "value": "={{ $('Processing').item.json.searchResult.resultType }}"
            },
            {
              "id": "158f5b8d-7ae8-4dd4-b256-0ec9d87f47ae",
              "name": "=rank",
              "type": "number",
              "value": "={{ $('Processing').item.json.searchResult.rank }}"
            },
            {
              "id": "39429b08-9e81-4239-80e4-84a1bc86950c",
              "name": "search_query",
              "type": "string",
              "value": "={{ $('Processing').item.json.search_query }}"
            },
            {
              "id": "2515a3d3-db74-41c0-bf65-a998c3f92356",
              "name": "cleaned_text",
              "type": "string",
              "value": "={{ $('Processing').item.json.cleaned_text }}"
            },
            {
              "id": "0d25ca54-ccf0-4160-a718-34d6ab14655f",
              "name": "normalized_text",
              "type": "string",
              "value": "={{ $('Processing').item.json.normalized_text }}"
            },
            {
              "id": "2e407ec6-6b15-4f86-b5b9-be1097544fcb",
              "name": "query",
              "type": "string",
              "value": "={{ $('Processing').item.json.query }}"
            },
            {
              "id": "e9109b83-2940-47e6-931a-f459e1c36679",
              "name": "search_query",
              "type": "string",
              "value": "={{ $('Processing').item.json.search_query }}"
            },
            {
              "id": "d1a07815-e34d-44b6-8b63-40352816ef10",
              "name": "relevance_score",
              "type": "number",
              "value": "={{ $json.output.relevance.score }}"
            },
            {
              "id": "d4a6d47f-c0b1-46e9-bbea-2554aba44bd7",
              "name": "relevance_reasoning",
              "type": "string",
              "value": "={{ $json.output.relevance.reasoning }}"
            },
            {
              "id": "2d1ccc2a-9eae-432e-bb5c-947d8cac8a70",
              "name": "key_topics_matched",
              "type": "array",
              "value": "={{ $json.output.relevance.key_topics_matched }}"
            },
            {
              "id": "e307f96d-ae17-485a-92e2-9c9c7356bb50",
              "name": "query_coverage",
              "type": "string",
              "value": "={{ $json.output.relevance.query_coverage }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ee5d5656-db60-4d01-8764-d5ce67b896ae",
      "name": "结构化输出解析器3",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        16,
        656
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"array\",\n  \"items\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"claim\": { \"type\": \"string\" },\n      \"evidence\": { \"type\": \"string\" },\n      \"source\": { \"type\": \"string\", \"format\": \"uri\" },\n      \"external_source\": { \"type\": \"boolean\" },\n      \"external_url\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" }\n    },\n    \"required\": [\"claim\", \"evidence\", \"source\"]\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "a1afc127-9f55-4626-a468-51ff429528ed",
      "name": "结构化输出解析器7",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        16,
        144
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"title\": { \"type\": \"string\" },\n    \"url\": { \"type\": \"string\", \"format\": \"uri\" },\n    \"summary\": { \"type\": \"string\" }\n  },\n  \"required\": [\"title\", \"url\", \"summary\"]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "b9c17bd7-efb3-4abd-8817-693c311fb3d9",
      "name": "洞察提取",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueRegularOutput",
      "position": [
        -144,
        432
      ],
      "parameters": {
        "text": "=Research Question:\n{{ $json.query }}\n\nCleaned Article Text:\n{{ $json.cleaned_text }}\n\nArticle Metadata:\nTitle: {{ $json.title }}\nURL: {{ $json.url }}\n\nInstructions:\n\t1.\tCarefully read the cleaned article text above.\n\t2.\tExtract every explicit statement, claim, or recommendation that answers the research question.\n\t3.\tFor each, copy the exact phrase or sentence that supports your extraction.\n\t4.\tIf possible, prioritize claims that are well-supported, recent, or come from an official or credible source.\n\t5.\tFor each claim, determine if it relies on an external source or citation (such as a third-party report, survey, government statistic, or external research referenced in the article). If so, provide the external source’s name and direct URL. If not, indicate that the claim is not based on an external source.\n\t6.\tDo not include information unrelated to the question.",
        "options": {
          "systemMessage": "You are a research assistant tasked with extracting direct, answer-focused insights from business or technical articles.\n\nYour instructions:\n• Review the user’s research question and the provided article text.\n• Identify all passages that directly answer or provide guidance about the question.\n• For each insight:\n • Write a concise, declarative claim in your own words (1–2 sentences).\n • Provide the most relevant supporting quote, paraphrased sentence, or data as evidence (taken from the article).\n • Include the article’s URL as the source.\n • Determine if the claim is based on an external source (such as a survey, report, research, or statistic cited from outside the article’s publisher). If so, set \"external_source\": true and provide the external source’s direct URL in \"external_url\" (if available). Otherwise, set \"external_source\": false and \"external_url\": null.\n• Only return information supported by the article and directly related to the research question."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "46348aab-34c9-49aa-a2fe-630f8db91fcf",
      "name": "摘要生成",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueRegularOutput",
      "position": [
        -144,
        -80
      ],
      "parameters": {
        "text": "=Research Question:\n{{ $json.query }}\n\nCleaned Article Text:\n{{ $json.cleaned_text }}\n\nArticle Metadata:\nTitle: {{ $json.title }}\nURL: {{ $json.url }}\n\nInstructions:\n\t•\tRead the article and metadata above.\n\t•\tSummarize the main points that directly address the research question.\n\t•\tYour summary should be 2–3 sentences, original wording, and user-friendly.\n\t•\tDo not include unrelated information or a general summary—stick to the research question.",
        "options": {
          "systemMessage": "You are a research assistant. Your job is to write a concise, 2–3 sentence summary of each article, focusing only on information that answers or supports the user’s research question.\n\nInstructions:\n\t•\tUse the article’s cleaned text and metadata.\n\t•\tSummarize only the information that is clearly relevant to the research question—ignore everything else.\n\t•\tWrite the summary in clear, contemporary American English.\n\t•\tThe summary should be easy to read and useful for a non-technical business reader.\n\t•\tOutput a valid JSON object with these fields:\n\t•\ttitle (string)\n\t•\turl (string)\n\t•\tsummary (string; 2–3 sentences)\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "executeOnce": false,
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "58908562-f8a4-45d2-a267-f938ce1810b3",
      "name": "结构化输出解析器9",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        640,
        144
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"array\",\n  \"items\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"summary\": {\n        \"type\": \"string\",\n        \"description\": \"A concise summary of the article as it relates to the research question\"\n      },\n      \"article_title\": {\n        \"type\": \"string\",\n        \"description\": \"The title of the summarized article\"\n      },\n      \"url\": {\n        \"type\": \"string\",\n        \"format\": \"uri\",\n        \"description\": \"The URL of the original article\"\n      },\n      \"rank\": {\n        \"type\": \"integer\",\n        \"description\": \"The relevance rank of this summary (1 = most relevant)\"\n      },\n      \"reason_for_ranking\": {\n        \"type\": \"string\",\n        \"description\": \"Explanation for why this summary was ranked at this position\"\n      }\n    },\n    \"required\": [\n      \"summary\",\n      \"article_title\",\n      \"url\",\n      \"rank\",\n      \"reason_for_ranking\"\n    ]\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "94893703-0d43-4d75-a345-3e3acd2d0e09",
      "name": "结构化输出解析器10",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        640,
        656
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"array\",\n  \"items\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"claim\": {\n        \"type\": \"string\",\n        \"description\": \"A concise, declarative statement answering the research question.\"\n      },\n      \"evidence\": {\n        \"type\": \"string\",\n        \"description\": \"Direct supporting quote or data from the article.\"\n      },\n      \"source\": {\n        \"type\": \"string\",\n        \"format\": \"uri\",\n        \"description\": \"URL of the article or external source.\"\n      },\n      \"rank\": {\n        \"type\": \"integer\",\n        \"description\": \"Ranking of this claim's relevance (1 = most relevant).\"\n      },\n      \"reason_for_ranking\": {\n        \"type\": \"string\",\n        \"description\": \"Short explanation for why this claim received its rank.\"\n      },\n      \"external_source\": {\n        \"type\": \"boolean\",\n        \"description\": \"True if the claim is based on a source external to the article; otherwise false.\"\n      },\n      \"external_url\": {\n        \"type\": [\"string\", \"null\"],\n        \"description\": \"URL of the external source if external_source is true; otherwise null.\"\n      }\n    },\n    \"required\": [\n      \"claim\",\n      \"evidence\",\n      \"source\",\n      \"rank\",\n      \"reason_for_ranking\"\n    ]\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "356396a6-0405-452b-840a-3aaa30be2f2f",
      "name": "提取声明的聚合和排名",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueRegularOutput",
      "position": [
        480,
        432
      ],
      "parameters": {
        "text": "=You are given a list of extracted claims about the following research question:\n\nResearch Question: {{ $('Edit Fields5').first().json.query }}\n\nClaims:\n{{ JSON.stringify($json.claims, null, 2) }}\n\nInstructions:\n  1. Review all claims provided above.\n  2. Compare the quality, specificity, evidence, and authority of each claim in relation to the research question.\n  3. Rank all claims from most to least relevant, prioritizing those that are clear, well-supported, and sourced from highly credible or recent articles.\n  4. If multiple claims repeat the same point, cluster them and keep only the best representative claim.\n  5. Return a final list of the top 3 most relevant, unique claims (if more than three exist), with each claim including its text, supporting evidence, article URL, and your reason for its ranking.",
        "options": {
          "systemMessage": "You are an evidence synthesis expert. Your job is to review a collection of extracted claims about a business or technical topic, rank them by their usefulness to the research question, and remove duplicates.\n\nInstructions:\n  • Read all claims for their directness, evidence, and relevance to the research question.\n  • Prioritize claims from well-known, reputable, or recent sources, and those with strong supporting evidence.\n  • Remove any duplicate or redundant entries, keeping only the strongest and clearest version of each unique point.\n  • Rank the top three claims and explain why you selected them.\n  • Return your output as a valid JSON array of objects with: claim, evidence, source, rank (1-3), and reason_for_ranking."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "executeOnce": false,
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "9c5083fe-7551-4b31-bc1d-f43be017f8f7",
      "name": "提取摘要的聚合和排名",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueRegularOutput",
      "position": [
        480,
        -80
      ],
      "parameters": {
        "text": "=You are given a list of article summaries about the following research question:\n\nResearch Question:{{ $('Edit Fields5').first().json.query }}\n\n\nSummaries:\n{{ JSON.stringify($json.summaries, null, 2) }}\n\nInstructions:\n\t1.\tReview all summaries provided above.\n\t2.\tCompare the quality, relevance, and authority of each summary in relation to the research question.\n\t3.\tRank all summaries from most to least relevant, prioritizing those that are concise, well-supported, and sourced from highly credible or recent articles.\n\t4.\tIf multiple summaries repeat the same point, cluster them and keep only the best representative summary.\n\t5.\tReturn a final list of the top 3 most relevant, unique summaries (if more than three exist), with each summary including its article title, URL, and your reason for its ranking.",
        "options": {
          "systemMessage": "You are an evidence synthesizer and summarization expert. Your job is to review a collection of article summaries about a business or technical topic, rank them by their usefulness to the research question, and remove duplicates.\n\nInstructions:\n\t•\tRead all summaries for their directness, clarity, and relevance to the question.\n\t•\tPrioritize summaries from well-known, reputable, or recent sources.\n\t•\tRemove any duplicates or redundant entries, keeping only the strongest and clearest version of each unique point.\n\t•\tRank the top three summaries and explain why you selected them.\n\t•\tReturn your output as a valid JSON array of objects with: summary, article_title, url, rank (1-3), and reason_for_ranking."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "executeOnce": false,
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "bc0d58dc-9818-4b46-8ecc-130b957ecb3a",
      "name": "保存",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        -1104,
        736
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "qdrantCollection": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Set Node').item.json.collection_name }}"
        },
        "embeddingBatchSize": 1
      },
      "credentials": {
        "qdrantApi": {
          "id": "1rlzgQcdRysKi0oS",
          "name": "QdrantApi account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "5665bd97-7041-4e0a-bc39-38fe5a5e7542",
      "name": "嵌入 Ollama1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "position": [
        -1120,
        960
      ],
      "parameters": {
        "model": "nomic-embed-text:latest"
      },
      "credentials": {
        "ollamaApi": {
          "id": "u58LNTOTwwLnJzt9",
          "name": "Ollama account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "cc339d87-199c-43fd-9da1-e0a7156f51f1",
      "name": "字符文本分割器2",
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "position": [
        -896,
        1168
      ],
      "parameters": {
        "chunkSize": 3000,
        "chunkOverlap": 200
      },
      "typeVersion": 1
    },
    {
      "id": "5cd4b848-6cd2-40b4-a792-170732010342",
      "name": "Default Data Loader2",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        -992,
        960
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "=url",
                "value": "={{ $json.searchResult.url }}"
              },
              {
                "name": "title",
                "value": "={{ $json.searchResult.title }}"
              },
              {
                "name": "description",
                "value": "={{ $json.searchResult.description }}"
              }
            ]
          }
        },
        "jsonData": "={{ $json.normalized_text }}",
        "jsonMode": "expressionData",
        "textSplittingMode": "custom"
      },
      "typeVersion": 1.1
    },
    {
      "id": "c173f56c-eb63-454c-a748-719074050d2b",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -3088,
        704
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "Y8ZxcY3KmZ6Zqrd2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5a0cd20d-e2e7-4c63-a6e2-15d1b46a253e",
      "name": "OpenAI 聊天模型4",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -112,
        144
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "Y8ZxcY3KmZ6Zqrd2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c5002eea-9568-4db9-8485-408edda7d15f",
      "name": "OpenAI 聊天模型5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -112,
        656
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "Y8ZxcY3KmZ6Zqrd2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "67fa92e1-f1c8-4de8-a545-6f45ac34b5c1",
      "name": "OpenAI 聊天模型6",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        512,
        144
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "Y8ZxcY3KmZ6Zqrd2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "23faa796-f45f-4d28-a1b2-420a8922fa07",
      "name": "OpenAI 聊天模型7",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        512,
        656
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "Y8ZxcY3KmZ6Zqrd2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3160e68f-b115-46a2-a524-4a29f87f4462",
      "name": "智能查询构建器",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueRegularOutput",
      "position": [
        -3088,
        480
      ],
      "parameters": {
        "text": "=Analyze and optimize this research query for RAG retrieval: {{ $json.query }}\n{% if prior_query %}\nPrevious attempt: {{ $json.prior_query }}\nFailure reason: {{ $json.failure_details }}\n{% endif %}\nReturn JSON only in Apify format.",
        "options": {
          "systemMessage": "=You are an expert research query optimizer for a RAG system using Google Search API. Transform user queries into highly effective search strings that maximize relevant, authoritative document retrieval.\n\nCore Principles:\n- Extract key entities and concepts\n- Target authoritative sources when possible\n- Use precise search operators\n- Filter out noise and unreliable sources\n\nSearch Operators:\n- Exact phrase: \"search term\"\n- Boolean: AND, OR, NOT\n- Inclusion: +term\n- Exclusion: -term\n- Site specific: site:domain.com\n- File type: filetype:pdf\n\nAlways Exclude:\n-site:quora.com -site:reddit.com -site:pinterest.com -site:medium.com -site:facebook.com -site:twitter.com -site:linkedin.com -site:youtube.com -site:wattpad.com -site:fandom.com -site:stackoverflow.com -site:chegg.com -site:brainly.com -site:tumblr.com -site:scribd.com -site:slideshare.net -site:weebly.com -site:wix.com -site:blogspot.com -site:wordpress.com -site:tripadvisor.com -site:yelp.com -site:ebay.com -site:aliexpress.com\n\nFor non-product queries also exclude:\n-site:amazon.com -site:bestbuy.com -site:walmart.com -site:newegg.com -site:alibaba.com -site:bhphotovideo.com -site:etsy.com -site:target.com\n\nStrategy:\n1. Identify authoritative sources for the topic (academic, government, industry leaders)\n2. Use exact phrases for critical concepts\n3. Include technical/formal terminology alongside common terms\n4. Apply site: operators for known authoritative domains\n5. Use filetype:pdf for research papers and official reports\n\nOutput Format (Apify Google Search):\n{\n  \"queries\": \"optimized search query with all operators and exclusions\",\n  \"resultsPerPage\": 10,\n  \"maxPagesPerQuery\": 1,\n  \"languageCode\": \"en\",\n  \"countryCode\": \"us\",\n  \"customDataFunction\": \"async ({ input, $, request, response, html }) => { return {}; }\"\n}\n\nReturn ONLY the JSON object. No explanations."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "25c5161a-3e17-4399-8dc7-d75a570bd248",
      "name": "无错误时继续",
      "type": "n8n-nodes-base.if",
      "position": [
        -2464,
        480
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "62a81f7e-77cd-496e-8366-1b489bc6d061",
              "operator": {
                "type": "number",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.crawl.httpStatusCode }}",
              "rightValue": 500
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c17d00b7-e06c-4228-b16a-49763fdd99de",
      "name": "Markdown 清理器",
      "type": "n8n-nodes-base.code",
      "position": [
        -2240,
        480
      ],
      "parameters": {
        "jsCode": "// Process all items in the input array, returning one output per input.\nreturn items.map(item => {\n  const md = item.json.markdown;\n\n  let cleanedMarkdown = md;\n\n  // If markdown is missing or not a string, return empty cleaned_markdown\n  if (!cleanedMarkdown || typeof cleanedMarkdown !== \"string\") {\n    return {\n      json: {\n        ...item.json,\n        cleaned_markdown: \"\"\n      }\n    };\n  }\n\n  // Remove junk and navigation/footer content\n  cleanedMarkdown = cleanedMarkdown\n    .replace(/\\[Skip to main content\\]\\([^)]+\\)/gi, '')\n    .replace(/Menu\\s*\\n+/gi, '')\n    .replace(/An official website of the United States government[\\s\\S]+?Here’s how you know/gi, '')\n    .replace(/Here’s how you know[\\s\\S]+?(?=\\n#|$)/gi, '')\n    .replace(/^\\s*#+\\s*About the author[\\s\\S]+$/gmi, '')\n    .replace(/!\\[.*?\\]\\(.*?\\)/g, '')        // Remove images\n    .replace(/^[-*_]{3,}\\s*$/gm, '')        // Remove horizontal rules\n    .replace(/^\\s*[\\r\\n]/gm, '')            // Remove empty lines\n    .replace(/\\n{2,}/g, '\\n')               // Remove repeated blank lines\n    .trim();\n\n  // Convert [text](url) links to \"text (url)\"\n  cleanedMarkdown = cleanedMarkdown.replace(/\\[([^\\]]+?)\\]\\((https?:\\/\\/[^\\)]+)\\)/g, '$1 ($2)');\n\n  // Remove reference-style links [1], [a], etc.\n  cleanedMarkdown = cleanedMarkdown.replace(/\\[[^\\]]{1,3}\\]/g, '');\n\n  // Remove HTML tags\n  cleanedMarkdown = cleanedMarkdown.replace(/<[^>]+>/g, '');\n\n  // Normalize extra whitespace\n  cleanedMarkdown = cleanedMarkdown.replace(/[ \\t]+/g, ' ').replace(/\\n{2,}/g, '\\n').trim();\n\n  return {\n    json: {\n      ...item.json,\n      markdown: cleanedMarkdown\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "e45b29d1-5eba-4c9a-ba38-848ebac5f5b7",
      "name": "设置值",
      "type": "n8n-nodes-base.set",
      "position": [
        -1568,
        480
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ebf46179-7f07-4cd4-8415-420c00be08d8",
              "name": "crawl",
              "type": "object",
              "value": "={{ $json.crawl }}"
            },
            {
              "id": "d403c817-de3a-4613-96e7-2d4214fdc20f",
              "name": "searchResult",
              "type": "object",
              "value": "={{ $json.searchResult }}"
            },
            {
              "id": "f575e3ae-91a1-4282-8ff3-d68c0f07d3c5",
              "name": "metadata",
              "type": "object",
              "value": "={{ $json.metadata }}"
            },
            {
              "id": "6e4913d9-a4a2-4efd-a067-e94728fce700",
              "name": "search_query",
              "type": "string",
              "value": "={{ $json.query }}"
            },
            {
              "id": "906ae656-45f1-4b2a-bfcc-0a4ce7eb5e4c",
              "name": "cleaned_text",
              "type": "string",
              "value": "={{ $json.cleaned_text }}"
            },
            {
              "id": "f273fa2f-ec47-4fa3-a7dd-2317125328ff",
              "name": "normalized_text",
              "type": "string",
              "value": "={{ $json.normalized_text }}"
            },
            {
              "id": "a6150203-0a37-4e6c-82ce-ca50dbd29580",
              "name": "isDuplicate",
              "type": "boolean",
              "value": "={{ $json.isDuplicate }}"
            },
            {
              "id": "18291c02-5d44-4212-a26b-11ee166d7bc0",
              "name": "duplicateType",
              "type": "string",
              "value": "={{ $json.duplicateType }}"
            },
            {
              "id": "0fc772d6-e15b-4a13-9244-7b9596ed1d6d",
              "name": "existingDocId",
              "type": "string",
              "value": "={{ $json.existingDocId }}"
            },
            {
              "id": "f66c54b7-f3f6-4021-b35b-50d0cad9ca27",
              "name": "skipProcessing",
              "type": "boolean",
              "value": "={{ $json.skipProcessing }}"
            },
            {
              "id": "af332664-df9a-4443-9c7f-ec08792339e8",
              "name": "query",
              "type": "string",
              "value": "={{ $('Set Node').item.json.query }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f66b6480-9ab8-464b-b584-5e3c9df2ce3f",
      "name": "处理中",
      "type": "n8n-nodes-base.if",
      "onError": "continueRegularOutput",
      "position": [
        -1344,
        480
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e4b92d47-7d99-404a-a39c-39b2b0c104e1",
              "operator": {
                "type": "boolean",
                "operation": "false",
                "singleValue": true
              },
              "leftValue": "={{ $json.skipProcessing }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "5172c4ca-4ea3-4499-923a-3b2c28ff8f5f",
      "name": "继续处理",
      "type": "n8n-nodes-base.if",
      "position": [
        -592,
        224
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "4a7f0a85-ddca-4a36-b16c-6515f298d6cb",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.output.decision.process_further }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0636cd56-4bf0-4149-b828-2816f4569486",
      "name": "聚合摘要",
      "type": "n8n-nodes-base.code",
      "position": [
        256,
        -80
      ],
      "parameters": {
        "jsCode": "// Aggregate all input items under \"summaries\"\nreturn [\n  {\n    json: {\n      summaries: items.map(i => i.json.output)\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "6093bcb1-2cc5-410c-96f2-73d7ffe70aeb",
      "name": "聚合输出",
      "type": "n8n-nodes-base.code",
      "position": [
        256,
        432
      ],
      "parameters": {
        "jsCode": "// Aggregate all input items under \"summaries\"\nreturn [\n  {\n    json: {\n      claims: items.map(i => i.json.output)\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "4c6eba72-fc45-443b-b7ed-ff1327050d26",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        880,
        224
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "32591a9b-50b3-4085-b4d9-66d64aba5e04",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4128,
        48
      ],
      "parameters": {
        "width": 460,
        "height": 960,
        "content": "## 试试看!"
      },
      "typeVersion": 1
    },
    {
      "id": "ac813f64-38f8-47b7-a6c1-bb06c0cc6c74",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3152,
        240
      ],
      "parameters": {
        "width": 400,
        "height": 624,
        "content": "## 智能查询构建器"
      },
      "typeVersion": 1
    },
    {
      "id": "37d2265f-1594-49d9-8f8f-7314a900786b",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1184,
        592
      ],
      "parameters": {
        "width": 496,
        "height": 736,
        "content": "保存页面以供将来参考"
      },
      "typeVersion": 1
    },
    {
      "id": "59c7171b-8a5f-434e-898d-5cb0792ca7ad",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        -128
      ],
      "parameters": {
        "width": 368,
        "height": 656,
        "content": "## 早期内容过滤器"
      },
      "typeVersion": 1
    },
    {
      "id": "540d6ce9-9274-4389-88e1-a1f231fe0ceb",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -240
      ],
      "parameters": {
        "width": 1024,
        "height": 1072,
        "content": "## 内容分析与洞察排名"
      },
      "typeVersion": 1
    },
    {
      "id": "352d6e95-35ec-4a16-80ec-5c6b7ce0cf5f",
      "name": "Anthropic 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -1056,
        352
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-20250514",
          "cachedResultName": "Claude 4 Sonnet"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "id": "neUytnXv9lE0Rzht",
          "name": "Anthropic account"
        }
      },
      "typeVersion": 1.3
    }
  ],
  "pinData": {
    "When clicking ‘Execute workflow’": [
      {
        "query": "How do I Build AI Sentiment Analysis with n8n?"
      }
    ]
  },
  "connections": {
    "Set Node": {
      "main": [
        [
          {
            "node": "Smart Query Builder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Processing": {
      "main": [
        [
          {
            "node": "Early Content Filter",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Values": {
      "main": [
        [
          {
            "node": "Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields5": {
      "main": [
        [
          {
            "node": "Insight Extraction",
            "type": "main",
            "index": 0
          },
          {
            "node": "Summarization",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarization": {
      "main": [
        [
          {
            "node": "Aggregate Summaries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize text": {
      "main": [
        [
          {
            "node": "Duplicate Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Duplicate Check": {
      "main": [
        [
          {
            "node": "Set Values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RAG Web Browser": {
      "main": [
        [
          {
            "node": "Continue of No Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Output": {
      "main": [
        [
          {
            "node": "aggregation and ranking of extracted claims",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Markdown Cleaner": {
      "main": [
        [
          {
            "node": "Normalize text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Smart Query Builder",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Ollama1": {
      "ai_embedding": [
        [
          {
            "node": "Save",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Insight Extraction": {
      "main": [
        [
          {
            "node": "Aggregate Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "Summarization",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model5": {
      "ai_languageModel": [
        [
          {
            "node": "Insight Extraction",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model6": {
      "ai_languageModel": [
        [
          {
            "node": "aggregation and ranking of extracted summaries",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model7": {
      "ai_languageModel": [
        [
          {
            "node": "aggregation and ranking of extracted claims",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Summaries": {
      "main": [
        [
          {
            "node": "aggregation and ranking of extracted summaries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Continue Processing": {
      "main": [
        [
          {
            "node": "Edit Fields5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Smart Query Builder": {
      "main": [
        [
          {
            "node": "RAG Web Browser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Early Content Filter",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Continue of No Error": {
      "main": [
        [
          {
            "node": "Markdown Cleaner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader2": {
      "ai_document": [
        [
          {
            "node": "Save",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Early Content Filter": {
      "main": [
        [
          {
            "node": "Continue Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Character Text Splitter2": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader2",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Smart Query Builder",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Early Content Filter",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser3": {
      "ai_outputParser": [
        [
          {
            "node": "Insight Extraction",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser7": {
      "ai_outputParser": [
        [
          {
            "node": "Summarization",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser9": {
      "ai_outputParser": [
        [
          {
            "node": "aggregation and ranking of extracted summaries",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser10": {
      "ai_outputParser": [
        [
          {
            "node": "aggregation and ranking of extracted claims",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Set Node",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Set Node",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "aggregation and ranking of extracted claims": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "aggregation and ranking of extracted summaries": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 市场调研, AI RAG 检索增强

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量42
分类2
节点类型16
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 查看

分享此工作流