Retrieval Augmented Generation (RAG) Explained

Retrieval Augmented Generation (RAG)

The technique combines the power of generative models with access to an external knowledge base. The model first retrieves relevant information from a database, then uses that information to generate an answer.

AdvantagesDisadvantages
Improves the accuracy and relevance of answersNeeds extra resources to store and process external data
Lets the model work with up-to-date informationCan be slower than purely generative approaches
Reduces the chance of model hallucinationsComplicates setup and integration with databases

RAG prompt example:

Using the available database of recent scientific discoveries, describe the three most significant advances in quantum computing over the past year. For each advance, name the research group, the main results and the potential impact on technology.

Try it in GPTunneL