The problem RAG solves
Ask ChatGPT about your company's internal handbook. It will guess. Confidently. Wrongly. RAG is the fix. This is the lesson where that clicks.
A brilliant new employee on day one knows the world but not your company. Hand them the employee handbook before each meeting and they will sound like a 5-year veteran. RAG hands the handbook to the LLM right before each answer.
LLMs have two knowledge limits:
- Cutoff: training data has a date. Anything after that does not exist for the model.
- Privacy: the model was not trained on your internal docs, your PDFs, your DB.
RAG fixes both by retrieving relevant snippets from a knowledge source at inference time and adding them to the prompt. The model still does the answering. The knowledge is just-in-time.
A naive prompt: "What is GeekHub's reputation algorithm?" -> LLM guesses.
A RAG prompt: "Use the following snippets from GeekHub's docs to answer. [snippet1] [snippet2] Question: What is GeekHub's reputation algorithm?" -> LLM grounds its answer in the snippets.
The retrieval step picks the most relevant snippets. The augmentation step packs them into the prompt. The generation step answers.
Quick recall
3 prompts · think before you flip
Prompt 1 of 3
What two LLM limits does RAG solve?
Quiz time
1 question · tap an answer to check it
1. RAG augments prompts with
Finished lesson 7.1?
Mark complete to update your module progress and unlock the streak.