GeekHub Learn
Module

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:

  1. Cutoff: training data has a date. Anything after that does not exist for the model.
  2. 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.

Visualize it

A side-by-side diagram: "Without RAG" arrow from question to hallucinated answer; "With RAG" arrow goes through a "Retrieve" box, then "Augment", then "Generate", landing on a grounded answer.

Try it now

Ask ChatGPT a question about a niche topic only documented on one website. Note its hedging. Now copy a paragraph from that website into the prompt and ask again. Watch confidence and accuracy rise.

Hands-on lab

Take any 200-word paragraph from a website. Write a question whose answer is only in that text. Without the paragraph, ask the LLM. With the paragraph (pasted into the prompt), ask again. Document the difference.

Try it now

Why is RAG better than waiting for the next model retrain to absorb your docs?

Common mistakes

  • Calling everything that augments a prompt "RAG" (RAG specifically uses retrieval)
  • Confusing RAG with fine-tuning (different mechanism, different cost shape)
  • Believing larger context windows make RAG obsolete (they reduce, not eliminate, the need)

Debugging tip

If your RAG answers hallucinate, the retrieval probably failed: wrong chunk, missing chunk, irrelevant chunk. The model is rarely the culprit.

Challenge

Write a one-page explanation of RAG for a non-engineer manager who is deciding whether to fund a RAG project.

Where this shows up

  • Internal company Q&A bots
  • Legal and medical document assistants
  • Code repo "ask the codebase" tools
  • Customer support backed by product docs

From the field

In 2026 over 70% of enterprise AI projects are some flavor of RAG. The skill is widely demanded, often poorly executed, and a clear differentiator.

Recap

RAG injects relevant outside knowledge into the prompt at query time. It solves the knowledge cutoff and the privacy gap that pure LLMs cannot fix on their own.


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. 1. RAG augments prompts with

Finished lesson 7.1?

Mark complete to update your module progress and unlock the streak.

Loading