M7-A — What is RAG?
RAG sounds scary. It is not. It means: before AI answers, it looks up your notes — then writes the answer using those notes.
📖 The open-book exam analogy
| Closed-book exam | Open-book exam |
|---|---|
| Student uses only memory | Student can open textbook first |
| Might remember wrong | Can check facts in the book |
| ChatGPT alone | ChatGPT + your PDFs / notes |
RAG = Retrieval-Augmented Generation
- Retrieval = find the right pages from your material
- Augmented = add those pages to the question
- Generation = AI writes the answer
RAG does not make AI smarter. It gives AI the right pages to read first — so answers come from your data, not from guessing.
🤔 Why normal ChatGPT is not enough
ChatGPT was trained on internet text — months or years ago.
| Problem | What happens |
|---|---|
| Your private notes | AI never saw them |
| Today's fee structure | AI might invent numbers |
| Your company's internal policy | AI does not know it exists |
| Latest batch timetable | AI hallucinates dates |
You need AI that answers: "According to THIS document…"
That is RAG.
🧩 RAG in one picture
YOUR DOCUMENTS
(PDF, notes, website)
│
▼
┌───────────────┐
│ Store & index │ ← happens once when you upload
└───────┬───────┘
│
YOU ASK: "What is the Module 3 assignment?"
│
▼
┌───────────────┐
│ RETRIEVE │ ← find relevant paragraphs
└───────┬───────┘
│
▼
┌───────────────┐
│ AI GENERATES │ ← answer using retrieved text
└───────┬───────┘
│
▼
ANSWER TO YOU
🆚 RAG vs normal chat — quick table
| Normal ChatGPT | RAG system | |
|---|---|---|
| Knowledge source | Training memory | Your uploaded files |
| Best for | General questions, writing help | Company docs, course notes, manuals |
| Wrong answers | Hallucination risk | Lower — if retrieval finds right chunk |
| Setup | Zero | Upload docs + use RAG tool |
| Updates | Retrain model (you can't) | Upload new file (you can) |
🎒 Where students use RAG
| Use case | What you upload |
|---|---|
| AI Study Assistant | All chapter PDFs + your notes |
| Exam prep | Past question papers |
| Project help | Project guideline PDF |
| Coaching class | Brochure + syllabus |
| Personal | Resume + job descriptions |
Brochure capstone track: "Students: AI Study Assistant" — that is a RAG project.
🛠️ Tools that do RAG (no coding needed)
| Tool | What it does |
|---|---|
| NotebookLM | Upload notes → chat + podcast + slides |
| ChatGPT | Attach files to a Project / GPT with knowledge |
| Claude | Projects with document upload |
| Gemini | Upload to Gems / notebook features |
You will build deeper systems in Module 8. For now, NotebookLM is the easiest classroom demo.
⚠️ RAG is not magic
RAG fails when:
- Wrong chunk retrieved (question too vague)
- Document is scanned badly (OCR garbage)
- You uploaded outdated file
- You never check if answer matches source
Good RAG tools show citations. If they don't — verify yourself.
Next: M7-B — How RAG Works Behind the Scenes — embeddings, chunks, and vector search in simple language.
Later: M8-A — Document-Based AI Assistants — building real assistants