Mental model
Module 01: Why RAG exists- Understand why an LLM can sound confident yet still need external evidence, and learn the simplest mental model for retrieval-augmented generation.
Understand why an LLM can sound confident yet still need external evidence, and learn the simplest mental model for retrieval-augmented generation.
Engineering focus: Why RAG exists
Understand why an LLM can sound confident yet still need external evidence, and learn the simplest mental model for retrieval-augmented generation.
You are not expected to know the engineering vocabulary before using the idea. Formal terminology comes after the mental model.
Carry one evidence-grounded knowledge assistant through all 18 modules. Preserve source IDs, retrieval evidence, evaluation cases, authority decisions and security assumptions so every improvement is measurable.
Think of the LLM as a capable colleague with no guaranteed access to your latest handbook. RAG gives that colleague a controlled evidence pack before they answer.
RAG changes what evidence the model can see at answer time; it does not retrain the model.
A language model generates from patterns learned during training. It may not know your private documents, may not know the newest facts, and can still produce fluent unsupported claims.
RAG means: find relevant evidence first, then ask the model to answer using that evidence.
Retrieval can fail, the wrong passage can be selected, and the model can still ignore good evidence. Production RAG is a pipeline that must be measured end to end.
Use deterministic lookups, databases or tools when the task requires exact structured facts, transactions or authorization rather than fuzzy document reasoning.
Module 01: Why RAG existsQuestion: "What port does the API use?"
1. Search approved knowledge sources
2. Retrieve: network.md#api → "The API listens on TCP 8080."
3. Build context with source ID
4. Answer: "TCP 8080"
5. Cite: network.md#api
Unanswerable query → INSUFFICIENT_EVIDENCEThe answer sounds plausible but no source supports it.
Establish evidence before discussing prompt quality.
Goal: Create a three-document mini knowledge base and manually retrieve the correct source before answering.
printf '%s\n' 'VPN resets require MFA.' 'Payroll closes Friday.' 'API listens on 8080.' > /tmp/rag-kb.txt
grep -n '8080' /tmp/rag-kb.txtRecord the intermediate source IDs, ranks, metadata or state produced by the baseline. Explain which pipeline layer this evidence belongs to.
Ask: 'What is the payroll account number?' The mini corpus has no answer. Record what a forced-answer system would be tempted to do.
Establish evidence before discussing prompt quality. State the failing layer, change only that layer, then repeat the verification checks.
Record: hypothesis → evidence → change → observed result → remaining limitation. Keep this note with the running Evidence Desk project.
Production RAG improves when every change can be traced to evidence at a specific pipeline layer. In production, retain the before/after evidence so the same failure can become a regression test.
Corpus answerability boundary documented
Unsupported questions tested
Structured-data/API alternatives identified where appropriate
Because its internal parameters may not contain current, private or authoritative evidence needed for the task.
Retrieve relevant evidence, place it in context, then generate an answer constrained by that evidence.
No. Retrieval and generation can each fail, so the pipeline must be evaluated.
When the answer is structured, exact, transactional or authorization-sensitive.
Progress is saved in this browser immediately. When you sign in to My Learning, it can also sync across devices.
Attempt the core lab and knowledge checks before marking the module complete.