Class: AWSCDK::Bedrock::CfnFlow::VectorSearchRerankingConfigurationProperty

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

Overview

Configuration for reranking vector search results to improve relevance.

Reranking applies additional relevance models to reorder the initial vector search results based on more sophisticated criteria.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, bedrock_reranking_configuration: nil) ⇒ VectorSearchRerankingConfigurationProperty

Returns a new instance of VectorSearchRerankingConfigurationProperty.

Parameters:



2890
2891
2892
2893
2894
2895
# File 'bedrock/cfn_flow.rb', line 2890

def initialize(type:, bedrock_reranking_configuration: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @bedrock_reranking_configuration = bedrock_reranking_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::VectorSearchBedrockRerankingConfigurationProperty.new(**bedrock_reranking_configuration.transform_keys(&:to_sym)) : bedrock_reranking_configuration
  Jsii::Type.check_type(@bedrock_reranking_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuVmVjdG9yU2VhcmNoQmVkcm9ja1JlcmFua2luZ0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "bedrockRerankingConfiguration") unless @bedrock_reranking_configuration.nil?
end

Instance Attribute Details

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

Configuration for using Amazon Bedrock foundation models to rerank search results.

This is required when the reranking type is set to BEDROCK.



2910
2911
2912
# File 'bedrock/cfn_flow.rb', line 2910

def bedrock_reranking_configuration
  @bedrock_reranking_configuration
end

#typeString (readonly)

The type of reranking to apply to vector search results.

Currently, the only supported value is BEDROCK, which uses Amazon Bedrock foundation models for reranking.



2903
2904
2905
# File 'bedrock/cfn_flow.rb', line 2903

def type
  @type
end

Class Method Details

.jsii_propertiesObject



2912
2913
2914
2915
2916
2917
# File 'bedrock/cfn_flow.rb', line 2912

def self.jsii_properties
  {
    :type => "type",
    :bedrock_reranking_configuration => "bedrockRerankingConfiguration",
  }
end

Instance Method Details

#to_jsiiObject



2919
2920
2921
2922
2923
2924
2925
2926
# File 'bedrock/cfn_flow.rb', line 2919

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "bedrockRerankingConfiguration" => @bedrock_reranking_configuration,
  })
  result.compact
end