Retrieval-Augmented Generation(RAG)
A method that lets an AI look things up in a trusted collection of documents before it answers, rather than relying only on what it learned during training. Think of it as giving the AI a reference library to check first. This approach is called retrieval-augmented generation, or RAG.
A normal AI answers from memory, drawing on what it learned during training. That memory can be out of date or patchy, and sometimes the AI fills gaps by making things up. Retrieval-augmented generation adds a step. Before answering, the AI searches a chosen set of documents for relevant material, then uses what it finds to shape its reply.
The reference library analogy captures it well. Imagine asking a knowledgeable friend a question, but instead of answering off the top of their head, they first step into a library, pull the relevant books, read the key passages, and then answer with those pages open in front of them. Their reply is grounded in real, checkable sources rather than memory alone.
This matters because it tackles two common frustrations. It helps keep answers current, since the documents can be updated any time, and it reduces hallucinations, because the AI is working from actual material rather than guessing. Many company help assistants and document question-and-answer tools use RAG for exactly these reasons.
Under the surface, RAG usually relies on embeddings to understand meaning and a vector database to find the closest matches quickly. This is an intermediate topic, so if you would like to go further, our sister site rag-repo.org has a curated directory of open data sources to explore.
Related terms
Used in
- What are embeddings? · Guide
- What is RAG? · Guide