Class Evaluation.GoldenExpectation (0.9.0)

public static final class Evaluation.GoldenExpectation extends GeneratedMessage implements Evaluation.GoldenExpectationOrBuilder

Represents a single, checkable requirement.

Protobuf type google.cloud.ces.v1beta.Evaluation.GoldenExpectation

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > Evaluation.GoldenExpectation

Static Fields

AGENT_RESPONSE_FIELD_NUMBER

public static final int AGENT_RESPONSE_FIELD_NUMBER
Field Value
Type Description
int

AGENT_RESPONSE_HALLUCINATION_METRICS_CONFIG_OVERRIDE_FIELD_NUMBER

public static final int AGENT_RESPONSE_HALLUCINATION_METRICS_CONFIG_OVERRIDE_FIELD_NUMBER
Field Value
Type Description
int

AGENT_RESPONSE_SEMANTIC_SIMILARITY_METRICS_CONFIG_OVERRIDE_FIELD_NUMBER

public static final int AGENT_RESPONSE_SEMANTIC_SIMILARITY_METRICS_CONFIG_OVERRIDE_FIELD_NUMBER
Field Value
Type Description
int

AGENT_TRANSFER_FIELD_NUMBER

public static final int AGENT_TRANSFER_FIELD_NUMBER
Field Value
Type Description
int

COMPARISON_TYPE_FIELD_NUMBER

public static final int COMPARISON_TYPE_FIELD_NUMBER
Field Value
Type Description
int

EXPECTATION_LEVEL_METRICS_THRESHOLDS_OVERRIDE_FIELD_NUMBER

public static final int EXPECTATION_LEVEL_METRICS_THRESHOLDS_OVERRIDE_FIELD_NUMBER
Field Value
Type Description
int

MOCK_TOOL_RESPONSE_FIELD_NUMBER

public static final int MOCK_TOOL_RESPONSE_FIELD_NUMBER
Field Value
Type Description
int

NOTE_FIELD_NUMBER

public static final int NOTE_FIELD_NUMBER
Field Value
Type Description
int

NO_TOOL_CALLS_FIELD_NUMBER

public static final int NO_TOOL_CALLS_FIELD_NUMBER
Field Value
Type Description
int

SKIP_EVALUATION_FIELD_NUMBER

public static final int SKIP_EVALUATION_FIELD_NUMBER
Field Value
Type Description
int

TOOL_CALL_FIELD_NUMBER

public static final int TOOL_CALL_FIELD_NUMBER
Field Value
Type Description
int

TOOL_RESPONSE_FIELD_NUMBER

public static final int TOOL_RESPONSE_FIELD_NUMBER
Field Value
Type Description
int

UPDATED_VARIABLES_FIELD_NUMBER

public static final int UPDATED_VARIABLES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Evaluation.GoldenExpectation getDefaultInstance()
Returns
Type Description
Evaluation.GoldenExpectation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Evaluation.GoldenExpectation.Builder newBuilder()
Returns
Type Description
Evaluation.GoldenExpectation.Builder

newBuilder(Evaluation.GoldenExpectation prototype)

public static Evaluation.GoldenExpectation.Builder newBuilder(Evaluation.GoldenExpectation prototype)
Parameter
Name Description
prototype Evaluation.GoldenExpectation
Returns
Type Description
Evaluation.GoldenExpectation.Builder

parseDelimitedFrom(InputStream input)

public static Evaluation.GoldenExpectation parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Evaluation.GoldenExpectation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Evaluation.GoldenExpectation parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Evaluation.GoldenExpectation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Evaluation.GoldenExpectation parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Evaluation.GoldenExpectation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Evaluation.GoldenExpectation parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Evaluation.GoldenExpectation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Evaluation.GoldenExpectation parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Evaluation.GoldenExpectation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Evaluation.GoldenExpectation parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Evaluation.GoldenExpectation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Evaluation.GoldenExpectation
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Evaluation.GoldenExpectation> parser()
Returns
Type Description
Parser<GoldenExpectation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAgentResponse()

public Message getAgentResponse()

Optional. Check that the agent responded with the correct response. The role "agent" is implied.

.google.cloud.ces.v1beta.Message agent_response = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Message

The agentResponse.

getAgentResponseHallucinationMetricsConfigOverride()

public EvaluationMetricsConfig.HallucinationMetricsConfig getAgentResponseHallucinationMetricsConfigOverride()

Optional. Overrides for agent_response hallucination metrics.

.google.cloud.ces.v1beta.EvaluationMetricsConfig.HallucinationMetricsConfig agent_response_hallucination_metrics_config_override = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EvaluationMetricsConfig.HallucinationMetricsConfig

The agentResponseHallucinationMetricsConfigOverride.

getAgentResponseHallucinationMetricsConfigOverrideOrBuilder()

public EvaluationMetricsConfig.HallucinationMetricsConfigOrBuilder getAgentResponseHallucinationMetricsConfigOverrideOrBuilder()

Optional. Overrides for agent_response hallucination metrics.

.google.cloud.ces.v1beta.EvaluationMetricsConfig.HallucinationMetricsConfig agent_response_hallucination_metrics_config_override = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EvaluationMetricsConfig.HallucinationMetricsConfigOrBuilder

getAgentResponseOrBuilder()

public MessageOrBuilder getAgentResponseOrBuilder()

Optional. Check that the agent responded with the correct response. The role "agent" is implied.

.google.cloud.ces.v1beta.Message agent_response = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MessageOrBuilder

getAgentResponseSemanticSimilarityMetricsConfigOverride()

public EvaluationMetricsConfig.SemanticSimilarityMetricsConfig getAgentResponseSemanticSimilarityMetricsConfigOverride()

Optional. Overrides for agent_response semantic similarity metrics.

.google.cloud.ces.v1beta.EvaluationMetricsConfig.SemanticSimilarityMetricsConfig agent_response_semantic_similarity_metrics_config_override = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EvaluationMetricsConfig.SemanticSimilarityMetricsConfig

The agentResponseSemanticSimilarityMetricsConfigOverride.

getAgentResponseSemanticSimilarityMetricsConfigOverrideOrBuilder()

public EvaluationMetricsConfig.SemanticSimilarityMetricsConfigOrBuilder getAgentResponseSemanticSimilarityMetricsConfigOverrideOrBuilder()

Optional. Overrides for agent_response semantic similarity metrics.

.google.cloud.ces.v1beta.EvaluationMetricsConfig.SemanticSimilarityMetricsConfig agent_response_semantic_similarity_metrics_config_override = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EvaluationMetricsConfig.SemanticSimilarityMetricsConfigOrBuilder

getAgentTransfer()

public AgentTransfer getAgentTransfer()

Optional. Check that the agent transferred the conversation to a different agent.

.google.cloud.ces.v1beta.AgentTransfer agent_transfer = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AgentTransfer

The agentTransfer.

getAgentTransferOrBuilder()

public AgentTransferOrBuilder getAgentTransferOrBuilder()

Optional. Check that the agent transferred the conversation to a different agent.

.google.cloud.ces.v1beta.AgentTransfer agent_transfer = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AgentTransferOrBuilder

getComparisonType()

public EvaluationMetricsConfig.ComparisonType getComparisonType()

Optional. The comparison type to use for the expectation check.

.google.cloud.ces.v1beta.EvaluationMetricsConfig.ComparisonType comparison_type = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EvaluationMetricsConfig.ComparisonType

The comparisonType.

getComparisonTypeValue()

public int getComparisonTypeValue()

Optional. The comparison type to use for the expectation check.

.google.cloud.ces.v1beta.EvaluationMetricsConfig.ComparisonType comparison_type = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for comparisonType.

getConditionCase()

public Evaluation.GoldenExpectation.ConditionCase getConditionCase()
Returns
Type Description
Evaluation.GoldenExpectation.ConditionCase

getDefaultInstanceForType()

public Evaluation.GoldenExpectation getDefaultInstanceForType()
Returns
Type Description
Evaluation.GoldenExpectation

getExpectationLevelMetricsThresholdsOverride()

public EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholds getExpectationLevelMetricsThresholdsOverride()

Optional. Overrides metrics at the step level.

.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholds expectation_level_metrics_thresholds_override = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholds

The expectationLevelMetricsThresholdsOverride.

getExpectationLevelMetricsThresholdsOverrideOrBuilder()

public EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholdsOrBuilder getExpectationLevelMetricsThresholdsOverrideOrBuilder()

Optional. Overrides metrics at the step level.

.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholds expectation_level_metrics_thresholds_override = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholdsOrBuilder

getMockToolResponse()

public ToolResponse getMockToolResponse()

Optional. The tool response to mock, with the parameters of interest specified. Any parameters not specified will be hallucinated by the LLM.

.google.cloud.ces.v1beta.ToolResponse mock_tool_response = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolResponse

The mockToolResponse.

getMockToolResponseOrBuilder()

public ToolResponseOrBuilder getMockToolResponseOrBuilder()

Optional. The tool response to mock, with the parameters of interest specified. Any parameters not specified will be hallucinated by the LLM.

.google.cloud.ces.v1beta.ToolResponse mock_tool_response = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolResponseOrBuilder

getNoToolCalls()

public boolean getNoToolCalls()

Optional. Check that no tools were called during this turn.

bool no_tool_calls = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The noToolCalls.

getNote()

public String getNote()

Optional. A note for this requirement, useful in reporting when specific checks fail. E.g., "Check_Payment_Tool_Called".

string note = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The note.

getNoteBytes()

public ByteString getNoteBytes()

Optional. A note for this requirement, useful in reporting when specific checks fail. E.g., "Check_Payment_Tool_Called".

string note = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for note.

getParserForType()

public Parser<Evaluation.GoldenExpectation> getParserForType()
Returns
Type Description
Parser<GoldenExpectation>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSkipEvaluation()

public boolean getSkipEvaluation()

Optional. If set to true, this specific expectation will not be evaluated.

bool skip_evaluation = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The skipEvaluation.

getToolCall()

public ToolCall getToolCall()

Optional. Check that a specific tool was called with the parameters.

.google.cloud.ces.v1beta.ToolCall tool_call = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolCall

The toolCall.

getToolCallOrBuilder()

public ToolCallOrBuilder getToolCallOrBuilder()

Optional. Check that a specific tool was called with the parameters.

.google.cloud.ces.v1beta.ToolCall tool_call = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolCallOrBuilder

getToolResponse()

public ToolResponse getToolResponse()

Optional. Check that a specific tool had the expected response.

.google.cloud.ces.v1beta.ToolResponse tool_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolResponse

The toolResponse.

getToolResponseOrBuilder()

public ToolResponseOrBuilder getToolResponseOrBuilder()

Optional. Check that a specific tool had the expected response.

.google.cloud.ces.v1beta.ToolResponse tool_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ToolResponseOrBuilder

getUpdatedVariables()

public Struct getUpdatedVariables()

Optional. Check that the agent updated the session variables to the expected values. Used to also capture agent variable updates for golden evals.

.google.protobuf.Struct updated_variables = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Struct

The updatedVariables.

getUpdatedVariablesOrBuilder()

public StructOrBuilder getUpdatedVariablesOrBuilder()

Optional. Check that the agent updated the session variables to the expected values. Used to also capture agent variable updates for golden evals.

.google.protobuf.Struct updated_variables = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
StructOrBuilder

hasAgentResponse()

public boolean hasAgentResponse()

Optional. Check that the agent responded with the correct response. The role "agent" is implied.

.google.cloud.ces.v1beta.Message agent_response = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the agentResponse field is set.

hasAgentResponseHallucinationMetricsConfigOverride()

public boolean hasAgentResponseHallucinationMetricsConfigOverride()

Optional. Overrides for agent_response hallucination metrics.

.google.cloud.ces.v1beta.EvaluationMetricsConfig.HallucinationMetricsConfig agent_response_hallucination_metrics_config_override = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the agentResponseHallucinationMetricsConfigOverride field is set.

hasAgentResponseSemanticSimilarityMetricsConfigOverride()

public boolean hasAgentResponseSemanticSimilarityMetricsConfigOverride()

Optional. Overrides for agent_response semantic similarity metrics.

.google.cloud.ces.v1beta.EvaluationMetricsConfig.SemanticSimilarityMetricsConfig agent_response_semantic_similarity_metrics_config_override = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the agentResponseSemanticSimilarityMetricsConfigOverride field is set.

hasAgentTransfer()

public boolean hasAgentTransfer()

Optional. Check that the agent transferred the conversation to a different agent.

.google.cloud.ces.v1beta.AgentTransfer agent_transfer = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the agentTransfer field is set.

hasExpectationLevelMetricsThresholdsOverride()

public boolean hasExpectationLevelMetricsThresholdsOverride()

Optional. Overrides metrics at the step level.

.google.cloud.ces.v1beta.EvaluationMetricsThresholds.GoldenEvaluationMetricsThresholds.ExpectationLevelMetricsThresholds expectation_level_metrics_thresholds_override = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the expectationLevelMetricsThresholdsOverride field is set.

hasMockToolResponse()

public boolean hasMockToolResponse()

Optional. The tool response to mock, with the parameters of interest specified. Any parameters not specified will be hallucinated by the LLM.

.google.cloud.ces.v1beta.ToolResponse mock_tool_response = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the mockToolResponse field is set.

hasNoToolCalls()

public boolean hasNoToolCalls()

Optional. Check that no tools were called during this turn.

bool no_tool_calls = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the noToolCalls field is set.

hasToolCall()

public boolean hasToolCall()

Optional. Check that a specific tool was called with the parameters.

.google.cloud.ces.v1beta.ToolCall tool_call = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the toolCall field is set.

hasToolResponse()

public boolean hasToolResponse()

Optional. Check that a specific tool had the expected response.

.google.cloud.ces.v1beta.ToolResponse tool_response = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the toolResponse field is set.

hasUpdatedVariables()

public boolean hasUpdatedVariables()

Optional. Check that the agent updated the session variables to the expected values. Used to also capture agent variable updates for golden evals.

.google.protobuf.Struct updated_variables = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the updatedVariables field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Evaluation.GoldenExpectation.Builder newBuilderForType()
Returns
Type Description
Evaluation.GoldenExpectation.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Evaluation.GoldenExpectation.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Evaluation.GoldenExpectation.Builder
Overrides

toBuilder()

public Evaluation.GoldenExpectation.Builder toBuilder()
Returns
Type Description
Evaluation.GoldenExpectation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException