Class PairwiseMetricPromptTemplate (1.66.0)

PairwiseMetricPromptTemplate(
    *,
    criteria: typing.Dict[str, str],
    rating_rubric: typing.Dict[str, str],
    input_variables: typing.Optional[typing.List[str]] = None,
    instruction: typing.Optional[str] = None,
    metric_definition: typing.Optional[str] = None,
    evaluation_steps: typing.Optional[typing.Dict[str, str]] = None,
    few_shot_examples: typing.Optional[typing.List[str]] = None
)

Pairwise metric prompt template for pairwise model-based metrics.

Methods

PairwiseMetricPromptTemplate

PairwiseMetricPromptTemplate(
    *,
    criteria: typing.Dict[str, str],
    rating_rubric: typing.Dict[str, str],
    input_variables: typing.Optional[typing.List[str]] = None,
    instruction: typing.Optional[str] = None,
    metric_definition: typing.Optional[str] = None,
    evaluation_steps: typing.Optional[typing.Dict[str, str]] = None,
    few_shot_examples: typing.Optional[typing.List[str]] = None
)

Initializes a pairwise metric prompt template.

__str__

__str__()

Serializes the pairwise metric prompt template to a string.

assemble

assemble(**kwargs) -> vertexai.evaluation.prompt_template.PromptTemplate

Replaces only the provided variables in the template with specific values.

get_default_pairwise_evaluation_steps

get_default_pairwise_evaluation_steps() -> typing.Dict[str, str]

Returns the default evaluation steps for the metric prompt template.

get_default_pairwise_instruction

get_default_pairwise_instruction() -> str

Returns the default instruction for the metric prompt template.