- [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Evaluation.GoldenExpectation#SCHEMA_REPRESENTATION)
- [EvaluationMetricsConfig.HallucinationMetricsConfig](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Evaluation.GoldenExpectation#EvaluationMetricsConfig.HallucinationMetricsConfig)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Evaluation.GoldenExpectation#EvaluationMetricsConfig.HallucinationMetricsConfig.SCHEMA_REPRESENTATION)
- [EvaluationMetricsConfig.ComparisonType](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Evaluation.GoldenExpectation#EvaluationMetricsConfig.ComparisonType)

Represents a single, checkable requirement.

| JSON representation |
|---|
| ``` { "note": string, "skipEvaluation": boolean, "expectationLevelMetricsThresholdsOverride": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholds`) }, "agentResponseSemanticSimilarityMetricsConfigOverride": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/EvaluationMetricsConfig.SemanticSimilarityMetricsConfig`) }, "agentResponseHallucinationMetricsConfigOverride": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Evaluation.GoldenExpectation#EvaluationMetricsConfig.HallucinationMetricsConfig`) }, "comparisonType": enum (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Evaluation.GoldenExpectation#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 (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/ToolCall`) }, "toolResponse": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/ToolResponse`) }, "agentResponse": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Message`) }, "agentTransfer": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/AgentTransfer`) }, "updatedVariables": { object }, "mockToolResponse": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/ToolResponse`) }, "noToolCalls": boolean // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `note` | `string` Optional. A note for this requirement, useful in reporting when specific checks fail. E.g., "Check_Payment_Tool_Called". |
| `skipEvaluation` | `boolean` Optional. If set to true, this specific expectation will not be evaluated. |
| `expectationLevelMetricsThresholdsOverride` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholds`)`` Optional. Overrides metrics at the step level. |
| `agentResponseSemanticSimilarityMetricsConfigOverride` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/EvaluationMetricsConfig.SemanticSimilarityMetricsConfig`)`` Optional. Overrides for agentResponse semantic similarity metrics. |
| `agentResponseHallucinationMetricsConfigOverride` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Evaluation.GoldenExpectation#EvaluationMetricsConfig.HallucinationMetricsConfig`)`` Optional. Overrides for agentResponse hallucination metrics. |
| `comparisonType` | ``enum (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Evaluation.GoldenExpectation#EvaluationMetricsConfig.ComparisonType`)`` Optional. The comparison type to use for the expectation check. |
| The actual check to perform. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `toolCall` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/ToolCall`)`` Optional. Check that a specific tool was called with the parameters. |
| `toolResponse` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/ToolResponse`)`` Optional. Check that a specific tool had the expected response. |
| `agentResponse` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/Message`)`` Optional. Check that the agent responded with the correct response. The role "agent" is implied. |
| `agentTransfer` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/AgentTransfer`)`` Optional. Check that the agent transferred the conversation to a different agent. |
| `updatedVariables` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. Check that the agent updated the session variables to the expected values. Used to also capture agent variable updates for golden evals. |
| `mockToolResponse` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/ToolResponse`)`` Optional. The tool response to mock, with the parameters of interest specified. Any parameters not specified will be hallucinated by the LLM. |
| `noToolCalls` | `boolean` Optional. Check that no tools were called during this turn. |
| End of mutually exclusive fields. ||

## EvaluationMetricsConfig.HallucinationMetricsConfig

Configuration for the hallucination metrics for the evaluation. To disable the metric, set the message but do not set the `enableHallucinationMetrics` field to true (or explicitly set it to false). To unset the configuration and fallback to the default behavior, omit the message entirely.

| JSON representation |
|---|
| ``` { "enableHallucinationMetrics": boolean } ``` |

| Fields ||
|---|---|
| `enableHallucinationMetrics` | `boolean` Optional. Whether to calculate hallucination metrics for the evaluation. |

## EvaluationMetricsConfig.ComparisonType

Supported comparison types for checking the agent's response.

| Enums ||
|---|---|
| `COMPARISON_TYPE_UNSPECIFIED` | Unspecified comparison type. Behavior defaults to SEMANTIC_SIMILARITY for agent responses and tool calls. |
| `EQUALS` | Exact string match. |
| `CONTAINS` | Substring match (checks if the expected string is contained in the actual response). |
| `SEMANTIC_SIMILARITY` | Semantic similarity match (evaluates meaning similarity using an LLM). |