Class: AWSCDK::BedrockAgentCore::NumericalRatingOption

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

Overview

A numerical rating scale option for custom evaluators.

Numerical scales define labeled numeric values for scoring agent performance.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition:, label:, value:) ⇒ NumericalRatingOption

Returns a new instance of NumericalRatingOption.

Parameters:

  • definition (String)

    The description that explains what this numerical rating represents.

  • label (String)

    The label for this rating option.

  • value (Numeric)

    The numerical value for this rating scale option.



12
13
14
15
16
17
18
19
# File 'bedrock_agent_core/numerical_rating_option.rb', line 12

def initialize(definition:, label:, value:)
  @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")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value")
end

Instance Attribute Details

#definitionString (readonly)

The description that explains what this numerical rating represents.

Examples:

"The response is comprehensive, accurate, and well-structured."

Returns:

  • (String)


26
27
28
# File 'bedrock_agent_core/numerical_rating_option.rb', line 26

def definition
  @definition
end

#labelString (readonly)

The label for this rating option.

Examples:

"Excellent"

Returns:

  • (String)


32
33
34
# File 'bedrock_agent_core/numerical_rating_option.rb', line 32

def label
  @label
end

#valueNumeric (readonly)

The numerical value for this rating scale option.

Examples:

5

Returns:

  • (Numeric)


38
39
40
# File 'bedrock_agent_core/numerical_rating_option.rb', line 38

def value
  @value
end

Class Method Details

.jsii_propertiesObject



40
41
42
43
44
45
46
# File 'bedrock_agent_core/numerical_rating_option.rb', line 40

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

Instance Method Details

#to_jsiiObject



48
49
50
51
52
53
54
55
56
# File 'bedrock_agent_core/numerical_rating_option.rb', line 48

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