Amazon Bedrock Knowledge Bases

With Amazon Bedrock Knowledge Bases, you can give foundation models and agents contextual information from your company’s private data sources to deliver more relevant, accurate, and customized responses

Fully managed support for end-to-end RAG workflow

To equip foundation models (FMs) with up-to-date and proprietary information, organizations use Retrieval Augmented Generation (RAG), a technique that fetches data from company data sources and enriches the prompt to provide more relevant and accurate responses. Amazon Bedrock Knowledge Bases is a fully managed capability with in-built session context management and source attribution that helps you implement the entire RAG workflow from ingestion to retrieval and prompt augmentation without having to build custom integrations to data sources and manage data flows. You can also ask questions and summarize data from a single document, without setting up a vector database.

A formal depiction of a knowledge base's overview

Securely connect FMs and agents to data sources

If you have unstructured data sources, Amazon Bedrock Knowledge Bases automatically fetches data from sources such as Amazon Simple Storage Service (Amazon S3), Confluence (preview), Salesforce (preview), SharePoint (preview), or Web Crawler (preview). In addition, you also receive programmatic access to ingest streaming data or data from unsupported sources. Once the content is ingested, Amazon Bedrock Knowledge Bases divides them into blocks of text, converts from text into embeddings, and stores them in your vector database. You can choose from multiple supported vector stores, including Amazon Aurora, Amazon Opensearch Serverless, MongoDB, Pinecone and Redis Enterprise Cloud.

screen to create knowledge base and set up data sources

Customize Amazon Bedrock Knowledge Bases to deliver accurate responses at runtime

You have various options to customize and improve accuracy of retrieval. For unstructured data sources, you can customize how Knowledge Bases parses your data to process textual data from popular document formats. Amazon Bedrock Knowledge Bases offers a variety of advanced data chunking options including semantic, hierarchical, and fixed size chunking. For full control, you can also write your own chunking code as a Lambda function, and even use off-the-shelf components from frameworks like LangChain and LlamaIndex.

bedrock chunking parsing configuration screenshot

Retrieve data and augment prompts

Using Retrieve API, you can fetch relevant results for a user query from knowledge bases. The RetrieveAndGenerate API goes one step further by directly using the retrieved results to augment the FM prompt and return the response. You can also add Amazon Bedrock Knowledge Bases to Amazon Bedrock Agents to provide contextual information to agents. You can also choose to manually provide or automatically generate filters when you retrieve the content to improve its relevance. Amazon Bedrock Knowledge Bases offer reranker models to improve the relevance of retrieved document chunks.

Retrieve And Generate API

Provide source attribution

All the information retrieved from Amazon Bedrock Knowledge Bases is provided with citations to improve transparency and minimize hallucinations.

A chat window where a user is having a conversation with Agent