class EvaluatorRatingScale
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.EvaluatorRatingScale |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#EvaluatorRatingScale |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.EvaluatorRatingScale |
Python | aws_cdk.aws_bedrock_agentcore_alpha.EvaluatorRatingScale |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป EvaluatorRatingScale |
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.
Example
// Categorical rating scale
const 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
const 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 },
]);
Methods
| Name | Description |
|---|---|
| static categorical(options) | Creates a categorical rating scale. |
| static numerical(options) | Creates a numerical rating scale. |
static categorical(options)
public static categorical(options: CategoricalRatingOption[]): EvaluatorRatingScale
Parameters
- options
CategoricalRating Option []โ - The categorical rating options (at least 1 required).
Returns
Creates a categorical rating scale.
Categorical scales define discrete labels for scoring, such as "Good" / "Bad" or "Pass" / "Fail".
static numerical(options)
public static numerical(options: NumericalRatingOption[]): EvaluatorRatingScale
Parameters
- options
NumericalRating Option []โ - The numerical rating options (at least 1 required).
Returns
Creates a numerical rating scale.
Numerical scales define labeled numeric values for scoring, such as 1 (Poor) through 5 (Excellent).

.NET
Go
Java
Python
TypeScript (