Skip to content

/AWS1/CL_BDA=>CREATEKNOWLEDGEBASE()

About CreateKnowledgeBase

Creates a knowledge base that contains data sources from which information can be queried and used by LLMs. To create a knowledge base, you must first set up your data sources and configure a supported vector store. For more information, see Set up your data for ingestion.

If you prefer to let Amazon Bedrock create and manage a vector store for you in Amazon OpenSearch Service, use the console. For more information, see Create a knowledge base.

  • Provide the name and an optional description.

  • Provide the Amazon Resource Name (ARN) with permissions to create a knowledge base in the roleArn field.

  • Provide the embedding model to use in the embeddingModelArn field in the knowledgeBaseConfiguration object.

  • Provide the configuration for your vector store in the storageConfiguration object.

Method Signature

IMPORTING

Required arguments:

IV_NAME TYPE /AWS1/BDANAME /AWS1/BDANAME

A name for the knowledge base.

IV_ROLEARN TYPE /AWS1/BDAKNOWLEDGEBASEROLEARN /AWS1/BDAKNOWLEDGEBASEROLEARN

The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.

IO_KNOWLEDGEBASECONF TYPE REF TO /AWS1/CL_BDAKNOWLEDGEBASECONF /AWS1/CL_BDAKNOWLEDGEBASECONF

Contains details about the embeddings model used for the knowledge base.

IO_STORAGECONFIGURATION TYPE REF TO /AWS1/CL_BDASTORAGECONF /AWS1/CL_BDASTORAGECONF

Contains details about the configuration of the vector database used for the knowledge base.

Optional arguments:

IV_CLIENTTOKEN TYPE /AWS1/BDACLIENTTOKEN /AWS1/BDACLIENTTOKEN

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

IV_DESCRIPTION TYPE /AWS1/BDADESCRIPTION /AWS1/BDADESCRIPTION

A description of the knowledge base.

IT_TAGS TYPE /AWS1/CL_BDATAGSMAP_W=>TT_TAGSMAP TT_TAGSMAP

Specify the key-value pairs for the tags that you want to attach to your knowledge base in this object.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_BDACREKNOWLEDGEBASE01 /AWS1/CL_BDACREKNOWLEDGEBASE01