AI & Automation free courses

Master the TrickProfessionalFree

Retrieval-Augmented Generation Basics

Plan a small document-grounded assistant using retrieval, source citations and access-aware evaluation.

3 reading lessons · about 30 min ·written by MTT

The idea

Retrieval-augmented generation selects relevant reference passages for a question and supplies them as context to a model. It does not automatically retrain the model or guarantee a correct answer. Access controls should filter eligible documents before their content reaches the model, and an answer should admit when the retrieved evidence is insufficient.

Worked example

A fictional shop policy contains delivery, returns and warranty sections. For a question about returning a damaged product, retrieve the returns section and provide its version date. Do not supply an unrelated employee document just because its wording is similar. If the policy omits the requested deadline, the assistant should not invent one.

Try it

Write a three-section fictional policy and two customer questions. For each question, select the supporting passage manually and draft a source-grounded answer. Add one unanswerable question and specify the clarification or escalation response instead of guessing.

Lesson 1 of 3 · About 10 min

Retrieve before generating

Check your understanding

Course quiz

Finish the course to unlock the quiz

Complete all 3 lessons and 5 questions open up here. You have 3 to go.

What you will learn

  • Explain retrieval versus model training
  • Design useful document chunks with metadata
  • Evaluate retrieval and answer grounding separately

Before you start

Prerequisites
Basic AI chat familiarity. No coding or paid vector database is required for the paper exercises.
Cost
Free introductory reading lessons, exercises and quiz. Optional third-party tools, hosting or AI subscriptions may cost money.

Original introductory lessons and assessment by Master the Trick. Estimated times include the suggested exercises.