Package com.google.genai.types
Class PairwiseMetricSpec
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.PairwiseMetricSpec
Spec for pairwise metric.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for PairwiseMetricSpec. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional.static PairwiseMetricSpec.Builderbuilder()Instantiates a builder for PairwiseMetricSpec.Optional.abstract Optional<CustomOutputFormatConfig>Optional.static PairwiseMetricSpecDeserializes a JSON string to a PairwiseMetricSpec object.Required.Optional.abstract PairwiseMetricSpec.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
PairwiseMetricSpec
public PairwiseMetricSpec()
-
-
Method Details
-
metricPromptTemplate
Required. Metric prompt template for pairwise metric. -
baselineResponseFieldName
Optional. The field name of the baseline response. -
candidateResponseFieldName
Optional. The field name of the candidate response. -
customOutputFormatConfig
Optional. CustomOutputFormatConfig allows customization of metric output. When this config is set, the default output is replaced with the raw output string. If a custom format is chosen, the `pairwise_choice` and `explanation` fields in the corresponding metric result will be empty. -
systemInstruction
Optional. System instructions for pairwise metric. -
builder
Instantiates a builder for PairwiseMetricSpec. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a PairwiseMetricSpec object.
-