What is Retrieval-Augmented Generation?
Retrieval-augmented generation, or RAG, is a framework that combines the strengths of retrieval-based systems and generation-based models to produce more accurate & contextualized relevant responses. It does this through the following core components:
Retrieval: relevant data is identified & retrieved from an external data source based on a user query.
Augmentation: the retrieved data and the user query are combined into a prompt to provide the model with context for the generation step.
Generation: the model generates output from the augmented prompt, using the context to drive a more accurate and relevant response.
How RAG functions.
The first thing RAG does is take all the data and break them down into pages that we call “chunks”.
These chunks are then converted into a dimensions by a process known as embedding which are then stored in a vector database.
The vector database will then retrieve the important points to the user upon generation process to give a similar answer/response.
Top comments (0)