We may earn an affiliate commission when you visit our partners.

RAG

Save
May 1, 2024 3 minute read

Retrieval Augmented Generation (RAG) is a cutting-edge technique that enhances the capabilities of large language models (LLMs). By leveraging a dual-encoder architecture, RAG empowers LLMs with the ability to retrieve relevant information from extensive text databases, significantly improving their performance on various text-based tasks.

Understanding RAG

The core concept of RAG lies in its dual-encoder structure, consisting of a text encoder and a retrieval encoder. The text encoder converts the input text into a fixed-length representation, while the retrieval encoder transforms the text database into a collection of vectors.

To perform retrieval, the text encoder generates a query vector for the input text, which is then compared to the vectors in the database. The retrieval encoder identifies the most similar vectors, corresponding to the most relevant documents from the database.

Benefits of RAG

RAG offers several advantages that enhance the performance of LLMs:

  • Improved Information Retrieval: RAG enables LLMs to access and leverage external knowledge, improving their ability to find and retrieve relevant information.
  • Enhanced Text Generation: By incorporating retrieved information, LLMs can generate more informed and contextually rich text.
  • Better Question Answering: RAG empowers LLMs to provide comprehensive and accurate answers to complex questions, utilizing external knowledge.
  • Augmented Summarization: RAG helps LLMs generate concise and informative summaries of large text corpora, leveraging retrieved information.

Applications of RAG

Path to RAG

Take the first step.
We've curated 23 courses to help you on your path to RAG. Use these to develop your skills, build background knowledge, and put what you learn to practice.
Sorted from most relevant to least relevant:

Share

Help others find this page about RAG: by sharing it with your friends and followers:

Reading list

We've selected four 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 RAG.
Provides a comprehensive overview of large language models and RAG. It covers the underlying principles, architectures, and applications, offering a valuable resource for researchers and practitioners in the field.
Focuses on the application of RAG in information retrieval systems. It covers techniques for retrieving relevant documents, ranking search results, and improving the overall user experience.
Examines the use of RAG in machine translation. It covers methods for language modeling, sentence alignment, and translation decoding, providing valuable insights for researchers and practitioners in the field.
Explores the application of RAG in international development. It discusses how RAG can be used to improve education, healthcare, and economic opportunities in developing countries.
Table of Contents
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser