Interface EvaluatorProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
EvaluatorProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)",
date="2026-05-19T19:44:37.075Z")
@Stability(Stable)
public interface EvaluatorProps
extends software.amazon.jsii.JsiiSerializable
Properties for creating an Evaluator.
Example:
// Create a custom LLM-as-a-Judge evaluator
Evaluator evaluator = Evaluator.Builder.create(this, "MyEvaluator")
.evaluatorName("my_custom_evaluator")
.level(EvaluationLevel.SESSION)
.evaluatorConfig(EvaluatorConfig.llmAsAJudge(LlmAsAJudgeOptions.builder()
.instructions("Evaluate whether the agent response is helpful and accurate.")
.modelId("us.anthropic.claude-sonnet-4-6")
.ratingScale(EvaluatorRatingScale.categorical(List.of(CategoricalRatingOption.builder().label("Good").definition("The response is helpful and accurate.").build(), CategoricalRatingOption.builder().label("Bad").definition("The response is not helpful or contains errors.").build())))
.build()))
.build();
// Use the custom evaluator in an online evaluation configuration
// Use the custom evaluator in an online evaluation configuration
OnlineEvaluationConfig.Builder.create(this, "MyEvaluation")
.onlineEvaluationConfigName("my_evaluation")
.evaluators(List.of(EvaluatorSelector.builtin(BuiltinEvaluator.HELPFULNESS), EvaluatorSelector.custom(evaluator)))
.dataSource(DataSourceConfig.fromCloudWatchLogs(CloudWatchLogsDataSourceConfig.builder()
.logGroupNames(List.of("/aws/bedrock-agentcore/my-agent"))
.serviceNames(List.of("my-agent.default"))
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEvaluatorPropsstatic final classAn implementation forEvaluatorProps -
Method Summary
Modifier and TypeMethodDescriptionstatic EvaluatorProps.Builderbuilder()default StringThe description of the evaluator.The configuration that defines how the evaluator assesses agent performance.The name of the evaluator.getLevel()The level at which the evaluator assesses agent performance.getTags()Tags for the evaluator.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEvaluatorConfig
The configuration that defines how the evaluator assesses agent performance.Use
EvaluatorConfig.llmAsAJudge()for model-based evaluation orEvaluatorConfig.codeBased()for Lambda-based evaluation. -
getEvaluatorName
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.
-
getLevel
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).
-
getDescription
The description of the evaluator.Default: - No description
-
getTags
Tags for the evaluator.A list of key:value pairs of tags to apply to this Evaluator resource.
Default: - No tags
-
builder
- Returns:
- a
EvaluatorProps.BuilderofEvaluatorProps
-