Implementing RAG with other methods
Amazon Bedrock is not the only way to implement RAG, and in this section, we will learn about the other ways. Starting with LangChain, we will also look at some other GenAI systems.
Using LangChain
LangChain provides an excellent framework for building RAG models by integrating retrieval tools and LLMs. In this section, we will look at how to implement RAG with LangChain using the following components:
- LLMs: LangChain integrates with Amazon Bedrock’s powerful LLMs using Bedrock’s available FM invocation APIs. Amazon Bedrock can be used to generate fluent NL responses after reviewing the retrieved documents.
- Embedding model: Text embedding models available via Amazon Bedrock, such as Amazon Titan Text Embeddings, generate vector representations of text passages. This allows comparing textual similarity in order to retrieve relevant contextual information to augment the input prompt for composing a final response. ...