Experimental
@aws-cdk/aws-bedrock-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
KnowledgeBaseOpenSearchServerlessStorageProps Struct Added in v2.274.0-alpha.0
Properties for KnowledgeBaseOpenSearchServerlessStorage.
Example
ts
declare const collection: opensearchserverless.ICollectionRef;
declare const role: iam.Role;
new aws_bedrock_cfn.CfnKnowledgeBase(this, 'KnowledgeBase', {
name: 'product-documentation',
roleArn: role.roleArn,
knowledgeBaseConfiguration: {
type: 'VECTOR',
vectorKnowledgeBaseConfiguration: {
embeddingModelArn: bedrock.BedrockFoundationModel.TITAN_EMBED_TEXT_V2_1024.modelArn,
},
},
}).with(new bedrock.mixins.KnowledgeBaseOpenSearchServerlessStorage({
collection,
vectorIndexName: 'bedrock-knowledge-base-default-index',
vectorField: 'bedrock-knowledge-base-default-vector',
textField: 'AMAZON_BEDROCK_TEXT_CHUNK',
metadataField: 'AMAZON_BEDROCK_METADATA',
}));
Properties
collectionICollectionRefcollectionICollectionRefcollectionICollectionRefCollectionICollectionRefCollectionICollectionRefrequired#The OpenSearch Serverless collection that contains the vector index.
metadataFieldstringmetadata_fieldstrmetadataFieldStringMetadataFieldstringMetadataField*stringrequired#The name of the index field that stores the metadata of each chunk.
The name of the index field that stores the raw text of each chunk.
The name of the index field that stores the vector embeddings.
vectorIndexNamestringvector_index_namestrvectorIndexNameStringVectorIndexNamestringVectorIndexName*stringrequired#The name of the vector index in the collection.