CfnEvaluatorPropsMixin

class aws_cdk.mixins_preview.aws_bedrockagentcore.mixins.CfnEvaluatorPropsMixin(props, *, strategy=None)

Bases: Mixin

Resource Type definition for AWS::BedrockAgentCore::Evaluator - Creates a custom evaluator for agent quality assessment using LLM-as-a-Judge configurations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrockagentcore-evaluator.html

CloudformationResource:

AWS::BedrockAgentCore::Evaluator

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrockagentcore import mixins as bedrockagentcore_mixins
import aws_cdk as cdk

# additional_model_request_fields: Any
# merge_strategy: cdk.IMergeStrategy

cfn_evaluator_props_mixin = bedrockagentcore_mixins.CfnEvaluatorPropsMixin(bedrockagentcore_mixins.CfnEvaluatorMixinProps(
    description="description",
    evaluator_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.EvaluatorConfigProperty(
        llm_as_aJudge=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.LlmAsAJudgeEvaluatorConfigProperty(
            instructions="instructions",
            model_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.EvaluatorModelConfigProperty(
                bedrock_evaluator_model_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.BedrockEvaluatorModelConfigProperty(
                    additional_model_request_fields=additional_model_request_fields,
                    inference_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.InferenceConfigurationProperty(
                        max_tokens=123,
                        temperature=123,
                        top_p=123
                    ),
                    model_id="modelId"
                )
            ),
            rating_scale=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.RatingScaleProperty(
                categorical=[bedrockagentcore_mixins.CfnEvaluatorPropsMixin.CategoricalScaleDefinitionProperty(
                    definition="definition",
                    label="label"
                )],
                numerical=[bedrockagentcore_mixins.CfnEvaluatorPropsMixin.NumericalScaleDefinitionProperty(
                    definition="definition",
                    label="label",
                    value=123
                )]
            )
        )
    ),
    evaluator_name="evaluatorName",
    level="level",
    tags=[cdk.CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::BedrockAgentCore::Evaluator.

Parameters:
  • props (Union[CfnEvaluatorMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['description', 'evaluatorConfig', 'evaluatorName', 'level', 'tags']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

BedrockEvaluatorModelConfigProperty

class CfnEvaluatorPropsMixin.BedrockEvaluatorModelConfigProperty(*, additional_model_request_fields=None, inference_config=None, model_id=None)

Bases: object

The configuration for using Amazon Bedrock models in evaluator assessments.

Parameters:
  • additional_model_request_fields (Any) – Additional model-specific request fields.

  • inference_config (Union[IResolvable, InferenceConfigurationProperty, Dict[str, Any], None]) – The inference configuration parameters that control model behavior during evaluation.

  • model_id (Optional[str]) – The identifier of the Amazon Bedrock model to use for evaluation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-bedrockevaluatormodelconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrockagentcore import mixins as bedrockagentcore_mixins

# additional_model_request_fields: Any

bedrock_evaluator_model_config_property = bedrockagentcore_mixins.CfnEvaluatorPropsMixin.BedrockEvaluatorModelConfigProperty(
    additional_model_request_fields=additional_model_request_fields,
    inference_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.InferenceConfigurationProperty(
        max_tokens=123,
        temperature=123,
        top_p=123
    ),
    model_id="modelId"
)

Attributes

additional_model_request_fields

Additional model-specific request fields.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-bedrockevaluatormodelconfig.html#cfn-bedrockagentcore-evaluator-bedrockevaluatormodelconfig-additionalmodelrequestfields

inference_config

The inference configuration parameters that control model behavior during evaluation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-bedrockevaluatormodelconfig.html#cfn-bedrockagentcore-evaluator-bedrockevaluatormodelconfig-inferenceconfig

model_id

The identifier of the Amazon Bedrock model to use for evaluation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-bedrockevaluatormodelconfig.html#cfn-bedrockagentcore-evaluator-bedrockevaluatormodelconfig-modelid

CategoricalScaleDefinitionProperty

class CfnEvaluatorPropsMixin.CategoricalScaleDefinitionProperty(*, definition=None, label=None)

Bases: object

A categorical rating scale option.

Parameters:
  • definition (Optional[str]) – The description that explains what this categorical rating represents.

  • label (Optional[str]) – The label of this categorical rating option.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-categoricalscaledefinition.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrockagentcore import mixins as bedrockagentcore_mixins

categorical_scale_definition_property = bedrockagentcore_mixins.CfnEvaluatorPropsMixin.CategoricalScaleDefinitionProperty(
    definition="definition",
    label="label"
)

Attributes

definition

The description that explains what this categorical rating represents.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-categoricalscaledefinition.html#cfn-bedrockagentcore-evaluator-categoricalscaledefinition-definition

label

The label of this categorical rating option.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-categoricalscaledefinition.html#cfn-bedrockagentcore-evaluator-categoricalscaledefinition-label

EvaluatorConfigProperty

class CfnEvaluatorPropsMixin.EvaluatorConfigProperty(*, llm_as_a_judge=None)

Bases: object

The configuration that defines how an evaluator assesses agent performance.

Parameters:

llm_as_a_judge (Union[IResolvable, LlmAsAJudgeEvaluatorConfigProperty, Dict[str, Any], None]) – The configuration for LLM-as-a-Judge evaluation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-evaluatorconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrockagentcore import mixins as bedrockagentcore_mixins

# additional_model_request_fields: Any

evaluator_config_property = bedrockagentcore_mixins.CfnEvaluatorPropsMixin.EvaluatorConfigProperty(
    llm_as_aJudge=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.LlmAsAJudgeEvaluatorConfigProperty(
        instructions="instructions",
        model_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.EvaluatorModelConfigProperty(
            bedrock_evaluator_model_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.BedrockEvaluatorModelConfigProperty(
                additional_model_request_fields=additional_model_request_fields,
                inference_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.InferenceConfigurationProperty(
                    max_tokens=123,
                    temperature=123,
                    top_p=123
                ),
                model_id="modelId"
            )
        ),
        rating_scale=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.RatingScaleProperty(
            categorical=[bedrockagentcore_mixins.CfnEvaluatorPropsMixin.CategoricalScaleDefinitionProperty(
                definition="definition",
                label="label"
            )],
            numerical=[bedrockagentcore_mixins.CfnEvaluatorPropsMixin.NumericalScaleDefinitionProperty(
                definition="definition",
                label="label",
                value=123
            )]
        )
    )
)

Attributes

llm_as_a_judge

The configuration for LLM-as-a-Judge evaluation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-evaluatorconfig.html#cfn-bedrockagentcore-evaluator-evaluatorconfig-llmasajudge

EvaluatorModelConfigProperty

class CfnEvaluatorPropsMixin.EvaluatorModelConfigProperty(*, bedrock_evaluator_model_config=None)

Bases: object

The model configuration that specifies which foundation model to use for evaluation.

Parameters:

bedrock_evaluator_model_config (Union[IResolvable, BedrockEvaluatorModelConfigProperty, Dict[str, Any], None]) – The configuration for using Amazon Bedrock models in evaluator assessments.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-evaluatormodelconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrockagentcore import mixins as bedrockagentcore_mixins

# additional_model_request_fields: Any

evaluator_model_config_property = bedrockagentcore_mixins.CfnEvaluatorPropsMixin.EvaluatorModelConfigProperty(
    bedrock_evaluator_model_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.BedrockEvaluatorModelConfigProperty(
        additional_model_request_fields=additional_model_request_fields,
        inference_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.InferenceConfigurationProperty(
            max_tokens=123,
            temperature=123,
            top_p=123
        ),
        model_id="modelId"
    )
)

Attributes

bedrock_evaluator_model_config

The configuration for using Amazon Bedrock models in evaluator assessments.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-evaluatormodelconfig.html#cfn-bedrockagentcore-evaluator-evaluatormodelconfig-bedrockevaluatormodelconfig

InferenceConfigurationProperty

class CfnEvaluatorPropsMixin.InferenceConfigurationProperty(*, max_tokens=None, temperature=None, top_p=None)

Bases: object

The inference configuration parameters that control model behavior during evaluation.

Parameters:
  • max_tokens (Union[int, float, None]) – The maximum number of tokens to generate in the model response.

  • temperature (Union[int, float, None]) – The temperature value that controls randomness in the model’s responses.

  • top_p (Union[int, float, None]) – The top-p sampling parameter that controls the diversity of the model’s responses.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-inferenceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrockagentcore import mixins as bedrockagentcore_mixins

inference_configuration_property = bedrockagentcore_mixins.CfnEvaluatorPropsMixin.InferenceConfigurationProperty(
    max_tokens=123,
    temperature=123,
    top_p=123
)

Attributes

max_tokens

The maximum number of tokens to generate in the model response.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-inferenceconfiguration.html#cfn-bedrockagentcore-evaluator-inferenceconfiguration-maxtokens

temperature

The temperature value that controls randomness in the model’s responses.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-inferenceconfiguration.html#cfn-bedrockagentcore-evaluator-inferenceconfiguration-temperature

top_p

The top-p sampling parameter that controls the diversity of the model’s responses.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-inferenceconfiguration.html#cfn-bedrockagentcore-evaluator-inferenceconfiguration-topp

LlmAsAJudgeEvaluatorConfigProperty

class CfnEvaluatorPropsMixin.LlmAsAJudgeEvaluatorConfigProperty(*, instructions=None, model_config=None, rating_scale=None)

Bases: object

The configuration for LLM-as-a-Judge evaluation.

Parameters:
  • instructions (Optional[str]) – The evaluation instructions that guide the language model in assessing agent performance.

  • model_config (Union[IResolvable, EvaluatorModelConfigProperty, Dict[str, Any], None]) – The model configuration that specifies which foundation model to use for evaluation.

  • rating_scale (Union[IResolvable, RatingScaleProperty, Dict[str, Any], None]) – The rating scale that defines how evaluators should score agent performance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-llmasajudgeevaluatorconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrockagentcore import mixins as bedrockagentcore_mixins

# additional_model_request_fields: Any

llm_as_aJudge_evaluator_config_property = bedrockagentcore_mixins.CfnEvaluatorPropsMixin.LlmAsAJudgeEvaluatorConfigProperty(
    instructions="instructions",
    model_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.EvaluatorModelConfigProperty(
        bedrock_evaluator_model_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.BedrockEvaluatorModelConfigProperty(
            additional_model_request_fields=additional_model_request_fields,
            inference_config=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.InferenceConfigurationProperty(
                max_tokens=123,
                temperature=123,
                top_p=123
            ),
            model_id="modelId"
        )
    ),
    rating_scale=bedrockagentcore_mixins.CfnEvaluatorPropsMixin.RatingScaleProperty(
        categorical=[bedrockagentcore_mixins.CfnEvaluatorPropsMixin.CategoricalScaleDefinitionProperty(
            definition="definition",
            label="label"
        )],
        numerical=[bedrockagentcore_mixins.CfnEvaluatorPropsMixin.NumericalScaleDefinitionProperty(
            definition="definition",
            label="label",
            value=123
        )]
    )
)

Attributes

instructions

The evaluation instructions that guide the language model in assessing agent performance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-llmasajudgeevaluatorconfig.html#cfn-bedrockagentcore-evaluator-llmasajudgeevaluatorconfig-instructions

model_config

The model configuration that specifies which foundation model to use for evaluation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-llmasajudgeevaluatorconfig.html#cfn-bedrockagentcore-evaluator-llmasajudgeevaluatorconfig-modelconfig

rating_scale

The rating scale that defines how evaluators should score agent performance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-llmasajudgeevaluatorconfig.html#cfn-bedrockagentcore-evaluator-llmasajudgeevaluatorconfig-ratingscale

NumericalScaleDefinitionProperty

class CfnEvaluatorPropsMixin.NumericalScaleDefinitionProperty(*, definition=None, label=None, value=None)

Bases: object

A numerical rating scale option.

Parameters:
  • definition (Optional[str]) – The description that explains what this numerical rating represents.

  • label (Optional[str]) – The label that describes this numerical rating option.

  • value (Union[int, float, None]) – The numerical value for this rating scale option.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-numericalscaledefinition.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrockagentcore import mixins as bedrockagentcore_mixins

numerical_scale_definition_property = bedrockagentcore_mixins.CfnEvaluatorPropsMixin.NumericalScaleDefinitionProperty(
    definition="definition",
    label="label",
    value=123
)

Attributes

definition

The description that explains what this numerical rating represents.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-numericalscaledefinition.html#cfn-bedrockagentcore-evaluator-numericalscaledefinition-definition

label

The label that describes this numerical rating option.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-numericalscaledefinition.html#cfn-bedrockagentcore-evaluator-numericalscaledefinition-label

value

The numerical value for this rating scale option.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-numericalscaledefinition.html#cfn-bedrockagentcore-evaluator-numericalscaledefinition-value

RatingScaleProperty

class CfnEvaluatorPropsMixin.RatingScaleProperty(*, categorical=None, numerical=None)

Bases: object

The rating scale that defines how evaluators should score agent performance.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-ratingscale.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrockagentcore import mixins as bedrockagentcore_mixins

rating_scale_property = bedrockagentcore_mixins.CfnEvaluatorPropsMixin.RatingScaleProperty(
    categorical=[bedrockagentcore_mixins.CfnEvaluatorPropsMixin.CategoricalScaleDefinitionProperty(
        definition="definition",
        label="label"
    )],
    numerical=[bedrockagentcore_mixins.CfnEvaluatorPropsMixin.NumericalScaleDefinitionProperty(
        definition="definition",
        label="label",
        value=123
    )]
)

Attributes

categorical

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-ratingscale.html#cfn-bedrockagentcore-evaluator-ratingscale-categorical

Type:

see

numerical

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-evaluator-ratingscale.html#cfn-bedrockagentcore-evaluator-ratingscale-numerical

Type:

see