我的智能体竞技场社区竞赛
高级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 41 个节点。主要使用 Set, Code, Wait, Filter, Evaluation 等节点。 使用Qdrant、Mistral OCR和GPT-4构建基于RAG的问答系统
前置要求
- •Google Drive API 凭证
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
- •Qdrant 服务器连接信息
使用的节点 (41)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "9wQdbEN53X1Q78fl",
"meta": {
"instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
"templateCredsSetupCompleted": true
},
"name": "我的智能体竞技场社区竞赛",
"tags": [],
"nodes": [
{
"id": "ff9d2c01-8f8b-4e2b-927a-68e73a048a50",
"name": "仅当我们在评估时",
"type": "n8n-nodes-base.evaluation",
"position": [
-176,
336
],
"parameters": {
"operation": "checkIfEvaluating"
},
"typeVersion": 4.7
},
{
"id": "061e124c-c05a-4d8e-be34-5e3894d5afc9",
"name": "评估输入",
"type": "n8n-nodes-base.set",
"position": [
-1392,
320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "91a79047-f1c3-4b16-921e-0c8a45c43320",
"name": "chatInput",
"type": "string",
"value": "={{ $json.question }}"
},
{
"id": "56cb3f48-70b0-4737-b4cd-8563fdd28455",
"name": "sessionId",
"type": "string",
"value": "=pureEval-{{ Math.round(Math.random()*1000) }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "1b9691ad-a118-4c57-a970-6dae65cf4f6a",
"name": "评估集",
"type": "n8n-nodes-base.evaluationTrigger",
"position": [
-1600,
320
],
"parameters": {
"filtersUI": {
"values": [
{
"lookupColumn": "agent answer"
}
]
},
"limitRows": true,
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ed0c-Nt4BTETlbwpCA3oTdp7Z_-h1om2tJGasOpPvbo/edit#gid=0",
"cachedResultName": "Eval"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ed0c-Nt4BTETlbwpCA3oTdp7Z_-h1om2tJGasOpPvbo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ed0c-Nt4BTETlbwpCA3oTdp7Z_-h1om2tJGasOpPvbo/edit?usp=drivesdk",
"cachedResultName": "Public Agentic Arena Evaluation Set"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "JYR6a64Qecd6t8Hb",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "2f3235df-a66a-4ac2-82b3-38b58985357e",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
96
],
"parameters": {
"color": 4,
"width": 1024,
"height": 560,
"content": "## 正确性评估"
},
"typeVersion": 1
},
{
"id": "aadf0db5-676b-47c0-99ef-12f9b14aaffe",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1648,
208
],
"parameters": {
"color": 4,
"width": 656,
"height": 288,
"content": "## 评估输入"
},
"typeVersion": 1
},
{
"id": "98e04e20-12dc-4d2b-947f-5dc54ba9abc0",
"name": "响应聊天",
"type": "@n8n/n8n-nodes-langchain.chat",
"position": [
304,
512
],
"parameters": {
"message": "={{ $json.output }}",
"options": {}
},
"typeVersion": 1
},
{
"id": "adf0d271-cae7-4aa7-b8fd-e58a3d4fd4af",
"name": "过滤空行",
"type": "n8n-nodes-base.filter",
"position": [
-1184,
320
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9eab8192-200a-4520-afe9-b13c14cd000c",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.chatInput }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "ac63265e-e361-4df3-9a32-4f3aca4d504f",
"name": "保存评估",
"type": "n8n-nodes-base.evaluation",
"position": [
560,
272
],
"parameters": {
"outputs": {
"values": [
{
"outputName": "correctness",
"outputValue": "={{ $json.Correctness }}"
},
{
"outputName": "agent answer",
"outputValue": "={{ $('AI Agent').item.json.output }}"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1D1P_B70KYuzLXVhSFGd6t19Q2u7msEenvhUqajwLw7k/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ed0c-Nt4BTETlbwpCA3oTdp7Z_-h1om2tJGasOpPvbo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ed0c-Nt4BTETlbwpCA3oTdp7Z_-h1om2tJGasOpPvbo/edit?usp=drivesdk",
"cachedResultName": "Public Agentic Arena Evaluation Set"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "JYR6a64Qecd6t8Hb",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "baac5f6a-46ab-4207-94c0-cc2445c3a0aa",
"name": "运行评估",
"type": "n8n-nodes-base.evaluation",
"position": [
208,
272
],
"parameters": {
"prompt": "You are an expert factual evaluator assessing the accuracy of answers compared to established ground truths.\n\nEvaluate the factual correctness of a given output compared to the provided ground truth on a scale from 1 to 5. Use detailed reasoning to thoroughly analyze all claims before determining the final score.\n\n# Scoring Criteria\n\n- 5: Highly similar - The output and ground truth are nearly identical, with only minor, insignificant differences.\n- 4: Somewhat similar - The output is largely similar to the ground truth but has few noticeable differences.\n- 3: Moderately similar - There are some evident differences, but the core essence is captured in the output.\n- 2: Slightly similar - The output only captures a few elements of the ground truth and contains several differences.\n- 1: Not similar - The output is significantly different from the ground truth, with few or no matching elements.\n- 0: Not similar at all – The outpus is completely different from the ground truth or not provided. Like nothings is matching.\n\nEvery correct Citation (ideally exact) inside of the Output that matches the provided ground truth is a strong boost for a good score. Also important: A Citation DOES NOT require to be in square brackets. Correct Text is perfectly fine.\n\n# Evaluation Steps\n\n1. Identify and list the key elements present in both the output and the ground truth.\n2. Compare these key elements to evaluate their similarities and differences, considering both content and structure.\n3. Analyze the semantic meaning conveyed by both the output and the ground truth, noting any significant deviations.\n4. Consider factual accuracy of specific details, including names, dates, numbers, and relationships.\n5. Assess whether the output maintains the factual integrity of the ground truth, even if phrased differently.\n6. Determine the overall level of similarity and accuracy according to the defined criteria.\n7. Check if the Citation of Source is provided and matches the original source of the ground truth.\n\n# Output Format\n\nProvide:\n- A detailed analysis of the comparison (extended reasoning)\n- A one-sentence summary highlighting key differences (not similarities)\n- The final similarity score as an integer (0, 1, 2, 3, 4, or 5)\n\nAlways follow the JSON format below and return nothing else:\n{\n \"extended_reasoning\": \"<detailed step-by-step analysis of factual accuracy and similarity>\",\n \"reasoning_summary\": \"<one sentence summary focusing on key differences>\",\n \"score\": <number: integer from 1 to 5>,\n \"expected_citation\": \"<exact correct citation of the source like in expected answer>\",\n}\n\n# Examples\n\n**Example 1:**\n\nInput:\n- Output: \"The cat sat on the mat.\"\n- Ground Truth: \"The feline is sitting on the rug.\"\n\nExpected Output:\n{\n \"extended_reasoning\": \"I need to compare 'The cat sat on the mat' with 'The feline is sitting on the rug.' First, let me identify the key elements: both describe an animal ('cat' vs 'feline') in a position ('sat' vs 'sitting') on a surface ('mat' vs 'rug'). The subject is semantically identical - 'cat' and 'feline' refer to the same animal. The action is also semantically equivalent - 'sat' and 'sitting' both describe the same position, though one is past tense and one is present continuous. The location differs in specific wording ('mat' vs 'rug') but both refer to floor coverings that serve the same function. The basic structure and meaning of both sentences are preserved, though they use different vocabulary and slightly different tense. The core information being conveyed is the same, but there are noticeable wording differences.\",\n \"reasoning_summary\": \"The sentences differ in vocabulary choice ('cat' vs 'feline', 'mat' vs 'rug') and verb tense ('sat' vs 'is sitting').\",\n \"score\": 3\n}\n\n**Example 2:**\n\nInput:\n- Output: \"The quick brown fox jumps over the lazy dog.\"\n- Ground Truth: \"A fast brown animal leaps over a sleeping canine.\"\n\nExpected Output:\n{\n \"extended_reasoning\": \"I need to compare 'The quick brown fox jumps over the lazy dog' with 'A fast brown animal leaps over a sleeping canine.' Starting with the subjects: 'quick brown fox' vs 'fast brown animal'. Both describe the same entity (a fox is a type of animal) with the same attributes (quick/fast and brown). The action is described as 'jumps' vs 'leaps', which are synonymous verbs describing the same motion. The object in both sentences is a dog, described as 'lazy' in one and 'sleeping' in the other, which are related concepts (a sleeping dog could be perceived as lazy). The structure follows the same pattern: subject + action + over + object. The sentences convey the same scene with slightly different word choices that maintain the core meaning. The level of specificity differs slightly ('fox' vs 'animal', 'dog' vs 'canine'), but the underlying information and imagery remain very similar.\",\n \"reasoning_summary\": \"The sentences use different but synonymous terminology ('quick' vs 'fast', 'jumps' vs 'leaps', 'lazy' vs 'sleeping') and varying levels of specificity ('fox' vs 'animal', 'dog' vs 'canine').\",\n \"score\": 4\n}\n\n# Notes\n\n- Focus primarily on factual accuracy and semantic similarity, not writing style or phrasing differences.\n- Identify specific differences rather than making general assessments.\n- Pay special attention to dates, numbers, names, locations, and causal relationships when present.\n- Consider the significance of each difference in the context of the overall information.\n- Be consistent in your scoring approach across different evaluations.\n- Value the Citation if correct. False Citation is a negative factor. A missing Citation is strong negative factor.",
"options": {},
"operation": "setMetrics",
"actualAnswer": "={{ $json.output || \"No output provided.\" }}",
"expectedAnswer": "={{ $('Eval Set').item.json.answer }}"
},
"typeVersion": 4.7
},
{
"id": "f9b69d7f-87c5-412e-844f-b198aa7b64d0",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
160
],
"parameters": {
"content": "## 连接你自己的Google表格以保存输出"
},
"typeVersion": 1
},
{
"id": "56ade4de-8554-4a50-9a9c-e0a9f4ad30b0",
"name": "LLM作为评判者",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
576,
496
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "gpt-4.1"
},
"options": {
"temperature": 0.1,
"responseFormat": "json_object"
}
},
"credentials": {
"openAiApi": {
"id": "TefveNaDaMERl1hY",
"name": "OpenAi account (Eure)"
}
},
"typeVersion": 1.2
},
{
"id": "787c3ae3-8d48-4cb3-8380-0f00a69962ed",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
432
],
"parameters": {
"color": 3,
"height": 224,
"content": "## 请勿修改此部分!"
},
"typeVersion": 1
},
{
"id": "c050a45d-7708-4981-8f87-09f97589e2e6",
"name": "当点击“执行工作流”时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1568,
-1216
],
"parameters": {},
"typeVersion": 1
},
{
"id": "81da391f-e1a8-4bec-8020-ba452132c46f",
"name": "Mistral 上传",
"type": "n8n-nodes-base.httpRequest",
"position": [
-960,
-912
],
"parameters": {
"url": "https://api.mistral.ai/v1/files",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "purpose",
"value": "ocr"
},
{
"name": "file",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
}
]
},
"nodeCredentialType": "mistralCloudApi"
},
"credentials": {
"mistralCloudApi": {
"id": "FydnNvrpqnG0B7ee",
"name": "Mistral Cloud account"
}
},
"typeVersion": 4.2
},
{
"id": "1c48b0d2-8256-406f-86cc-c05f3b762117",
"name": "Mistral 签名 URL",
"type": "n8n-nodes-base.httpRequest",
"position": [
-640,
-912
],
"parameters": {
"url": "=https://api.mistral.ai/v1/files/{{ $json.id }}/url",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"authentication": "predefinedCredentialType",
"queryParameters": {
"parameters": [
{
"name": "expiry",
"value": "24"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Accept",
"value": "application/json"
}
]
},
"nodeCredentialType": "mistralCloudApi"
},
"credentials": {
"mistralCloudApi": {
"id": "FydnNvrpqnG0B7ee",
"name": "Mistral Cloud account"
}
},
"typeVersion": 4.2
},
{
"id": "1868dc23-f486-4ec7-85e4-41ca7a677c7a",
"name": "Mistral 文档 OCR",
"type": "n8n-nodes-base.httpRequest",
"position": [
-320,
-912
],
"parameters": {
"url": "https://api.mistral.ai/v1/ocr",
"method": "POST",
"options": {},
"jsonBody": "={\n \"model\": \"mistral-ocr-latest\",\n \"document\": {\n \"type\": \"document_url\",\n \"document_url\": \"{{ $json.url }}\"\n },\n \"include_image_base64\": true\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "mistralCloudApi"
},
"credentials": {
"mistralCloudApi": {
"id": "FydnNvrpqnG0B7ee",
"name": "Mistral Cloud account"
}
},
"typeVersion": 4.2
},
{
"id": "1795d977-cce8-42aa-a74e-9d8ac80bf5c5",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-1552,
-640
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "1bc2beaf-c0da-41ec-95c4-740ae35cd55d",
"name": "刷新集合",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1248,
-1216
],
"parameters": {
"url": "http://XX.XX.XX:6333/collections/agentic-arena/points/delete",
"method": "POST",
"options": {},
"jsonBody": "{\n \"filter\": {}\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "qhny6r5ql9wwotpn",
"name": "Qdrant API (Hetzner)"
}
},
"typeVersion": 4.2
},
{
"id": "83d76a59-2184-4d36-bb00-eb882c6882eb",
"name": "Embeddings OpenAI",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
-768,
-368
],
"parameters": {
"options": {
"stripNewLines": false
}
},
"credentials": {
"openAiApi": {
"id": "4zwP0MSr8zkNvvV9",
"name": "OpenAi account"
}
},
"typeVersion": 1.1
},
{
"id": "f2170147-3b23-460c-b9d4-8d5554a8d90c",
"name": "默认数据加载器",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
-624,
-400
],
"parameters": {
"options": {
"metadata": {
"metadataValues": [
{
"name": "document",
"value": "={{$('Get PDF').item.binary.data.fileName}}"
}
]
}
}
},
"typeVersion": 1
},
{
"id": "8c819fbd-daa2-4390-af6e-10665073e0e7",
"name": "代码",
"type": "n8n-nodes-base.code",
"position": [
0,
-912
],
"parameters": {
"jsCode": "const data = $json.pages;\n\nreturn data.map(entry => ({\n json: {\n markdown: entry.markdown\n }\n}));"
},
"typeVersion": 2
},
{
"id": "2f4108c9-9ac2-49e9-b9d1-52db9d50d518",
"name": "等待",
"type": "n8n-nodes-base.wait",
"position": [
-224,
-624
],
"webhookId": "1000b40d-5dc5-4795-9dd2-8a23653c2b49",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "994ae38c-8f8d-4dfb-9441-a72de0d32d3c",
"name": "Qdrant 向量存储",
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"position": [
-704,
-624
],
"parameters": {
"mode": "insert",
"options": {},
"qdrantCollection": {
"__rl": true,
"mode": "list",
"value": "agentic-arena",
"cachedResultName": "agentic-arena"
}
},
"credentials": {
"qdrantApi": {
"id": "iyQ6MQiVaF3VMBmt",
"name": "QdrantApi account (Hetzner)"
}
},
"typeVersion": 1.1
},
{
"id": "7304d3bc-929a-4e99-9663-b9e6ccee849d",
"name": "Loop Over Items1",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-592,
-1216
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "77330811-3fc7-4cab-b370-c7053b99d613",
"name": "当由另一个工作流执行时",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-1616,
-912
],
"parameters": {
"inputSource": "passthrough"
},
"typeVersion": 1.1
},
{
"id": "1de75150-f5a5-4eec-82d0-f1cf930babb0",
"name": "创建集合",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1568,
-1472
],
"parameters": {
"url": "http://XX.XX.XX:6333/collections/agentic-arena",
"method": "PUT",
"options": {},
"jsonBody": "{\n \"vectors\": {\n \"size\": 1536,\n \"distance\": \"Cosine\" \n },\n \"shard_number\": 1, \n \"replication_factor\": 1, \n \"write_consistency_factor\": 1 \n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "qhny6r5ql9wwotpn",
"name": "Qdrant API (Hetzner)"
}
},
"typeVersion": 4.2
},
{
"id": "46919cd2-4558-413e-8676-6dfc85b060fe",
"name": "设置页面",
"type": "n8n-nodes-base.set",
"position": [
-1088,
-624
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "189f4944-a692-423c-bc6d-76747e1d04df",
"name": "text",
"type": "string",
"value": "={{ $json.markdown }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "fbfdd7d6-f648-4460-b645-7f98228eb57d",
"name": "搜索PDF",
"type": "n8n-nodes-base.googleDrive",
"position": [
-896,
-1216
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "1dbVllHyJvJqJs2P5lTzvhqP8NNCrqwVp",
"cachedResultUrl": "https://drive.google.com/drive/folders/1dbVllHyJvJqJs2P5lTzvhqP8NNCrqwVp",
"cachedResultName": "Agentic Arena"
},
"whatToSearch": "files"
},
"options": {},
"resource": "fileFolder",
"returnAll": true
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "HEy5EuZkgPZVEa9w",
"name": "Google Drive account (n3w.it)"
}
},
"typeVersion": 3
},
{
"id": "0a35360d-17a7-4095-a93b-0c0ca6efa754",
"name": "获取PDF",
"type": "n8n-nodes-base.googleDrive",
"position": [
-1312,
-912
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.file_id }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "HEy5EuZkgPZVEa9w",
"name": "Google Drive account (n3w.it)"
}
},
"typeVersion": 3
},
{
"id": "6f6ee381-0c36-4c59-823e-a7bb522ccc70",
"name": "字符文本分割器",
"type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
"position": [
-608,
-192
],
"parameters": {
"separator": "#",
"chunkOverlap": 100
},
"typeVersion": 1
},
{
"id": "003c9ac1-c683-4b5d-9a43-dbdaca687b37",
"name": "AI 代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-880,
336
],
"parameters": {
"text": "={{ $json.chatInput }}",
"options": {
"systemMessage": "=You are a Ministry of Finance (MoF) policy compliance assistant specialized in permit applications and regulatory analysis. Your role is to evaluate permit applications against established MoF policies and provide accurate determinations.\n\n**CORE INSTRUCTIONS:**\n1. **Always use the RAG tool** for each request to retrieve relevant policy information\n2. **Never invent or fabricate information** - only use verified policy data\n3. **Respond in English** with clear and professional language\n4. **Provide definitive determinations** - start with \"Yes\" or \"No\" followed by specific reasoning\n\n**RESPONSE STRUCTURE:**\n- **Opening determination:** Clear Yes/No or specific outcome statement\n- **Reasoning:** Concise explanation referencing specific policy requirements\n- **Citations:** Always include citations in format: Citation: [MoF Policy ###: Policy Name]\n\n**KEY ANALYSIS AREAS:**\n- Zone requirements and submission timelines\n- Payment timing (minimum 7 days before activation)\n- Entity type eligibility (nonprofit vs. for-profit restrictions)\n- Officer conflict of interest rules\n- Emergency processing classifications\n- Seasonal adjustment requirements\n- Fee calculations and waiver eligibility\n\n**EXAMPLE RESPONSE FORMAT:**\n```\nYes/No—[specific violation]. [Timeline/requirement details], [consequences].\n\nCitation: [MoF Policy ###: Policy Name, MoF Policy ###: Policy Name]\n```\n\n**QUALITY STANDARDS:**\n- Be precise with dates, timelines, and calculations\n- Identify ALL applicable violations in complex cases\n- Reference multiple policies when relevant\n- Maintain professional, authoritative tone\n- Ensure legal accuracy and compliance\n\nAlways cross-reference multiple policies when evaluating complex scenarios involving multiple potential violations."
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "8d8a79c6-0055-4829-89f7-08b98399c157",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-768,
528
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "7e2250c0-a209-4c51-b87e-73193dc192d8",
"name": "Cohere 重新排序器",
"type": "@n8n/n8n-nodes-langchain.rerankerCohere",
"position": [
-512,
704
],
"parameters": {},
"credentials": {
"cohereApi": {
"id": "abTpzDTZs5Bvhxjp",
"name": "CohereApi account"
}
},
"typeVersion": 1
},
{
"id": "b89afe71-728c-497c-8f07-7c8ace131607",
"name": "OpenAI 嵌入1",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
-672,
704
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "TefveNaDaMERl1hY",
"name": "OpenAi account (Eure)"
}
},
"typeVersion": 1.2
},
{
"id": "22f8a99c-77a1-4708-b086-b75723d82031",
"name": "RAG",
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"position": [
-640,
528
],
"parameters": {
"mode": "retrieve-as-tool",
"options": {},
"useReranker": true,
"toolDescription": "Search the RAG for questions you are asked\n",
"qdrantCollection": {
"__rl": true,
"mode": "list",
"value": "agentic-arena",
"cachedResultName": "agentic-arena"
}
},
"credentials": {
"qdrantApi": {
"id": "iyQ6MQiVaF3VMBmt",
"name": "QdrantApi account (Hetzner)"
}
},
"typeVersion": 1.3
},
{
"id": "f0aec6e7-a4b4-43a6-a15b-890712c59703",
"name": "调用'智能体竞技场'",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
32,
-1200
],
"parameters": {
"mode": "each",
"options": {
"waitForSubWorkflow": true
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "9wQdbEN53X1Q78fl"
},
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
}
},
"typeVersion": 1.2
},
{
"id": "c49b7933-592a-4cb7-86f5-fcba33269e4d",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-928,
528
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "gpt-4.1"
},
"options": {
"temperature": 0.1
}
},
"credentials": {
"openAiApi": {
"id": "TefveNaDaMERl1hY",
"name": "OpenAi account (Eure)"
}
},
"typeVersion": 1.2
},
{
"id": "315b9054-8eb6-48b7-a6b5-97663e5059f5",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1664,
-2752
],
"parameters": {
"color": 3,
"width": 1904,
"height": 432,
"content": "# 智能体竞技场社区竞赛"
},
"typeVersion": 1
},
{
"id": "35156e25-624e-47cc-9d2d-48e4a335b970",
"name": "### 需要帮助?",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1664,
-2288
],
"parameters": {
"color": 5,
"width": 1904,
"height": 352,
"content": ""
},
"typeVersion": 1
},
{
"id": "4ca9e2fe-fa70-4f5e-b694-5e0c2c0d08fd",
"name": "## 试试看!",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1664,
-1888
],
"parameters": {
"width": 1904,
"height": 1856,
"content": "## 我的解决方案"
},
"typeVersion": 1
},
{
"id": "fc396562-d642-46d9-a287-8357bf79b59f",
"name": "获取文件ID",
"type": "n8n-nodes-base.set",
"position": [
-272,
-1200
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ca7c30f2-444d-4551-988d-0f513e5ee4b1",
"name": "file_id",
"type": "string",
"value": "={{ $json.id }}"
}
]
}
},
"typeVersion": 3.4
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d7715ff3-8833-4b10-862e-0eb02f65c2ff",
"connections": {
"RAG": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Get PDF": {
"main": [
[
{
"node": "Mistral Upload",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Only if we are evaluating",
"type": "main",
"index": 0
}
]
]
},
"Eval Set": {
"main": [
[
{
"node": "Eval Input",
"type": "main",
"index": 0
}
]
]
},
"Set page": {
"main": [
[
{
"node": "Qdrant Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Eval Input": {
"main": [
[
{
"node": "Filter Empty Rows",
"type": "main",
"index": 0
}
]
]
},
"Get File ID": {
"main": [
[
{
"node": "Call 'Agent Arena'",
"type": "main",
"index": 0
}
]
]
},
"Search PDFs": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"LLM as a Judge": {
"ai_languageModel": [
[
{
"node": "Run Evaluation",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Mistral Upload": {
"main": [
[
{
"node": "Mistral Signed URL",
"type": "main",
"index": 0
}
]
]
},
"Run Evaluation": {
"main": [
[
{
"node": "Save Eval",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Set page",
"type": "main",
"index": 0
}
]
]
},
"Mistral DOC OCR": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Reranker Cohere": {
"ai_reranker": [
[
{
"node": "RAG",
"type": "ai_reranker",
"index": 0
}
]
]
},
"Loop Over Items1": {
"main": [
[],
[
{
"node": "Get File ID",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Qdrant Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Filter Empty Rows": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Call 'Agent Arena'": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI1": {
"ai_embedding": [
[
{
"node": "RAG",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Mistral Signed URL": {
"main": [
[
{
"node": "Mistral DOC OCR",
"type": "main",
"index": 0
}
]
]
},
"Refresh collection": {
"main": [
[
{
"node": "Search PDFs",
"type": "main",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Qdrant Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Qdrant Vector Store": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"Only if we are evaluating": {
"main": [
[
{
"node": "Run Evaluation",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Chat",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Get PDF",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Refresh collection",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
基于 Mistral OCR 的完整 RAG 从 PDF 开始
使用Mistral OCR、Qdrant和Gemini AI构建PDF文档RAG系统
Set
Code
Wait
+16
34 节点Davide
人工智能
上下文混合RAG AI文案
Google Drive到Supabase上下文向量数据库同步用于RAG应用
If
Set
Code
+25
76 节点Michael Taleb
AI RAG 检索增强
内容生成器 v3
AI驱动博客自动化:使用GPT-4生成并发布SEO文章至WordPress和Twitter
If
Set
Code
+25
144 节点Jay Emp0
内容创作
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+27
125 节点Daniel Ng
内容创作
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
WooCommerce AI售后支持聊天机器人工作流
WooCommerce AI售后聊天机器人,集成GPT4o、RAG、Google Drive和Telegram
Set
Google Drive
Http Request
+16
31 节点Davide
销售
工作流信息
难度等级
高级
节点数量41
分类2
节点类型22
作者
Davide
@n3witaliaFull-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at info@n3w.it or add me on Linkedin.com/in/davideboizza
外部链接
在 n8n.io 查看 →
分享此工作流