Skip to content
v2.274.0

Experimental

@aws-cdk/aws-bedrock-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

KnowledgeBaseProps Struct Added in v2.274.0-alpha.0 ​

Properties for a knowledge base.

Example ​

ts
declare const collection: opensearchserverless.ICollectionRef;

const knowledgeBase = new bedrock.KnowledgeBase(this, 'KnowledgeBase', {
  type: bedrock.KnowledgeBaseType.vector({
    embeddingsModel: bedrock.BedrockFoundationModel.TITAN_EMBED_TEXT_V2_1024,
    vectorStore: bedrock.VectorStore.openSearchServerless({
      collection,
      vectorIndexName: 'bedrock-knowledge-base-default-index',
      vectorField: 'bedrock-knowledge-base-default-vector',
      textField: 'AMAZON_BEDROCK_TEXT_CHUNK',
      metadataField: 'AMAZON_BEDROCK_METADATA',
    }),
  }),
});

Properties ​

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= no description#
A description of the knowledge base.

Must be 1-200 characters.

knowledgeBaseNamestringknowledge_base_namestrknowledgeBaseNameStringKnowledgeBaseNamestringKnowledgeBaseName*string= a unique name is generated#
The name of the knowledge base.

Must be 1-100 characters of letters, digits, hyphens and underscores, and must not contain consecutive hyphens or underscores.

roleanyroleanyroleanyRoleanyRoleany= a new role is created, trusted b…#
The service role that Amazon Bedrock assumes to operate the knowledge base.

The permissions the knowledge base needs to reach its data store and models are granted to this role.

default

Default: a new role is created, trusted by bedrock.amazonaws.com and scoped to knowledge bases in this account

tags{ [key: string]: string }tagstyping.Mapping[str, str]tagsMap<String, String>TagsIDictionary<string, string>Tags*map[string]*string= no tags#
Tags to apply to the knowledge base.
The type of the knowledge base and its type-specific configuration.