Show / Hide Table of Contents

Class OnlineEvaluationConfigProps

Properties for creating an OnlineEvaluationConfig.

Inheritance
object
OnlineEvaluationConfigProps
Implements
IOnlineEvaluationConfigProps
IOnlineEvaluationBaseProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.BedrockAgentCore
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class OnlineEvaluationConfigProps : IOnlineEvaluationConfigProps, IOnlineEvaluationBaseProps
Syntax (vb)
Public Class OnlineEvaluationConfigProps Implements IOnlineEvaluationConfigProps, IOnlineEvaluationBaseProps
Remarks

ExampleMetadata: fixture=default infused

Examples
Evaluator customEvaluator;


            var evaluation = new OnlineEvaluationConfig(this, "MixedEvaluation", new OnlineEvaluationConfigProps {
                OnlineEvaluationConfigName = "mixed_evaluation",
                Evaluators = new [] { EvaluatorSelector.Builtin(BuiltinEvaluator.HELPFULNESS), EvaluatorSelector.Builtin(BuiltinEvaluator.CORRECTNESS), EvaluatorSelector.Custom(customEvaluator) },
                DataSource = DataSourceConfig.FromCloudWatchLogs(new CloudWatchLogsDataSourceConfig {
                    LogGroupNames = new [] { "/aws/bedrock-agentcore/my-agent" },
                    ServiceNames = new [] { "my-agent.default" }
                })
            });

Synopsis

Constructors

OnlineEvaluationConfigProps()

Properties for creating an OnlineEvaluationConfig.

Properties

DataSource

The data source configuration that specifies where to read agent traces from.

Description

The description of the online evaluation configuration.

Evaluators

The list of evaluators to apply during online evaluation.

ExecutionRole

The IAM role that provides permissions for the evaluation to access AWS services.

ExecutionStatus

The execution status of the online evaluation configuration.

Filters

The list of filters that determine which agent traces should be evaluated.

OnlineEvaluationConfigName

The name of the online evaluation configuration.

SamplingPercentage

The percentage of agent traces to sample for evaluation.

SessionTimeout

The duration of inactivity after which an agent session is considered complete and ready for evaluation.

Tags

Tags for the online evaluation configuration.

Constructors

OnlineEvaluationConfigProps()

Properties for creating an OnlineEvaluationConfig.

public OnlineEvaluationConfigProps()
Remarks

ExampleMetadata: fixture=default infused

Examples
Evaluator customEvaluator;


            var evaluation = new OnlineEvaluationConfig(this, "MixedEvaluation", new OnlineEvaluationConfigProps {
                OnlineEvaluationConfigName = "mixed_evaluation",
                Evaluators = new [] { EvaluatorSelector.Builtin(BuiltinEvaluator.HELPFULNESS), EvaluatorSelector.Builtin(BuiltinEvaluator.CORRECTNESS), EvaluatorSelector.Custom(customEvaluator) },
                DataSource = DataSourceConfig.FromCloudWatchLogs(new CloudWatchLogsDataSourceConfig {
                    LogGroupNames = new [] { "/aws/bedrock-agentcore/my-agent" },
                    ServiceNames = new [] { "my-agent.default" }
                })
            });

Properties

DataSource

The data source configuration that specifies where to read agent traces from.

public DataSourceConfig DataSource { get; set; }
Property Value

DataSourceConfig

Remarks

ExampleMetadata: fixture=default infused

Description

The description of the online evaluation configuration.

public string? Description { get; set; }
Property Value

string

Remarks

Default: - No description

MaxLength: 200

Evaluators

The list of evaluators to apply during online evaluation.

public EvaluatorSelector[] Evaluators { get; set; }
Property Value

EvaluatorSelector[]

Remarks

Can include both built-in evaluators and custom evaluators.

Maximum: 10

Minimum: 1

ExecutionRole

The IAM role that provides permissions for the evaluation to access AWS services.

public IRole? ExecutionRole { get; set; }
Property Value

IRole

Remarks

If not provided, a role will be created automatically with the required permissions including cross-region Bedrock model invocation (to support cross-region inference profiles). For strict cost controls or data residency compliance, provide a custom role with region-scoped permissions.

Default: - A new role will be created

ExecutionStatus

The execution status of the online evaluation configuration.

public ExecutionStatus? ExecutionStatus { get; set; }
Property Value

ExecutionStatus

Remarks

Controls whether the evaluation actively processes agent traces.

Default: ExecutionStatus.ENABLED

Filters

The list of filters that determine which agent traces should be evaluated.

public IFilterConfig[]? Filters { get; set; }
Property Value

IFilterConfig[]

Remarks

Default: - No filters (evaluate all sampled traces)

Maximum: 5

OnlineEvaluationConfigName

The name of the online evaluation configuration.

public string OnlineEvaluationConfigName { get; set; }
Property Value

string

Remarks

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.

Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,47}$

SamplingPercentage

The percentage of agent traces to sample for evaluation.

public double? SamplingPercentage { get; set; }
Property Value

double?

Remarks

Default: 10

Maximum: 100

Minimum: 0.01

SessionTimeout

The duration of inactivity after which an agent session is considered complete and ready for evaluation.

public Duration? SessionTimeout { get; set; }
Property Value

Duration

Remarks

Must be between 1 minute and 1440 minutes (24 hours).

Default: Duration.minutes(15)

Tags

Tags for the online evaluation configuration.

public IDictionary<string, string>? Tags { get; set; }
Property Value

IDictionary<string, string>

Remarks

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

Default: - No tags

Implements

IOnlineEvaluationConfigProps
IOnlineEvaluationBaseProps
Back to top Generated by DocFX