AI at work · Lesson 2
RAG: giving AI an open book
Retrieval-Augmented Generation (RAG) is how most company chatbots answer from their own documents:
- Retrieve: find the passages most relevant to the question (using embeddings).
- Augment: paste them into the prompt.
- Generate: the AI answers using only those passages, ideally with citations.
Try it Yourself: Build a RAG pipeline (Build your own RAG)
Tip: RAG reduces hallucinations because the AI works from your text, but only if retrieval finds the right passage.
Exercises
- Write a question whose top retrieved chunk is the Expenses policy, without using the words "expense" or "expenses".
- What does RAG add before the AI answers?