Class PointwiseMetricSpec.Builder

java.lang.Object
com.google.genai.types.PointwiseMetricSpec.Builder
Enclosing class:
PointwiseMetricSpec

public abstract static class PointwiseMetricSpec.Builder extends Object
Builder for PointwiseMetricSpec.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • metricPromptTemplate

      public abstract PointwiseMetricSpec.Builder metricPromptTemplate(String metricPromptTemplate)
      Setter for metricPromptTemplate.

      metricPromptTemplate: Required. Metric prompt template for pointwise metric.

    • clearMetricPromptTemplate

      @CanIgnoreReturnValue public PointwiseMetricSpec.Builder clearMetricPromptTemplate()
      Clears the value of metricPromptTemplate field.
    • customOutputFormatConfig

      public abstract PointwiseMetricSpec.Builder customOutputFormatConfig(CustomOutputFormatConfig customOutputFormatConfig)
      Setter for customOutputFormatConfig.

      customOutputFormatConfig: Optional. CustomOutputFormatConfig allows customization of metric output. By default, metrics return a score and explanation. When this config is set, the default output is replaced with either: - The raw output string. - A parsed output based on a user-defined schema. If a custom format is chosen, the `score` and `explanation` fields in the corresponding metric result will be empty.

    • customOutputFormatConfig

      @CanIgnoreReturnValue public PointwiseMetricSpec.Builder customOutputFormatConfig(CustomOutputFormatConfig.Builder customOutputFormatConfigBuilder)
      Setter for customOutputFormatConfig builder.

      customOutputFormatConfig: Optional. CustomOutputFormatConfig allows customization of metric output. By default, metrics return a score and explanation. When this config is set, the default output is replaced with either: - The raw output string. - A parsed output based on a user-defined schema. If a custom format is chosen, the `score` and `explanation` fields in the corresponding metric result will be empty.

    • clearCustomOutputFormatConfig

      @CanIgnoreReturnValue public PointwiseMetricSpec.Builder clearCustomOutputFormatConfig()
      Clears the value of customOutputFormatConfig field.
    • systemInstruction

      public abstract PointwiseMetricSpec.Builder systemInstruction(String systemInstruction)
      Setter for systemInstruction.

      systemInstruction: Optional. System instructions for pointwise metric.

    • clearSystemInstruction

      @CanIgnoreReturnValue public PointwiseMetricSpec.Builder clearSystemInstruction()
      Clears the value of systemInstruction field.
    • build

      public abstract PointwiseMetricSpec build()