Class: AWSCDK::BedrockAgentCore::CategoricalRatingOption

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock_agent_core/categorical_rating_option.rb

Overview

A categorical rating scale option for custom evaluators.

Categorical scales define discrete labels for scoring agent performance.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition:, label:) ⇒ CategoricalRatingOption

Returns a new instance of CategoricalRatingOption.

Parameters:

  • definition (String)

    The description that explains what this rating represents.

  • label (String)

    The label for this rating option.



11
12
13
14
15
16
# File 'bedrock_agent_core/categorical_rating_option.rb', line 11

def initialize(definition:, label:)
  @definition = definition
  Jsii::Type.check_type(@definition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "definition")
  @label = label
  Jsii::Type.check_type(@label, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "label")
end

Instance Attribute Details

#definitionString (readonly)

The description that explains what this rating represents.

Examples:

"The response fully addresses the user query with accurate information."

Returns:

  • (String)


23
24
25
# File 'bedrock_agent_core/categorical_rating_option.rb', line 23

def definition
  @definition
end

#labelString (readonly)

The label for this rating option.

Examples:

"Good"

Returns:

  • (String)


29
30
31
# File 'bedrock_agent_core/categorical_rating_option.rb', line 29

def label
  @label
end

Class Method Details

.jsii_propertiesObject



31
32
33
34
35
36
# File 'bedrock_agent_core/categorical_rating_option.rb', line 31

def self.jsii_properties
  {
    :definition => "definition",
    :label => "label",
  }
end

Instance Method Details

#to_jsiiObject



38
39
40
41
42
43
44
45
# File 'bedrock_agent_core/categorical_rating_option.rb', line 38

def to_jsii
  result = {}
  result.merge!({
    "definition" => @definition,
    "label" => @label,
  })
  result.compact
end