Class: AWSCDK::Bedrock::CfnFlow::MetadataConfigurationForRerankingProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_flow.rb

Overview

Configuration for how metadata should be used during the reranking process in Knowledge Base vector searches.

This determines which metadata fields are included or excluded when reordering search results.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(selection_mode:, selective_mode_configuration: nil) ⇒ MetadataConfigurationForRerankingProperty

Returns a new instance of MetadataConfigurationForRerankingProperty.

Parameters:



1997
1998
1999
2000
2001
2002
# File 'bedrock/cfn_flow.rb', line 1997

def initialize(selection_mode:, selective_mode_configuration: nil)
  @selection_mode = selection_mode
  Jsii::Type.check_type(@selection_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "selectionMode")
  @selective_mode_configuration = selective_mode_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::RerankingMetadataSelectiveModeConfigurationProperty.new(**selective_mode_configuration.transform_keys(&:to_sym)) : selective_mode_configuration
  Jsii::Type.check_type(@selective_mode_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuUmVyYW5raW5nTWV0YWRhdGFTZWxlY3RpdmVNb2RlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "selectiveModeConfiguration") unless @selective_mode_configuration.nil?
end

Instance Attribute Details

#selection_modeString (readonly)

The mode for selecting which metadata fields to include in the reranking process.

Valid values are ALL (use all available metadata fields) or SELECTIVE (use only specified fields).



2010
2011
2012
# File 'bedrock/cfn_flow.rb', line 2010

def selection_mode
  @selection_mode
end

#selective_mode_configurationAWSCDK::IResolvable, ... (readonly)

Configuration for selective mode, which allows you to explicitly include or exclude specific metadata fields during reranking.

This is only used when selectionMode is set to SELECTIVE.



2017
2018
2019
# File 'bedrock/cfn_flow.rb', line 2017

def selective_mode_configuration
  @selective_mode_configuration
end

Class Method Details

.jsii_propertiesObject



2019
2020
2021
2022
2023
2024
# File 'bedrock/cfn_flow.rb', line 2019

def self.jsii_properties
  {
    :selection_mode => "selectionMode",
    :selective_mode_configuration => "selectiveModeConfiguration",
  }
end

Instance Method Details

#to_jsiiObject



2026
2027
2028
2029
2030
2031
2032
2033
# File 'bedrock/cfn_flow.rb', line 2026

def to_jsii
  result = {}
  result.merge!({
    "selectionMode" => @selection_mode,
    "selectiveModeConfiguration" => @selective_mode_configuration,
  })
  result.compact
end