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();
 
  • Method Details

    • getEvaluatorConfig

      @Stability(Stable) @NotNull EvaluatorConfig getEvaluatorConfig()
      The configuration that defines how the evaluator assesses agent performance.

      Use EvaluatorConfig.llmAsAJudge() for model-based evaluation or EvaluatorConfig.codeBased() for Lambda-based evaluation.

    • getEvaluatorName

      @Stability(Stable) @NotNull String 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

      @Stability(Stable) @NotNull EvaluationLevel 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

      @Stability(Stable) @Nullable default String getDescription()
      The description of the evaluator.

      Default: - No description

    • getTags

      @Stability(Stable) @Nullable default Map<String,String> getTags()
      Tags for the evaluator.

      A list of key:value pairs of tags to apply to this Evaluator resource.

      Default: - No tags

    • builder

      @Stability(Stable) static EvaluatorProps.Builder builder()
      Returns:
      a EvaluatorProps.Builder of EvaluatorProps