Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class PairwiseMetricSpec.
Spec for pairwise metric.
Generated from protobuf message google.cloud.aiplatform.v1.PairwiseMetricSpec
Namespace
Google \ Cloud \ AIPlatform \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ metric_prompt_template |
string
Required. Metric prompt template for pairwise metric. |
↳ candidate_response_field_name |
string
Optional. The field name of the candidate response. |
↳ baseline_response_field_name |
string
Optional. The field name of the baseline response. |
↳ system_instruction |
string
Optional. System instructions for pairwise metric. |
↳ custom_output_format_config |
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 |
getMetricPromptTemplate
Required. Metric prompt template for pairwise metric.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasMetricPromptTemplate
clearMetricPromptTemplate
setMetricPromptTemplate
Required. Metric prompt template for pairwise metric.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCandidateResponseFieldName
Optional. The field name of the candidate response.
| Returns | |
|---|---|
| Type | Description |
string |
|
setCandidateResponseFieldName
Optional. The field name of the candidate response.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getBaselineResponseFieldName
Optional. The field name of the baseline response.
| Returns | |
|---|---|
| Type | Description |
string |
|
setBaselineResponseFieldName
Optional. The field name of the baseline response.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSystemInstruction
Optional. System instructions for pairwise metric.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasSystemInstruction
clearSystemInstruction
setSystemInstruction
Optional. System instructions for pairwise metric.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCustomOutputFormatConfig
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.
| Returns | |
|---|---|
| Type | Description |
CustomOutputFormatConfig|null |
|
hasCustomOutputFormatConfig
clearCustomOutputFormatConfig
setCustomOutputFormatConfig
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.
| Parameter | |
|---|---|
| Name | Description |
var |
CustomOutputFormatConfig
|
| Returns | |
|---|---|
| Type | Description |
$this |
|