Skip to content

Beginning of the lesson

Giving AI Your Documents: RAG

A chat model is brilliant at language but blind to your world. It never read your company handbook, your class notes, last week's news, or the PDF sitting on your desktop. Retrieval-Augmented Generation (RAG) is the trick that lets a model answer questions using your own documents — and even point to the exact page it got the answer from.

The big idea in one sentence

Instead of hoping the model already memorised the right facts, RAG looks up the most relevant pieces of your documents at question time and pastes them into the prompt, so the model answers with real, checkable information in front of it.

What you will be able to do after this lesson
  • Explain why a language model does not know your private files or anything after its knowledge cutoff.
  • Describe what an embedding is in plain words — text turned into a point in space where similar meaning sits close together.
  • Understand vector search: finding the document chunks nearest to a question.
  • Walk through the full RAG pipeline, step by step, from raw documents to a grounded, cited answer.
  • Judge why chunking and retrieval quality matter, and recognise when RAG gives a confident but wrong answer.
  • Name real RAG products you have probably already used.

Continue this lesson on YourAIZone

The full lesson has the complete explanation, worked examples, common mistakes, tests with instant checking and an AI tutor. Start right away as a guest, or create an account to keep your progress.

In the full lesson

  • The complete explanation
  • Worked examples
  • Common mistakes and how to avoid them
  • Test questions: 16
  • AI tutor that answers questions about the topic
  • Progress tracking for students, parents and teachers