MCP Tools Reference: ces.googleapis.com

工具:list_evaluations

列出評估結果。

下列範例示範如何使用 curl 叫用 list_evaluations 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": "list_evaluations",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

輸入內容的結構定義

EvaluationService.ListEvaluations 的要求訊息。

ListEvaluationsRequest

JSON 表示法
{
  "parent": string,
  "pageSize": integer,
  "pageToken": string,
  "filter": string,
  "evaluationFilter": string,
  "evaluationRunFilter": string,
  "orderBy": string,
  "lastTenResults": boolean
}
欄位
parent

string

這是必要旗標,要列出評估結果的應用程式資源名稱。

pageSize

integer

選用。要求的頁面大小。伺服器傳回的項目數量可能會少於要求數量。如未指定,伺服器會挑選適當的預設值。

pageToken

string

選用。先前的清單 EvaluationService.ListEvaluations 呼叫傳回的 next_page_token 值。

filter
(deprecated)

string

選用。已淘汰:請改用 evaluation_filter 和 evaluation_run_filter。

evaluationFilter

string

選用。列出評估結果時,要套用至評估結果的篩選器。詳情請參閱 https://google.aip.dev/160。支援的欄位:evaluation_datasets

evaluationRunFilter

string

選用。相關聯 EvaluationRun 資源的欄位篩選字串。詳情請參閱 https://google.aip.dev/160。支援的欄位:create_time、initiated_by、app_version_display_name

orderBy

string

選用。用於排序的欄位。僅支援「name」、「create_time」和「update_time」。時間欄位會依遞減順序排列,名稱欄位則依遞增順序排列。如未加入,系統會預設為「update_time」。詳情請參閱 https://google.aip.dev/132#ordering

lastTenResults

boolean

選用。是否要在回覆中納入每項評估的最後 10 項評估結果。

輸出內容的結構定義

EvaluationService.ListEvaluations 的回應訊息。

ListEvaluationsResponse

JSON 表示法
{
  "evaluations": [
    {
      object (Evaluation)
    }
  ],
  "nextPageToken": string
}
欄位
evaluations[]

object (Evaluation)

評估清單。

nextPageToken

string

可做為 ListEvaluationsRequest.page_token 傳送的權杖,用於擷取後續網頁。如果沒有這個欄位,表示沒有後續頁面。

評估

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,

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

boolean

選用。這個旗標用於指出目前訊息是否為雙向串流工作階段中較大輸入內容的片段。

如果設為 true,代理會延後處理,直到收到後續訊息 (其中 will_continuefalse),或系統在音訊輸入中偵測到端點為止。

注意:音訊和 DTMF 輸入內容一律會根據終止信號自動處理,因此不適用這個欄位。

聯集欄位 input_type。輸入內容的類型。input_type 只能是下列其中一個設定:
text

string

選用。來自使用者的文字資料。

dtmf

string

選用。來自使用者的 DTMF 數字。

audio

string (bytes format)

選用。來自使用者的音訊資料。

Base64 編碼字串。

toolResponses

object (ToolResponses)

選用。用戶端工具呼叫的執行結果。

image

object (Image)

選用。使用者提供的圖片資料。

blob

object (Blob)

選用。來自使用者的 Blob 資料。

variables

object (Struct format)

選用。工作階段的內容變數,以名稱做為鍵。CES 代理程式只會使用在應用程式中宣告的變數。

無法辨識的變數仍會以額外工作階段參數的形式傳送至 [Dialogflow 代理程式][Agent.RemoteDialogflowAgent]。

event

object (Event)

選用。活動輸入。

ToolResponses

JSON 表示法
{
  "toolResponses": [
    {
      object (ToolResponse)
    }
  ]
}
欄位
toolResponses[]

object (ToolResponse)

選用。工具執行結果清單。

ToolResponse

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

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

string

選用。tool call 回應的相符 ID。

displayName

string

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

response

object (Struct format)

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

聯集欄位 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 數字。不得為 NaNInfinity-Infinity,因為 JSON 不支援這些字元。此外,由於 JSON 格式一般不支援數字類型中的大型 Int64 值,因此也無法表示這類值。

stringValue

string

代表 JSON 字串。

boolValue

boolean

代表 JSON 布林值 (JSON 中的 truefalse 常值)。

structValue

object (Struct format)

代表 JSON 物件。

listValue

array (ListValue format)

代表 JSON 陣列。

ListValue

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

value (Value format)

動態型別值的重複欄位。

Image

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

string

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

data

string (bytes format)

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

Base64 編碼字串。

Blob

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

string

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

data

string (bytes format)

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

Base64 編碼字串。

事件

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

string

這是必要旗標,活動名稱。

AgentTransfer

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

string

這是必要旗標,要將對話轉移給哪位服務專員。代理會接手處理後續對話。格式:projects/{project}/locations/{location}/apps/{app}/agents/{agent}

displayName

string

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

GoldenExpectation

JSON 表示法
{
  "note": string,
  "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)

選用。代理程式回覆語意相似度指標的覆寫。

agentResponseHallucinationMetricsConfigOverride

object (HallucinationMetricsConfig)

選用。覆寫 agent_response 幻覺指標。

comparisonType

enum (ComparisonType)

選用。用於期望值檢查的比對類型。

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

object (ToolCall)

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

toolResponse

object (ToolResponse)

選用。確認特定工具是否收到預期回應。

agentResponse

object (Message)

選用。確認代理程式是否回覆正確答案。角色為「代理人」。

agentTransfer

object (AgentTransfer)

選用。確認服務專員已將對話轉給其他服務專員。

updatedVariables

object (Struct format)

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

mockToolResponse

object (ToolResponse)

選用。要模擬的工具回應,並指定感興趣的參數。如果未指定任何參數,LLM 就會產生幻覺。

noToolCalls

boolean

選用。確認在此回合中未呼叫任何工具。

ToolCall

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

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

string

選用。工具呼叫的專屬 ID。如果已填入,用戶端應傳回執行結果,並在 ToolResponse 中提供相符的 ID。

displayName

string

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

args

object (Struct format)

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

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

結構體代表對話中更新的變數,並以變數名稱做為鍵。

defaultVariables

object (Struct format)

結構體代表對話開始時的預設變數,並以變數名稱做為鍵。

時間戳記

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 之間 (含)。

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

僅供輸出。時距的名稱。

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"

duration

string (Duration format)

僅供輸出。時距長度。

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

attributes

object (Struct format)

僅供輸出。與範圍相關聯的鍵/值屬性。

childSpans[]

object (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
  ],
  "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}

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 就會產生幻覺。

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

這是必要旗標,評估結果的顯示名稱。評估中不得重複。預設格式為「 結果 - 」。

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)

僅供輸出。回合中時距的延遲時間。

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

聯集欄位 _score

_score 只能是下列其中一項:

score

integer

僅供輸出。語意相似度分數。可以是 0、1、2、3 或 4。

ToolInvocationResult

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

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

enum (Outcome)

僅供輸出。工具叫用檢查的結果。這是透過比較 parameter_correctness_score 與門檻來判斷。如果分數等於或高於門檻,結果就會是「通過」。否則結果會是 FAIL。

explanation

string

僅供輸出。工具叫用結果的自由文字說明。

聯集欄位 _parameter_correctness_score

_parameter_correctness_score 只能是下列其中一項:

parameterCorrectnessScore

number

僅供輸出。工具呼叫參數正確度分數。這表示實際工具呼叫中也出現預期工具呼叫的參數百分比。

HallucinationResult

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

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

string

僅供輸出。與各個分數相關的標籤。分數 1:合理分數 0:不合理分數 -1:沒有可評估的聲明

explanation

string

僅供輸出。幻覺分數的說明。

聯集欄位 _score

_score 只能是下列其中一項:

score

integer

僅供輸出。幻覺分數。可以是 -1、0 或 1。

ToolCallLatency

JSON 表示法
{
  "tool": string,
  "displayName": string,
  "startTime": string,
  "endTime": string,
  "executionLatency": string
}
欄位
tool

string

僅供輸出。執行的工具名稱。格式:projects/{project}/locations/{location}/apps/{app}/tools/{tool}

displayName

string

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

startTime

string (Timestamp format)

僅供輸出。工具呼叫執行的開始時間。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 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,如果分數等於或高於門檻,結果就會是「通過」。否則結果會是 FAIL。

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

僅供輸出。範圍類型。

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"

聯集欄位 identifier。特定項目的 ID,取決於項目類型。identifier 只能是下列其中一個設定:
resource

string

僅供輸出。防護措施或工具範圍的資源名稱。

toolset

object (ToolsetTool)

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

model

string

僅供輸出。LLM 範圍的名稱。

callback

string

僅供輸出。使用者回呼範圍的名稱。

EvaluationExpectationResult

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

string

僅供輸出。評估期望。格式:projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}

prompt

string

僅供輸出。用於評估的提示。

outcome

enum (Outcome)

僅供輸出。評估期望的結果。

explanation

string

僅供輸出。結果的說明。

ScenarioResult

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

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

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

string

僅供輸出。情境中生成的對話。

task

string

僅供輸出。執行此結果情境時使用的工作。

userFacts[]

object (UserFact)

僅供輸出。情境用於此結果的使用者事實。

expectationOutcomes[]

object (ScenarioExpectationOutcome)

僅供輸出。每項期望的結果。

rubricOutcomes[]

object (ScenarioRubricOutcome)

僅供輸出。評分量表的結果。

hallucinationResult[]

object (HallucinationResult)

僅供輸出。幻覺檢查結果。對話中的每一輪都會有一個幻覺結果。

taskCompletionResult
(deprecated)

object (TaskCompletionResult)

僅供輸出。工作完成檢查結果。

toolCallLatencies[]

object (ToolCallLatency)

僅供輸出。對話中每次執行工具呼叫的延遲時間。

userGoalSatisfactionResult

object (UserGoalSatisfactionResult)

僅供輸出。使用者目標達成情況檢查結果。

spanLatencies[]

object (SpanLatency)

僅供輸出。對話中跨度的延遲時間。

evaluationExpectationResults[]

object (EvaluationExpectationResult)

僅供輸出。評估期望的結果。

聯集欄位 _all_expectations_satisfied

_all_expectations_satisfied 只能是下列其中一項:

allExpectationsSatisfied

boolean

僅供輸出。這個回合是否滿足所有期望。

聯集欄位 _task_completed

_task_completed 只能是下列其中一項:

taskCompleted

boolean

僅供輸出。這項工作是否已完成。這項指標綜合考量了所有滿足的期望、沒有錯覺,以及使用者目標達成率。

ScenarioExpectationOutcome

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

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

object (ScenarioExpectation)

僅供輸出。評估的期望。

outcome

enum (Outcome)

僅供輸出。ScenarioExpectation 的結果。

聯集欄位 result。預期結果。result 只能是下列其中一個設定:
observedToolCall

object (ObservedToolCall)

僅供輸出。觀察到的工具呼叫。

observedAgentResponse

object (Message)

僅供輸出。觀察到的代理程式回應。

ObservedToolCall

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

object (ToolCall)

僅供輸出。觀察到的工具呼叫。

toolResponse

object (ToolResponse)

僅供輸出。觀察到的工具回應。

ScenarioRubricOutcome

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

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

string

僅供輸出。用來評估對話的評量表。

scoreExplanation

string

僅供輸出。評估者對評量表的回應。

聯集欄位 _score

_score 只能是下列其中一項:

score

number

僅供輸出。對話的評分量表分數。

TaskCompletionResult

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

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

string

僅供輸出。與各個分數相關的標籤。分數 1:工作完成 分數 0:工作未完成 分數 -1:使用者目標未定義

explanation

string

僅供輸出。工作完成分數的說明。

聯集欄位 _score

_score 只能是下列其中一項:

score

integer

僅供輸出。工作完成分數。可以是 -1、0、1

UserGoalSatisfactionResult

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

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

string

僅供輸出。與各個分數相關的標籤。分數 2:順暢交接分數 1:使用者工作已完成分數 0:使用者工作未完成分數 -1:使用者工作未指定

explanation

string

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

聯集欄位 _score

_score 只能是下列其中一項:

score

integer

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

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

這是必要旗標,角色的顯示名稱。應用程式內的專屬 ID。

personality

string

這是必要旗標,代理在評估期間的行為指示。

speechConfig

object (SpeechConfig)

選用。設定角色聲音的方式 (文字轉語音設定)。

SpeechConfig

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

number

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

environment

enum (BackgroundEnvironment)

選用。模擬音訊環境。

voiceId

string

選用。要使用的特定語音 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 空值。

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 使用者模擬作業失敗。

類型

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

列舉
TYPE_UNSPECIFIED 預設值。這個值不會使用。
TOOL 工具呼叫範圍。
USER_CALLBACK 使用者回呼跨度。
GUARDRAIL 護欄跨距。
LLM LLM 範圍。

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 評估結果顯示,系統已順利將對話轉交給真人代表。

工具註解

破壞性提示:❌ | 等冪提示:✅ | 唯讀提示:✅ | 開放世界提示:❌