MCP Tools Reference: ces.googleapis.com

工具:update_evaluation

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

下列範例示範如何使用 curl 叫用 update_evaluation MCP 工具。

Curl 要求
                  
curl --location 'https://ces.[REGION].rep.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "update_evaluation",
    "arguments": {
      // provide these details according to the tool's MCP 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)
    }
  ],

  // 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 時,才會填入這個欄位。

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

object (Golden)

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

scenario

object (Scenario)

選用。情境的設定。

金黃

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

object (GoldenTurn)

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

evaluationExpectations[]

string

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

GoldenTurn

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

object (Step)

這是必要旗標,重播精彩對話的必要步驟。

rootSpan

object (Span)

選用。處理及維護音訊資訊的黃金回合根範圍。

步驟

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

代表空值。

numberValue

number

表示雙精度浮點數值。

stringValue

string

代表字串值。

boolValue

boolean

表示布林值。

structValue

object (Struct format)

代表結構化值。

listValue

array (ListValue format)

代表重複的 Value

ListValue

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

value (Value format)

動態型別值的重複欄位。

圖片

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

string

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

data

string (bytes format)

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

Base64 編碼字串。

Blob

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

string

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

data

string (bytes format)

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

Base64 編碼字串。

事件

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

string

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

AgentTransfer

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

string

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

displayName

string

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

GoldenExpectation

JSON 表示法
{
  "note": string,

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

string

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

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

object (ToolCall)

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

toolResponse

object (ToolResponse)

選用。確認特定工具是否提供預期回應。

agentResponse

object (Message)

選用。確認代理程式是否回覆正確內容。「代理商」角色是隱含的。

agentTransfer

object (AgentTransfer)

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

updatedVariables

object (Struct format)

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

mockToolResponse

object (ToolResponse)

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

ToolCall

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

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

string

選用。工具呼叫的專屬 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 之間 (含)。

時距

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

情境

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

string

這是必要旗標,情境要鎖定的工作。

userFacts[]

object (UserFact)

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

maxTurns

integer

選用。要模擬的回合數上限。如未指定,模擬作業會持續進行,直到工作完成為止。

rubrics[]

string

這是必要旗標,用來評估情境的評量表。

scenarioExpectations[]

object (ScenarioExpectation)

這是必要旗標,ScenarioExpectations,用於評估使用者模擬產生的對話。

variableOverrides

object (Struct format)

選用。工作階段的變數 / 工作階段參數,以變數名稱做為鍵。這個結構體的成員會覆寫系統設定的所有預設值。

請注意,這些與使用者事實不同,使用者事實是指使用者已知的事實。變數是服務專員已知的參數,也就是電話系統傳送的 MDN (電話號碼)。

taskCompletionBehavior
(deprecated)

enum (TaskCompletionBehavior)

選用。已淘汰,請改用 user_goal_behavior。

userGoalBehavior

enum (UserGoalBehavior)

選用。使用者目標的預期行為。

evaluationExpectations[]

string

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

UserFact

JSON 表示法
{
  "name": string,
  "value": string
}
欄位
name

string

這是必要旗標,使用者事實的名稱。

value

string

這是必要旗標,使用者事實的值。

ScenarioExpectation

JSON 表示法
{

  // Union field expectation can be only one of the following:
  "toolExpectation": {
    object (ToolExpectation)
  },
  "agentResponse": {
    object (Message)
  }
  // End of list of possible types for union field expectation.
}
欄位
聯集欄位 expectation。評估模擬產生的對話。expectation 只能是下列其中一個設定:
toolExpectation

object (ToolExpectation)

選用。要評估的工具呼叫和回覆配對。

agentResponse

object (Message)

選用。要評估的服務專員回覆。

ToolExpectation

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

object (ToolCall)

這是必要旗標,預期工具呼叫,並指定感興趣的參數。如果未指定任何參數,LLM 就會產生幻覺。

mockToolResponse

object (ToolResponse)

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

AggregatedMetrics

JSON 表示法
{
  "metricsByAppVersion": [
    {
      object (MetricsByAppVersion)
    }
  ]
}
欄位
metricsByAppVersion[]

object (MetricsByAppVersion)

僅供輸出。依應用程式版本 ID 分組的匯總指標。

MetricsByAppVersion

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

string

僅供輸出。應用程式版本 ID。

toolMetrics[]

object (ToolMetrics)

僅供輸出。這個應用程式版本中各項工具的指標。

semanticSimilarityMetrics[]

object (SemanticSimilarityMetrics)

僅供輸出。這個應用程式版本中的語意相似度指標。

hallucinationMetrics[]

object (HallucinationMetrics)

僅供輸出。這個應用程式版本中的錯覺指標。

toolCallLatencyMetrics[]

object (ToolCallLatencyMetrics)

僅供輸出。這個應用程式版本的工具呼叫延遲指標。

turnLatencyMetrics[]

object (TurnLatencyMetrics)

僅供輸出。這個應用程式版本的輪替延遲指標。

passCount

integer

僅供輸出。評估通過的次數。

failCount

integer

僅供輸出。評估失敗次數。

metricsByTurn[]

object (MetricsByTurn)

僅供輸出。這項應用程式版本中,每個回合的匯總指標。

ToolMetrics

JSON 表示法
{
  "tool": string,
  "passCount": integer,
  "failCount": integer
}
欄位
tool

string

僅供輸出。工具名稱。

passCount

integer

僅供輸出。工具通過的次數。

failCount

integer

僅供輸出。工具失敗的次數。

SemanticSimilarityMetrics

JSON 表示法
{
  "score": number
}
欄位
score

number

僅供輸出。平均語意相似度分數 (0 到 4 分)。

HallucinationMetrics

JSON 表示法
{
  "score": number
}
欄位
score

number

僅供輸出。平均錯覺分數 (0 到 1)。

ToolCallLatencyMetrics

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

string

僅供輸出。工具名稱。

averageLatency

string (Duration format)

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

時間長度以秒為單位,最多可有 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),

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

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

聯集欄位 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)
  }
  // End of list of possible types for union field result.
}
欄位
expectation

object (GoldenExpectation)

僅供輸出。評估的期望。

outcome

enum (Outcome)

僅供輸出。預期的結果。

semanticSimilarityResult
(deprecated)

object (SemanticSimilarityResult)

僅供輸出。語意相似度檢查結果。

toolInvocationResult

object (ToolInvocationResult)

僅供輸出。工具叫用檢查結果。

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

object (ToolCall)

僅供輸出。工具呼叫預期的結果。

observedToolResponse

object (ToolResponse)

僅供輸出。工具回應預期的結果。

observedAgentResponse

object (Message)

僅供輸出。代理回覆預期的結果。

observedAgentTransfer

object (AgentTransfer)

僅供輸出。預期轉移給服務專員的結果。

SemanticSimilarityResult

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

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

string

僅供輸出。與各個分數相關的標籤。分數 4:完全一致 分數 3:大致一致 分數 2:部分一致 (有小部分遺漏) 分數 1:大致不一致 (有大部分遺漏) 分數 0:完全不一致 / 矛盾

explanation

string

僅供輸出。語意相似度分數的說明。

outcome

enum (Outcome)

僅供輸出。語意相似度檢查結果。這是透過比較分數與 semantic_similarity_success_threshold 來判斷。如果分數等於或高於門檻,結果就會是「通過」。否則結果會是「失敗」。

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

聯集欄位 _tool_invocation_score

_tool_invocation_score 只能是下列其中一項:

toolInvocationScore

number

這個回合的整體工具叫用分數。這表示實際叫用工具的百分比,以預期回合為基準。

EvaluationErrorInfo

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

enum (ErrorType)

僅供輸出。錯誤類型。

errorMessage

string

僅供輸出。錯誤訊息。

sessionId

string

僅供輸出。導致錯誤的對話工作階段 ID。

SpanLatency

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

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

enum (Type)

僅供輸出。範圍類型。

displayName

string

僅供輸出。範圍的顯示名稱。適用於工具和防護機制範圍。

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

僅供輸出。與各個分數相關的標籤。分數 1:使用者任務滿意分數 0:使用者任務不滿意分數 -1:使用者任務未指定

explanation

string

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

聯集欄位 _score

_score 只能是下列其中一項:

score

integer

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

EvaluationPersona

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

string

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

description

string

選用。角色說明。

displayName

string

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

personality

string

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

speechConfig

object (SpeechConfig)

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

SpeechConfig

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

number

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

environment

enum (BackgroundEnvironment)

選用。模擬音訊環境。

voiceId

string

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

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

TurnLevelMetricsThresholds

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

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

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

enum (SemanticSimilarityChannel)

選用。用於評估的語意相似度管道。

聯集欄位 _semantic_similarity_success_threshold

_semantic_similarity_success_threshold 只能是下列其中一項:

semanticSimilaritySuccessThreshold

integer

選用。語意相似度的成功門檻。必須是介於 0 到 4 之間的整數。預設值為 >= 3。

聯集欄位 _overall_tool_invocation_correctness_threshold

_overall_tool_invocation_correctness_threshold 只能是下列其中一項:

overallToolInvocationCorrectnessThreshold

number

選用。工具整體叫用正確性的成功門檻。必須是介於 0 到 1 之間的浮點數。預設值為 1.0。

ExpectationLevelMetricsThresholds

JSON 表示法
{

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

聯集欄位 _tool_invocation_parameter_correctness_threshold

_tool_invocation_parameter_correctness_threshold 只能是下列其中一項:

toolInvocationParameterCorrectnessThreshold

number

選用。個別工具叫用參數正確性的成功門檻。必須是介於 0 到 1 之間的浮點數。預設值為 1.0。

ToolMatchingSettings

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

enum (ExtraToolCallBehavior)

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

EvaluationConfig

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

object (InputAudioConfig)

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

outputAudioConfig
(deprecated)

object (OutputAudioConfig)

選用。用於生成輸出音訊的設定。

evaluationChannel

enum (EvaluationChannel)

選用。要評估的管道。

toolCallBehaviour

enum (EvaluationToolCallBehaviour)

選用。指定評估作業應使用真實工具呼叫或虛擬工具。

InputAudioConfig

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

enum (AudioEncoding)

這是必要旗標,輸入音訊資料的編碼。

sampleRateHertz

integer

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

noiseSuppressionLevel

string

選用。是否要對輸入音訊啟用噪音抑制功能。可用的值為「low」、「moderate」、「high」、「very_high」。

OutputAudioConfig

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

enum (AudioEncoding)

這是必要旗標,輸出音訊資料的編碼。

sampleRateHertz

integer

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

FieldMask

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

string

一組欄位遮罩路徑。

輸出內容的結構定義

評估代表模擬及評估代理程式所需的所有資訊。

評估

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

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

string

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 時,才會填入這個欄位。

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

object (Golden)

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

scenario

object (Scenario)

選用。情境的設定。

金黃

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

object (GoldenTurn)

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

evaluationExpectations[]

string

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

GoldenTurn

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

object (Step)

這是必要旗標,重播精彩對話的必要步驟。

rootSpan

object (Span)

選用。處理及維護音訊資訊的黃金回合根範圍。

步驟

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

代表空值。

numberValue

number

表示雙精度浮點數值。

stringValue

string

代表字串值。

boolValue

boolean

表示布林值。

structValue

object (Struct format)

代表結構化值。

listValue

array (ListValue format)

代表重複的 Value

ListValue

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

value (Value format)

動態型別值的重複欄位。

圖片

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

string

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

data

string (bytes format)

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

Base64 編碼字串。

Blob

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

string

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

data

string (bytes format)

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

Base64 編碼字串。

事件

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

string

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

AgentTransfer

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

string

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

displayName

string

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

GoldenExpectation

JSON 表示法
{
  "note": string,

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

string

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

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

object (ToolCall)

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

toolResponse

object (ToolResponse)

選用。確認特定工具是否提供預期回應。

agentResponse

object (Message)

選用。確認代理程式是否回覆正確內容。「代理商」角色是隱含的。

agentTransfer

object (AgentTransfer)

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

updatedVariables

object (Struct format)

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

mockToolResponse

object (ToolResponse)

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

ToolCall

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

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

string

選用。工具呼叫的專屬 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 之間 (含)。

時距

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

情境

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

string

這是必要旗標,情境要鎖定的工作。

userFacts[]

object (UserFact)

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

maxTurns

integer

選用。要模擬的回合數上限。如未指定,模擬作業會持續進行,直到工作完成為止。

rubrics[]

string

這是必要旗標,用來評估情境的評量表。

scenarioExpectations[]

object (ScenarioExpectation)

這是必要旗標,ScenarioExpectations,用於評估使用者模擬產生的對話。

variableOverrides

object (Struct format)

選用。工作階段的變數 / 工作階段參數,以變數名稱做為鍵。這個結構體的成員會覆寫系統設定的所有預設值。

請注意,這些與使用者事實不同,使用者事實是指使用者已知的事實。變數是服務專員已知的參數,也就是電話系統傳送的 MDN (電話號碼)。

taskCompletionBehavior
(deprecated)

enum (TaskCompletionBehavior)

選用。已淘汰,請改用 user_goal_behavior。

userGoalBehavior

enum (UserGoalBehavior)

選用。使用者目標的預期行為。

evaluationExpectations[]

string

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

UserFact

JSON 表示法
{
  "name": string,
  "value": string
}
欄位
name

string

這是必要旗標,使用者事實的名稱。

value

string

這是必要旗標,使用者事實的值。

ScenarioExpectation

JSON 表示法
{

  // Union field expectation can be only one of the following:
  "toolExpectation": {
    object (ToolExpectation)
  },
  "agentResponse": {
    object (Message)
  }
  // End of list of possible types for union field expectation.
}
欄位
聯集欄位 expectation。評估模擬產生的對話。expectation 只能是下列其中一個設定:
toolExpectation

object (ToolExpectation)

選用。要評估的工具呼叫和回覆配對。

agentResponse

object (Message)

選用。要評估的服務專員回覆。

ToolExpectation

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

object (ToolCall)

這是必要旗標,預期工具呼叫,並指定感興趣的參數。如果未指定任何參數,LLM 就會產生幻覺。

mockToolResponse

object (ToolResponse)

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

AggregatedMetrics

JSON 表示法
{
  "metricsByAppVersion": [
    {
      object (MetricsByAppVersion)
    }
  ]
}
欄位
metricsByAppVersion[]

object (MetricsByAppVersion)

僅供輸出。依應用程式版本 ID 分組的匯總指標。

MetricsByAppVersion

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

string

僅供輸出。應用程式版本 ID。

toolMetrics[]

object (ToolMetrics)

僅供輸出。這個應用程式版本中各項工具的指標。

semanticSimilarityMetrics[]

object (SemanticSimilarityMetrics)

僅供輸出。這個應用程式版本中的語意相似度指標。

hallucinationMetrics[]

object (HallucinationMetrics)

僅供輸出。這個應用程式版本中的錯覺指標。

toolCallLatencyMetrics[]

object (ToolCallLatencyMetrics)

僅供輸出。這個應用程式版本的工具呼叫延遲指標。

turnLatencyMetrics[]

object (TurnLatencyMetrics)

僅供輸出。這個應用程式版本的輪替延遲指標。

passCount

integer

僅供輸出。評估通過的次數。

failCount

integer

僅供輸出。評估失敗次數。

metricsByTurn[]

object (MetricsByTurn)

僅供輸出。這項應用程式版本中,每個回合的匯總指標。

ToolMetrics

JSON 表示法
{
  "tool": string,
  "passCount": integer,
  "failCount": integer
}
欄位
tool

string

僅供輸出。工具名稱。

passCount

integer

僅供輸出。工具通過的次數。

failCount

integer

僅供輸出。工具失敗的次數。

SemanticSimilarityMetrics

JSON 表示法
{
  "score": number
}
欄位
score

number

僅供輸出。平均語意相似度分數 (0 到 4 分)。

HallucinationMetrics

JSON 表示法
{
  "score": number
}
欄位
score

number

僅供輸出。平均錯覺分數 (0 到 1)。

ToolCallLatencyMetrics

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

string

僅供輸出。工具名稱。

averageLatency

string (Duration format)

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

時間長度以秒為單位,最多可有 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),

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

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

聯集欄位 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)
  }
  // End of list of possible types for union field result.
}
欄位
expectation

object (GoldenExpectation)

僅供輸出。評估的期望。

outcome

enum (Outcome)

僅供輸出。預期的結果。

semanticSimilarityResult
(deprecated)

object (SemanticSimilarityResult)

僅供輸出。語意相似度檢查結果。

toolInvocationResult

object (ToolInvocationResult)

僅供輸出。工具叫用檢查結果。

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

object (ToolCall)

僅供輸出。工具呼叫預期的結果。

observedToolResponse

object (ToolResponse)

僅供輸出。工具回應預期的結果。

observedAgentResponse

object (Message)

僅供輸出。代理回覆預期的結果。

observedAgentTransfer

object (AgentTransfer)

僅供輸出。預期轉移給服務專員的結果。

SemanticSimilarityResult

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

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

string

僅供輸出。與各個分數相關的標籤。分數 4:完全一致 分數 3:大致一致 分數 2:部分一致 (有小部分遺漏) 分數 1:大致不一致 (有大部分遺漏) 分數 0:完全不一致 / 矛盾

explanation

string

僅供輸出。語意相似度分數的說明。

outcome

enum (Outcome)

僅供輸出。語意相似度檢查結果。這是透過比較分數與 semantic_similarity_success_threshold 來判斷。如果分數等於或高於門檻,結果就會是「通過」。否則結果會是「失敗」。

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

聯集欄位 _tool_invocation_score

_tool_invocation_score 只能是下列其中一項:

toolInvocationScore

number

這個回合的整體工具叫用分數。這表示實際叫用工具的百分比,以預期回合為基準。

EvaluationErrorInfo

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

enum (ErrorType)

僅供輸出。錯誤類型。

errorMessage

string

僅供輸出。錯誤訊息。

sessionId

string

僅供輸出。導致錯誤的對話工作階段 ID。

SpanLatency

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

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

enum (Type)

僅供輸出。範圍類型。

displayName

string

僅供輸出。範圍的顯示名稱。適用於工具和防護機制範圍。

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

僅供輸出。與各個分數相關的標籤。分數 1:使用者任務滿意分數 0:使用者任務不滿意分數 -1:使用者任務未指定

explanation

string

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

聯集欄位 _score

_score 只能是下列其中一項:

score

integer

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

EvaluationPersona

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

string

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

description

string

選用。角色說明。

displayName

string

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

personality

string

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

speechConfig

object (SpeechConfig)

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

SpeechConfig

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

number

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

environment

enum (BackgroundEnvironment)

選用。模擬音訊環境。

voiceId

string

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

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

TurnLevelMetricsThresholds

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

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

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

enum (SemanticSimilarityChannel)

選用。用於評估的語意相似度管道。

聯集欄位 _semantic_similarity_success_threshold

_semantic_similarity_success_threshold 只能是下列其中一項:

semanticSimilaritySuccessThreshold

integer

選用。語意相似度的成功門檻。必須是介於 0 到 4 之間的整數。預設值為 >= 3。

聯集欄位 _overall_tool_invocation_correctness_threshold

_overall_tool_invocation_correctness_threshold 只能是下列其中一項:

overallToolInvocationCorrectnessThreshold

number

選用。工具整體叫用正確性的成功門檻。必須是介於 0 到 1 之間的浮點數。預設值為 1.0。

ExpectationLevelMetricsThresholds

JSON 表示法
{

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

聯集欄位 _tool_invocation_parameter_correctness_threshold

_tool_invocation_parameter_correctness_threshold 只能是下列其中一項:

toolInvocationParameterCorrectnessThreshold

number

選用。個別工具叫用參數正確性的成功門檻。必須是介於 0 到 1 之間的浮點數。預設值為 1.0。

ToolMatchingSettings

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

enum (ExtraToolCallBehavior)

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

EvaluationConfig

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

object (InputAudioConfig)

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

outputAudioConfig
(deprecated)

object (OutputAudioConfig)

選用。用於生成輸出音訊的設定。

evaluationChannel

enum (EvaluationChannel)

選用。要評估的管道。

toolCallBehaviour

enum (EvaluationToolCallBehaviour)

選用。指定評估作業應使用真實工具呼叫或虛擬工具。

InputAudioConfig

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

enum (AudioEncoding)

這是必要旗標,輸入音訊資料的編碼。

sampleRateHertz

integer

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

noiseSuppressionLevel

string

選用。是否要對輸入音訊啟用噪音抑制功能。可用的值為「low」、「moderate」、「high」、「very_high」。

OutputAudioConfig

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

enum (AudioEncoding)

這是必要旗標,輸出音訊資料的編碼。

sampleRateHertz

integer

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

工具註解

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