8
n8n 中文网amn8n.com

具有Graph RAG知识本体的推理专家

中级

这是一个Engineering, AI RAG领域的自动化工作流,包含 8 个节点。主要使用 Agent, HttpRequestTool, ChatTrigger, LmChatOpenAi, MemoryBufferWindow 等节点。 使用GraphRAG和知识本体为AI代理创建自定义推理模式

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "a31fIa8ZmGBq07CK",
  "meta": {
    "instanceId": "2a26454b0172ffcb8d70ba77c235b1209f92cd71bf06c79ba609c7173b416d68",
    "templateCredsSetupCompleted": true
  },
  "name": "具有 Graph RAG 知识本体的推理专家",
  "tags": [],
  "nodes": [
    {
      "id": "aa3aae5b-5652-4bd8-a1bf-986eb9765ab3",
      "name": "当收到聊天消息时",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -480,
        -220
      ],
      "webhookId": "2dfe79eb-bbb0-49ed-83c9-cb3e2a49602f",
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "7c700795-faff-412e-aecb-4624439c1246",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -360,
        200
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "07wFa8Wa4mMRCHAj",
          "name": "OpenAi account 2"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4a09a841-6743-4d8f-8cbc-33b64b2d21bb",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -160,
        200
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "c388dd69-24a6-422b-a08c-4a2046a75997",
      "name": "交互动态专家",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        200,
        200
      ],
      "parameters": {
        "url": "https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&addStats=true&optimize=develop&includeStatements=true&includeGraphSummary=true&includeGraph=false",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "eightos_system"
            },
            {
              "name": "requestMode",
              "value": "response"
            },
            {
              "name": "prompt",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters2_Value', `User query to send to the expert`, 'string') }}"
            },
            {
              "name": "aiTopics",
              "value": "true"
            }
          ]
        },
        "genericAuthType": "httpBearerAuth",
        "toolDescription": "You are an expert in interaction dynamics who provides advice on the best way to interact with people and situations. You receive information about the dynamics of an interaction and then provide advice for what to do next based on these dynamics.\n\n<MainConcepts>: \n[[escalation]], [[adaptive_strategy]], [[metastability]], [[polysingularity]]\n</MainConcepts>\n\n\n<MainTopics>: \n1. Tension Dynamics: [[escalation]] [[engagement]] [[tension_release]] \n2. Synergistic Growth: [[synergy]] [[assimilation]] [[common_good]] \n3. Ethical Narratives: [[∞os_private_ethics]] [[narrative_activation_formula]] [[environment]] \n4. Chaotic Stability: [[metastability]] [[chaotic_itinerancy]] [[dynamic_stability]] \n5. Adaptive Fluidity: [[adaptive_strategy]] [[fluidity]] [[environmental_input]] \n6. Diverse Governance: [[polysingularity]] [[hedging_preset]] [[holocracy]] \n</MainTopics>\n\n<TopicalGap>: \n4. Chaotic Stability: [[metastability]] [[chaotic_itinerancy]] \n6. Diverse Governance: [[polysingularity]] [[hedging_preset]] \n</TopicalGap>\n\n<ConceptualGateways> \n[[common_good]] [[chaotic_itinerancy]] [[hedging_preset]] [[environmental_input]] [[synergy]] [[narrative_activation_formula]] [[∞os_private_ethics]] [[environment]] [[fluidity]] [[holocracy]] [[assimilation]] [[panarchy]] [[discipline_preset]] \n</ConceptualGateways>\n\n\n<Relations>: \n1) [[dissipation]] [[tension_release]]\n2) [[dissipation]] [[a_r_d_method]]\n3) [[common_good]] [[synergy]]\n4) [[oscillatory_progress]] [[pendulation]]\n5) [[assimilation]] [[energy_absorption]]\n6) [[feedback_escalation]] [[feedback_loop]]\n7) [[metastability]] [[chaotic_itinerancy]]\n8) [[polysingularity]] [[diversity]]\n9) [[oscillatory_pattern]] [[synchronization]]\n10) [[fluidity]] [[adaptive_strategy]]\n11) [[tension_increase]] [[tension_release]]\n12) [[escalation]] [[adaptive_strategy]]\n</Relations>\n\nSentiment (wink):\npositive: 15%, negative: 18%, neutral: 68%\n\n"
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "zVdEF7tjCSMRkhDJ",
          "name": "InfraNodus Experts Account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1bf99f65-00fb-49f3-b576-b21acc14e2ae",
      "name": "推理代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -200,
        -60
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are a reasoning agent. You have access to a dynamic interaction expert that provides you advice on how to continue your interaction. When you send a request to this expert, you need to give it an interpretation of the previous interaction and its dynamics (your interpretation of the conversation) using the language and concepts that the reasoning agent will understand. \n\nUse the response from the expert as an instruction to improve your response to the user's query. Give the utmost importance to the expert's advice to improve your standard response to the client's original query."
        }
      },
      "typeVersion": 1.9
    },
    {
      "id": "61106e92-7c6a-4e93-8afb-180f00123f2e",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -240
      ],
      "parameters": {
        "width": 380,
        "height": 320,
        "content": "## 1. 推理代理"
      },
      "typeVersion": 1
    },
    {
      "id": "7b409287-758d-46e8-b828-69776ce5f56d",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        120
      ],
      "parameters": {
        "width": 340,
        "height": 560,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "06e7c099-dd74-4f46-bb3b-b7639c3fc3ea",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        120
      ],
      "parameters": {
        "width": 420,
        "height": 560,
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "02353b90-13a1-4624-bc39-391a0dd4a1b0",
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Reasoning Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Reasoning Agent": {
      "main": [
        []
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Reasoning Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Reasoning Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Interaction Dynamics Expert": {
      "ai_tool": [
        [
          {
            "node": "Reasoning Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 工程, AI RAG 检索增强

需要付费吗?

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

工作流信息
难度等级
中级
节点数量8
分类2
节点类型6
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
InfraNodus

InfraNodus

@infranodus

I'm Dmitry, the founder of InfraNodus — an AI text network analysis tool. I'm passionate about networks and data visualization and its ability to reveal what everyone else is missing and to highlight different perspectives. I'm sharing the n8n templates that make use of this unique capability of InfraNodus for multiple scenarios.

外部链接
在 n8n.io 查看

分享此工作流