Class CfnFlowVersionPropsMixin.VectorSearchBedrockRerankingConfigurationProperty
Configuration for using Amazon Bedrock foundation models to rerank Knowledge Base vector search results.
Inherited Members
Namespace: Amazon.CDK.Mixins.Preview.AWS.Bedrock.Mixins
Assembly: Amazon.CDK.Mixins.Preview.dll
Syntax (csharp)
public class CfnFlowVersionPropsMixin.VectorSearchBedrockRerankingConfigurationProperty : CfnFlowVersionPropsMixin.IVectorSearchBedrockRerankingConfigurationProperty
Syntax (vb)
Public Class CfnFlowVersionPropsMixin.VectorSearchBedrockRerankingConfigurationProperty Implements CfnFlowVersionPropsMixin.IVectorSearchBedrockRerankingConfigurationProperty
Remarks
This enables more sophisticated relevance ranking using large language models.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Mixins.Preview.AWS.Bedrock.Mixins;
var additionalModelRequestFields;
var vectorSearchBedrockRerankingConfigurationProperty = new VectorSearchBedrockRerankingConfigurationProperty {
MetadataConfiguration = new MetadataConfigurationForRerankingProperty {
SelectionMode = "selectionMode",
SelectiveModeConfiguration = new RerankingMetadataSelectiveModeConfigurationProperty {
FieldsToExclude = new [] { new FieldForRerankingProperty {
FieldName = "fieldName"
} },
FieldsToInclude = new [] { new FieldForRerankingProperty {
FieldName = "fieldName"
} }
}
},
ModelConfiguration = new VectorSearchBedrockRerankingModelConfigurationProperty {
AdditionalModelRequestFields = additionalModelRequestFields,
ModelArn = "modelArn"
},
NumberOfRerankedResults = 123
};
Synopsis
Constructors
| VectorSearchBedrockRerankingConfigurationProperty() | Configuration for using Amazon Bedrock foundation models to rerank Knowledge Base vector search results. |
Properties
| MetadataConfiguration | Configuration for how document metadata should be used during the reranking process. |
| ModelConfiguration | Configuration for the Amazon Bedrock foundation model used for reranking. |
| NumberOfRerankedResults | The maximum number of results to rerank. |
Constructors
VectorSearchBedrockRerankingConfigurationProperty()
Configuration for using Amazon Bedrock foundation models to rerank Knowledge Base vector search results.
public VectorSearchBedrockRerankingConfigurationProperty()
Remarks
This enables more sophisticated relevance ranking using large language models.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Mixins.Preview.AWS.Bedrock.Mixins;
var additionalModelRequestFields;
var vectorSearchBedrockRerankingConfigurationProperty = new VectorSearchBedrockRerankingConfigurationProperty {
MetadataConfiguration = new MetadataConfigurationForRerankingProperty {
SelectionMode = "selectionMode",
SelectiveModeConfiguration = new RerankingMetadataSelectiveModeConfigurationProperty {
FieldsToExclude = new [] { new FieldForRerankingProperty {
FieldName = "fieldName"
} },
FieldsToInclude = new [] { new FieldForRerankingProperty {
FieldName = "fieldName"
} }
}
},
ModelConfiguration = new VectorSearchBedrockRerankingModelConfigurationProperty {
AdditionalModelRequestFields = additionalModelRequestFields,
ModelArn = "modelArn"
},
NumberOfRerankedResults = 123
};
Properties
MetadataConfiguration
Configuration for how document metadata should be used during the reranking process.
public object? MetadataConfiguration { get; set; }
Property Value
Remarks
This determines which metadata fields are included when reordering search results.
Type union: either IResolvable or CfnFlowVersionPropsMixin.IMetadataConfigurationForRerankingProperty
ModelConfiguration
Configuration for the Amazon Bedrock foundation model used for reranking.
public object? ModelConfiguration { get; set; }
Property Value
Remarks
This includes the model ARN and any additional request fields required by the model.
Type union: either IResolvable or CfnFlowVersionPropsMixin.IVectorSearchBedrockRerankingModelConfigurationProperty
NumberOfRerankedResults
The maximum number of results to rerank.
public double? NumberOfRerankedResults { get; set; }
Property Value
Remarks
This limits how many of the initial vector search results will be processed by the reranking model. A smaller number improves performance but may exclude potentially relevant results.