Skip to content

评估节点(Evaluation node)#

评估节点执行与评估相关的各种操作,以验证你的 AI 工作流的可靠性。

🌐 The Evaluation node performs various operations related to evaluations to validate your AI workflow reliability.

在以下场景中使用 Evaluation 节点:

🌐 Use the Evaluation node in these scenarios:

  • 要根据工作流是否处于评估状态来有条件地执行逻辑
  • 要将评估结果写回 Google 表格数据集,请执行以下操作:
  • 将评估性能的评分指标记录到 n8n 的评估标签页:

Google 表格凭证

评估节点的 设置输出 操作会将评估结果记录到数据表或 Google 表格。要使用 Google 表格作为记录位置,请配置一个 Google 表格凭证

操作(Operations)#

评估节点提供以下操作:

🌐 The Evaluation node offers the following operations:

  • 设置输出:将评估结果写回数据表或 Google 表格数据集。
  • 设置指标:将评估表现的指标记录到 n8n 的 评估 标签页。
  • 检查是否为评估:根据当前执行是否为评估来分支工作流执行逻辑。

可用参数和选项取决于你选择的操作。

🌐 The parameters and options available depend on the operation you select.

设置输出(Set Outputs)#

设置输出 操作具有以下参数:

🌐 The Set Outputs operation has the following parameters:

  • 来源: 选择要输出评估结果的位置。默认值为 数据表

根据所选 ,源设置会有所不同。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
* 当 **源** 是 **数据表** 时:
    * **数据表:** 通过名称或ID选择数据表
* 当 **来源** 是 **Google 表格** 时:
    * **连接凭证**:创建或选择现有的 [Google 表格凭证](/integrations/builtin/credentials/google/index.md)。
    * **包含数据集的文档**:选择你想要写入评估结果的电子表格文档。通常,这与你在 [Evaluation Trigger](/integrations/builtin/core-nodes/n8n-nodes-base.evaluationtrigger.md) 节点中选择的文档相同。
    * 选择 **从列表中** 从下拉列表中选择电子表格标题,选择 **通过 URL** 输入电子表格的 URL,或选择 **通过 ID** 输入 `spreadsheetId`。
        * 您可以在 Google 表格的 URL 中找到 `spreadsheetId`:`https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0`。
    * **包含数据集的表格**:选择你想要写入评估结果的表格。通常,这与你在 [Evaluation Trigger](/integrations/builtin/core-nodes/n8n-nodes-base.evaluationtrigger.md) 节点中选择的表格相同。
        * 选择 **从列表中** 从下拉列表中选择工作表标题,选择 **通过 URL** 输入工作表的 URL,选择 **通过 ID** 输入 `sheetId`,或选择 **通过名称** 输入工作表标题。
        * 您可以在 Google 表格的 URL 中找到 `sheetId`:`https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId`。

您在 输出 部分定义要写入数据表或 Google 表格的项目。对于每个输出,您需要设置以下内容:

🌐 You define the items to write to the data table or Google Sheet in the Outputs section. For each output, you set the following:

  • 名称:要将评估结果写入的 Google 表格列名称。
  • :要写入 Google 表格的值。

设置指标(Set Metrics)#

设置指标操作包括一个要返回的指标部分,在这里你可以定义要记录和跟踪的评估指标。你可以在工作流的评估选项卡中查看指标结果。

🌐 The Set Metrics operation includes a Metrics to Return section where you define the metrics to record and track for your evaluations. You can see the metric results in your workflow's Evaluations tab.

对于要记录的每个指标,请设置以下详细信息:

🌐 For each metric you wish to record, you set the following details:

  • 名称:用于指标的名称。
  • :要记录的数值。一旦你运行评估,就可以将之前节点的数值拖放到此处。指标值必须为数值型。

检查是否正在评估(Check If Evaluating)#

检查是否评估 操作没有任何参数。此操作提供分支输出连接器,因此你可以根据当前执行是否为评估来有条件地执行逻辑。

🌐 The Check If Evaluating operation doesn't have any parameters. This operation provides branching output connectors so that you can conditionally execute logic depending on whether the current execution is an evaluation or not.

模板和示例(Templates and examples)#

Template widget placeholder.

要了解更多关于 n8n 评估的信息,请查看 评估文档

🌐 To learn more about n8n evaluations, check out the evaluations documentation

n8n 提供了一个用于评估的触发节点。你可以在 这里 找到该节点的文档。

🌐 n8n provides a trigger node for evaluations. You can find the node docs here.

有关常见问题或问题及建议的解决方案,请参阅评估 提示和常见问题 页面。

🌐 For common questions or issues and suggested solutions, refer to the evaluations tips and common issues page.