Week 3: Behind the Scenes

Day 18: RAG: Retrieval-Augmented Generation

Day 18 of 2815 minGoal - Learn - Example - Practice - Checkpoint

Goal

Understand how chatbots answer from documents.

Learn

RAG combines search and generation. First, the system retrieves relevant chunks from documents, databases, or the web. Then the model writes an answer using that retrieved context. RAG can reduce hallucination, but only if retrieval finds the right material and the model respects it.

Behind the scenes
AI tools are products wrapped around models, data, prompts, retrieval, safety systems, and user interfaces. The better you understand the wrapper, the better your results get.

Example

A help bot searches a policy document first, then writes an answer from the matching section.

Practice

Ask an assistant to answer only from a short pasted source. Then ask what it cannot know from the source.

Checkpoint

Checkpoint
You can explain why “chat with your documents” still needs source checking.