Google Cloud Ai Platform V1 Client - Class PointwiseMetricSpec (1.58.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class PointwiseMetricSpec.

Spec for pointwise metric.

Generated from protobuf message google.cloud.aiplatform.v1.PointwiseMetricSpec

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ metric_prompt_template string

Required. Metric prompt template for pointwise metric.

↳ system_instruction string

Optional. System instructions for pointwise metric.

↳ custom_output_format_config 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.

getMetricPromptTemplate

Required. Metric prompt template for pointwise metric.

Returns
Type Description
string

hasMetricPromptTemplate

clearMetricPromptTemplate

setMetricPromptTemplate

Required. Metric prompt template for pointwise metric.

Parameter
Name Description
var string
Returns
Type Description
$this

getSystemInstruction

Optional. System instructions for pointwise metric.

Returns
Type Description
string

hasSystemInstruction

clearSystemInstruction

setSystemInstruction

Optional. System instructions for pointwise metric.

Parameter
Name Description
var string
Returns
Type Description
$this

getCustomOutputFormatConfig

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.
Returns
Type Description
CustomOutputFormatConfig|null

hasCustomOutputFormatConfig

clearCustomOutputFormatConfig

setCustomOutputFormatConfig

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.
Parameter
Name Description
var CustomOutputFormatConfig
Returns
Type Description
$this