REST Resource: projects.locations.apps.evaluations

資源:Evaluation

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

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)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "golden": {
    object (Evaluation.Golden)
  },
  "scenario": {
    object (Evaluation.Scenario)
  }
  // End of mutually exclusive fields.
}
欄位
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

僅供輸出。與這項評估作業相關聯的 EvaluationRuns。

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)

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

評估作業的輸入內容。以下是互斥欄位清單。回應中最多會設定一個欄位:
golden

object (Evaluation.Golden)

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

scenario

object (Evaluation.Scenario)

選用。情境的設定。

互斥欄位的結尾。

Evaluation.Golden

重播精選對話的必要步驟。

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

object (Evaluation.GoldenTurn)

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

evaluationExpectations[]

string

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

Evaluation.GoldenTurn

黃金回合是指黃金對話中的單一回合。

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

object (Evaluation.Step)

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

rootSpan

object (Span)

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

turnLevelMetricsThresholdsOverride

object (EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.TurnLevelMetricsThresholds)

選用。回合層級指標的臨界值覆寫。

hallucinationMetricBehaviorOverride

enum (EvaluationMetricsThresholds.HallucinationMetricBehavior)

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

Evaluation.Step

步驟定義評估期間發生的單一動作。

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "userInput": {
    object (SessionInput)
  },
  "agentTransfer": {
    object (AgentTransfer)
  },
  "expectation": {
    object (Evaluation.GoldenExpectation)
  }
  // End of mutually exclusive fields.
}
欄位
要執行的步驟。以下列出互斥欄位。回應中最多會設定一個欄位:
userInput

object (SessionInput)

選用。對話中輸入的使用者輸入內容。

agentTransfer

object (AgentTransfer)

選用。將對話轉移給其他服務專員。

expectation

object (Evaluation.GoldenExpectation)

選用。在目前回合執行期望。

互斥欄位的結尾。

SessionInput

工作階段的輸入內容。

JSON 表示法
{
  "willContinue": boolean,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "text": string,
  "dtmf": string,
  "audio": string,
  "toolResponses": {
    object (ToolResponses)
  },
  "image": {
    object (Image)
  },
  "blob": {
    object (Blob)
  },
  "variables": {
    object
  },
  "event": {
    object (Event)
  }
  // End of mutually exclusive fields.
}
欄位
willContinue

boolean

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

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

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

輸入內容的類型。以下列出互斥欄位。回應中最多會設定一個欄位:
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)

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

事件

事件輸入。

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

string

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

variables

object (Struct format)

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

Evaluation.Scenario

情境的設定

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

string

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

userFacts[]

object (Evaluation.Scenario.UserFact)

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

maxTurns

integer

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

rubrics[]

string

這是必要旗標,用來評估情境的分數標準。

scenarioExpectations[]

object (Evaluation.ScenarioExpectation)

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

variableOverrides

object (Struct format)

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

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

taskCompletionBehavior
(deprecated)

enum (Evaluation.Scenario.TaskCompletionBehavior)

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

userGoalBehavior

enum (Evaluation.Scenario.UserGoalBehavior)

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

evaluationExpectations[]

string

選用。評估期望,用來評估模擬產生的對話。格式:projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluationExpectation}

scenarioExecutionMode

enum (EvaluationSettings.ScenarioExecutionMode)

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

Evaluation.Scenario.TaskCompletionBehavior

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

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

Evaluation.Scenario.UserGoalBehavior

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

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

方法

create

建立評估作業。

delete

刪除評估作業。

export

匯出評估結果。

get

取得指定評估的詳細資料。

list

列出指定應用程式中的所有評估。

patch

更新評估作業。

uploadEvaluationAudio

上傳音訊,用於黃金評估。