Skip to main content
Retrieval-Augmented Generation (RAG) enhances the performance of foundation models by grounding their calculations in external knowledge sources, resulting in more accurate and up-to-date responses. RAG is a versatile pattern that combines the power of retrieval systems with generative models to unlock use cases that are less accurate when using standalone foundation models. This tutorial demonstrates RAG leveraging LangChain and Granite. LangChain is a framework for building LLM-powered applications by chaining interoperable components. LangChain provides a standard interface for models, embeddings, vector stores, and more. You will need a Replicate API token and a Hugging Face token to run this recipe in Colab. Instructions for obtaining these credentials can be found here.