Retrieval-Augmented Generation (RAG)
May 1, 2024
Updated July 18, 2025
16 minute read
Retrieval-Augmented Generation (RAG) is a powerful natural language processing (NLP) technique that combines the strengths of retrieval-based and generative approaches to achieve state-of-the-art results in a variety of language-related tasks such as question answering, text summarization, machine translation, and conversational AI.
How does Retrieval-Augmented Generation (RAG) work?
RAG works by first retrieving a set of relevant documents from a large corpus of text. These documents are then used to train a generative model, which is able to generate new text that is both informative and coherent. The generative model is typically a transformer-based model, such as BERT or GPT-3.
The key advantage of RAG over traditional generative models is that it allows the model to access external knowledge during the generation process. This enables the model to generate text that is more factually accurate and comprehensive. In addition, RAG can be used to generate text in a variety of styles and genres, making it a highly versatile tool for NLP tasks.
bhzi9v|
Find a path to becoming a Retrieval-Augmented Generation (RAG). Learn more at:
OpenCourser.com/topic/bhzi9v/retrieval
Reading list
We've selected 28 books
that we think will supplement your
learning. Use these to
develop background knowledge, enrich your coursework, and gain a
deeper understanding of the topics covered in
Retrieval-Augmented Generation (RAG).
LangChain widely used framework for developing applications powered by language models, including RAG systems and AI agents. offers a practical guide to using LangChain and LangGraph, providing hands-on experience with implementing RAG and related concepts.
Provides a comprehensive overview of deep learning for natural language processing. It covers the latest techniques and best practices, and is written by a leading researcher in the field.
Transformers are the fundamental architecture behind most modern Large Language Models used in RAG. provides a comprehensive guide to working with transformers using the Hugging Face ecosystem. It offers essential background knowledge for understanding the generative component of RAG systems.
Is specifically designed for beginners interested in Retrieval Augmented Generation (RAG). It aims to introduce the core concepts and guide readers in building basic RAG systems. It serves as a good starting point for those with minimal prior knowledge of RAG.
Large Language Models are a core component of RAG. provides a practical, hands-on guide to understanding and working with LLMs, covering transformers, tokenizers, and semantic search. It offers essential background knowledge for anyone building RAG systems and valuable reference for practitioners.
This project-based book helps solidify understanding of Large Language Models and their applications, including the use of Vector Databases and LangChain, which are highly relevant to RAG implementation. It provides practical experience through building various LLM projects.
For those wanting a deep understanding of the generation component in RAG, this book guides you through building an LLM from scratch. It covers the internal workings, limitations, and customization methods. While challenging, it provides a solid foundation in LLM architecture and training.
Aimed at beginners, this book provides a comprehensive roadmap to understanding Retrieval Augmented Generation (RAG) technology. It covers core principles, architecture, training processes, and real-world applications. This valuable resource for those new to RAG looking to gain foundational knowledge.
Explores vector databases and their role in modern data analytics, including applications in AI and generative AI. Understanding vector databases is fundamental to building efficient RAG systems. This book provides a good overview of this essential technology.
Focuses on generative models, which are key to the generation aspect of RAG. It covers various generative techniques and their applications, providing valuable background for understanding how LLMs produce output. The second edition includes recent advancements in the field.
Authored by the creator of Keras, this book provides an accessible introduction to deep learning with Python. The third edition includes updated content on generative AI and large language models, making it highly relevant for understanding the generation aspect of RAG. It helps solidify understanding through practical examples.
Focuses specifically on applying deep learning techniques to natural language processing problems. It delves into advanced concepts and models relevant to the generative component of RAG systems. It is suitable for those looking to deepen their understanding of the neural network architectures used in NLP.
Provides a comprehensive overview of deep learning for natural language processing, including a chapter on RAG. It valuable resource for both beginners and advanced readers who want to learn more about RAG and its applications.
Considered a classic in the field, this book provides a broad and deep understanding of Natural Language Processing. While not specifically about RAG, it lays crucial groundwork in areas like text processing, language models (earlier forms), and information extraction, which are prerequisites for understanding RAG. It is commonly used as a textbook in academic institutions.
Investigates the use of RAG for machine translation. It presents a new approach to neural machine translation that incorporates retrieval, and it shows that this approach can improve the quality of machine translations on a variety of language pairs.
Provides a comprehensive overview of natural language processing, including a chapter on RAG. It valuable resource for both beginners and advanced readers who want to learn more about RAG and its applications.
While not directly about RAG architecture, effective prompt engineering is crucial for optimizing the output of the LLM within a RAG system. provides practical guidance on crafting prompts to achieve reliable results from generative AI models, enhancing the overall performance of a RAG application.
Offers a practical introduction to Natural Language Processing using Python and the NLTK library. It's excellent for beginners to gain hands-on experience with fundamental NLP tasks like text processing and analysis, which are helpful prerequisites for working with RAG systems.
For more information about how these books relate to this course, visit:
OpenCourser.com/topic/bhzi9v/retrieval