What is…
RAG (Retrieval-Augmented Generation)
Looking up relevant documents first, then having the model answer using them — grounded, current, citable.
RAG gives a model an open-book exam. When a question arrives, the system searches your documents (often with embeddings), pulls the most relevant passages into the prompt, and asks the model to answer from those passages, ideally with citations.
It's how "chat with your docs" products, customer-support bots and most enterprise AI work — cheaper and easier to keep current than fine-tuning.
💡 Think of it like
An open-book test: the model doesn't need to have memorized your company handbook — it just needs to find the right page.
🧠 Test yourself
Which of these describes RAG?
Related terms
Embeddings
Lists of numbers that represent meaning — texts about similar things end up close together.
Vector database
A database built to store embeddings and quickly find the most similar ones.
Grounding
Tying a model's answer to real, provided sources — search results, documents, data — instead of memory.
Hallucination
When a model states something false — a fake quote, citation, or fact — with total confidence.
🎮 Learn AI by playing
40 bite-size missions, boss battles and a certificate. Free.
Start the bootcamp →☀️ One AI term every morning
Plus the day's top stories, in your inbox by 8am.