Class PairwiseMetricSpec.Builder
- Enclosing class:
- PairwiseMetricSpec
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract PairwiseMetricSpec.BuilderbaselineResponseFieldName(String baselineResponseFieldName) Setter for baselineResponseFieldName.abstract PairwiseMetricSpecbuild()abstract PairwiseMetricSpec.BuildercandidateResponseFieldName(String candidateResponseFieldName) Setter for candidateResponseFieldName.Clears the value of baselineResponseFieldName field.Clears the value of candidateResponseFieldName field.Clears the value of customOutputFormatConfig field.Clears the value of metricPromptTemplate field.Clears the value of systemInstruction field.abstract PairwiseMetricSpec.BuildercustomOutputFormatConfig(CustomOutputFormatConfig customOutputFormatConfig) Setter for customOutputFormatConfig.customOutputFormatConfig(CustomOutputFormatConfig.Builder customOutputFormatConfigBuilder) Setter for customOutputFormatConfig builder.abstract PairwiseMetricSpec.BuildermetricPromptTemplate(String metricPromptTemplate) Setter for metricPromptTemplate.abstract PairwiseMetricSpec.BuildersystemInstruction(String systemInstruction) Setter for systemInstruction.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metricPromptTemplate
Setter for metricPromptTemplate.metricPromptTemplate: Required. Metric prompt template for pairwise metric.
-
clearMetricPromptTemplate
Clears the value of metricPromptTemplate field. -
baselineResponseFieldName
public abstract PairwiseMetricSpec.Builder baselineResponseFieldName(String baselineResponseFieldName) Setter for baselineResponseFieldName.baselineResponseFieldName: Optional. The field name of the baseline response.
-
clearBaselineResponseFieldName
Clears the value of baselineResponseFieldName field. -
candidateResponseFieldName
public abstract PairwiseMetricSpec.Builder candidateResponseFieldName(String candidateResponseFieldName) Setter for candidateResponseFieldName.candidateResponseFieldName: Optional. The field name of the candidate response.
-
clearCandidateResponseFieldName
Clears the value of candidateResponseFieldName field. -
customOutputFormatConfig
public abstract PairwiseMetricSpec.Builder customOutputFormatConfig(CustomOutputFormatConfig customOutputFormatConfig) Setter for customOutputFormatConfig.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.
-
customOutputFormatConfig
@CanIgnoreReturnValue public PairwiseMetricSpec.Builder customOutputFormatConfig(CustomOutputFormatConfig.Builder customOutputFormatConfigBuilder) Setter for customOutputFormatConfig builder.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.
-
clearCustomOutputFormatConfig
Clears the value of customOutputFormatConfig field. -
systemInstruction
Setter for systemInstruction.systemInstruction: Optional. System instructions for pairwise metric.
-
clearSystemInstruction
Clears the value of systemInstruction field. -
build
-