Explain it simpler
A language model learned from a huge pile of text up to a certain date. It has never seen your company's private files, and it does not know about anything that changed after its training. Ask it anyway and it may make up something that sounds right. Retrieval augmented generation, or RAG, is a fix that works like an open-book exam. When a question arrives, your app first searches your own documents for the most relevant passages, then hands those passages to the model along with the question and the instruction answer only from these. The model now reads and summarizes instead of remembering. Update a document, and the next answer uses the new version. Because the passages came with their file names, the answer can say where it came from.
Marcus, a network engineer at Cedar Valley Schools, asks the district's new AI assistant how to reissue a VPN token under the policy that changed last month. The answer comes back confident, well formatted and completely wrong: it describes a process the district retired two years ago and cites a form number that never existed. The model was never trained on the district's internal wiki, and it has no idea the policy changed. Retraining a model every time IT updates an article is not realistic. How do you get a model to answer from your own current documents, and to show where each answer came from?
A language model knows only what was in its training data. That data stops at a cutoff date, so it is out of date, and it never included your company's private documents, policies or product catalog. When asked about them, the model may invent a plausible answer, a behavior often called fabrication or hallucination. Retrieval augmented generation (RAG) addresses this by retrieving relevant passages from your own data at question time and adding them to the prompt, along with instructions to answer only from those passages. The model's job changes from remembering facts to reading and summarizing the facts you hand it, which is a task language models do very well.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.