评估节点#
¥Evaluation node
评估节点执行与 evaluations 相关的各种操作,以验证你的 AI 工作流的可靠性。
¥The Evaluation node performs various operations related to evaluations to validate your AI workflow reliability.
在以下场景中使用 Evaluation 节点:
¥Use the Evaluation node in these scenarios:
- 要根据工作流是否处于评估状态来有条件地执行逻辑
¥To conditionally execute logic based on whether the workflow is under evaluation
- 要将评估结果写回 Google 表格数据集,请执行以下操作:
¥To write evaluation outcomes back to a Google Sheet datasetor
- 将评估性能的评分指标记录到 n8n 的评估标签页:
¥To log scoring metrics for your evaluation performance to n8n's evaluations tab
Credentials for Google Sheets
评估节点的“设置输出”操作会将评估结果记录到数据表或 Google 表格中。要使用 Google Sheets 作为录制位置,请配置 Google Sheets 凭据。
¥The Evaluation node's Set Outputs operation records evaluation results to data tables or Google Sheets. To use Google Sheets as a recording location, configure a Google Sheets credential.
操作#
¥Operations
评估节点提供以下操作:
¥The Evaluation node offers the following operations:
- 设置输出:将评估结果写回数据表或 Google 表格数据集。
¥Set Outputs: Write the results of an evaluation back to a data table or Google Sheet dataset.
- 设置指标:将评估性能的指标记录到 n8n 的“评估”选项卡中。
¥Set Metrics: Record metrics scoring the evaluation performance to n8n's Evaluations tab.
- 检查是否正在评估:根据当前执行是否为评估来分支工作流执行逻辑。
¥Check If Evaluating: Branches the workflow execution logic depending on whether the current execution is an evaluation.
可用参数和选项取决于你选择的操作。
¥The parameters and options available depend on the operation you select.
设置输出#
¥Set Outputs
“设置输出”操作具有以下参数:
¥The Set Outputs operation has the following parameters:
- 源:选择要输出评估结果的位置。默认值为数据表。
¥Source: Select the location to which you want to output the evaluation results. Default value is Data table.
源设置会根据源的选择而有所不同。
¥Source settings differ depending on Source selection.
-
当数据源为数据表时:
¥When Source is Data table:
- 数据表:按名称或 ID 选择数据表。
¥Data table: Select a data table by name or ID
-
当数据源为 Google Sheets 时:
¥When Source is Google Sheets:
- 用于连接的凭据:创建或选择现有 Google Sheets 凭据。
¥Credential to connect with: Create or select an existing Google Sheets credentials.
- 包含数据集的文档:选择要写入评估结果的电子表格文档。通常,这与你在 评估触发器 节点中选择的文档相同。
¥Document Containing Dataset: Choose the spreadsheet document you want to write the evaluation results to. Usually this is the same document you select in the Evaluation Trigger node.
- 选择“从列表”从下拉列表中选择电子表格标题,选择“通过 URL”输入电子表格 URL,或选择“通过 ID”输入
spreadsheetId。
¥Select From list to choose the spreadsheet title from the dropdown list, By URL to enter the url of the spreadsheet, or By ID to enter the
spreadsheetId.-
你可以在 Google 表格 URL 中找到
spreadsheetId:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0。¥You can find the
spreadsheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0. -
包含数据集的工作表:请选择要写入评估结果的工作表。通常,这与你在 评估触发器 节点中选择的工作表相同。
¥Sheet Containing Dataset: Choose the sheet you want to write the evaluation results to. Usually this is the same sheet you select in the Evaluation Trigger node.
-
选择“从列表”从下拉列表中选择工作表标题,选择“通过 URL”输入工作表 URL,选择“通过 ID”输入
sheetId,或选择“通过名称”输入工作表标题。¥Select From list to choose the sheet title from the dropdown list, By URL to enter the url of the sheet, By ID to enter the
sheetId, or By Name to enter the sheet title. -
你可以在 Google 表格 URL 中找到
sheetId:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId。¥You can find the
sheetIdin a Google Sheets URL: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 表格列名。
¥Name: The Google Sheet column name to write the evaluation results to.
- 值:要写入 Google 表格的值。
¥Value: The value to write to the Google Sheet.
设置指标#
¥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:
- 名称:指标的名称。
¥Name: The name to use for the metric.
- 值:要记录的数值。运行评估后,你可以将之前节点中的值拖放到此处。指标值必须为数值。
¥Value: The numeric value to record. Once you run your evaluation, you can drag and drop values from previous nodes here. Metric values must be numeric.
检查是否正在评估#
¥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
相关资源#
¥Related resources
要了解有关 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.