MCP Tools Reference: ces.googleapis.com

工具:get_evaluation

获取指定评估的详细信息。

以下示例演示了如何使用 curl 调用 get_evaluation MCP 工具。

Curl 请求
                  
curl --location 'https://ces.[REGION].rep.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "get_evaluation",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

输入架构

EvaluationService.GetEvaluation 的请求消息。

GetEvaluationRequest

JSON 表示法
{
  "name": string
}
字段
name

string

必需。要检索的评估的资源名称。

输出架构

评估表示模拟和评估代理所需的所有信息。

评估

JSON 表示法
{
  "name": string,
  "displayName": string,
  "description": string,
  "tags": [
    string
  ],
  "evaluationDatasets": [
    string
  ],
  "createTime": string,
  "createdBy": string,
  "updateTime": string,
  "lastUpdatedBy": string,
  "evaluationRuns": [
    string
  ],
  "etag": string,
  "aggregatedMetrics": {
    object (AggregatedMetrics)
  },
  "lastCompletedResult": {
    object (EvaluationResult)
  },
  "invalid": boolean,
  "lastTenResults": [
    {
      object (EvaluationResult)
    }
  ],

  // Union field inputs can be only one of the following:
  "golden": {
    object (Golden)
  },
  "scenario": {
    object (Scenario)
  }
  // End of list of possible types for union field inputs.
}
字段
name

string

标识符。相应评估的唯一标识符。格式:projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}

displayName

string

必需。用户定义的评估显示名称。在应用内是唯一的。

description

string

可选。用户定义的评估说明。

tags[]

string

可选。用于对评估进行分类的用户定义标记。

evaluationDatasets[]

string

仅限输出。相应评估所属的评估数据集的列表。格式:projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}

createTime

string (Timestamp format)

仅限输出。创建评估时的时间戳。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

createdBy

string

仅限输出。创建评估的用户。

updateTime

string (Timestamp format)

仅限输出。上次更新评估时的时间戳。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

lastUpdatedBy

string

仅限输出。上次更新评估的用户。

evaluationRuns[]

string

仅限输出。相应评估所关联的 EvaluationRun。

etag

string

仅限输出。用于确保对象在读取-修改-写入操作期间未发生更改的 ETag。如果 etag 为空,则更新会覆盖任何并发更改。

aggregatedMetrics

object (AggregatedMetrics)

仅限输出。相应评估在所有运行中的汇总指标。

lastCompletedResult

object (EvaluationResult)

仅限输出。相应评估的最新评估结果。

invalid

boolean

仅限输出。评估是否无效。如果评估所引用的工具、工具集或代理已被删除,则可能会发生这种情况。

lastTenResults[]

object (EvaluationResult)

仅限输出。相应评估的最近 10 次评估结果。仅当在 ListEvaluationsRequest 或 GetEvaluationRequest 中将 include_last_ten_results 设置为 true 时,才会填充此字段。

联合字段 inputs。评估 inputs 的输入只能是以下值之一:
golden

object (Golden)

可选。要评估的黄金步数。

scenario

object (Scenario)

可选。相应场景的配置。

金色

JSON 表示法
{
  "turns": [
    {
      object (GoldenTurn)
    }
  ],
  "evaluationExpectations": [
    string
  ]
}
字段
turns[]

object (GoldenTurn)

必需。重放黄金对话所需的黄金回合数。

evaluationExpectations[]

string

可选。用于评估重放对话的评估预期。格式:projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}

GoldenTurn

JSON 表示法
{
  "steps": [
    {
      object (Step)
    }
  ],
  "rootSpan": {
    object (Span)
  }
}
字段
steps[]

object (Step)

必需。重放黄金对话所需的步骤。

rootSpan

object (Span)

可选。用于处理和维护音频信息的黄金周期的根 span。

步骤

JSON 表示法
{

  // Union field step can be only one of the following:
  "userInput": {
    object (SessionInput)
  },
  "agentTransfer": {
    object (AgentTransfer)
  },
  "expectation": {
    object (GoldenExpectation)
  }
  // End of list of possible types for union field step.
}
字段
联合字段 step。要执行的步骤。step 只能是下列其中一项:
userInput

object (SessionInput)

可选。对话的用户输入。

agentTransfer

object (AgentTransfer)

可选。将对话转接给其他客服人员。

expectation

object (GoldenExpectation)

可选。在当前回合中执行预期。

SessionInput

JSON 表示法
{
  "willContinue": boolean,

  // Union field input_type can be only one of the following:
  "text": string,
  "dtmf": string,
  "audio": string,
  "toolResponses": {
    object (ToolResponses)
  },
  "image": {
    object (Image)
  },
  "blob": {
    object (Blob)
  },
  "variables": {
    object
  },
  "event": {
    object (Event)
  }
  // End of list of possible types for union field input_type.
}
字段
willContinue

boolean

可选。一个标志,用于指示当前消息是否是双向流式会话中较大输入的片段。

如果设置为 true,代理会延迟处理,直到收到 will_continuefalse 的后续消息,或者直到系统检测到音频输入中的端点。

注意:此字段不适用于音频和 DTMF 输入,因为它们始终会根据端点信号自动处理。

联合字段 input_type。输入的类型。input_type 只能是下列其中一项:
text

string

可选。最终用户的文本数据。

dtmf

string

可选。来自最终用户的 DTMF 数字。

audio

string (bytes format)

可选。最终用户的音频数据。

使用 base64 编码的字符串。

toolResponses

object (ToolResponses)

可选。来自客户端的工具调用的执行结果。

image

object (Image)

可选。最终用户的图片数据。

blob

object (Blob)

可选。来自最终用户的 Blob 数据。

variables

object (Struct format)

可选。会话的上下文变量,按名称键控。CES 代理只会使用在应用中声明的变量。

无法识别的变量仍会作为额外的会话参数发送到 [Dialogflow 代理][Agent.RemoteDialogflowAgent]。

event

object (Event)

可选。活动输入。

ToolResponses

JSON 表示法
{
  "toolResponses": [
    {
      object (ToolResponse)
    }
  ]
}
字段
toolResponses[]

object (ToolResponse)

可选。工具执行结果列表。

ToolResponse

JSON 表示法
{
  "id": string,
  "displayName": string,
  "response": {
    object
  },

  // Union field tool_identifier can be only one of the following:
  "tool": string,
  "toolsetTool": {
    object (ToolsetTool)
  }
  // End of list of possible types for union field tool_identifier.
}
字段
id

string

可选。相应回答所针对的匹配项的 ID。tool call

displayName

string

仅限输出。工具的显示名称。

response

object (Struct format)

必需。以 JSON 对象格式表示的工具执行结果。使用“output”键指定工具响应,使用“error”键指定错误详情(如有)。如果未指定“output”和“error”键,则整个“response”都被视为工具执行结果。

联合字段 tool_identifier。已执行的工具的标识符。它可以是持久化工具,也可以是工具集中的工具。tool_identifier 只能是下列其中一项:
tool

string

可选。要执行的工具的名称。格式:projects/{project}/locations/{location}/apps/{app}/tools/{tool}

toolsetTool

object (ToolsetTool)

可选。已执行的工具集工具。

ToolsetTool

JSON 表示法
{
  "toolset": string,
  "toolId": string
}
字段
toolset

string

必需。相应工具所源自的 Toolset 的资源名称。格式:projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}

toolId

string

可选。用于过滤工具的工具 ID,以检索相应工具的架构。

结构体

JSON 表示法
{
  "fields": {
    string: value,
    ...
  }
}
字段
fields

map (key: string, value: value (Value format))

无序的动态类型值映射。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

FieldsEntry

JSON 表示法
{
  "key": string,
  "value": value
}
字段
key

string

value

value (Value format)

JSON 表示法
{

  // Union field kind can be only one of the following:
  "nullValue": null,
  "numberValue": number,
  "stringValue": string,
  "boolValue": boolean,
  "structValue": {
    object
  },
  "listValue": array
  // End of list of possible types for union field kind.
}
字段
联合字段 kind。值的类型。kind 只能是下列其中一项:
nullValue

null

表示 null 值。

numberValue

number

表示双精度值。

stringValue

string

表示字符串值。

boolValue

boolean

表示布尔值。

structValue

object (Struct format)

表示结构化值。

listValue

array (ListValue format)

表示重复的 Value

ListValue

JSON 表示法
{
  "values": [
    value
  ]
}
字段
values[]

value (Value format)

动态类型值的重复字段。

图片

JSON 表示法
{
  "mimeType": string,
  "data": string
}
字段
mimeType

string

必需。来源数据的 IANA 标准 MIME 类型。支持的图片类型包括: * image/png * image/jpeg * image/webp

data

string (bytes format)

必需。图片的原始字节。

使用 base64 编码的字符串。

Blob

JSON 表示法
{
  "mimeType": string,
  "data": string
}
字段
mimeType

string

必需。来源数据的 IANA 标准 MIME 类型。

data

string (bytes format)

必需。相应 blob 的原始字节。

使用 base64 编码的字符串。

事件

JSON 表示法
{
  "event": string
}
字段
event

string

必需。事件的名称。

AgentTransfer

JSON 表示法
{
  "targetAgent": string,
  "displayName": string
}
字段
targetAgent

string

必需。对话要转移到的代理。智能体将从这一刻起接管对话。格式:projects/{project}/locations/{location}/apps/{app}/agents/{agent}

displayName

string

仅限输出。代理的显示名称。

GoldenExpectation

JSON 表示法
{
  "note": string,

  // Union field condition can be only one of the following:
  "toolCall": {
    object (ToolCall)
  },
  "toolResponse": {
    object (ToolResponse)
  },
  "agentResponse": {
    object (Message)
  },
  "agentTransfer": {
    object (AgentTransfer)
  },
  "updatedVariables": {
    object
  },
  "mockToolResponse": {
    object (ToolResponse)
  }
  // End of list of possible types for union field condition.
}
字段
note

string

可选。此要求的备注,在报告特定检查失败时很有用。例如,"Check_Payment_Tool_Called".

联合字段 condition。要执行的实际检查。condition 只能是下列其中一项:
toolCall

object (ToolCall)

可选。检查是否已使用参数调用特定工具。

toolResponse

object (ToolResponse)

可选。检查特定工具是否具有预期响应。

agentResponse

object (Message)

可选。检查代理是否回答了正确的响应。角色“agent”是隐含的。

agentTransfer

object (AgentTransfer)

可选。检查客服人员是否已将对话转给其他客服人员。

updatedVariables

object (Struct format)

可选。检查代理是否已将会话变量更新为预期值。用于捕获代理变量更新以进行黄金评估。

mockToolResponse

object (ToolResponse)

可选。要模拟的工具响应,其中指定了相关参数。任何未指定的参数都将由 LLM 编造。

ToolCall

JSON 表示法
{
  "id": string,
  "displayName": string,
  "args": {
    object
  },

  // Union field tool_identifier can be only one of the following:
  "tool": string,
  "toolsetTool": {
    object (ToolsetTool)
  }
  // End of list of possible types for union field tool_identifier.
}
字段
id

string

可选。工具调用的唯一标识符。如果填充了此字段,客户端应返回执行结果,并在 ToolResponse 中包含匹配 ID。

displayName

string

仅限输出。工具的显示名称。

args

object (Struct format)

可选。以 JSON 对象格式表示的工具的输入参数和值。

联合字段 tool_identifier。要执行的工具的标识符。它可以是持久化工具,也可以是工具集中的工具。tool_identifier 只能是下列其中一项:
tool

string

可选。要执行的工具的名称。格式:projects/{project}/locations/{location}/apps/{app}/tools/{tool}

toolsetTool

object (ToolsetTool)

可选。要执行的工具集工具。

消息

JSON 表示法
{
  "role": string,
  "chunks": [
    {
      object (Chunk)
    }
  ],
  "eventTime": string
}
字段
role

string

可选。对话中的角色,例如用户、代理。

chunks[]

object (Chunk)

可选。消息的内容,以一系列块的形式呈现。

eventTime

string (Timestamp format)

可选。消息的发送或接收时间。如果消息是 example 的一部分,则不应使用此属性。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

JSON 表示法
{

  // Union field data can be only one of the following:
  "text": string,
  "transcript": string,
  "blob": {
    object (Blob)
  },
  "payload": {
    object
  },
  "image": {
    object (Image)
  },
  "toolCall": {
    object (ToolCall)
  },
  "toolResponse": {
    object (ToolResponse)
  },
  "agentTransfer": {
    object (AgentTransfer)
  },
  "updatedVariables": {
    object
  },
  "defaultVariables": {
    object
  }
  // End of list of possible types for union field data.
}
字段
联合字段 data。数据块数据。data 只能是下列其中一项:
text

string

可选。文本数据。

transcript

string

可选。与音频关联的转写内容。

blob

object (Blob)

可选。Blob 数据。

payload

object (Struct format)

可选。自定义载荷数据。

image

object (Image)

可选。图片数据。

toolCall

object (ToolCall)

可选。工具执行请求。

toolResponse

object (ToolResponse)

可选。工具执行响应。

agentTransfer

object (AgentTransfer)

可选。代理转移事件。

updatedVariables

object (Struct format)

一个结构体,表示对话中更新的变量,按变量名称键控。

defaultVariables

object (Struct format)

结构体表示对话开始时的默认变量,按变量名称键控。

时间戳

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
字段
seconds

string (int64 format)

表示世界协调时间 (UTC) 的秒数(从 Unix 纪元 1970-01-01T00:00:00Z 开始算起)。必须介于 -62135596800 到 253402300799 之间(含边界值),对应于 0001-01-01T00:00:00Z 到 9999-12-31T23:59:59Z。

nanos

integer

秒数的非负小数部分(以纳秒为单位)。此字段是时长的纳秒部分,而不是秒的替代项。对于含小数部分的负秒数,仍必须包含按时间递升的非负纳秒值。必须在 0 到 999,999,999 之间(含边界值)。

span

JSON 表示法
{
  "name": string,
  "startTime": string,
  "endTime": string,
  "duration": string,
  "attributes": {
    object
  },
  "childSpans": [
    {
      object (Span)
    }
  ]
}
字段
name

string

仅限输出。span 的名称。

startTime

string (Timestamp format)

仅限输出。时间段的开始时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

endTime

string (Timestamp format)

仅限输出。时间段的结束时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

duration

string (Duration format)

仅限输出。Span 的时长。

该时长以秒为单位,最多包含九个小数位,以“s”结尾。示例:"3.5s"

attributes

object (Struct format)

仅限输出。与 span 关联的键值对属性。

childSpans[]

object (Span)

仅限输出。嵌套在此 span 下的子 span。

时长

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
字段
seconds

string (int64 format)

时间段的带符号秒数。必须介于 -315,576,000,000 到 +315,576,000,000 之间(含边界值)。注意:这些界限的计算依据是:60 秒/分钟 * 60 分钟/小时 * 24 小时/天 * 365.25 天/年 * 10000 年

nanos

integer

时间跨度的有符号秒数小数部分(以纳秒为单位)。时长不足 1 秒时,seconds 字段为 0,nanos 字段为正数或负数。对于时长为 1 秒或更长时间的情况,nanos 字段的非零值必须与 seconds 字段的符号相同。必须介于 -999,999,999 到 +999,999,999 之间(含边界值)。

场景

JSON 表示法
{
  "task": string,
  "userFacts": [
    {
      object (UserFact)
    }
  ],
  "maxTurns": integer,
  "rubrics": [
    string
  ],
  "scenarioExpectations": [
    {
      object (ScenarioExpectation)
    }
  ],
  "variableOverrides": {
    object
  },
  "taskCompletionBehavior": enum (TaskCompletionBehavior),
  "userGoalBehavior": enum (UserGoalBehavior),
  "evaluationExpectations": [
    string
  ]
}
字段
task

string

必需。相应场景所针对的任务。

userFacts[]

object (UserFact)

可选。供场景使用的用户事实。

maxTurns

integer

可选。要模拟的最大回合数。如果未指定,模拟将继续进行,直到任务完成。

rubrics[]

string

必需。用于对方案进行评分的评分标准。

scenarioExpectations[]

object (ScenarioExpectation)

必需。用于评估用户模拟生成的对话的 ScenarioExpectations。

variableOverrides

object (Struct format)

可选。作为会话上下文的变量 / 会话参数,按变量名称键控。此结构体的成员将替换系统设置的任何默认值。

请注意,这些与用户已知的事实(即用户事实)不同。变量是代理已知的参数:即由手机系统传递的 MDN(手机号码)。

taskCompletionBehavior
(deprecated)

enum (TaskCompletionBehavior)

可选。已弃用。请改用 user_goal_behavior。

userGoalBehavior

enum (UserGoalBehavior)

可选。用户目标的预期行为。

evaluationExpectations[]

string

可选。用于评估模拟生成的对话的评估预期。格式:projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}

UserFact

JSON 表示法
{
  "name": string,
  "value": string
}
字段
name

string

必需。用户事实的名称。

value

string

必需。用户事实的值。

ScenarioExpectation

JSON 表示法
{

  // Union field expectation can be only one of the following:
  "toolExpectation": {
    object (ToolExpectation)
  },
  "agentResponse": {
    object (Message)
  }
  // End of list of possible types for union field expectation.
}
字段
联合字段 expectation。用于评估模拟生成的对话的预期结果。expectation 只能是下列其中一项:
toolExpectation

object (ToolExpectation)

可选。要评估的工具调用和响应对。

agentResponse

object (Message)

可选。待评估的代理回答。

ToolExpectation

JSON 表示法
{
  "expectedToolCall": {
    object (ToolCall)
  },
  "mockToolResponse": {
    object (ToolResponse)
  }
}
字段
expectedToolCall

object (ToolCall)

必需。预期工具调用,其中指定了感兴趣的参数。任何未指定的参数都将由 LLM 编造。

mockToolResponse

object (ToolResponse)

必需。要模拟的工具响应,其中指定了相关参数。任何未指定的参数都将由 LLM 编造。

AggregatedMetrics

JSON 表示法
{
  "metricsByAppVersion": [
    {
      object (MetricsByAppVersion)
    }
  ]
}
字段
metricsByAppVersion[]

object (MetricsByAppVersion)

仅限输出。按应用版本 ID 分组的汇总指标。

MetricsByAppVersion

JSON 表示法
{
  "appVersionId": string,
  "toolMetrics": [
    {
      object (ToolMetrics)
    }
  ],
  "semanticSimilarityMetrics": [
    {
      object (SemanticSimilarityMetrics)
    }
  ],
  "hallucinationMetrics": [
    {
      object (HallucinationMetrics)
    }
  ],
  "toolCallLatencyMetrics": [
    {
      object (ToolCallLatencyMetrics)
    }
  ],
  "turnLatencyMetrics": [
    {
      object (TurnLatencyMetrics)
    }
  ],
  "passCount": integer,
  "failCount": integer,
  "metricsByTurn": [
    {
      object (MetricsByTurn)
    }
  ]
}
字段
appVersionId

string

仅限输出。应用版本 ID。

toolMetrics[]

object (ToolMetrics)

仅限输出。相应应用版本中每个工具的指标。

semanticSimilarityMetrics[]

object (SemanticSimilarityMetrics)

仅限输出。相应应用版本内的语义相似度指标。

hallucinationMetrics[]

object (HallucinationMetrics)

仅限输出。相应应用版本中出现幻觉的指标。

toolCallLatencyMetrics[]

object (ToolCallLatencyMetrics)

仅限输出。相应应用版本中工具调用延迟时间的指标。

turnLatencyMetrics[]

object (TurnLatencyMetrics)

仅限输出。相应应用版本中对话延迟时间的指标。

passCount

integer

仅限输出。评估通过的次数。

failCount

integer

仅限输出。评估失败的次数。

metricsByTurn[]

object (MetricsByTurn)

仅限输出。此应用版本中每个回合的汇总指标。

ToolMetrics

JSON 表示法
{
  "tool": string,
  "passCount": integer,
  "failCount": integer
}
字段
tool

string

仅限输出。工具的名称。

passCount

integer

仅限输出。工具通过的次数。

failCount

integer

仅限输出。工具失败的次数。

SemanticSimilarityMetrics

JSON 表示法
{
  "score": number
}
字段
score

number

仅限输出。平均语义相似度得分(0-4)。

HallucinationMetrics

JSON 表示法
{
  "score": number
}
字段
score

number

仅限输出。平均幻觉分数(0 到 1)。

ToolCallLatencyMetrics

JSON 表示法
{
  "tool": string,
  "averageLatency": string
}
字段
tool

string

仅限输出。工具的名称。

averageLatency

string (Duration format)

仅限输出。工具调用的平均延迟时间。

该时长以秒为单位,最多包含九个小数位,以“s”结尾。示例:"3.5s"

TurnLatencyMetrics

JSON 表示法
{
  "averageLatency": string
}
字段
averageLatency

string (Duration format)

仅限输出。对话轮次的平均延迟时间。

该时长以秒为单位,最多包含九个小数位,以“s”结尾。示例:"3.5s"

MetricsByTurn

JSON 表示法
{
  "turnIndex": integer,
  "toolMetrics": [
    {
      object (ToolMetrics)
    }
  ],
  "semanticSimilarityMetrics": [
    {
      object (SemanticSimilarityMetrics)
    }
  ],
  "hallucinationMetrics": [
    {
      object (HallucinationMetrics)
    }
  ],
  "toolCallLatencyMetrics": [
    {
      object (ToolCallLatencyMetrics)
    }
  ],
  "turnLatencyMetrics": [
    {
      object (TurnLatencyMetrics)
    }
  ]
}
字段
turnIndex

integer

仅限输出。回合指数(从 0 开始)。

toolMetrics[]

object (ToolMetrics)

仅限输出。相应回合中每个工具的指标。

semanticSimilarityMetrics[]

object (SemanticSimilarityMetrics)

仅限输出。相应轮次内的语义相似度指标。

hallucinationMetrics[]

object (HallucinationMetrics)

仅限输出。相应轮次中出现幻觉的指标。

toolCallLatencyMetrics[]

object (ToolCallLatencyMetrics)

仅限输出。相应回合中工具调用延迟时间的指标。

turnLatencyMetrics[]

object (TurnLatencyMetrics)

仅限输出。相应轮次中轮次延迟时间的指标。

EvaluationResult

JSON 表示法
{
  "name": string,
  "displayName": string,
  "createTime": string,
  "evaluationStatus": enum (Outcome),
  "evaluationRun": string,
  "persona": {
    object (EvaluationPersona)
  },
  "errorInfo": {
    object (EvaluationErrorInfo)
  },
  "error": {
    object (Status)
  },
  "initiatedBy": string,
  "appVersion": string,
  "appVersionDisplayName": string,
  "changelog": string,
  "changelogCreateTime": string,
  "executionState": enum (ExecutionState),
  "evaluationMetricsThresholds": {
    object (EvaluationMetricsThresholds)
  },
  "config": {
    object (EvaluationConfig)
  },
  "goldenRunMethod": enum (GoldenRunMethod),

  // Union field result can be only one of the following:
  "goldenResult": {
    object (GoldenResult)
  },
  "scenarioResult": {
    object (ScenarioResult)
  }
  // End of list of possible types for union field result.
}
字段
name

string

标识符。评估结果的唯一标识符。格式:projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{result}

displayName

string

必需。评估结果的显示名称。在评估中是唯一的。默认情况下,其格式如下:“ 结果 - ”。

createTime

string (Timestamp format)

仅限输出。创建评估结果时的时间戳。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

evaluationStatus

enum (Outcome)

仅限输出。评估结果。仅在 execution_state 为 COMPLETE 时填充。

evaluationRun

string

仅限输出。生成相应结果的评估运行。格式:projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}

persona

object (EvaluationPersona)

仅限输出。用于生成对话以评估结果的角色。

errorInfo

object (EvaluationErrorInfo)

仅限输出。评估结果的错误信息。

error
(deprecated)

object (Status)

仅限输出。已弃用:请改用 error_info。执行期间遇到的错误。

initiatedBy

string

仅限输出。发起评估运行的用户,该评估运行产生了相应结果。

appVersion

string

仅限输出。用于生成对话的应用版本,该对话最终产生了此结果。格式:projects/{project}/locations/{location}/apps/{app}/versions/{version}

appVersionDisplayName

string

仅限输出。评估所针对的 app_version 的显示名称。

changelog

string

仅限输出。评估所针对的应用版本的更改日志。如果用户在最新版本/草稿上运行评估,则会填充此字段。

changelogCreateTime

string (Timestamp format)

仅限输出。评估所针对的应用版本的更改日志的创建时间。如果用户在最新版本/草稿上运行评估,则会填充此字段。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

executionState

enum (ExecutionState)

仅限输出。评估结果执行的状态。

evaluationMetricsThresholds

object (EvaluationMetricsThresholds)

仅限输出。结果的评估阈值。

config

object (EvaluationConfig)

仅限输出。在生成此结果的评估运行中使用的配置。

goldenRunMethod

enum (GoldenRunMethod)

仅限输出。用于运行黄金评估的方法。

联合字段 result。评估结果。仅当 execution_state 为 COMPLETED 时填充。result 只能是下列其中一项:
goldenResult

object (GoldenResult)

仅限输出。黄金评估的结果。

scenarioResult

object (ScenarioResult)

仅限输出。情景评估的结果。

GoldenResult

JSON 表示法
{
  "turnReplayResults": [
    {
      object (TurnReplayResult)
    }
  ],
  "evaluationExpectationResults": [
    {
      object (EvaluationExpectationResult)
    }
  ]
}
字段
turnReplayResults[]

object (TurnReplayResult)

仅限输出。运行黄金对话的每一轮的结果。

evaluationExpectationResults[]

object (EvaluationExpectationResult)

仅限输出。评估预期结果。

TurnReplayResult

JSON 表示法
{
  "conversation": string,
  "expectationOutcome": [
    {
      object (GoldenExpectationOutcome)
    }
  ],
  "hallucinationResult": {
    object (HallucinationResult)
  },
  "toolInvocationScore": number,
  "turnLatency": string,
  "toolCallLatencies": [
    {
      object (ToolCallLatency)
    }
  ],
  "semanticSimilarityResult": {
    object (SemanticSimilarityResult)
  },
  "overallToolInvocationResult": {
    object (OverallToolInvocationResult)
  },
  "errorInfo": {
    object (EvaluationErrorInfo)
  },
  "spanLatencies": [
    {
      object (SpanLatency)
    }
  ],

  // Union field _tool_ordered_invocation_score can be only one of the following:
  "toolOrderedInvocationScore": number
  // End of list of possible types for union field
  // _tool_ordered_invocation_score.
}
字段
conversation

string

仅限输出。为相应对话轮次生成的对话。

expectationOutcome[]

object (GoldenExpectationOutcome)

仅限输出。每项预期结果。

hallucinationResult

object (HallucinationResult)

仅限输出。幻觉检查的结果。

toolInvocationScore
(deprecated)

number

仅限输出。已弃用。请改用 OverallToolInvocationResult。

turnLatency

string (Duration format)

仅限输出。回合时长。

该时长以秒为单位,最多包含九个小数位,以“s”结尾。示例:"3.5s"

toolCallLatencies[]

object (ToolCallLatency)

仅限输出。相应回合中每次工具调用的延迟时间。

semanticSimilarityResult

object (SemanticSimilarityResult)

仅限输出。语义相似性检查的结果。

overallToolInvocationResult

object (OverallToolInvocationResult)

仅限输出。整个工具调用检查的结果。

errorInfo

object (EvaluationErrorInfo)

仅限输出。有关此回合期间发生的错误的信息。

spanLatencies[]

object (SpanLatency)

仅限输出。相应轮次中 span 的延迟时间。

联合字段 _tool_ordered_invocation_score

_tool_ordered_invocation_score 只能是下列其中一项:

toolOrderedInvocationScore

number

仅限输出。相应对话轮次的总体工具调用得分。这表示预期轮次中实际按预期顺序调用的工具占总工具数的百分比。

GoldenExpectationOutcome

JSON 表示法
{
  "expectation": {
    object (GoldenExpectation)
  },
  "outcome": enum (Outcome),
  "semanticSimilarityResult": {
    object (SemanticSimilarityResult)
  },
  "toolInvocationResult": {
    object (ToolInvocationResult)
  },

  // Union field result can be only one of the following:
  "observedToolCall": {
    object (ToolCall)
  },
  "observedToolResponse": {
    object (ToolResponse)
  },
  "observedAgentResponse": {
    object (Message)
  },
  "observedAgentTransfer": {
    object (AgentTransfer)
  }
  // End of list of possible types for union field result.
}
字段
expectation

object (GoldenExpectation)

仅限输出。已评估的预期。

outcome

enum (Outcome)

仅限输出。预期结果。

semanticSimilarityResult
(deprecated)

object (SemanticSimilarityResult)

仅限输出。语义相似性检查的结果。

toolInvocationResult

object (ToolInvocationResult)

仅限输出。工具调用检查的结果。

联合字段 result。预期结果。result 只能是下列其中一项:
observedToolCall

object (ToolCall)

仅限输出。工具调用预期结果。

observedToolResponse

object (ToolResponse)

仅限输出。工具响应预期结果。

observedAgentResponse

object (Message)

仅限输出。代理回答预期结果。

observedAgentTransfer

object (AgentTransfer)

仅限输出。代理转移预期结果。

SemanticSimilarityResult

JSON 表示法
{
  "label": string,
  "explanation": string,
  "outcome": enum (Outcome),

  // Union field _score can be only one of the following:
  "score": integer
  // End of list of possible types for union field _score.
}
字段
label

string

仅限输出。与每个得分相关联的标签。得分 4:完全一致得分 3:基本一致得分 2:部分一致(略有遗漏)得分 1:基本不一致(严重遗漏)得分 0:完全不一致 / 矛盾

explanation

string

仅限输出。语义相似度得分的说明。

outcome

enum (Outcome)

仅限输出。语义相似度检查的结果。这是通过将得分与 semantic_similarity_success_threshold 进行比较来确定的。如果得分等于或高于阈值,结果将为“通过”。否则,结果将为 FAIL。

联合字段 _score

_score 只能是下列其中一项:

score

integer

仅限输出。语义相似度得分。可以是 0、1、2、3 或 4。

ToolInvocationResult

JSON 表示法
{
  "outcome": enum (Outcome),
  "explanation": string,

  // Union field _parameter_correctness_score can be only one of the following:
  "parameterCorrectnessScore": number
  // End of list of possible types for union field _parameter_correctness_score.
}
字段
outcome

enum (Outcome)

仅限输出。工具调用检查的结果。这是通过将 parameter_correctness_score 与阈值进行比较来确定的。如果得分等于或高于阈值,结果将为“通过”。否则,结果将为 FAIL。

explanation

string

仅限输出。工具调用结果的自由文本说明。

联合字段 _parameter_correctness_score

_parameter_correctness_score 只能是下列其中一项:

parameterCorrectnessScore

number

仅限输出。工具调用参数正确性得分。这表示预期工具调用中也出现在实际工具调用中的参数所占的百分比。

HallucinationResult

JSON 表示法
{
  "label": string,
  "explanation": string,

  // Union field _score can be only one of the following:
  "score": integer
  // End of list of possible types for union field _score.
}
字段
label

string

仅限输出。与每个得分相关联的标签。得分 1:合理得分 0:不合理得分 -1:无声明可评估

explanation

string

仅限输出。幻觉得分的说明。

联合字段 _score

_score 只能是下列其中一项:

score

integer

仅限输出。出现幻觉的得分。可以是 -1、0、1。

ToolCallLatency

JSON 表示法
{
  "tool": string,
  "displayName": string,
  "startTime": string,
  "endTime": string,
  "executionLatency": string
}
字段
tool

string

仅限输出。已执行的工具的名称。格式:projects/{project}/locations/{location}/apps/{app}/tools/{tool}

displayName

string

仅限输出。工具的显示名称。

startTime

string (Timestamp format)

仅限输出。工具调用执行的开始时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

endTime

string (Timestamp format)

仅限输出。工具调用执行的结束时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

executionLatency

string (Duration format)

仅限输出。工具调用执行的延迟时间。

该时长以秒为单位,最多包含九个小数位,以“s”结尾。示例:"3.5s"

OverallToolInvocationResult

JSON 表示法
{
  "outcome": enum (Outcome),

  // Union field _tool_invocation_score can be only one of the following:
  "toolInvocationScore": number
  // End of list of possible types for union field _tool_invocation_score.
}
字段
outcome

enum (Outcome)

仅限输出。工具调用检查的结果。这是通过将 tool_invocation_score 与 overall_tool_invocation_correctness_threshold 进行比较来确定的。如果得分等于或高于阈值,结果将为“通过”。否则,结果将为 FAIL。

联合字段 _tool_invocation_score

_tool_invocation_score 只能是下列其中一项:

toolInvocationScore

number

相应对话轮次的总体工具调用得分。此指标表示实际调用的工具占预期回合中工具总数的百分比。

EvaluationErrorInfo

JSON 表示法
{
  "errorType": enum (ErrorType),
  "errorMessage": string,
  "sessionId": string
}
字段
errorType

enum (ErrorType)

仅限输出。错误类型。

errorMessage

string

仅限输出。错误消息。

sessionId

string

仅限输出。导致错误的对话的会话 ID。

SpanLatency

JSON 表示法
{
  "type": enum (Type),
  "displayName": string,
  "startTime": string,
  "endTime": string,
  "executionLatency": string,

  // Union field identifier can be only one of the following:
  "resource": string,
  "toolset": {
    object (ToolsetTool)
  },
  "model": string,
  "callback": string
  // End of list of possible types for union field identifier.
}
字段
type

enum (Type)

仅限输出。跨度的类型。

displayName

string

仅限输出。span 的显示名称。适用于工具和保护措施范围。

startTime

string (Timestamp format)

仅限输出。span 的开始时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

endTime

string (Timestamp format)

仅限输出。时间段的结束时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

executionLatency

string (Duration format)

仅限输出。span 的延迟时间。

该时长以秒为单位,最多包含九个小数位,以“s”结尾。示例:"3.5s"

联合字段 identifier。特定商品的标识符(取决于商品类型)。identifier 只能是下列其中一项:
resource

string

仅限输出。防护栏或工具 span 的资源名称。

toolset

object (ToolsetTool)

仅限输出。工具集工具标识符。

model

string

仅限输出。LLM span 的名称。

callback

string

仅限输出。用户回调 span 的名称。

EvaluationExpectationResult

JSON 表示法
{
  "evaluationExpectation": string,
  "prompt": string,
  "outcome": enum (Outcome),
  "explanation": string
}
字段
evaluationExpectation

string

仅限输出。评估预期。格式:projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}

prompt

string

仅限输出。用于评估的提示。

outcome

enum (Outcome)

仅限输出。评估预期结果。

explanation

string

仅限输出。结果的说明。

ScenarioResult

JSON 表示法
{
  "conversation": string,
  "task": string,
  "userFacts": [
    {
      object (UserFact)
    }
  ],
  "expectationOutcomes": [
    {
      object (ScenarioExpectationOutcome)
    }
  ],
  "rubricOutcomes": [
    {
      object (ScenarioRubricOutcome)
    }
  ],
  "hallucinationResult": [
    {
      object (HallucinationResult)
    }
  ],
  "taskCompletionResult": {
    object (TaskCompletionResult)
  },
  "toolCallLatencies": [
    {
      object (ToolCallLatency)
    }
  ],
  "userGoalSatisfactionResult": {
    object (UserGoalSatisfactionResult)
  },
  "spanLatencies": [
    {
      object (SpanLatency)
    }
  ],
  "evaluationExpectationResults": [
    {
      object (EvaluationExpectationResult)
    }
  ],

  // Union field _all_expectations_satisfied can be only one of the following:
  "allExpectationsSatisfied": boolean
  // End of list of possible types for union field _all_expectations_satisfied.

  // Union field _task_completed can be only one of the following:
  "taskCompleted": boolean
  // End of list of possible types for union field _task_completed.
}
字段
conversation

string

仅限输出。相应场景中生成的对话。

task

string

仅限输出。运行相应结果的场景时所用的任务。

userFacts[]

object (UserFact)

仅限输出。相应结果所对应的方案使用的用户事实。

expectationOutcomes[]

object (ScenarioExpectationOutcome)

仅限输出。每项预期结果。

rubricOutcomes[]

object (ScenarioRubricOutcome)

仅限输出。评分准则的结果。

hallucinationResult[]

object (HallucinationResult)

仅限输出。幻觉检查的结果。对话中的每一轮都会有一个幻觉结果。

taskCompletionResult
(deprecated)

object (TaskCompletionResult)

仅限输出。任务完成情况检查的结果。

toolCallLatencies[]

object (ToolCallLatency)

仅限输出。对话中每次工具调用执行的延迟时间。

userGoalSatisfactionResult

object (UserGoalSatisfactionResult)

仅限输出。用户目标达成情况检查的结果。

spanLatencies[]

object (SpanLatency)

仅限输出。对话中 span 的延迟时间。

evaluationExpectationResults[]

object (EvaluationExpectationResult)

仅限输出。评估预期结果。

联合字段 _all_expectations_satisfied

_all_expectations_satisfied 只能是下列其中一项:

allExpectationsSatisfied

boolean

仅限输出。相应回合是否满足了所有预期。

联合字段 _task_completed

_task_completed 只能是下列其中一项:

taskCompleted

boolean

仅限输出。相应任务是否已在此回合中完成。这是所有已满足的期望、无幻觉和用户目标达成情况的综合体现。

ScenarioExpectationOutcome

JSON 表示法
{
  "expectation": {
    object (ScenarioExpectation)
  },
  "outcome": enum (Outcome),

  // Union field result can be only one of the following:
  "observedToolCall": {
    object (ObservedToolCall)
  },
  "observedAgentResponse": {
    object (Message)
  }
  // End of list of possible types for union field result.
}
字段
expectation

object (ScenarioExpectation)

仅限输出。已评估的预期。

outcome

enum (Outcome)

仅限输出。ScenarioExpectation 的结果。

联合字段 result。预期结果。result 只能是下列其中一项:
observedToolCall

object (ObservedToolCall)

仅限输出。观测到的工具调用。

observedAgentResponse

object (Message)

仅限输出。观察到的智能体回答。

ObservedToolCall

JSON 表示法
{
  "toolCall": {
    object (ToolCall)
  },
  "toolResponse": {
    object (ToolResponse)
  }
}
字段
toolCall

object (ToolCall)

仅限输出。观测到的工具调用。

toolResponse

object (ToolResponse)

仅限输出。观察到的工具响应。

ScenarioRubricOutcome

JSON 表示法
{
  "rubric": string,
  "scoreExplanation": string,

  // Union field _score can be only one of the following:
  "score": number
  // End of list of possible types for union field _score.
}
字段
rubric

string

仅限输出。用于评估对话的评分标准。

scoreExplanation

string

仅限输出。评分者对评分准则的回答。

联合字段 _score

_score 只能是下列其中一项:

score

number

仅限输出。对话根据评分准则得出的分数。

TaskCompletionResult

JSON 表示法
{
  "label": string,
  "explanation": string,

  // Union field _score can be only one of the following:
  "score": integer
  // End of list of possible types for union field _score.
}
字段
label

string

仅限输出。与每个得分相关联的标签。得分 1:任务已完成得分 0:任务未完成得分 -1:用户目标未定义

explanation

string

仅限输出。任务完成得分的说明。

联合字段 _score

_score 只能是下列其中一项:

score

integer

仅限输出。任务完成得分。可以是 -1、0、1

UserGoalSatisfactionResult

JSON 表示法
{
  "label": string,
  "explanation": string,

  // Union field _score can be only one of the following:
  "score": integer
  // End of list of possible types for union field _score.
}
字段
label

string

仅限输出。与每个得分相关联的标签。得分 1:用户任务已完成得分 0:用户任务未完成得分 -1:用户任务未指定

explanation

string

仅限输出。用户任务完成度得分的说明。

联合字段 _score

_score 只能是下列其中一项:

score

integer

仅限输出。用户任务完成满意度得分。可以是 -1、0、1。

EvaluationPersona

JSON 表示法
{
  "name": string,
  "description": string,
  "displayName": string,
  "personality": string,
  "speechConfig": {
    object (SpeechConfig)
  }
}
字段
name

string

必需。角色的唯一标识符。格式:projects/{project}/locations/{location}/apps/{app}/evaluationPersonas/{evaluationPersona}

description

string

可选。角色的说明。

displayName

string

必需。角色的显示名称。在应用内是唯一的。

personality

string

必需。有关代理在评估中应如何表现的指令。

speechConfig

object (SpeechConfig)

可选。角色声音的配置(文字转语音设置)。

SpeechConfig

JSON 表示法
{
  "speakingRate": number,
  "environment": enum (BackgroundEnvironment),
  "voiceId": string
}
字段
speakingRate

number

可选。语速。1.0 为正常值。值越低,速度越慢(例如 0.8),值越高速度越快(例如 1.5)。有助于测试代理如何处理语速较快的用户。

environment

enum (BackgroundEnvironment)

可选。模拟音频环境。

voiceId

string

可选。要使用的特定语音标识符/口音。示例:“en-US-Wavenet-D”或“en-GB-Standard-A”

状态

JSON 表示法
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
字段
code

integer

状态代码,应为 google.rpc.Code 的枚举值。

message

string

面向开发者的错误消息(应采用英语)。任何向用户显示的错误消息都应进行本地化并通过 google.rpc.Status.details 字段发送,或者由客户端进行本地化。

details[]

object

包含错误详细信息的消息列表。有一组通用的消息类型可供 API 使用。

可以包含任意类型字段的对象。附加字段 "@type" 包含用于标示相应类型的 URI。示例:{ "id": 1234, "@type": "types.example.com/standard/id" }

不限

JSON 表示法
{
  "typeUrl": string,
  "value": string
}
字段
typeUrl

string

通过 URI 引用(包含以斜杠结尾的前缀和完全限定的类型名称)来标识序列化 Protobuf 消息的类型。

示例:type.googleapis.com/google.protobuf.StringValue

此字符串必须包含至少一个 / 字符,并且最后一个 / 之后的内容必须是规范形式的完全限定名,不含前导点。请勿在这些 URI 引用中写入方案,以免客户端尝试联系它们。

前缀是任意的,Protobuf 实现应仅剥离最后一个 / 之前(包括最后一个 /)的所有内容,以识别类型。type.googleapis.com/ 是某些旧版实现所需的常见默认前缀。此前缀并不表示类型的来源,包含该前缀的 URI 不应响应任何请求。

所有类型网址字符串都必须是合法的 URI 引用,并且(对于文本格式)还必须满足以下额外限制:引用的内容只能包含字母数字字符、百分号编码的转义字符以及以下集合中的字符(不包括外侧的反引号):/-.~_!$&()*+,;=。尽管我们允许百分比编码,但实现不应对其进行转义,以免与现有解析器混淆。例如,应拒绝 type.googleapis.com%2FFoo

Any 的原始设计中,曾考虑过在这些类型网址上启动类型解析服务的可能性,但 Protobuf 从未实现过该服务,并且认为联系这些网址存在问题,可能会导致安全问题。不尝试联系人类型网址。

value

string (bytes format)

包含由 type_url 描述的类型的 Protobuf 序列化。

使用 base64 编码的字符串。

EvaluationMetricsThresholds

JSON 表示法
{
  "goldenEvaluationMetricsThresholds": {
    object (GoldenEvaluationMetricsThresholds)
  },
  "hallucinationMetricBehavior": enum (HallucinationMetricBehavior),
  "goldenHallucinationMetricBehavior": enum (HallucinationMetricBehavior),
  "scenarioHallucinationMetricBehavior": enum (HallucinationMetricBehavior)
}
字段
goldenEvaluationMetricsThresholds

object (GoldenEvaluationMetricsThresholds)

可选。黄金评估指标阈值。

hallucinationMetricBehavior
(deprecated)

enum (HallucinationMetricBehavior)

可选。已弃用:请改用 golden_hallucination_metric_behavior。目前,幻觉指标行为用于黄金评估。

goldenHallucinationMetricBehavior

enum (HallucinationMetricBehavior)

可选。黄金评估的幻觉指标行为。

scenarioHallucinationMetricBehavior

enum (HallucinationMetricBehavior)

可选。用于评估方案的幻觉指标行为。

GoldenEvaluationMetricsThresholds

JSON 表示法
{
  "turnLevelMetricsThresholds": {
    object (TurnLevelMetricsThresholds)
  },
  "expectationLevelMetricsThresholds": {
    object (ExpectationLevelMetricsThresholds)
  },
  "toolMatchingSettings": {
    object (ToolMatchingSettings)
  }
}
字段
turnLevelMetricsThresholds

object (TurnLevelMetricsThresholds)

可选。对话轮次级指标阈值。

expectationLevelMetricsThresholds

object (ExpectationLevelMetricsThresholds)

可选。预期级别指标阈值。

toolMatchingSettings

object (ToolMatchingSettings)

可选。工具匹配设置。额外的工具调用是指在执行中存在但在黄金预期中没有任何匹配的工具调用。

TurnLevelMetricsThresholds

JSON 表示法
{
  "semanticSimilarityChannel": enum (SemanticSimilarityChannel),

  // Union field _semantic_similarity_success_threshold can be only one of the
  // following:
  "semanticSimilaritySuccessThreshold": integer
  // End of list of possible types for union field
  // _semantic_similarity_success_threshold.

  // Union field _overall_tool_invocation_correctness_threshold can be only one
  // of the following:
  "overallToolInvocationCorrectnessThreshold": number
  // End of list of possible types for union field
  // _overall_tool_invocation_correctness_threshold.
}
字段
semanticSimilarityChannel

enum (SemanticSimilarityChannel)

可选。用于评估的语义相似度渠道。

联合字段 _semantic_similarity_success_threshold

_semantic_similarity_success_threshold 只能是下列其中一项:

semanticSimilaritySuccessThreshold

integer

可选。语义相似度的成功阈值。必须是介于 0 到 4 之间的整数。默认值为 >= 3。

联合字段 _overall_tool_invocation_correctness_threshold

_overall_tool_invocation_correctness_threshold 只能是下列其中一项:

overallToolInvocationCorrectnessThreshold

number

可选。工具调用的总体正确性成功阈值。必须是介于 0 到 1 之间的浮点数。默认值为 1.0。

ExpectationLevelMetricsThresholds

JSON 表示法
{

  // Union field _tool_invocation_parameter_correctness_threshold can be only one
  // of the following:
  "toolInvocationParameterCorrectnessThreshold": number
  // End of list of possible types for union field
  // _tool_invocation_parameter_correctness_threshold.
}
字段

联合字段 _tool_invocation_parameter_correctness_threshold

_tool_invocation_parameter_correctness_threshold 只能是下列其中一项:

toolInvocationParameterCorrectnessThreshold

number

可选。单个工具调用参数正确性的成功阈值。必须是介于 0 到 1 之间的浮点数。默认值为 1.0。

ToolMatchingSettings

JSON 表示法
{
  "extraToolCallBehavior": enum (ExtraToolCallBehavior)
}
字段
extraToolCallBehavior

enum (ExtraToolCallBehavior)

可选。针对额外工具调用的行为。默认值为 FAIL。

EvaluationConfig

JSON 表示法
{
  "inputAudioConfig": {
    object (InputAudioConfig)
  },
  "outputAudioConfig": {
    object (OutputAudioConfig)
  },
  "evaluationChannel": enum (EvaluationChannel),
  "toolCallBehaviour": enum (EvaluationToolCallBehaviour)
}
字段
inputAudioConfig
(deprecated)

object (InputAudioConfig)

可选。用于处理输入音频的配置。

outputAudioConfig
(deprecated)

object (OutputAudioConfig)

可选。用于生成输出音频的配置。

evaluationChannel

enum (EvaluationChannel)

可选。要评估的渠道。

toolCallBehaviour

enum (EvaluationToolCallBehaviour)

可选。指定评估应使用真实的工具调用还是虚假的工具。

InputAudioConfig

JSON 表示法
{
  "audioEncoding": enum (AudioEncoding),
  "sampleRateHertz": integer,
  "noiseSuppressionLevel": string
}
字段
audioEncoding

enum (AudioEncoding)

必需。输入音频数据的编码。

sampleRateHertz

integer

必需。输入音频数据的采样率(以赫兹为单位)。

noiseSuppressionLevel

string

可选。是否对输入音频启用噪声抑制。可选的值包括“low”“moderate”“high”“very_high”。

OutputAudioConfig

JSON 表示法
{
  "audioEncoding": enum (AudioEncoding),
  "sampleRateHertz": integer
}
字段
audioEncoding

enum (AudioEncoding)

必需。输出音频数据的编码。

sampleRateHertz

integer

必需。输出音频数据的采样率(以赫兹为单位)。

工具注释

破坏性提示:❌ | 等幂性提示:✅ | 只读提示:✅ | 开放世界提示:❌