Google Cloud Ai Platform V1 Client - Class LLMBasedMetricSpec (1.60.0)

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

Specification for an LLM based metric.

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

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ rubric_group_key
string

Use a pre-defined group of rubrics associated with the input. Refers to a key in the rubric_groups map of EvaluationInstance.

↳ predefined_rubric_generation_spec
PredefinedMetricSpec

Dynamically generate rubrics using a predefined spec.

↳ metric_prompt_template
string

Required. Template for the prompt sent to the judge model.

↳ system_instruction
string

Optional. System instructions for the judge model.

↳ judge_autorater_config
AutoraterConfig

Optional. Optional configuration for the judge LLM (Autorater).

↳ additional_config
Google\Protobuf\Struct

Optional. Optional additional configuration for the metric.

getRubricGroupKey

Use a pre-defined group of rubrics associated with the input.

Refers to a key in the rubric_groups map of EvaluationInstance.

Returns
Type
Description
string

hasRubricGroupKey

setRubricGroupKey

Use a pre-defined group of rubrics associated with the input.

Refers to a key in the rubric_groups map of EvaluationInstance.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getPredefinedRubricGenerationSpec

Dynamically generate rubrics using a predefined spec.

Returns
Type
Description

hasPredefinedRubricGenerationSpec

setPredefinedRubricGenerationSpec

Dynamically generate rubrics using a predefined spec.

Parameter
Name
Description
Returns
Type
Description
$this

getMetricPromptTemplate

Required. Template for the prompt sent to the judge model.

Returns
Type
Description
string

hasMetricPromptTemplate

clearMetricPromptTemplate

setMetricPromptTemplate

Required. Template for the prompt sent to the judge model.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getSystemInstruction

Optional. System instructions for the judge model.

Returns
Type
Description
string

hasSystemInstruction

clearSystemInstruction

setSystemInstruction

Optional. System instructions for the judge model.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getJudgeAutoraterConfig

Optional. Optional configuration for the judge LLM (Autorater).

Returns
Type
Description
AutoraterConfig |null

hasJudgeAutoraterConfig

clearJudgeAutoraterConfig

setJudgeAutoraterConfig

Optional. Optional configuration for the judge LLM (Autorater).

Parameter
Name
Description
var
AutoraterConfig
Returns
Type
Description
$this

getAdditionalConfig

Optional. Optional additional configuration for the metric.

Returns
Type
Description

hasAdditionalConfig

clearAdditionalConfig

setAdditionalConfig

Optional. Optional additional configuration for the metric.

Parameter
Name
Description
Returns
Type
Description
$this

getRubricsSource

Returns
Type
Description
string
Create a Mobile Website
View Site in Mobile | Classic
Share by: