Imagine a new employee answering customer questions. Without a handbook, they rely on memory. With RAG, they first look up the relevant pages in the approved handbook, then write an answer using those pages.

The four steps

  1. Prepare: collect trusted documents and split them into useful passages.
  2. Find: turn a question into a search and retrieve likely relevant passages.
  3. Answer: give the question plus retrieved passages to the language model.
  4. Check: show citations or source snippets so a person can verify the answer.

When RAG helps

RAG is useful when answers must depend on a specific, changing body of information: product manuals, company policies, course notes or a catalogue. It can be updated by changing the source collection rather than retraining the whole model.

What RAG does not solve

FailureWhy it happensBetter practice
Wrong document retrievedSearch found similar words, not the right meaningImprove chunking, metadata and queries
Correct source, wrong answerThe model misread or combined passages badlyRequire quotes and verify them
Missing current informationThe source collection was not updatedTrack document dates and owners
Private data leakagePermissions were ignored during retrievalEnforce access before search, not after

A no-code mental test

Before building anything, take ten realistic questions and identify the exact source passage each answer needs. If humans cannot find a clear source, RAG will not magically create one. Better documents often improve the system more than a more complex model.

RAG in one lineSearch trusted material first; generate an answer second; keep the source visible for checking.