17. RAG Foundations
Understand retrieval augmented generation and why grounding documents matter.
By Jacques Botte, founder of Toptronic®. Last updated 19 September 2026.
The lesson
RAG means the system retrieves relevant documents and supplies them to the model as context. This reduces guessing because the answer can be grounded in known material.
The quality of RAG depends on chunking, metadata, retrieval ranking, prompt design, and the model's ability to cite or use the retrieved text.
TPEE does not run a RAG server; it teaches you how to ask for grounded answers and how to prepare source material for another tool.
A junior support agent uses TPEE to answer product questions only from the supplied help-centre excerpts, and reports plainly when the excerpts do not cover the question.
A hospital policy officer builds a grounded prompt that answers staff questions only from the supplied infection-control documents, citing the section used.
A warehouse compliance lead grounds AI answers in the supplied storage and handling rules rather than letting the model rely on memory.
An insurance claims officer prepares policy wording excerpts as retrieval context so AI answers stay tied to the actual conditions.
A university librarian builds a grounded prompt that draws only from catalogue records and borrowing policy excerpts.
A municipal officer grounds AI answers about permit steps in the supplied procedure documents and flags anything the documents do not cover.
A manufacturing quality lead supplies the plant own work instructions as retrieval context so AI answers about batch release stay grounded.
A legal knowledge manager prepares clause excerpts so AI answers about contract terms quote the supplied text only.
A veterinary practice nurse grounds AI answers about aftercare in the supplied clinic protocols and says when the documents are silent.
An aged care educator builds a grounded prompt from the organisation own training material so answers cite the supplied pages.
Check yourself
Question 1: What is RAG?
- Random answer generation
- A GPU connector
- A file menu
- Retrieval augmented generation using documents as context — correct
Answer: Retrieval augmented generation using documents as context
RAG retrieves relevant material and gives it to the model.
Question 2: What affects RAG quality?
- Only monitor type
- Only keyboard layout
- Chunking, metadata, retrieval ranking, prompt design, and citation behavior — correct
- Only font size
Answer: Chunking, metadata, retrieval ranking, prompt design, and citation behavior
RAG systems depend on retrieval and how the model uses retrieved text.
Question 3: What does TPEE do about RAG?
- Starts MCP servers
- Teaches grounded prompting and preparation, but does not run a RAG server — correct
- Runs a vector database
- Uploads documents automatically
Answer: Teaches grounded prompting and preparation, but does not run a RAG server
TPEE remains local and educational.
← Previous lesson · All 91 lessons · Next lesson →
The full course — 91 lessons and 273 quiz questions — ships inside the app. Get TPEE to study it offline.