Retrieval augmented generation (RAG) is a powerful approach that combines the capabilities of language models with the ability to retrieve relevant information from external documents. In RAG, a language model retrieves contextual documents from an external dataset to enhance its understanding and generate more accurate and informative responses.
This retrieval-based approach is particularly useful when we want to ask questions or generate content based on specific documents such as PDFs, videos, web pages, or even Notion databases. By incorporating external documents into the language model's execution, RAG expands its knowledge and provides more contextually rich output