RAG comprises two primary components: a retriever and a generator, aimed at retrieving and generating information, respectively.
External memory sources like databases, conversations history, or internet data are utilized by the retriever to provide relevant information for the generator.
RAG enhances the model's knowledge by accessing updated information, contributing to contextually relevant responses.
The success of a RAG system heavily relies on the quality of its retriever, with sparse and dense retrievers being key types that handle data representation differently.