Google Analytics counts our visits, with cookies. No thanks turns it off and removes its cookies; in Europe, the UK, Switzerland and India, or wherever we cannot tell where you are, it stays off unless you accept. Cookie Notice

Advertise
PRICES

What is RAG?

RAG (Retrieval-Augmented Generation): an AI term, explained in plain English.

In one line

A way to make an AI answer from trusted documents: it first looks up the relevant pages, then writes its answer from them.

AI Drafted with AI help · Reviewed by Keshav Aggarwal · Updated

In simple words

Imagine a student in an open-book exam. Before answering, they look up the right page in the book, then write the answer.

RAG lets an AI do the same: look things up first, then answer.

The technical side

Retrieval-augmented generation adds a search step before the model writes. Documents are split into chunks and stored, often as embeddings in a vector database. For each question, the closest chunks are retrieved and placed in the model’s context window together with the question.

RAG lets a model use private or very recent information without retraining it, and makes it easier to show sources. It lowers the risk of hallucination but does not remove it.

RAG kya hai?

RAG mein AI pehle sahi documents dhoondhta hai, phir unhi ko padh ke jawab likhta hai. Jaise open-book exam mein bachcha pehle kitaab dekhta hai, phir likhta hai.

Related terms

All terms, A to Z