MCP Tools Reference: ces.googleapis.com

工具:update_evaluation

更新指定的評估作業。請務必在輸入內容中傳遞更新遮罩。

下列程式碼範例說明如何使用 curl 呼叫 update_evaluation MCP 工具。

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

輸入內容的結構定義

EvaluationService.UpdateEvaluation 的要求訊息。

UpdateEvaluationRequest

JSON 表示法
{
  "evaluation": {
    object (Evaluation)
  },
  "updateMask": string
}
欄位
evaluation

object (Evaluation)

這是必要旗標,要更新的評估作業。

updateMask

string (FieldMask format)

選用。欄位遮罩可用來控制要更新的欄位。如未提供遮罩,系統會更新所有欄位。

這是以半形逗號分隔的完整欄位名稱清單,範例:"user.displayName,photo"。

評估

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)
    }
  ],
  "evaluationMetricsThresholdOverride": {
    object (EvaluationMetricsThresholds)
  },
  "evaluationMetricsConfigOverride": {
    object (EvaluationMetricsConfig)
  },

  // 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

ID。這項評估的專屬 ID。格式: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 正規化,並使用 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 正規化,並使用 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 時,系統才會填入這個欄位。

evaluationMetricsThresholdOverride

object (EvaluationMetricsThresholds)

選用。覆寫這項特定評估的指標門檻。

evaluationMetricsConfigOverride

object (EvaluationMetricsConfig)

選用。覆寫這項特定評估作業的指標設定。

聯集欄位 inputs。評估 inputs 的輸入內容只能是下列其中一項:
golden

object (Golden)

選用。要評估的黃金步驟。

scenario

object (Scenario)

選用。情境設定。

金黃

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

object (GoldenTurn)

這是必要旗標,重播黃金對話所需的黃金回合。對話回合數上限為 100。

evaluationExpectations[]

string

選用。評估重播對話時的預期結果。格式:projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}

GoldenTurn

JSON 表示法
{
  "steps": [
    {
      object (Step)
    }
  ],
  "rootSpan": {
    object (Span)
  },
  "turnLevelMetricsThresholdsOverride": {
    object (TurnLevelMetricsThresholds)
  },
  "hallucinationMetricBehaviorOverride": enum (HallucinationMetricBehavior)
}
欄位
steps[]

object (Step)

這是必要旗標,重播黃金對話所需的步驟。

rootSpan

object (Span)

選用。處理及維護音訊資訊的黃金回合根時距。音訊的 URI 必須包含以 16Khz 取樣率儲存的音訊。

turnLevelMetricsThresholdsOverride

object (TurnLevelMetricsThresholds)

選用。覆寫回合層級指標門檻。

hallucinationMetricBehaviorOverride

enum (HallucinationMetricBehavior)

選用。覆寫回合層級幻覺指標行為。

步驟

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,
  "recordingControl": enum (RecordingControl),

  // 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_continue 為 false 的後續訊息,或系統偵測到音訊輸入中的端點。

注意:這個欄位不適用於音訊和 DTMF 輸入,因為系統一律會根據端點信號自動處理這些輸入。

recordingControl

enum (RecordingControl)

選用。是否要從現在起錄製及記錄對話。

如果是由應用程式 (而非代理) 決定可保留的內容,請使用這個選項。舉例來說,使用者必須先同意錄音,系統才能儲存通話相關內容。

這個值會持續有效,直到用戶端傳送不同的值為止,因此只有在答案變更時才需要傳送。一輪對話結束時,系統會根據當時生效的設定,決定該輪對話的音訊是否會傳送至錄音 bucket,以及轉錄稿是否會傳送至對話記錄、BigQuery 和 Cloud Logging。涵蓋代理和使用者雙方的對話內容。

在用戶端首次傳送此欄位之前完成的回合,會根據應用程式的記錄設定記錄,就像該欄位不存在一樣。

如果同一要求中有多個輸入內容設定了這個值,則以最後一個為準。

聯集欄位 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
  },
  "parentToolCallId": string,
  "agentName": string,
  "targetApp": string,

  // 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

選用。回覆所屬 tool call 的相符 ID。

displayName

string

僅供輸出。工具的顯示名稱。

response

object (Struct format)

這是必要旗標,JSON 物件格式的工具執行結果。請使用「output」鍵指定工具回覆,並使用「error」鍵指定錯誤詳細資料 (如有)。如未指定「output」和「error」鍵,整個「response」都會視為工具執行結果。

parentToolCallId

string

僅供輸出。如果工具呼叫是由代表父項呼叫的子代理發出,則此為導致該呼叫的工具呼叫 ID。頂層呼叫為空白。讓用戶端將子代理的工作分組到啟動該工作的呼叫下,而不是將每個步驟算做同層級。

agentName

string

僅供輸出。發出這項呼叫的代理人類可讀名稱,例如「Contract Architect」。如果是由根層級代理發出,則為空白。

targetApp

string

僅供輸出。執行工具指定的應用程式;與 ToolCall.target_app 相同。

聯集欄位 tool_identifier。已執行工具的 ID。可以是永久工具或工具集中的工具。tool_identifier 只能是下列其中一個設定:
tool

string

選用。要執行的工具名稱。格式:projects/{project}/locations/{location}/apps/{app}/tools/{tool}

toolsetTool

object (ToolsetTool)

選用。已執行的工具組工具。

ToolsetTool

JSON 表示法
{
  "toolset": string,
  "toolId": string
}
欄位
toolset

string

這是必要旗標,這個工具衍生自的工具集資源名稱。格式: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

代表 JSON null。

numberValue

number

代表 JSON 數字。不得為 NaN、Infinity 或 -Infinity,因為 JSON 不支援這些值。此外,這也無法代表大型 Int64 值,因為 JSON 格式通常不支援數字類型的 Int64 值。

stringValue

string

代表 JSON 字串。

boolValue

boolean

代表 JSON 布林值 (JSON 中的 true 或 false 常值)。

structValue

object (Struct format)

代表 JSON 物件。

listValue

array (ListValue format)

代表 JSON 陣列。

ListValue

JSON 表示法
{
  "values": [
    value
  ]
}
欄位
values[]

value (Value format)

動態類型值的重複欄位。

圖片

JSON 表示法
{
  "mimeType": string,
  "data": string,
  "altText": string
}
欄位
mimeType

string

這是必要旗標,來源資料的 IANA 標準 MIME 類型。支援的圖片類型包括:* image/png * image/jpeg * image/webp

data

string (bytes format)

這是必要旗標,圖片的原始位元組。

Base64 編碼字串。

altText

string

選用。圖片的替代文字。

Blob

JSON 表示法
{
  "mimeType": string,
  "data": string
}
欄位
mimeType

string

這是必要旗標,來源資料的 IANA 標準 MIME 類型。

data

string (bytes format)

這是必要旗標,Blob 的原始位元組。

Base64 編碼字串。

事件

JSON 表示法
{
  "event": string,
  "variables": {
    object
  }
}
欄位
event

string

這是必要旗標,事件名稱。

variables

object (Struct format)

選用。與事件相關聯的其他變數。

AgentTransfer

JSON 表示法
{
  "targetAgent": string,
  "displayName": string
}
欄位
targetAgent

string

這是必要旗標,對話轉移到的代理。代理會從這個時間點開始處理對話。格式:projects/{project}/locations/{location}/apps/{app}/agents/{agent}

displayName

string

僅供輸出。代理的顯示名稱。

GoldenExpectation

JSON 表示法
{
  "note": string,
  "skipEvaluation": boolean,
  "expectationLevelMetricsThresholdsOverride": {
    object (ExpectationLevelMetricsThresholds)
  },
  "agentResponseSemanticSimilarityMetricsConfigOverride": {
    object (SemanticSimilarityMetricsConfig)
  },
  "agentResponseHallucinationMetricsConfigOverride": {
    object (HallucinationMetricsConfig)
  },
  "comparisonType": enum (ComparisonType),

  // 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)
  },
  "noToolCalls": boolean
  // End of list of possible types for union field condition.
}
欄位
note

string

選用。這項規定的附註,在特定檢查失敗時,可用於回報。例如:"Check_Payment_Tool_Called".

skipEvaluation

boolean

選用。如果設為 true,系統就不會評估這項特定預期。

expectationLevelMetricsThresholdsOverride

object (ExpectationLevelMetricsThresholds)

選用。覆寫步驟層級的指標。

agentResponseSemanticSimilarityMetricsConfigOverride

object (SemanticSimilarityMetricsConfig)

選用。覆寫 agent_response 語意相似度指標。

agentResponseHallucinationMetricsConfigOverride

object (HallucinationMetricsConfig)

選用。覆寫 agent_response 幻覺指標。

comparisonType

enum (ComparisonType)

選用。預期檢查使用的比較類型。

聯集欄位 condition。實際執行的檢查。condition 只能是下列其中一個設定:
toolCall

object (ToolCall)

選用。確認是否使用參數呼叫特定工具。

toolResponse

object (ToolResponse)

選用。確認特定工具是否產生預期回覆。

agentResponse

object (Message)

選用。確認代理的回覆是否正確。系統會自動假設角色為「agent」。

agentTransfer

object (AgentTransfer)

選用。確認代理已將對話轉給其他代理。

updatedVariables

object (Struct format)

選用。確認代理已將工作階段變數更新為預期值。也用於擷取黃金評估的代理變數更新。

mockToolResponse

object (ToolResponse)

選用。要模擬的工具回應,並指定相關參數。未指定的參數會由 LLM 幻覺生成。

noToolCalls

boolean

選用。確認這個回合未呼叫任何工具。

ToolCall

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

  // 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。如果已填入,用戶端應在 ToolResponse 中傳回具有相符的 ID 的執行結果。

displayName

string

僅供輸出。工具的顯示名稱。

args

object (Struct format)

選用。工具的輸入參數和值,採用 JSON 物件格式。

parentToolCallId

string

僅供輸出。如果工具呼叫是由代表父項呼叫的子代理發出,則此為導致該呼叫的工具呼叫 ID。頂層呼叫為空白。讓用戶端將子代理的工作分組到啟動該工作的呼叫下,而不是將每個步驟算做同層級。

agentName

string

僅供輸出。發出這項呼叫的代理人類可讀名稱,例如「Contract Architect」。如果是由根層級代理發出,則為空白。

targetApp

string

僅供輸出。這項呼叫指定的應用程式,由助理從呼叫的資源引數衍生:應用程式資源名稱、位置範圍工具的 PROJECT,或工作階段本機工具的空白。僅在專案範圍的助理工作階段中設定。

聯集欄位 tool_identifier。要執行的工具 ID。可以是永久工具或工具集中的工具。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 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

Chunk

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)

struct 代表對話中更新的變數,以變數名稱為鍵。

defaultVariables

object (Struct format)

struct 代表對話開始時的預設變數,以變數名稱為索引鍵。

時間戳記

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
欄位
seconds

string (int64 format)

代表自 Unix 紀元 1970-01-01T00:00:00Z 起算的世界標準時間秒數。必須介於 -62135596800 和 253402300799 (含) 之間 (對應至 0001-01-01T00:00:00Z 至 9999-12-31T23:59:59Z)。

nanos

integer

非負數的秒數分數,解析度為奈秒。這個欄位是時間長度的奈秒部分,而非秒數的替代值。含有分數的負秒值仍須有非負奈秒值,以向前計算時間。必須介於 0 至 999,999,999 之間 (含 0 和 999,999,999)。

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。

SemanticSimilarityMetricsConfig

JSON 表示法
{
  "enableSemanticSimilarityMetrics": boolean
}
欄位
enableSemanticSimilarityMetrics

boolean

選用。是否要計算評估作業的語意相似度指標。

HallucinationMetricsConfig

JSON 表示法
{
  "enableHallucinationMetrics": boolean
}
欄位
enableHallucinationMetrics

boolean

選用。是否要計算評估作業的幻覺指標。

時距

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

string

僅供輸出。Span 的名稱。

startTime

string (Timestamp format)

僅供輸出。Span 的開始時間。

使用 RFC 3339,產生的輸出內容一律會經過 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)

僅供輸出。Span 的結束時間。

使用 RFC 3339,產生的輸出內容一律會經過 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 的時間長度。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「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

時間範圍內以奈秒解析度表示的有正負號秒數分數。如果時間長度不到一秒,則會以 0 seconds 欄位和正或負 nanos 欄位表示。如果時間長度為一秒以上,nanos 欄位的非零值必須與 seconds 欄位具有相同的正負號。必須介於 -999,999,999 至 +999,999,999 之間 (含)。

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。

情境

JSON 表示法
{
  "task": string,
  "userFacts": [
    {
      object (UserFact)
    }
  ],
  "maxTurns": integer,
  "rubrics": [
    string
  ],
  "scenarioExpectations": [
    {
      object (ScenarioExpectation)
    }
  ],
  "variableOverrides": {
    object
  },
  "taskCompletionBehavior": enum (TaskCompletionBehavior),
  "userGoalBehavior": enum (UserGoalBehavior),
  "evaluationExpectations": [
    string
  ],
  "milestones": [
    {
      object (Milestone)
    }
  ],
  "scenarioExecutionMode": enum (ScenarioExecutionMode)
}
欄位
task

string

這是必要旗標,情境要指定的任務。

userFacts[]

object (UserFact)

選用。情境要使用的使用者事實。

maxTurns

integer

選用。要模擬的回合數上限。最大值為 100。預設值為 100。

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}

milestones[]

object (Milestone)

選用。這個情境的里程碑。

scenarioExecutionMode

enum (ScenarioExecutionMode)

選用。情境評估的執行模式。

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 幻覺生成。

Milestone

JSON 表示法
{
  "goal": string,
  "maxTurnCount": integer,
  "successCriteria": string,
  "protocol": string,
  "staticUtterance": string,
  "event": {
    object (Event)
  }
}
欄位
goal

string

這是必要旗標,里程碑的目標。

maxTurnCount

integer

選用。這個里程碑的回合數上限。

successCriteria

string

選用。里程碑的成功標準。

protocol

string

選用。代理在對話期間應遵循的指南。

staticUtterance

string

選用。模擬器會傳送靜態語句,而非動態生成使用者輸入內容。

event

object (Event)

選用。要傳送的事件輸入,而非動態生成。

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)

僅供輸出。工具呼叫的平均延遲時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「s」。例如:"3.5s"。

TurnLatencyMetrics

JSON 表示法
{
  "averageLatency": string
}
欄位
averageLatency

string (Duration format)

僅供輸出。對話的平均延遲時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「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),
  "rootSpan": {
    object (Span)
  },
  "outcomeMetadata": enum (OutcomeMetadata),

  // 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

ID。評估結果的專屬 ID。格式:projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{result}

displayName

string

這是必要旗標,評估結果的顯示名稱。評估作業中的專屬 ID。預設格式為「 result - "。

createTime

string (Timestamp format)

僅供輸出。評估結果的建立時間戳記。

使用 RFC 3339,產生的輸出內容一律會經過 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 正規化,並使用 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)

僅供輸出。執行黃金評估的方法。

rootSpan

object (Span)

僅供輸出。評估執行作業的根時距,包含評估各步驟的資訊。

outcomeMetadata

enum (OutcomeMetadata)

僅供輸出。評估結果中繼資料。只有在 execution_state 為 COMPLETE 時,系統才會填入這個欄位。

聯集欄位 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)

僅供輸出。轉彎所需時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「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)
  },
  "observedPayload": {
    object
  }
  // 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)

僅供輸出。代理轉移預期結果。

observedPayload

object (Struct format)

僅供輸出。觀察到的自訂酬載。自訂酬載沒有任何預期。這項資訊僅用於計算指標。結果一律為「已略過」。

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,如果分數等於或高於門檻,結果就會是「通過」。否則結果會是「失敗」。

聯集欄位 _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 和門檻,如果分數等於或高於門檻,結果就會是「通過」。否則結果會是「失敗」。

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 正規化,並使用 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 正規化,並使用 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)

僅供輸出。工具呼叫執行作業的延遲時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「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,如果分數等於或高於門檻,結果就會是「通過」。否則結果會是「失敗」。

聯集欄位 _tool_invocation_score。

_tool_invocation_score 只能是下列其中一個設定:

toolInvocationScore

number

這個回合的整體工具叫用分數。這表示實際叫用的工具占預期回合工具總數的百分比。

EvaluationErrorInfo

JSON 表示法
{
  "errorType": enum (ErrorType),
  "errorMessage": string,
  "sessionId": string,
  "userFacingErrorMessage": string
}
欄位
errorType

enum (ErrorType)

僅供輸出。錯誤類型。

errorMessage

string

僅供輸出。錯誤訊息。

sessionId

string

僅供輸出。發生錯誤的對話工作階段 ID。

userFacingErrorMessage

string

僅供輸出。使用者看到的錯誤訊息。

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)

僅供輸出。Span 類型。

displayName

string

僅供輸出。Span 的顯示名稱。適用於工具和護欄 Span。

startTime

string (Timestamp format)

僅供輸出。Span 的開始時間。

使用 RFC 3339,產生的輸出內容一律會經過 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)

僅供輸出。Span 的結束時間。

使用 RFC 3339,產生的輸出內容一律會經過 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 的延遲時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「s」。例如:"3.5s"。

聯集欄位 identifier。特定項目的 ID (依類型而定)。identifier 只能是下列其中一個設定:
resource

string

僅供輸出。護欄或工具 span 的資源名稱。

toolset

object (ToolsetTool)

僅供輸出。工具組工具 ID。

model

string

僅供輸出。LLM 跨度的名稱。

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)
    }
  ],
  "milestoneResults": [
    {
      object (MilestoneResult)
    }
  ],

  // 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)

僅供輸出。評估預期結果。

milestoneResults[]

object (MilestoneResult)

僅供輸出。情境中每個里程碑的結果。

聯集欄位 _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

僅供輸出。與各分數相關聯的標籤。分數 2:順利交接;分數 1:使用者任務已完成;分數 0:使用者任務未完成;分數 -1:使用者任務未指定

explanation

string

僅供輸出。使用者任務滿意度分數的說明。

聯集欄位 _score。

_score 只能是下列其中一個設定:

score

integer

僅供輸出。使用者工作滿意度分數。可以是 -1、0、1、2。

MilestoneResult

JSON 表示法
{
  "milestone": {
    object (Milestone)
  },
  "status": enum (MilestoneStatus),
  "justification": string
}
欄位
milestone

object (Milestone)

僅供輸出。要追蹤的里程碑。

status

enum (MilestoneStatus)

僅供輸出。里程碑的目前狀態。

justification

string

僅供輸出。目前狀態的理由。

EvaluationPersona

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

string

這是必要旗標,角色的專屬 ID。格式:projects/{project}/locations/{location}/apps/{app}/evaluationPersonas/{evaluationPersona}

description

string

選用。人物角色的說明。

displayName

string

這是必要旗標,Persona 的顯示名稱。在應用程式中不得重複。

personality

string

這是必要旗標,指示代理在評估期間應如何行動。

speechConfig

object (SpeechConfig)

選用。Persona 的聲音設定 (文字轉語音設定)。

SpeechConfig

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

number

選用。說話速率。1.0 為正常值。值越低,速度越慢 (例如 0.8);值越高,速度越快 (例如 1.5)。適合用來測試代理如何處理說話速度快的使用者。

environment

enum (BackgroundEnvironment)

選用。模擬音訊環境。

voiceId

string

選用。要使用的特定語音 ID/口音。例如:「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)

選用。工具比對設定。額外工具呼叫是指執行過程中出現,但與黃金期望中的任何工具呼叫都不相符的工具呼叫。

ToolMatchingSettings

JSON 表示法
{
  "extraToolCallBehavior": enum (ExtraToolCallBehavior)
}
欄位
extraToolCallBehavior

enum (ExtraToolCallBehavior)

選用。額外工具呼叫的行為。預設值為 FAIL。

EvaluationConfig

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

object (InputAudioConfig)

選用。處理輸入音訊的設定。

outputAudioConfig

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

這是必要旗標,輸出音訊資料的取樣率 (赫茲)。

EvaluationMetricsConfig

JSON 表示法
{
  "goldenMetricsConfig": {
    object (GoldenMetricsConfig)
  },
  "scenarioMetricsConfig": {
    object (ScenarioMetricsConfig)
  }
}
欄位
goldenMetricsConfig

object (GoldenMetricsConfig)

選用。評估黃金指標的設定。

scenarioMetricsConfig

object (ScenarioMetricsConfig)

選用。評估情境指標的設定。

GoldenMetricsConfig

JSON 表示法
{
  "semanticSimilarityMetricsConfig": {
    object (SemanticSimilarityMetricsConfig)
  },
  "toolCorrectnessMetricsConfig": {
    object (ToolCorrectnessMetricsConfig)
  },
  "stepToolCorrectnessMetricsConfig": {
    object (ToolCorrectnessMetricsConfig)
  }
}
欄位
semanticSimilarityMetricsConfig

object (SemanticSimilarityMetricsConfig)

選用。語意相似度指標的全域設定。

toolCorrectnessMetricsConfig

object (ToolCorrectnessMetricsConfig)

選用。回合層級工具正確性指標的設定。

stepToolCorrectnessMetricsConfig

object (ToolCorrectnessMetricsConfig)

選用。步驟層級工具正確性指標的設定。

ToolCorrectnessMetricsConfig

JSON 表示法
{
  "enableToolCorrectnessMetrics": boolean
}
欄位
enableToolCorrectnessMetrics

boolean

選用。是否要計算評估作業的工具正確性指標。

ScenarioMetricsConfig

JSON 表示法
{
  "userGoalMetMetricsConfig": {
    object (UserGoalMetMetricsConfig)
  },
  "expectationsMetMetricsConfig": {
    object (ExpectationsMetMetricsConfig)
  }
}
欄位
userGoalMetMetricsConfig

object (UserGoalMetMetricsConfig)

選用。使用者目標達成指標的設定。

expectationsMetMetricsConfig

object (ExpectationsMetMetricsConfig)

選用。預期層級指標的設定。

UserGoalMetMetricsConfig

JSON 表示法
{
  "enableUserGoalMetMetrics": boolean
}
欄位
enableUserGoalMetMetrics

boolean

選用。是否要計算評估的使用者目標達成指標。

ExpectationsMetMetricsConfig

JSON 表示法
{
  "enableExpectationsMetMetrics": boolean
}
欄位
enableExpectationsMetMetrics

boolean

選用。是否要計算評估的期望層級指標。

FieldMask

JSON 表示法
{
  "paths": [
    string
  ]
}
欄位
paths[]

string

欄位遮罩路徑組合。

NullValue

代表 JSON null。

NullValue 是哨兵,使用只有一個值的列舉,代表 Value 類型聯集的空值。

NullValue 類型的欄位若含有 0 以外的值,則視為無效。無論整數值為何,大多數 ProtoJSON 序列化工具都會發出 Value,並將 null_value 設為 JSON null,因此會來回 0 值。

列舉
NULL_VALUE 空值。

RecordingControl

應用程式做出的決定可能會記錄下來。

這個列舉可擴充,日後可能會新增值。

列舉
RECORDING_CONTROL_UNSPECIFIED 應用程式並未控制錄製功能。應用程式的記錄設定會決定,就像每個從未設定這個欄位的工作階段一樣。
RECORDING_ENABLED 從現在起,系統可能會錄音並記錄對話內容。
RECORDING_DISABLED 系統可能不會再錄製或記錄對話。

ComparisonType

檢查代理回覆時支援的比較類型。

列舉
COMPARISON_TYPE_UNSPECIFIED 未指定比較類型。代理回覆和工具呼叫的預設行為是 SEMANTIC_SIMILARITY。
EQUALS 完全比對字串。
CONTAINS 子字串比對 (檢查實際回應是否包含預期字串)。
SEMANTIC_SIMILARITY 語意相似度比對 (使用 LLM 評估語意相似度)。

SemanticSimilarityChannel

要使用的語意相似度管道。

列舉
SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED 未指定指標。預設為 TEXT。
TEXT 使用文字語意相似度。
AUDIO 使用音訊語意相似度。

HallucinationMetricBehavior

幻覺指標行為。無論行為如何,系統一律會計算指標。差別在於,停用指標後,系統就不會使用該指標計算整體評估分數。

列舉
HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED 未指定的幻覺指標行為。
DISABLED 停用幻覺指標。
ENABLED 啟用幻覺指標。

TaskCompletionBehavior

使用者工作的預期行為。這項資訊可用來判斷情境是否成功。

列舉
TASK_COMPLETION_BEHAVIOR_UNSPECIFIED 未指定行為。預設為 TASK_SATISFIED。
TASK_SATISFIED 使用者工作應會順利完成。
TASK_REJECTED 使用者工作應遭拒。

UserGoalBehavior

使用者目標的預期行為。這項資訊可用來判斷情境是否成功。

列舉
USER_GOAL_BEHAVIOR_UNSPECIFIED 未指定行為。預設為 USER_GOAL_SATISFIED。
USER_GOAL_SATISFIED 使用者目標應能順利完成。
USER_GOAL_REJECTED 應拒絕使用者目標。
USER_GOAL_IGNORED 忽略使用者目標狀態。

ScenarioExecutionMode

情境評估的執行模式。

列舉
SCENARIO_EXECUTION_MODE_UNSPECIFIED 未指定執行模式。預設值為 QUALITY_OPTIMIZED。
QUALITY_OPTIMIZED 畫質最佳化模式。
SPEED_OPTIMIZED 速度最佳化模式。

結果

評估或預期的結果。

列舉
OUTCOME_UNSPECIFIED 未指定評估結果。
PASS 評估/預期通過。在評估時,這表示所有期望都已達成。
FAIL 評估/預期失敗。在評估作業中,這表示至少有一項預期未達成。
SKIPPED 已略過評估/預期。

ErrorType

錯誤類型

列舉
ERROR_TYPE_UNSPECIFIED 不明錯誤類型。
RUNTIME_FAILURE 執行階段執行失敗。
CONVERSATION_RETRIEVAL_FAILURE 無法從 CES 執行階段擷取對話。
METRIC_CALCULATION_FAILURE 無法計算指標/結果。
EVALUATION_UPDATE_FAILURE 無法更新評估作業。
QUOTA_EXHAUSTED 配額已用完。
USER_SIMULATION_FAILURE 使用者模擬失敗。

類型

Span 類型。日後可能會新增其他值。

列舉
TYPE_UNSPECIFIED 預設值。這個值不會用到。
TOOL 工具呼叫 span。
USER_CALLBACK 使用者回呼 span。
GUARDRAIL 防護機制時間範圍。
LLM LLM 範圍。

MilestoneStatus

里程碑的狀態。

列舉
MILESTONE_STATUS_UNSPECIFIED 未指定狀態。
NOT_STARTED 里程碑尚未開始。
IN_PROGRESS 里程碑目前正在進行中。
COMPLETED 已順利完成里程碑。

BackgroundEnvironment

模擬音訊環境。

列舉
BACKGROUND_ENVIRONMENT_UNSPECIFIED 未指定背景環境。
CALL_CENTER 客服中心環境。
TRAFFIC 交通噪音環境。
KIDS_NOISE 兒童噪音環境。
CAFE 咖啡廳環境。

ExecutionState

評估結果執行的狀態。

列舉
EXECUTION_STATE_UNSPECIFIED 未指定評估結果執行狀態。
QUEUED 評估結果執行作業已排入佇列。
RUNNING 正在執行評估結果。
COMPLETED 評估結果執行作業已完成。
ERROR 發生內部錯誤,因此無法執行評估結果。
CANCELLED 已取消執行評估結果。

ExtraToolCallBehavior

定義遇到額外工具呼叫時的行為。額外工具呼叫是指執行過程中出現,但與黃金期望中的任何工具呼叫都不相符的工具呼叫。

列舉
EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED 未指定行為。預設值為 FAIL。
FAIL 如果遇到額外的工具呼叫,評估就會失敗。
ALLOW 允許額外的工具呼叫。

AudioEncoding

AudioEncoding 會指定音訊資料的編碼格式。

列舉
AUDIO_ENCODING_UNSPECIFIED 未指定音訊編碼。
LINEAR16 16 位元線性 PCM 音訊編碼。
MULAW 使用 G.711 PCMU/mu-law 來壓縮 14 位元音訊樣本,並在傳輸後將其擴展的 8 位元樣本。
ALAW 使用 G.711 PCMU/A-law 壓縮 14 位元音訊樣本的 8 位元樣本。

EvaluationChannel

要評估的管道。

列舉
EVALUATION_CHANNEL_UNSPECIFIED 未指定評估管道。
TEXT 純文字評估管道。
AUDIO 音訊評估管道。

EvaluationToolCallBehaviour

設定評估執行的工具呼叫行為。

列舉
EVALUATION_TOOL_CALL_BEHAVIOUR_UNSPECIFIED 未指定工具呼叫行為。預設為實際工具呼叫。
REAL 使用實際的工具呼叫。
FAKE 使用假工具呼叫。

GoldenRunMethod

執行評估的方法。

列舉
GOLDEN_RUN_METHOD_UNSPECIFIED 未指定執行方法。
STABLE 以穩定重播的方式執行評估,每個回合都是獨立的工作階段,並插入先前的預期回合做為背景資訊。
NAIVE 以單純重播的方式執行評估,也就是在不插入內容的情況下,以單一工作階段執行。

OutcomeMetadata

評估結果的中繼資料。

列舉
OUTCOME_METADATA_UNSPECIFIED 未指定結果中繼資料。
GRACEFUL_HANDOFF 評估結果是順利轉接給真人代表。

輸出內容的結構定義

評估作業包含模擬及評估代理所需的所有資訊。

評估

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)
    }
  ],
  "evaluationMetricsThresholdOverride": {
    object (EvaluationMetricsThresholds)
  },
  "evaluationMetricsConfigOverride": {
    object (EvaluationMetricsConfig)
  },

  // 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

ID。這項評估的專屬 ID。格式: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 正規化,並使用 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 正規化,並使用 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 時,系統才會填入這個欄位。

evaluationMetricsThresholdOverride

object (EvaluationMetricsThresholds)

選用。覆寫這項特定評估的指標門檻。

evaluationMetricsConfigOverride

object (EvaluationMetricsConfig)

選用。覆寫這項特定評估作業的指標設定。

聯集欄位 inputs。評估 inputs 的輸入內容只能是下列其中一項:
golden

object (Golden)

選用。要評估的黃金步驟。

scenario

object (Scenario)

選用。情境設定。

金黃

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

object (GoldenTurn)

這是必要旗標,重播黃金對話所需的黃金回合。對話回合數上限為 100。

evaluationExpectations[]

string

選用。評估重播對話時的預期結果。格式:projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}

GoldenTurn

JSON 表示法
{
  "steps": [
    {
      object (Step)
    }
  ],
  "rootSpan": {
    object (Span)
  },
  "turnLevelMetricsThresholdsOverride": {
    object (TurnLevelMetricsThresholds)
  },
  "hallucinationMetricBehaviorOverride": enum (HallucinationMetricBehavior)
}
欄位
steps[]

object (Step)

這是必要旗標,重播黃金對話所需的步驟。

rootSpan

object (Span)

選用。處理及維護音訊資訊的黃金回合根時距。音訊的 URI 必須包含以 16Khz 取樣率儲存的音訊。

turnLevelMetricsThresholdsOverride

object (TurnLevelMetricsThresholds)

選用。覆寫回合層級指標門檻。

hallucinationMetricBehaviorOverride

enum (HallucinationMetricBehavior)

選用。覆寫回合層級幻覺指標行為。

步驟

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,
  "recordingControl": enum (RecordingControl),

  // 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_continue 為 false 的後續訊息,或系統偵測到音訊輸入中的端點。

注意:這個欄位不適用於音訊和 DTMF 輸入,因為系統一律會根據端點信號自動處理這些輸入。

recordingControl

enum (RecordingControl)

選用。是否要從現在起錄製及記錄對話。

如果是由應用程式 (而非代理) 決定可保留的內容,請使用這個選項。舉例來說,使用者必須先同意錄音,系統才能儲存通話相關內容。

這個值會持續有效,直到用戶端傳送不同的值為止,因此只有在答案變更時才需要傳送。一輪對話結束時,系統會根據當時生效的設定,決定該輪對話的音訊是否會傳送至錄音 bucket,以及轉錄稿是否會傳送至對話記錄、BigQuery 和 Cloud Logging。涵蓋代理和使用者雙方的對話內容。

在用戶端首次傳送此欄位之前完成的回合,會根據應用程式的記錄設定記錄,就像該欄位不存在一樣。

如果同一要求中有多個輸入內容設定了這個值,則以最後一個為準。

聯集欄位 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
  },
  "parentToolCallId": string,
  "agentName": string,
  "targetApp": string,

  // 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

選用。回覆所屬 tool call 的相符 ID。

displayName

string

僅供輸出。工具的顯示名稱。

response

object (Struct format)

這是必要旗標,JSON 物件格式的工具執行結果。請使用「output」鍵指定工具回覆,並使用「error」鍵指定錯誤詳細資料 (如有)。如未指定「output」和「error」鍵,整個「response」都會視為工具執行結果。

parentToolCallId

string

僅供輸出。如果工具呼叫是由代表父項呼叫的子代理發出,則此為導致該呼叫的工具呼叫 ID。頂層呼叫為空白。讓用戶端將子代理的工作分組到啟動該工作的呼叫下,而不是將每個步驟算做同層級。

agentName

string

僅供輸出。發出這項呼叫的代理人類可讀名稱,例如「Contract Architect」。如果是由根層級代理發出,則為空白。

targetApp

string

僅供輸出。執行工具指定的應用程式;與 ToolCall.target_app 相同。

聯集欄位 tool_identifier。已執行工具的 ID。可以是永久工具或工具集中的工具。tool_identifier 只能是下列其中一個設定:
tool

string

選用。要執行的工具名稱。格式:projects/{project}/locations/{location}/apps/{app}/tools/{tool}

toolsetTool

object (ToolsetTool)

選用。已執行的工具組工具。

ToolsetTool

JSON 表示法
{
  "toolset": string,
  "toolId": string
}
欄位
toolset

string

這是必要旗標,這個工具衍生自的工具集資源名稱。格式: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

代表 JSON null。

numberValue

number

代表 JSON 數字。不得為 NaN、Infinity 或 -Infinity,因為 JSON 不支援這些值。此外,這也無法代表大型 Int64 值,因為 JSON 格式通常不支援數字類型的 Int64 值。

stringValue

string

代表 JSON 字串。

boolValue

boolean

代表 JSON 布林值 (JSON 中的 true 或 false 常值)。

structValue

object (Struct format)

代表 JSON 物件。

listValue

array (ListValue format)

代表 JSON 陣列。

ListValue

JSON 表示法
{
  "values": [
    value
  ]
}
欄位
values[]

value (Value format)

動態類型值的重複欄位。

圖片

JSON 表示法
{
  "mimeType": string,
  "data": string,
  "altText": string
}
欄位
mimeType

string

這是必要旗標,來源資料的 IANA 標準 MIME 類型。支援的圖片類型包括:* image/png * image/jpeg * image/webp

data

string (bytes format)

這是必要旗標,圖片的原始位元組。

Base64 編碼字串。

altText

string

選用。圖片的替代文字。

Blob

JSON 表示法
{
  "mimeType": string,
  "data": string
}
欄位
mimeType

string

這是必要旗標,來源資料的 IANA 標準 MIME 類型。

data

string (bytes format)

這是必要旗標,Blob 的原始位元組。

Base64 編碼字串。

事件

JSON 表示法
{
  "event": string,
  "variables": {
    object
  }
}
欄位
event

string

這是必要旗標,事件名稱。

variables

object (Struct format)

選用。與事件相關聯的其他變數。

AgentTransfer

JSON 表示法
{
  "targetAgent": string,
  "displayName": string
}
欄位
targetAgent

string

這是必要旗標,對話轉移到的代理。代理會從這個時間點開始處理對話。格式:projects/{project}/locations/{location}/apps/{app}/agents/{agent}

displayName

string

僅供輸出。代理的顯示名稱。

GoldenExpectation

JSON 表示法
{
  "note": string,
  "skipEvaluation": boolean,
  "expectationLevelMetricsThresholdsOverride": {
    object (ExpectationLevelMetricsThresholds)
  },
  "agentResponseSemanticSimilarityMetricsConfigOverride": {
    object (SemanticSimilarityMetricsConfig)
  },
  "agentResponseHallucinationMetricsConfigOverride": {
    object (HallucinationMetricsConfig)
  },
  "comparisonType": enum (ComparisonType),

  // 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)
  },
  "noToolCalls": boolean
  // End of list of possible types for union field condition.
}
欄位
note

string

選用。這項規定的附註,在特定檢查失敗時,可用於回報。例如:"Check_Payment_Tool_Called".

skipEvaluation

boolean

選用。如果設為 true,系統就不會評估這項特定預期。

expectationLevelMetricsThresholdsOverride

object (ExpectationLevelMetricsThresholds)

選用。覆寫步驟層級的指標。

agentResponseSemanticSimilarityMetricsConfigOverride

object (SemanticSimilarityMetricsConfig)

選用。覆寫 agent_response 語意相似度指標。

agentResponseHallucinationMetricsConfigOverride

object (HallucinationMetricsConfig)

選用。覆寫 agent_response 幻覺指標。

comparisonType

enum (ComparisonType)

選用。預期檢查使用的比較類型。

聯集欄位 condition。實際執行的檢查。condition 只能是下列其中一個設定:
toolCall

object (ToolCall)

選用。確認是否使用參數呼叫特定工具。

toolResponse

object (ToolResponse)

選用。確認特定工具是否產生預期回覆。

agentResponse

object (Message)

選用。確認代理的回覆是否正確。系統會自動假設角色為「agent」。

agentTransfer

object (AgentTransfer)

選用。確認代理已將對話轉給其他代理。

updatedVariables

object (Struct format)

選用。確認代理已將工作階段變數更新為預期值。也用於擷取黃金評估的代理變數更新。

mockToolResponse

object (ToolResponse)

選用。要模擬的工具回應,並指定相關參數。未指定的參數會由 LLM 幻覺生成。

noToolCalls

boolean

選用。確認這個回合未呼叫任何工具。

ToolCall

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

  // 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。如果已填入,用戶端應在 ToolResponse 中傳回具有相符的 ID 的執行結果。

displayName

string

僅供輸出。工具的顯示名稱。

args

object (Struct format)

選用。工具的輸入參數和值,採用 JSON 物件格式。

parentToolCallId

string

僅供輸出。如果工具呼叫是由代表父項呼叫的子代理發出,則此為導致該呼叫的工具呼叫 ID。頂層呼叫為空白。讓用戶端將子代理的工作分組到啟動該工作的呼叫下,而不是將每個步驟算做同層級。

agentName

string

僅供輸出。發出這項呼叫的代理人類可讀名稱,例如「Contract Architect」。如果是由根層級代理發出,則為空白。

targetApp

string

僅供輸出。這項呼叫指定的應用程式,由助理從呼叫的資源引數衍生:應用程式資源名稱、位置範圍工具的 PROJECT,或工作階段本機工具的空白。僅在專案範圍的助理工作階段中設定。

聯集欄位 tool_identifier。要執行的工具 ID。可以是永久工具或工具集中的工具。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 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

Chunk

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)

struct 代表對話中更新的變數,以變數名稱為鍵。

defaultVariables

object (Struct format)

struct 代表對話開始時的預設變數,以變數名稱為索引鍵。

時間戳記

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
欄位
seconds

string (int64 format)

代表自 Unix 紀元 1970-01-01T00:00:00Z 起算的世界標準時間秒數。必須介於 -62135596800 和 253402300799 (含) 之間 (對應至 0001-01-01T00:00:00Z 至 9999-12-31T23:59:59Z)。

nanos

integer

非負數的秒數分數,解析度為奈秒。這個欄位是時間長度的奈秒部分,而非秒數的替代值。含有分數的負秒值仍須有非負奈秒值,以向前計算時間。必須介於 0 至 999,999,999 之間 (含 0 和 999,999,999)。

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。

SemanticSimilarityMetricsConfig

JSON 表示法
{
  "enableSemanticSimilarityMetrics": boolean
}
欄位
enableSemanticSimilarityMetrics

boolean

選用。是否要計算評估作業的語意相似度指標。

HallucinationMetricsConfig

JSON 表示法
{
  "enableHallucinationMetrics": boolean
}
欄位
enableHallucinationMetrics

boolean

選用。是否要計算評估作業的幻覺指標。

時距

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

string

僅供輸出。Span 的名稱。

startTime

string (Timestamp format)

僅供輸出。Span 的開始時間。

使用 RFC 3339,產生的輸出內容一律會經過 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)

僅供輸出。Span 的結束時間。

使用 RFC 3339,產生的輸出內容一律會經過 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 的時間長度。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「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

時間範圍內以奈秒解析度表示的有正負號秒數分數。如果時間長度不到一秒,則會以 0 seconds 欄位和正或負 nanos 欄位表示。如果時間長度為一秒以上,nanos 欄位的非零值必須與 seconds 欄位具有相同的正負號。必須介於 -999,999,999 至 +999,999,999 之間 (含)。

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。

情境

JSON 表示法
{
  "task": string,
  "userFacts": [
    {
      object (UserFact)
    }
  ],
  "maxTurns": integer,
  "rubrics": [
    string
  ],
  "scenarioExpectations": [
    {
      object (ScenarioExpectation)
    }
  ],
  "variableOverrides": {
    object
  },
  "taskCompletionBehavior": enum (TaskCompletionBehavior),
  "userGoalBehavior": enum (UserGoalBehavior),
  "evaluationExpectations": [
    string
  ],
  "milestones": [
    {
      object (Milestone)
    }
  ],
  "scenarioExecutionMode": enum (ScenarioExecutionMode)
}
欄位
task

string

這是必要旗標,情境要指定的任務。

userFacts[]

object (UserFact)

選用。情境要使用的使用者事實。

maxTurns

integer

選用。要模擬的回合數上限。最大值為 100。預設值為 100。

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}

milestones[]

object (Milestone)

選用。這個情境的里程碑。

scenarioExecutionMode

enum (ScenarioExecutionMode)

選用。情境評估的執行模式。

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 幻覺生成。

Milestone

JSON 表示法
{
  "goal": string,
  "maxTurnCount": integer,
  "successCriteria": string,
  "protocol": string,
  "staticUtterance": string,
  "event": {
    object (Event)
  }
}
欄位
goal

string

這是必要旗標,里程碑的目標。

maxTurnCount

integer

選用。這個里程碑的回合數上限。

successCriteria

string

選用。里程碑的成功標準。

protocol

string

選用。代理在對話期間應遵循的指南。

staticUtterance

string

選用。模擬器會傳送靜態語句,而非動態生成使用者輸入內容。

event

object (Event)

選用。要傳送的事件輸入,而非動態生成。

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)

僅供輸出。工具呼叫的平均延遲時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「s」。例如:"3.5s"。

TurnLatencyMetrics

JSON 表示法
{
  "averageLatency": string
}
欄位
averageLatency

string (Duration format)

僅供輸出。對話的平均延遲時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「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),
  "rootSpan": {
    object (Span)
  },
  "outcomeMetadata": enum (OutcomeMetadata),

  // 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

ID。評估結果的專屬 ID。格式:projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{result}

displayName

string

這是必要旗標,評估結果的顯示名稱。評估作業中的專屬 ID。預設格式為「 result - "。

createTime

string (Timestamp format)

僅供輸出。評估結果的建立時間戳記。

使用 RFC 3339,產生的輸出內容一律會經過 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 正規化,並使用 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)

僅供輸出。執行黃金評估的方法。

rootSpan

object (Span)

僅供輸出。評估執行作業的根時距,包含評估各步驟的資訊。

outcomeMetadata

enum (OutcomeMetadata)

僅供輸出。評估結果中繼資料。只有在 execution_state 為 COMPLETE 時,系統才會填入這個欄位。

聯集欄位 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)

僅供輸出。轉彎所需時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「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)
  },
  "observedPayload": {
    object
  }
  // 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)

僅供輸出。代理轉移預期結果。

observedPayload

object (Struct format)

僅供輸出。觀察到的自訂酬載。自訂酬載沒有任何預期。這項資訊僅用於計算指標。結果一律為「已略過」。

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,如果分數等於或高於門檻,結果就會是「通過」。否則結果會是「失敗」。

聯集欄位 _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 和門檻,如果分數等於或高於門檻,結果就會是「通過」。否則結果會是「失敗」。

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 正規化,並使用 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 正規化,並使用 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)

僅供輸出。工具呼叫執行作業的延遲時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「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,如果分數等於或高於門檻,結果就會是「通過」。否則結果會是「失敗」。

聯集欄位 _tool_invocation_score。

_tool_invocation_score 只能是下列其中一個設定:

toolInvocationScore

number

這個回合的整體工具叫用分數。這表示實際叫用的工具占預期回合工具總數的百分比。

EvaluationErrorInfo

JSON 表示法
{
  "errorType": enum (ErrorType),
  "errorMessage": string,
  "sessionId": string,
  "userFacingErrorMessage": string
}
欄位
errorType

enum (ErrorType)

僅供輸出。錯誤類型。

errorMessage

string

僅供輸出。錯誤訊息。

sessionId

string

僅供輸出。發生錯誤的對話工作階段 ID。

userFacingErrorMessage

string

僅供輸出。使用者看到的錯誤訊息。

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)

僅供輸出。Span 類型。

displayName

string

僅供輸出。Span 的顯示名稱。適用於工具和護欄 Span。

startTime

string (Timestamp format)

僅供輸出。Span 的開始時間。

使用 RFC 3339,產生的輸出內容一律會經過 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)

僅供輸出。Span 的結束時間。

使用 RFC 3339,產生的輸出內容一律會經過 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 的延遲時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「s」。例如:"3.5s"。

聯集欄位 identifier。特定項目的 ID (依類型而定)。identifier 只能是下列其中一個設定:
resource

string

僅供輸出。護欄或工具 span 的資源名稱。

toolset

object (ToolsetTool)

僅供輸出。工具組工具 ID。

model

string

僅供輸出。LLM 跨度的名稱。

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)
    }
  ],
  "milestoneResults": [
    {
      object (MilestoneResult)
    }
  ],

  // 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)

僅供輸出。評估預期結果。

milestoneResults[]

object (MilestoneResult)

僅供輸出。情境中每個里程碑的結果。

聯集欄位 _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

僅供輸出。與各分數相關聯的標籤。分數 2:順利交接;分數 1:使用者任務已完成;分數 0:使用者任務未完成;分數 -1:使用者任務未指定

explanation

string

僅供輸出。使用者任務滿意度分數的說明。

聯集欄位 _score。

_score 只能是下列其中一個設定:

score

integer

僅供輸出。使用者工作滿意度分數。可以是 -1、0、1、2。

MilestoneResult

JSON 表示法
{
  "milestone": {
    object (Milestone)
  },
  "status": enum (MilestoneStatus),
  "justification": string
}
欄位
milestone

object (Milestone)

僅供輸出。要追蹤的里程碑。

status

enum (MilestoneStatus)

僅供輸出。里程碑的目前狀態。

justification

string

僅供輸出。目前狀態的理由。

EvaluationPersona

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

string

這是必要旗標,角色的專屬 ID。格式:projects/{project}/locations/{location}/apps/{app}/evaluationPersonas/{evaluationPersona}

description

string

選用。人物角色的說明。

displayName

string

這是必要旗標,Persona 的顯示名稱。在應用程式中不得重複。

personality

string

這是必要旗標,指示代理在評估期間應如何行動。

speechConfig

object (SpeechConfig)

選用。Persona 的聲音設定 (文字轉語音設定)。

SpeechConfig

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

number

選用。說話速率。1.0 為正常值。值越低,速度越慢 (例如 0.8);值越高,速度越快 (例如 1.5)。適合用來測試代理如何處理說話速度快的使用者。

environment

enum (BackgroundEnvironment)

選用。模擬音訊環境。

voiceId

string

選用。要使用的特定語音 ID/口音。例如:「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)

選用。工具比對設定。額外工具呼叫是指執行過程中出現,但與黃金期望中的任何工具呼叫都不相符的工具呼叫。

ToolMatchingSettings

JSON 表示法
{
  "extraToolCallBehavior": enum (ExtraToolCallBehavior)
}
欄位
extraToolCallBehavior

enum (ExtraToolCallBehavior)

選用。額外工具呼叫的行為。預設值為 FAIL。

EvaluationConfig

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

object (InputAudioConfig)

選用。處理輸入音訊的設定。

outputAudioConfig

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

這是必要旗標,輸出音訊資料的取樣率 (赫茲)。

EvaluationMetricsConfig

JSON 表示法
{
  "goldenMetricsConfig": {
    object (GoldenMetricsConfig)
  },
  "scenarioMetricsConfig": {
    object (ScenarioMetricsConfig)
  }
}
欄位
goldenMetricsConfig

object (GoldenMetricsConfig)

選用。評估黃金指標的設定。

scenarioMetricsConfig

object (ScenarioMetricsConfig)

選用。評估情境指標的設定。

GoldenMetricsConfig

JSON 表示法
{
  "semanticSimilarityMetricsConfig": {
    object (SemanticSimilarityMetricsConfig)
  },
  "toolCorrectnessMetricsConfig": {
    object (ToolCorrectnessMetricsConfig)
  },
  "stepToolCorrectnessMetricsConfig": {
    object (ToolCorrectnessMetricsConfig)
  }
}
欄位
semanticSimilarityMetricsConfig

object (SemanticSimilarityMetricsConfig)

選用。語意相似度指標的全域設定。

toolCorrectnessMetricsConfig

object (ToolCorrectnessMetricsConfig)

選用。回合層級工具正確性指標的設定。

stepToolCorrectnessMetricsConfig

object (ToolCorrectnessMetricsConfig)

選用。步驟層級工具正確性指標的設定。

ToolCorrectnessMetricsConfig

JSON 表示法
{
  "enableToolCorrectnessMetrics": boolean
}
欄位
enableToolCorrectnessMetrics

boolean

選用。是否要計算評估作業的工具正確性指標。

ScenarioMetricsConfig

JSON 表示法
{
  "userGoalMetMetricsConfig": {
    object (UserGoalMetMetricsConfig)
  },
  "expectationsMetMetricsConfig": {
    object (ExpectationsMetMetricsConfig)
  }
}
欄位
userGoalMetMetricsConfig

object (UserGoalMetMetricsConfig)

選用。使用者目標達成指標的設定。

expectationsMetMetricsConfig

object (ExpectationsMetMetricsConfig)

選用。預期層級指標的設定。

UserGoalMetMetricsConfig

JSON 表示法
{
  "enableUserGoalMetMetrics": boolean
}
欄位
enableUserGoalMetMetrics

boolean

選用。是否要計算評估的使用者目標達成指標。

ExpectationsMetMetricsConfig

JSON 表示法
{
  "enableExpectationsMetMetrics": boolean
}
欄位
enableExpectationsMetMetrics

boolean

選用。是否要計算評估的期望層級指標。

NullValue

代表 JSON null。

NullValue 是哨兵,使用只有一個值的列舉,代表 Value 類型聯集的空值。

NullValue 類型的欄位若含有 0 以外的值,則視為無效。無論整數值為何,大多數 ProtoJSON 序列化工具都會發出 Value,並將 null_value 設為 JSON null,因此會來回 0 值。

列舉
NULL_VALUE 空值。

RecordingControl

應用程式做出的決定可能會記錄下來。

這個列舉可擴充,日後可能會新增值。

列舉
RECORDING_CONTROL_UNSPECIFIED 應用程式並未控制錄製功能。應用程式的記錄設定會決定,就像每個從未設定這個欄位的工作階段一樣。
RECORDING_ENABLED 從現在起,系統可能會錄音並記錄對話內容。
RECORDING_DISABLED 系統可能不會再錄製或記錄對話。

ComparisonType

檢查代理回覆時支援的比較類型。

列舉
COMPARISON_TYPE_UNSPECIFIED 未指定比較類型。代理回覆和工具呼叫的預設行為是 SEMANTIC_SIMILARITY。
EQUALS 完全比對字串。
CONTAINS 子字串比對 (檢查實際回應是否包含預期字串)。
SEMANTIC_SIMILARITY 語意相似度比對 (使用 LLM 評估語意相似度)。

SemanticSimilarityChannel

要使用的語意相似度管道。

列舉
SEMANTIC_SIMILARITY_CHANNEL_UNSPECIFIED 未指定指標。預設為 TEXT。
TEXT 使用文字語意相似度。
AUDIO 使用音訊語意相似度。

HallucinationMetricBehavior

幻覺指標行為。無論行為如何,系統一律會計算指標。差別在於,停用指標後,系統就不會使用該指標計算整體評估分數。

列舉
HALLUCINATION_METRIC_BEHAVIOR_UNSPECIFIED 未指定的幻覺指標行為。
DISABLED 停用幻覺指標。
ENABLED 啟用幻覺指標。

TaskCompletionBehavior

使用者工作的預期行為。這項資訊可用來判斷情境是否成功。

列舉
TASK_COMPLETION_BEHAVIOR_UNSPECIFIED 未指定行為。預設為 TASK_SATISFIED。
TASK_SATISFIED 使用者工作應會順利完成。
TASK_REJECTED 使用者工作應遭拒。

UserGoalBehavior

使用者目標的預期行為。這項資訊可用來判斷情境是否成功。

列舉
USER_GOAL_BEHAVIOR_UNSPECIFIED 未指定行為。預設為 USER_GOAL_SATISFIED。
USER_GOAL_SATISFIED 使用者目標應能順利完成。
USER_GOAL_REJECTED 應拒絕使用者目標。
USER_GOAL_IGNORED 忽略使用者目標狀態。

ScenarioExecutionMode

情境評估的執行模式。

列舉
SCENARIO_EXECUTION_MODE_UNSPECIFIED 未指定執行模式。預設值為 QUALITY_OPTIMIZED。
QUALITY_OPTIMIZED 畫質最佳化模式。
SPEED_OPTIMIZED 速度最佳化模式。

結果

評估或預期的結果。

列舉
OUTCOME_UNSPECIFIED 未指定評估結果。
PASS 評估/預期通過。在評估時,這表示所有期望都已達成。
FAIL 評估/預期失敗。在評估作業中,這表示至少有一項預期未達成。
SKIPPED 已略過評估/預期。

ErrorType

錯誤類型

列舉
ERROR_TYPE_UNSPECIFIED 不明錯誤類型。
RUNTIME_FAILURE 執行階段執行失敗。
CONVERSATION_RETRIEVAL_FAILURE 無法從 CES 執行階段擷取對話。
METRIC_CALCULATION_FAILURE 無法計算指標/結果。
EVALUATION_UPDATE_FAILURE 無法更新評估作業。
QUOTA_EXHAUSTED 配額已用完。
USER_SIMULATION_FAILURE 使用者模擬失敗。

類型

Span 類型。日後可能會新增其他值。

列舉
TYPE_UNSPECIFIED 預設值。這個值不會用到。
TOOL 工具呼叫 span。
USER_CALLBACK 使用者回呼 span。
GUARDRAIL 防護機制時間範圍。
LLM LLM 範圍。

MilestoneStatus

里程碑的狀態。

列舉
MILESTONE_STATUS_UNSPECIFIED 未指定狀態。
NOT_STARTED 里程碑尚未開始。
IN_PROGRESS 里程碑目前正在進行中。
COMPLETED 已順利完成里程碑。

BackgroundEnvironment

模擬音訊環境。

列舉
BACKGROUND_ENVIRONMENT_UNSPECIFIED 未指定背景環境。
CALL_CENTER 客服中心環境。
TRAFFIC 交通噪音環境。
KIDS_NOISE 兒童噪音環境。
CAFE 咖啡廳環境。

ExecutionState

評估結果執行的狀態。

列舉
EXECUTION_STATE_UNSPECIFIED 未指定評估結果執行狀態。
QUEUED 評估結果執行作業已排入佇列。
RUNNING 正在執行評估結果。
COMPLETED 評估結果執行作業已完成。
ERROR 發生內部錯誤,因此無法執行評估結果。
CANCELLED 已取消執行評估結果。

ExtraToolCallBehavior

定義遇到額外工具呼叫時的行為。額外工具呼叫是指執行過程中出現,但與黃金期望中的任何工具呼叫都不相符的工具呼叫。

列舉
EXTRA_TOOL_CALL_BEHAVIOR_UNSPECIFIED 未指定行為。預設值為 FAIL。
FAIL 如果遇到額外的工具呼叫,評估就會失敗。
ALLOW 允許額外的工具呼叫。

AudioEncoding

AudioEncoding 會指定音訊資料的編碼格式。

列舉
AUDIO_ENCODING_UNSPECIFIED 未指定音訊編碼。
LINEAR16 16 位元線性 PCM 音訊編碼。
MULAW 使用 G.711 PCMU/mu-law 來壓縮 14 位元音訊樣本,並在傳輸後將其擴展的 8 位元樣本。
ALAW 使用 G.711 PCMU/A-law 壓縮 14 位元音訊樣本的 8 位元樣本。

EvaluationChannel

要評估的管道。

列舉
EVALUATION_CHANNEL_UNSPECIFIED 未指定評估管道。
TEXT 純文字評估管道。
AUDIO 音訊評估管道。

EvaluationToolCallBehaviour

設定評估執行的工具呼叫行為。

列舉
EVALUATION_TOOL_CALL_BEHAVIOUR_UNSPECIFIED 未指定工具呼叫行為。預設為實際工具呼叫。
REAL 使用實際的工具呼叫。
FAKE 使用假工具呼叫。

GoldenRunMethod

執行評估的方法。

列舉
GOLDEN_RUN_METHOD_UNSPECIFIED 未指定執行方法。
STABLE 以穩定重播的方式執行評估,每個回合都是獨立的工作階段,並插入先前的預期回合做為背景資訊。
NAIVE 以單純重播的方式執行評估,也就是在不插入內容的情況下,以單一工作階段執行。

OutcomeMetadata

評估結果的中繼資料。

列舉
OUTCOME_METADATA_UNSPECIFIED 未指定結果中繼資料。
GRACEFUL_HANDOFF 評估結果是順利轉接給真人代表。

工具註解

工具註解會傳送至 MCP 用戶端,說明特定工具的基本風險。大多數用戶端會將這些提示視為不受信任,但可用於決定何時向使用者傳送確認提示。

除了標題字串外,下列布林值提示的定義如下:

  • readOnlyHint:如果設為 true,工具不會修改環境。預設值:false。
  • destructiveHint:如果為 true,工具可以執行破壞性動作。如果為 false,則工具只能執行附加動作。預設值:true。
  • idempotentHint:如果設為 true,則使用相同引數重複呼叫工具,不會對環境造成額外影響。預設值:false。
  • openWorldHint:如果設為 true,工具就能與外部實體的「開放世界」互動。如果設為 false,工具只能與內部實體互動。舉例來說,網頁搜尋工具是開放世界,而記憶工具則不是。

Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ❌