Augment response generation for your agent with knowledge base
Note
Amazon Bedrock Agents (launched November 2023) is now 'Amazon Bedrock Agents Classic' and will no longer be open to new customers starting on July 30, 2026. For capabilities similar to Bedrock Agents Classic, explore Amazon Bedrock AgentCore. If you would like to use Bedrock Agents Classic, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see Amazon Bedrock Agents Classic maintenance mode.
Amazon Bedrock Knowledge Bases help you take advantage of Retrieval Augmented Generation (RAG), a popular technique that involves drawing information from a data store to augment the responses generated by Large Language Models (LLMs). When you set up a knowledge base with your data source and vector store, your application can query the knowledge base to return information to answer the query either with direct quotations from sources or with natural responses generated from the query results.
To use Amazon Bedrock Knowledge Bases with your Amazon Bedrock Agent, you'll have to first create a knowledge base and then associate the knowledge base with the agent. If you haven't yet created a knowledge base, see Retrieve data and generate AI responses with Amazon Bedrock Knowledge Bases to learn about knowledge bases and create one. You can associate a knowledge base during agent creation or after an agent has been created. To associate a knowledge base to an existing agent, choose the tab for your preferred method, and then follow the steps:
You can modify the query configurations of a knowledge base attached to your agent by using the sessionState field in the InvokeAgent request when you invoke your agent. For more information, see Control agent session context.