REST Resource: projects.locations.apps.evaluations.results

資源:EvaluationResult

評估結果代表執行評估的輸出內容。

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

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "goldenResult": {
    object (EvaluationResult.GoldenResult)
  },
  "scenarioResult": {
    object (EvaluationResult.ScenarioResult)
  }
  // End of mutually exclusive fields.
}
欄位
name

string

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

displayName

string

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

createTime

string (Timestamp format)

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

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

evaluationStatus

enum (EvaluationResult.Outcome)

僅供輸出。評估結果。只有在 executionState 為 COMPLETE 時才會填入資料。

evaluationRun

string

僅供輸出。產生這項結果的評估執行作業。格式:projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluationRun}

persona

object (EvaluationPersona)

僅供輸出。用於產生對話的角色,以做為評估結果。

errorInfo

object (EvaluationErrorInfo)

僅供輸出。評估結果的錯誤資訊。

error
(deprecated)

object (Status)

僅供輸出。已淘汰:請改用 errorInfo。執行期間發生錯誤。

initiatedBy

string

僅供輸出。發起評估作業的使用者,該作業產生了這項結果。

appVersion

string

僅供輸出。產生這項結果的對話所用的應用程式版本。格式:projects/{project}/locations/{location}/apps/{app}/versions/{version}

appVersionDisplayName

string

僅供輸出。評估作業所使用的 appVersion 顯示名稱。

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 (EvaluationResult.ExecutionState)

僅供輸出。評估結果執行的狀態。

evaluationMetricsThresholds

object (EvaluationMetricsThresholds)

僅供輸出。結果的評估門檻。

config

object (EvaluationConfig)

僅供輸出。評估執行作業中使用的設定,產生了這項結果。

goldenRunMethod

enum (GoldenRunMethod)

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

rootSpan

object (Span)

僅供輸出。評估執行的根範圍,包含評估每個步驟的相關資訊。

outcomeMetadata

enum (EvaluationResult.OutcomeMetadata)

僅供輸出。評估結果的中繼資料。只有在 executionState 為 COMPLETE 時才會填入資料。

評估結果。只有在 execution_state 為 COMPLETED 時才會填入資料。以下列出互斥欄位。回應中最多會設定一個欄位:
goldenResult

object (EvaluationResult.GoldenResult)

僅供輸出。黃金標準評估的結果。

scenarioResult

object (EvaluationResult.ScenarioResult)

僅供輸出。情境評估結果。

互斥欄位的結尾。

EvaluationResult.GoldenResult

黃金標準評估結果。

JSON 表示法
{
  "turnReplayResults": [
    {
      object (EvaluationResult.GoldenResult.TurnReplayResult)
    }
  ],
  "evaluationExpectationResults": [
    {
      object (EvaluationResult.EvaluationExpectationResult)
    }
  ]
}
欄位
turnReplayResults[]

object (EvaluationResult.GoldenResult.TurnReplayResult)

僅供輸出。執行黃金對話中每個回合的結果。

evaluationExpectationResults[]

object (EvaluationResult.EvaluationExpectationResult)

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

EvaluationResult.GoldenResult.TurnReplayResult

執行單輪黃金對話的結果。

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

string

僅供輸出。系統為這個回合生成的對話。

expectationOutcome[]

object (EvaluationResult.GoldenExpectationOutcome)

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

hallucinationResult

object (EvaluationResult.HallucinationResult)

僅供輸出。幻覺檢查結果。

toolInvocationScore
(deprecated)

number

僅供輸出。已淘汰,請改用 OverallToolInvocationResult。

turnLatency

string (Duration format)

僅供輸出。回合時間長度。

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

toolCallLatencies[]

object (EvaluationResult.ToolCallLatency)

僅供輸出。回合中每次工具呼叫的延遲時間。

semanticSimilarityResult

object (EvaluationResult.SemanticSimilarityResult)

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

overallToolInvocationResult

object (EvaluationResult.OverallToolInvocationResult)

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

errorInfo

object (EvaluationErrorInfo)

僅供輸出。這個回合期間發生的錯誤相關資訊。

spanLatencies[]

object (EvaluationResult.SpanLatency)

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

toolOrderedInvocationScore

number

僅供輸出。這個回合的整體工具呼叫順序分數。這表示在預期回合中,實際以預期順序叫用工具的整體百分比。

EvaluationResult.GoldenExpectationOutcome

指定預期結果和該預期結果的結果。

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

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "observedToolCall": {
    object (ToolCall)
  },
  "observedToolResponse": {
    object (ToolResponse)
  },
  "observedAgentResponse": {
    object (Message)
  },
  "observedAgentTransfer": {
    object (AgentTransfer)
  },
  "observedPayload": {
    object
  }
  // End of mutually exclusive fields.
}
欄位
expectation

object (Evaluation.GoldenExpectation)

僅供輸出。評估的期望。

outcome

enum (EvaluationResult.Outcome)

僅供輸出。預期的結果。

semanticSimilarityResult
(deprecated)

object (EvaluationResult.SemanticSimilarityResult)

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

toolInvocationResult

object (EvaluationResult.GoldenExpectationOutcome.ToolInvocationResult)

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

期望結果。以下列出互斥欄位。回應中最多會設定一個欄位:
observedToolCall

object (ToolCall)

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

observedToolResponse

object (ToolResponse)

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

observedAgentResponse

object (Message)

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

observedAgentTransfer

object (AgentTransfer)

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

observedPayload

object (Struct format)

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

互斥欄位的結尾。

EvaluationResult.Outcome

評估或預期的結果。

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

EvaluationResult.SemanticSimilarityResult

語意相似度檢查結果。

JSON 表示法
{
  "label": string,
  "explanation": string,
  "outcome": enum (EvaluationResult.Outcome),
  "score": integer
}
欄位
label

string

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

explanation

string

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

outcome

enum (EvaluationResult.Outcome)

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

score

integer

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

EvaluationResult.GoldenExpectationOutcome.ToolInvocationResult

工具叫用檢查結果。

JSON 表示法
{
  "outcome": enum (EvaluationResult.Outcome),
  "explanation": string,
  "parameterCorrectnessScore": number
}
欄位
outcome

enum (EvaluationResult.Outcome)

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

explanation

string

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

parameterCorrectnessScore

number

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

EvaluationResult.HallucinationResult

單一輪對話的錯覺檢查結果。

JSON 表示法
{
  "label": string,
  "explanation": string,
  "score": integer
}
欄位
label

string

僅供輸出。與各項分數相關聯的標籤。分數 1:合理 分數 0:不合理 分數 -1:無法評估

explanation

string

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

score

integer

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

EvaluationResult.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"。

EvaluationResult.OverallToolInvocationResult

整體工具叫用檢查的結果。

JSON 表示法
{
  "outcome": enum (EvaluationResult.Outcome),
  "toolInvocationScore": number
}
欄位
outcome

enum (EvaluationResult.Outcome)

僅供輸出。工具叫用檢查結果。系統會比較 toolInvocationScore 與 overallToolInvocationCorrectnessThreshold,判斷是否正確。如果分數等於或高於門檻,結果就會是「通過」。否則結果會是「FAIL」。

toolInvocationScore

number

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

EvaluationResult.SpanLatency

Span 執行的延遲時間。

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

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "resource": string,
  "toolset": {
    object (ToolsetTool)
  },
  "model": string,
  "callback": string
  // End of mutually exclusive fields.
}
欄位
type

enum (EvaluationResult.SpanLatency.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"。

特定項目的 ID,視項目類型而定。以下列出互斥欄位。回應中最多會設定一個欄位:
resource

string

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

toolset

object (ToolsetTool)

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

model

string

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

callback

string

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

互斥欄位的結尾。

EvaluationResult.SpanLatency.Type

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

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

EvaluationResult.EvaluationExpectationResult

單一評估期望的結果。

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

string

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

prompt

string

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

outcome

enum (EvaluationResult.Outcome)

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

explanation

string

僅供輸出。結果的說明。

EvaluationResult.ScenarioResult

情境評估結果。

JSON 表示法
{
  "conversation": string,
  "task": string,
  "userFacts": [
    {
      object (Evaluation.Scenario.UserFact)
    }
  ],
  "expectationOutcomes": [
    {
      object (EvaluationResult.ScenarioExpectationOutcome)
    }
  ],
  "rubricOutcomes": [
    {
      object (EvaluationResult.ScenarioRubricOutcome)
    }
  ],
  "hallucinationResult": [
    {
      object (EvaluationResult.HallucinationResult)
    }
  ],
  "taskCompletionResult": {
    object (EvaluationResult.TaskCompletionResult)
  },
  "toolCallLatencies": [
    {
      object (EvaluationResult.ToolCallLatency)
    }
  ],
  "userGoalSatisfactionResult": {
    object (EvaluationResult.UserGoalSatisfactionResult)
  },
  "spanLatencies": [
    {
      object (EvaluationResult.SpanLatency)
    }
  ],
  "evaluationExpectationResults": [
    {
      object (EvaluationResult.EvaluationExpectationResult)
    }
  ],
  "allExpectationsSatisfied": boolean,
  "taskCompleted": boolean
}
欄位
conversation

string

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

task

string

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

userFacts[]

object (Evaluation.Scenario.UserFact)

僅供輸出。情境用於取得這項結果的使用者事實。

expectationOutcomes[]

object (EvaluationResult.ScenarioExpectationOutcome)

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

rubricOutcomes[]

object (EvaluationResult.ScenarioRubricOutcome)

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

hallucinationResult[]

object (EvaluationResult.HallucinationResult)

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

taskCompletionResult
(deprecated)

object (EvaluationResult.TaskCompletionResult)

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

toolCallLatencies[]

object (EvaluationResult.ToolCallLatency)

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

userGoalSatisfactionResult

object (EvaluationResult.UserGoalSatisfactionResult)

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

spanLatencies[]

object (EvaluationResult.SpanLatency)

僅供輸出。對話中時間範圍的延遲。

evaluationExpectationResults[]

object (EvaluationResult.EvaluationExpectationResult)

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

allExpectationsSatisfied

boolean

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

taskCompleted

boolean

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

EvaluationResult.ScenarioExpectationOutcome

情境預期的結果。

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

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "observedToolCall": {
    object (EvaluationResult.ScenarioExpectationOutcome.ObservedToolCall)
  },
  "observedAgentResponse": {
    object (Message)
  }
  // End of mutually exclusive fields.
}
欄位
expectation

object (Evaluation.ScenarioExpectation)

僅供輸出。評估的期望。

outcome

enum (EvaluationResult.Outcome)

僅供輸出。ScenarioExpectation 的結果。

期望結果。以下列出互斥欄位。回應中最多會設定一個欄位:
observedToolCall

object (EvaluationResult.ScenarioExpectationOutcome.ObservedToolCall)

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

observedAgentResponse

object (Message)

僅供輸出。觀察到的代理回覆。

互斥欄位的結尾。

EvaluationResult.ScenarioExpectationOutcome.ObservedToolCall

觀察到的工具呼叫和回應。

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

object (ToolCall)

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

toolResponse

object (ToolResponse)

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

EvaluationResult.ScenarioRubricOutcome

根據評量表評估的結果。

JSON 表示法
{
  "rubric": string,
  "scoreExplanation": string,
  "score": number
}
欄位
rubric

string

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

scoreExplanation

string

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

score

number

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

EvaluationResult.TaskCompletionResult

對話的任務完成檢查結果。

JSON 表示法
{
  "label": string,
  "explanation": string,
  "score": integer
}
欄位
label

string

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

explanation

string

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

score

integer

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

EvaluationResult.UserGoalSatisfactionResult

對話的使用者目標達成情況檢查結果。

JSON 表示法
{
  "label": string,
  "explanation": string,
  "score": integer
}
欄位
label

string

僅供輸出。與各項分數相關聯的標籤。分數 2:順暢交接分數 1:使用者工作滿意分數 0:使用者工作不滿意分數 -1:使用者工作未指定

explanation

string

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

score

integer

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

EvaluationResult.ExecutionState

評估結果執行的狀態。

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

EvaluationResult.OutcomeMetadata

評估結果的中繼資料。

列舉
OUTCOME_METADATA_UNSPECIFIED 未指定結果中繼資料。
GRACEFUL_HANDOFF 評估結果顯示,系統可順利將對話轉交給真人代表。

方法

delete

刪除評估結果。

export

匯出評估結果。

get

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

list

列出指定評估的所有評估結果。

runEvaluationResultMetrics

針對現有的評估結果執行指標。