Manage a knowledge base - Amazon Bedrock

Manage a knowledge base

After you set up a knowledge base, you can view information about it, modify it, or delete it.

To monitor with logs for your knowledge base using Amazon CloudWatch, see Knowledge base logging.

Select the tab corresponding to your method of choice and follow the steps.

View information about a knowledge base

You can view information about a knowledge base. Select the tab corresponding to your method of choice and follow the steps.

Console
To view information about a knowledge base
  1. Sign in to the AWS Management Console using an IAM role with Amazon Bedrock permissions, and open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.

  2. From the left navigation pane, select Knowledge bases.

  3. To view details for a knowledge base, either select the Name of the source or choose the radio button next to the source and select Edit.

  4. On the details page, you can carry out the following actions:

    • To change the details of the knowledge base, select Edit in the Knowledge base overview section.

    • To update the tags attached to the knowledge base, select Manage tags in the Tags section.

    • If you update the data source from which the knowledge base was created and need to sync the changes, select Sync in the Data source section.

    • To view the details of a data source, select a Data source name. Within the details, you can choose the radio button next to a sync event in the Sync history section and select View warnings to see why files in the data ingestion job failed to sync.

    • To manage the embeddings model used for the knowledge base, select Edit Provisioned Throughput.

    • Select Save changes when you are finished editing.

API

To get information about a knowledge base, send a GetKnowledgeBase request with a Agents for Amazon Bedrock build-time endpoint, specifying the knowledgeBaseId.

To list information about your knowledge bases, send a ListKnowledgeBases request with a Agents for Amazon Bedrock build-time endpoint. You can set the maximum number of results to return in a response. If there are more results than the number you set, the response returns a nextToken. You can use this value in the nextToken field of another ListKnowledgeBases request to see the next batch of results.

Update a knowledge base

Console
To update a knowledge base
  1. Sign in to the AWS Management Console using an IAM role with Amazon Bedrock permissions, and open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.

  2. From the left navigation pane, select Knowledge bases.

  3. Select a knowledge base to view details about it, or choose the radio button next to the knowledge base and select Edit.

  4. You can modify the knowledge base in the following ways.

    • Change configurations for the knowledge base by choosing Edit in the Knowledge base overview section.

    • Change the tags attached to the knowledge base by choosing Manage tags in the Tags section

    • Manage the data source in the Data source section. For more information, see Manage a data source.

  5. Select Save changes when you are finished editing.

API

To update a knowledge base, send an UpdateKnowledgeBase request with a Agents for Amazon Bedrock build-time endpoint. Because all fields will be overwritten, include both fields that you want to update as well as fields that you want to keep the same.

Delete a knowledge base

If you no longer need a knowledge base, you can delete it. When you delete a knowledge base, you should also carry out the following actions to fully delete all resources associated with the knowledge base.

  • Dissociate the knowledge base from any agents it's associated with.

  • Delete the vector store itself for your knowledge base.

Note

The default dataDeletionPolicy on a newly created data source is "Delete", unless otherwise specified during data source creation. The policy applies when you delete a knowledge base or data source resource. You can update the policy to "Retain" data from your data source that's converted into vector embeddings. Note that the vector store itself is not deleted if you delete a knowledge base or data source resource.

Select the tab corresponding to your method of choice and follow the steps.

Console
To delete a knowledge base
  1. Before the following steps, make sure to delete the knowledge base from any agents that it's associated with. To do this, carry out the following steps:

    1. From the left navigation pane, select Agents.

    2. Choose the Name of the agent that you want to delete the knowledge base from.

    3. A red banner appears to warn you to delete the reference to the knowledge base, which no longer exists, from the agent.

    4. Select the radio button next to the knowledge base that you want to remove. Select More and then choose Delete.

  2. Sign in to the AWS Management Console using an IAM role with Amazon Bedrock permissions, and open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.

  3. From the left navigation pane, select Knowledge bases.

  4. Choose a knowledge base or select the radio button next to a knowledge base. Then choose Delete.

  5. Review the warnings for deleting a knowledge base. If you accept these conditions, enter delete in the input box and select Delete to confirm.

    Note

    The vector store itself is not deleted, only the data. You can use the vector store's console or SDK to delete the vector store. Make sure to also check any Amazon Bedrock agents that you use with your knowledge base.

API

To delete the knowledge base, send a DeleteKnowledgeBase request with a Agents for Amazon Bedrock build-time endpoint.

You must also disassociate the knowledge base from any agents that it's associated with by making a DisassociateAgentKnowledgeBase request with a Agents for Amazon Bedrock build-time endpoint.

You must also delete the vector store itself by using the vector store's console or SDK to delete the vector store.