Module 09 of 12

Retrieval & Grounding

Lessons

About This Module

A language model only knows what it saw during training, and that knowledge is frozen, incomplete and sometimes wrong. When it does not know something, it will often produce a confident answer anyway. Retrieval fixes this by fetching relevant information, such as documents, policies or database records, at the moment a question is asked. Grounding means tying the answer to that information, so every claim can be checked against a real source.

The lessons cover retrieval-augmented generation (RAG), the most common way to do this. You will see why models hallucinate, how a RAG system splits documents into chunks, turns them into embeddings, stores them in a vector database and searches them by meaning, and how the retrieved passages are placed into the prompt. The previous module on context engineering explains why only the right information should be added, and this one shows how to find it.

Watch the lessons in order, then continue on to Memory & Conversation State.

Lessons

3 videos
01

What is Retrieval-Augmented Generation (RAG)?

IBM Technology's short introduction: why language models give out-of-date or unsourced answers, how adding a retrieval step fixes it, and why a RAG system can say "I don't know" instead of guessing.

Video 6min
02

A Helping Hand for LLMs (Retrieval Augmented Generation)

Computerphile with Mike Pound: how supplying real documents alongside a question improves answers on niche topics, lets the model cite its sources, and reduces hallucinations, with a worked code example.

Video 14min
03

Retrieval Augmented Generation (RAG) Explained: Embedding, Sentence BERT, Vector Database (HNSW)

A longer, step-by-step look under the hood: how text becomes embeddings, how a vector database searches them quickly, and how the retrieved passages are combined with the question in the prompt.

Video 49min