Skip to main content

Overview

This will help you getting started with AmazonKnowledgeBaseRetriever retrieval. For detailed documentation of all AmazonKnowledgeBaseRetriever features and configurations head to the API reference. Knowledge Bases for Amazon Bedrock is a fully managed support for end-to-end RAG workflow provided by Amazon Web Services (AWS). It provides an entire ingestion workflow of converting your documents into embeddings (vector) and storing the embeddings in a specialized vector database. Knowledge Bases for Amazon Bedrock supports popular databases for vector storage, including vector engine for Amazon OpenSearch Serverless, Pinecone, Redis Enterprise Cloud, Amazon Aurora (coming soon), and MongoDB (coming soon).

Integration details

AWS Knowledge Base Retriever can be ‘self hosted’ in the sense you can run it on your own AWS infrastructure. However it is not possible to run on another cloud provider or on-premises.

Setup

In order to use the AmazonKnowledgeBaseRetriever, you need to have an AWS account, where you can manage your indexes and documents. Once you’ve setup your account, set the following environment variables:
If you want to get automated tracing from individual queries, you can also set your LangSmith API key by uncommenting below:

Installation

This retriever lives in the @langchain/aws package:

Instantiation

Now we can instantiate our retriever:

Usage


API reference

For detailed documentation of all AmazonKnowledgeBaseRetriever features and configurations head to the API reference.