Class Evaluation.GoldenExpectation.Builder (0.3.0)

public static final class Evaluation.GoldenExpectation.Builder extends GeneratedMessage.Builder<Evaluation.GoldenExpectation.Builder> implements Evaluation.GoldenExpectationOrBuilder

Represents a single, checkable requirement.

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

Static Methods

getDescriptor()

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

Methods

build()

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

buildPartial()

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

clear()

public Evaluation.GoldenExpectation.Builder clear()
Returns
Type Description
Evaluation.GoldenExpectation.Builder
Overrides

clearAgentResponse()

public Evaluation.GoldenExpectation.Builder clearAgentResponse()

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
Evaluation.GoldenExpectation.Builder

clearAgentTransfer()

public Evaluation.GoldenExpectation.Builder clearAgentTransfer()

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
Evaluation.GoldenExpectation.Builder

clearCondition()

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

clearMockToolResponse()

public Evaluation.GoldenExpectation.Builder clearMockToolResponse()

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
Evaluation.GoldenExpectation.Builder

clearNote()

public Evaluation.GoldenExpectation.Builder clearNote()

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
Evaluation.GoldenExpectation.Builder

This builder for chaining.

clearToolCall()

public Evaluation.GoldenExpectation.Builder clearToolCall()

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
Evaluation.GoldenExpectation.Builder

clearToolResponse()

public Evaluation.GoldenExpectation.Builder clearToolResponse()

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
Evaluation.GoldenExpectation.Builder

clearUpdatedVariables()

public Evaluation.GoldenExpectation.Builder clearUpdatedVariables()

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
Evaluation.GoldenExpectation.Builder

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.

getAgentResponseBuilder()

public Message.Builder getAgentResponseBuilder()

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.Builder

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

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.

getAgentTransferBuilder()

public AgentTransfer.Builder getAgentTransferBuilder()

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.Builder

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

getConditionCase()

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

getDefaultInstanceForType()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

getMockToolResponseBuilder()

public ToolResponse.Builder getMockToolResponseBuilder()

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.Builder

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

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.

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.

getToolCallBuilder()

public ToolCall.Builder getToolCallBuilder()

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.Builder

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.

getToolResponseBuilder()

public ToolResponse.Builder getToolResponseBuilder()

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.Builder

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.

getUpdatedVariablesBuilder()

public Struct.Builder getUpdatedVariablesBuilder()

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
Builder

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.

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.

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAgentResponse(Message value)

public Evaluation.GoldenExpectation.Builder mergeAgentResponse(Message value)

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];

Parameter
Name Description
value Message
Returns
Type Description
Evaluation.GoldenExpectation.Builder

mergeAgentTransfer(AgentTransfer value)

public Evaluation.GoldenExpectation.Builder mergeAgentTransfer(AgentTransfer value)

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];

Parameter
Name Description
value AgentTransfer
Returns
Type Description
Evaluation.GoldenExpectation.Builder

mergeFrom(Evaluation.GoldenExpectation other)

public Evaluation.GoldenExpectation.Builder mergeFrom(Evaluation.GoldenExpectation other)
Parameter
Name Description
other Evaluation.GoldenExpectation
Returns
Type Description
Evaluation.GoldenExpectation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Evaluation.GoldenExpectation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Evaluation.GoldenExpectation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Evaluation.GoldenExpectation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Evaluation.GoldenExpectation.Builder
Overrides

mergeMockToolResponse(ToolResponse value)

public Evaluation.GoldenExpectation.Builder mergeMockToolResponse(ToolResponse value)

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];

Parameter
Name Description
value ToolResponse
Returns
Type Description
Evaluation.GoldenExpectation.Builder

mergeToolCall(ToolCall value)

public Evaluation.GoldenExpectation.Builder mergeToolCall(ToolCall value)

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

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

Parameter
Name Description
value ToolCall
Returns
Type Description
Evaluation.GoldenExpectation.Builder

mergeToolResponse(ToolResponse value)

public Evaluation.GoldenExpectation.Builder mergeToolResponse(ToolResponse value)

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

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

Parameter
Name Description
value ToolResponse
Returns
Type Description
Evaluation.GoldenExpectation.Builder

mergeUpdatedVariables(Struct value)

public Evaluation.GoldenExpectation.Builder mergeUpdatedVariables(Struct value)

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];

Parameter
Name Description
value Struct
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setAgentResponse(Message value)

public Evaluation.GoldenExpectation.Builder setAgentResponse(Message value)

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];

Parameter
Name Description
value Message
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setAgentResponse(Message.Builder builderForValue)

public Evaluation.GoldenExpectation.Builder setAgentResponse(Message.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Message.Builder
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setAgentTransfer(AgentTransfer value)

public Evaluation.GoldenExpectation.Builder setAgentTransfer(AgentTransfer value)

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];

Parameter
Name Description
value AgentTransfer
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setAgentTransfer(AgentTransfer.Builder builderForValue)

public Evaluation.GoldenExpectation.Builder setAgentTransfer(AgentTransfer.Builder builderForValue)

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];

Parameter
Name Description
builderForValue AgentTransfer.Builder
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setMockToolResponse(ToolResponse value)

public Evaluation.GoldenExpectation.Builder setMockToolResponse(ToolResponse value)

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];

Parameter
Name Description
value ToolResponse
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setMockToolResponse(ToolResponse.Builder builderForValue)

public Evaluation.GoldenExpectation.Builder setMockToolResponse(ToolResponse.Builder builderForValue)

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];

Parameter
Name Description
builderForValue ToolResponse.Builder
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setNote(String value)

public Evaluation.GoldenExpectation.Builder setNote(String value)

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];

Parameter
Name Description
value String

The note to set.

Returns
Type Description
Evaluation.GoldenExpectation.Builder

This builder for chaining.

setNoteBytes(ByteString value)

public Evaluation.GoldenExpectation.Builder setNoteBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for note to set.

Returns
Type Description
Evaluation.GoldenExpectation.Builder

This builder for chaining.

setToolCall(ToolCall value)

public Evaluation.GoldenExpectation.Builder setToolCall(ToolCall value)

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

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

Parameter
Name Description
value ToolCall
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setToolCall(ToolCall.Builder builderForValue)

public Evaluation.GoldenExpectation.Builder setToolCall(ToolCall.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue ToolCall.Builder
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setToolResponse(ToolResponse value)

public Evaluation.GoldenExpectation.Builder setToolResponse(ToolResponse value)

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

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

Parameter
Name Description
value ToolResponse
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setToolResponse(ToolResponse.Builder builderForValue)

public Evaluation.GoldenExpectation.Builder setToolResponse(ToolResponse.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue ToolResponse.Builder
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setUpdatedVariables(Struct value)

public Evaluation.GoldenExpectation.Builder setUpdatedVariables(Struct value)

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];

Parameter
Name Description
value Struct
Returns
Type Description
Evaluation.GoldenExpectation.Builder

setUpdatedVariables(Struct.Builder builderForValue)

public Evaluation.GoldenExpectation.Builder setUpdatedVariables(Struct.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Evaluation.GoldenExpectation.Builder