Class PointwiseMetricPromptTemplate (1.95.1)

PointwiseMetricPromptTemplate(
 *,
 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
)

Pointwise metric prompt template for pointwise model-based metrics.

Methods

PointwiseMetricPromptTemplate

PointwiseMetricPromptTemplate(
 *,
 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 pointwise metric prompt template.

__str__

__str__()

Serializes the pointwise 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_pointwise_evaluation_steps

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

Returns the default evaluation steps for the metric prompt template.

get_default_pointwise_instruction

get_default_pointwise_instruction() -> str

Returns the default instruction for the metric prompt template.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.