EvaluatorRatingScale

class aws_cdk.aws_bedrock_agentcore_alpha.EvaluatorRatingScale(*args: Any, **kwargs)

Bases: object

(experimental) Represents a rating scale for custom LLM-as-a-Judge evaluators.

Rating scales define how the evaluator scores agent performance. Use either categorical (discrete labels) or numerical (labeled numeric values) scales.

Stability:

experimental

Example:

# Categorical rating scale
categorical = agentcore.EvaluatorRatingScale.categorical([label="Good", definition="The response fully addresses the query.", label="Bad", definition="The response fails to address the query."
])

# Numerical rating scale
numerical = agentcore.EvaluatorRatingScale.numerical([label="Poor", definition="Inadequate response.", value=1, label="Good", definition="Adequate response.", value=3, label="Excellent", definition="Outstanding response.", value=5
])

Static Methods

classmethod categorical(options)

(experimental) Creates a categorical rating scale.

Categorical scales define discrete labels for scoring, such as “Good” / “Bad” or “Pass” / “Fail”.

Parameters:

options (Sequence[Union[CategoricalRatingOption, Dict[str, Any]]]) –

  • The categorical rating options (at least 1 required).

Stability:

experimental

Return type:

EvaluatorRatingScale

classmethod numerical(options)

(experimental) Creates a numerical rating scale.

Numerical scales define labeled numeric values for scoring, such as 1 (Poor) through 5 (Excellent).

Parameters:

options (Sequence[Union[NumericalRatingOption, Dict[str, Any]]]) –

  • The numerical rating options (at least 1 required).

Stability:

experimental

Return type:

EvaluatorRatingScale