AI glossary
What is RAG in AI?
RAG is a technique that finds relevant information in your documents and hands it to the model along with the question, so it answers with real, current data.
RAG stands for retrieval-augmented generation. It has two steps: first, the pieces of a knowledge base that relate to the question are retrieved, almost always with embeddings; then they go into the prompt and the model generates the answer using them.
It lets an assistant know information that was not in its training: a company's manuals, internal docs or data newer than its cutoff date. And it lets the answer cite where each fact came from.
Unlike fine-tuning, the model does not need retraining. But the answer is only as good as what gets retrieved: if the search brings back the wrong passage, the model answers about that.
An example
A support assistant that answers with a product's current terms and shows you which document they came from is using RAG.