Retrieval Augmented Generation (RAG)

Retrieval Augmented Generation (RAG) is a technique that enhances a model’s responses by integrating information from a Knowledge Base (KB). By referencing a KB, the model can generate responses that include data not originally part of its training, leading to more accurate and contextually relevant answers.

RAG uses two models: a retriever and a generator. The retriever searches a KB to fetch relevant data based on the user’s request. The generator then combines this retrieved data with its own learned knowledge from training to generate a response to the user’s request.

Common use cases for RAG include chatbots and virtual assistants.