Class: AWSCDK::Bedrock::CfnFlowVersion::VectorSearchRerankingConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnFlowVersion::VectorSearchRerankingConfigurationProperty
- Defined in:
- bedrock/cfn_flow_version.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
-
#bedrock_reranking_configuration ⇒ AWSCDK::IResolvable, ...
readonly
Configuration for using Amazon Bedrock foundation models to rerank search results.
-
#type ⇒ String
readonly
The type of reranking to apply to vector search results.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, bedrock_reranking_configuration: nil) ⇒ VectorSearchRerankingConfigurationProperty
constructor
A new instance of VectorSearchRerankingConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, bedrock_reranking_configuration: nil) ⇒ VectorSearchRerankingConfigurationProperty
Returns a new instance of VectorSearchRerankingConfigurationProperty.
2658 2659 2660 2661 2662 2663 |
# File 'bedrock/cfn_flow_version.rb', line 2658 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::CfnFlowVersion::VectorSearchBedrockRerankingConfigurationProperty.new(**bedrock_reranking_configuration.transform_keys(&:to_sym)) : bedrock_reranking_configuration Jsii::Type.check_type(@bedrock_reranking_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3dWZXJzaW9uLlZlY3RvclNlYXJjaEJlZHJvY2tSZXJhbmtpbmdDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "bedrockRerankingConfiguration") unless @bedrock_reranking_configuration.nil? end |
Instance Attribute Details
#bedrock_reranking_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
Configuration for using Amazon Bedrock foundation models to rerank search results.
This is required when the reranking type is set to BEDROCK.
2678 2679 2680 |
# File 'bedrock/cfn_flow_version.rb', line 2678 def bedrock_reranking_configuration @bedrock_reranking_configuration end |
#type ⇒ String (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.
2671 2672 2673 |
# File 'bedrock/cfn_flow_version.rb', line 2671 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
2680 2681 2682 2683 2684 2685 |
# File 'bedrock/cfn_flow_version.rb', line 2680 def self.jsii_properties { :type => "type", :bedrock_reranking_configuration => "bedrockRerankingConfiguration", } end |
Instance Method Details
#to_jsii ⇒ Object
2687 2688 2689 2690 2691 2692 2693 2694 |
# File 'bedrock/cfn_flow_version.rb', line 2687 def to_jsii result = {} result.merge!({ "type" => @type, "bedrockRerankingConfiguration" => @bedrock_reranking_configuration, }) result.compact end |