Class PointwiseMetricPromptTemplate (1.74.0)

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.