interface EvaluatorProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.EvaluatorProps |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#EvaluatorProps |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.EvaluatorProps |
Python | aws_cdk.aws_bedrock_agentcore_alpha.EvaluatorProps |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป EvaluatorProps |
Properties for creating an Evaluator.
Example
// Create a custom LLM-as-a-Judge evaluator
const evaluator = new agentcore.Evaluator(this, 'MyEvaluator', {
evaluatorName: 'my_custom_evaluator',
level: agentcore.EvaluationLevel.SESSION,
evaluatorConfig: agentcore.EvaluatorConfig.llmAsAJudge({
instructions: 'Evaluate whether the agent response is helpful and accurate.',
modelId: 'us.anthropic.claude-sonnet-4-6',
ratingScale: agentcore.EvaluatorRatingScale.categorical([
{ label: 'Good', definition: 'The response is helpful and accurate.' },
{ label: 'Bad', definition: 'The response is not helpful or contains errors.' },
]),
}),
});
// Use the custom evaluator in an online evaluation configuration
new agentcore.OnlineEvaluationConfig(this, 'MyEvaluation', {
onlineEvaluationConfigName: 'my_evaluation',
evaluators: [
agentcore.EvaluatorReference.builtin(agentcore.BuiltinEvaluator.HELPFULNESS),
agentcore.EvaluatorReference.custom(evaluator),
],
dataSource: agentcore.DataSourceConfig.fromCloudWatchLogs({
logGroupNames: ['/aws/bedrock-agentcore/my-agent'],
serviceNames: ['my-agent.default'],
}),
});
Properties
| Name | Type | Description |
|---|---|---|
| evaluator | Evaluator | The configuration that defines how the evaluator assesses agent performance. |
| evaluator | string | The name of the evaluator. |
| level | Evaluation | The level at which the evaluator assesses agent performance. |
| description? | string | The description of the evaluator. |
| tags? | { [string]: string } | Tags for the evaluator. |
evaluatorConfig
Type:
Evaluator
The configuration that defines how the evaluator assesses agent performance.
Use EvaluatorConfig.llmAsAJudge() for model-based evaluation or
EvaluatorConfig.codeBased() for Lambda-based evaluation.
evaluatorName
Type:
string
The name of the evaluator.
Must be unique within your account. Valid characters are a-z, A-Z, 0-9, _ (underscore). Must start with a letter and can be up to 48 characters long.
level
Type:
Evaluation
The level at which the evaluator assesses agent performance.
Determines what granularity of data the evaluator operates on: tool call, trace (single request-response), or session (full conversation).
description?
Type:
string
(optional, default: No description)
The description of the evaluator.
tags?
Type:
{ [string]: string }
(optional, default: No tags)
Tags for the evaluator.
A list of key:value pairs of tags to apply to this Evaluator resource.

.NET
Go
Java
Python
TypeScript (