CfnEvaluatorPropsMixin
- class aws_cdk.mixins_preview.aws_bedrockagentcore.mixins.CfnEvaluatorPropsMixin(props, *, strategy=None)
Bases:
MixinResource Type definition for AWS::BedrockAgentCore::Evaluator - Creates a custom evaluator for agent quality assessment using LLM-as-a-Judge configurations.
- See:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.
BedrockEvaluatorModelConfigProperty
- class CfnEvaluatorPropsMixin.BedrockEvaluatorModelConfigProperty(*, additional_model_request_fields=None, inference_config=None, model_id=None)
Bases:
objectThe 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:
- 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.
- inference_config
The inference configuration parameters that control model behavior during evaluation.
- model_id
The identifier of the Amazon Bedrock model to use for evaluation.
CategoricalScaleDefinitionProperty
- class CfnEvaluatorPropsMixin.CategoricalScaleDefinitionProperty(*, definition=None, label=None)
Bases:
objectA 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:
- 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.
- label
The label of this categorical rating option.
EvaluatorConfigProperty
- class CfnEvaluatorPropsMixin.EvaluatorConfigProperty(*, llm_as_a_judge=None)
Bases:
objectThe 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:
- 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.
EvaluatorModelConfigProperty
- class CfnEvaluatorPropsMixin.EvaluatorModelConfigProperty(*, bedrock_evaluator_model_config=None)
Bases:
objectThe 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:
- 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.
InferenceConfigurationProperty
- class CfnEvaluatorPropsMixin.InferenceConfigurationProperty(*, max_tokens=None, temperature=None, top_p=None)
Bases:
objectThe 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:
- 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.
- temperature
The temperature value that controls randomness in the model’s responses.
- top_p
The top-p sampling parameter that controls the diversity of the model’s responses.
LlmAsAJudgeEvaluatorConfigProperty
- class CfnEvaluatorPropsMixin.LlmAsAJudgeEvaluatorConfigProperty(*, instructions=None, model_config=None, rating_scale=None)
Bases:
objectThe 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:
- 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.
- model_config
The model configuration that specifies which foundation model to use for evaluation.
- rating_scale
The rating scale that defines how evaluators should score agent performance.
NumericalScaleDefinitionProperty
- class CfnEvaluatorPropsMixin.NumericalScaleDefinitionProperty(*, definition=None, label=None, value=None)
Bases:
objectA 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:
- 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.
- label
The label that describes this numerical rating option.
- value
The numerical value for this rating scale option.
RatingScaleProperty
- class CfnEvaluatorPropsMixin.RatingScaleProperty(*, categorical=None, numerical=None)
Bases:
objectThe rating scale that defines how evaluators should score agent performance.
- Parameters:
categorical (
Union[IResolvable,Sequence[Union[IResolvable,CategoricalScaleDefinitionProperty,Dict[str,Any]]],None])numerical (
Union[IResolvable,Sequence[Union[IResolvable,NumericalScaleDefinitionProperty,Dict[str,Any]]],None])
- See:
- 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
-
- Type:
see