Class: AWSCDK::Bedrock::CfnDataSource::BedrockFoundationModelContextEnrichmentConfigurationProperty

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

Overview

Context enrichment configuration is used to provide additional context to the RAG application using Amazon Bedrock foundation models.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enrichment_strategy_configuration:, model_arn:) ⇒ BedrockFoundationModelContextEnrichmentConfigurationProperty

Returns a new instance of BedrockFoundationModelContextEnrichmentConfigurationProperty.

Parameters:



759
760
761
762
763
764
# File 'bedrock/cfn_data_source.rb', line 759

def initialize(enrichment_strategy_configuration:, model_arn:)
  @enrichment_strategy_configuration = enrichment_strategy_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnDataSource::EnrichmentStrategyConfigurationProperty.new(**enrichment_strategy_configuration.transform_keys(&:to_sym)) : enrichment_strategy_configuration
  Jsii::Type.check_type(@enrichment_strategy_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkRhdGFTb3VyY2UuRW5yaWNobWVudFN0cmF0ZWd5Q29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "enrichmentStrategyConfiguration")
  @model_arn = model_arn
  Jsii::Type.check_type(@model_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelArn")
end

Instance Attribute Details

#enrichment_strategy_configurationAWSCDK::IResolvable, AWSCDK::Bedrock::CfnDataSource::EnrichmentStrategyConfigurationProperty (readonly)

The enrichment stategy used to provide additional context.

For example, Neptune GraphRAG uses Amazon Bedrock foundation models to perform chunk entity extraction.



772
773
774
# File 'bedrock/cfn_data_source.rb', line 772

def enrichment_strategy_configuration
  @enrichment_strategy_configuration
end

#model_arnString (readonly)

The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base.



777
778
779
# File 'bedrock/cfn_data_source.rb', line 777

def model_arn
  @model_arn
end

Class Method Details

.jsii_propertiesObject



779
780
781
782
783
784
# File 'bedrock/cfn_data_source.rb', line 779

def self.jsii_properties
  {
    :enrichment_strategy_configuration => "enrichmentStrategyConfiguration",
    :model_arn => "modelArn",
  }
end

Instance Method Details

#to_jsiiObject



786
787
788
789
790
791
792
793
# File 'bedrock/cfn_data_source.rb', line 786

def to_jsii
  result = {}
  result.merge!({
    "enrichmentStrategyConfiguration" => @enrichment_strategy_configuration,
    "modelArn" => @model_arn,
  })
  result.compact
end