Class EvaluationLevel

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrockagentcore.EvaluationLevel
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)", date="2026-05-19T19:44:37.072Z") @Stability(Stable) public class EvaluationLevel extends software.amazon.jsii.JsiiObject
The level at which a custom evaluator assesses agent performance.

Determines what granularity of data the evaluator operates on.

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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final EvaluationLevel
    Evaluates an entire agent session (multiple traces across a conversation).
    static final EvaluationLevel
    Evaluates individual tool call invocations within a trace.
    static final EvaluationLevel
    Evaluates a complete agent trace (a single request-response cycle).
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    EvaluationLevel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    EvaluationLevel(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The string value of the evaluation level.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • SESSION

      @Stability(Stable) public static final EvaluationLevel SESSION
      Evaluates an entire agent session (multiple traces across a conversation).
    • TOOL_CALL

      @Stability(Stable) public static final EvaluationLevel TOOL_CALL
      Evaluates individual tool call invocations within a trace.
    • TRACE

      @Stability(Stable) public static final EvaluationLevel TRACE
      Evaluates a complete agent trace (a single request-response cycle).
  • Constructor Details

    • EvaluationLevel

      protected EvaluationLevel(software.amazon.jsii.JsiiObjectRef objRef)
    • EvaluationLevel

      protected EvaluationLevel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • EvaluationLevel

      @Stability(Stable) public EvaluationLevel(@NotNull String value)
      Parameters:
      value -
      • The evaluation level string.
      This parameter is required.
  • Method Details

    • getValue

      @Stability(Stable) @NotNull public String getValue()
      The string value of the evaluation level.