How Does Retrieval Augmented Generation Work
Introduction RAG (Retrieval-Augmented Generation) is a technique where a model can generate text based on external information retrieved from a knowledge base, rather than relying solely on its pre-trained knowledge. The knowledge base is a collection of documents $$ D = { d_1, d_2, \dots, d_n } $$ such that, whenever text is generated, the information is based on the knowledge base as much as possible. There are two components to a RAG model: ...