LEVEL 02 · LESSON 12
Retrieval-augmented generation (RAG)
RAG finds relevant evidence first and asks the model to answer from it.
What it is
RAG combines finding relevant information with generating an answer from it. The system retrieves evidence at the time of the question instead of relying only on the model’s training.
Why it matters
It makes large, changing knowledge collections usable without retraining the language model for every update.
A business example
An employee asks whether a client dinner is reimbursable. The assistant retrieves the current expense policy and the relevant regional supplement, then explains the conditions with links to both.
How it actually works
During preparation, documents are cleaned, split, indexed, and associated with metadata. At query time, the system retrieves candidates, may rerank them, and sends selected passages to a model with the question. The answer should preserve source references. Evaluate retrieval and generation separately: an excellent writer cannot compensate for missing evidence. Access controls and document updates must reach the index as well as the original repository.
A common misconception
RAG is not simply uploading files to a vector database. Document quality, permissions, retrieval, and evidence use all affect the outcome.
ONE SENTENCE TO REMEMBER
RAG finds relevant evidence first and asks the model to answer from it.
CHECK YOUR UNDERSTANDING
A RAG assistant gives a wrong answer about the current returns policy. Which investigation step comes first?
Show the answer
Answer: D.
Evaluate retrieval and generation separately: an excellent writer cannot compensate for missing evidence. RAG is not just uploading files to a vector database; document quality, updates, permissions, and retrieval all affect the outcome.
Take it into your next meeting
When an answer fails, was the evidence missing, retrieved incorrectly, or interpreted incorrectly?
One more concept, understood.
Mark this lesson complete to keep your place.