Evaluation.GoldenExpectation

代表單一可勾選的需求。

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

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "toolCall": {
    object (ToolCall)
  },
  "toolResponse": {
    object (ToolResponse)
  },
  "agentResponse": {
    object (Message)
  },
  "agentTransfer": {
    object (AgentTransfer)
  },
  "updatedVariables": {
    object
  },
  "mockToolResponse": {
    object (ToolResponse)
  },
  "noToolCalls": boolean
  // End of mutually exclusive fields.
}
欄位
note

string

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

skipEvaluation

boolean

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

expectationLevelMetricsThresholdsOverride

object (EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholds)

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

agentResponseSemanticSimilarityMetricsConfigOverride

object (EvaluationMetricsConfig.SemanticSimilarityMetricsConfig)

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

agentResponseHallucinationMetricsConfigOverride

object (EvaluationMetricsConfig.HallucinationMetricsConfig)

選用。覆寫 agentResponse 幻覺指標。

comparisonType

enum (EvaluationMetricsConfig.ComparisonType)

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

要執行的實際檢查。以下列出互斥欄位。回應中最多會設定一個欄位:
toolCall

object (ToolCall)

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

toolResponse

object (ToolResponse)

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

agentResponse

object (Message)

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

agentTransfer

object (AgentTransfer)

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

updatedVariables

object (Struct format)

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

mockToolResponse

object (ToolResponse)

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

noToolCalls

boolean

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

互斥欄位的結尾。

EvaluationMetricsConfig.HallucinationMetricsConfig

評估的錯覺指標設定。如要停用指標,請設定訊息,但不要將 enableHallucinationMetrics 欄位設為 true (或明確設為 false)。如要取消設定並改回預設行為,請完全省略訊息。

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

boolean

選用。是否要計算評估的錯覺指標。

EvaluationMetricsConfig.ComparisonType

支援的比較類型,可用於檢查代理程式的回覆。

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