Brain labTry it → read → next · ~8 min

Tutorials · Chapter C (3/4) · ~8 min

RAG — look it up, then answer

Try it → see it → read → next

RAG makes the AI fetch relevant notes first, then write an answer from them.

Try yourself

Playground

RAG: look it up, then answer

Ask with RAG on, then toggle RAG off to catch guessing.

School rulesPhones stay in bags during class.
Cookie recipeBake cookies at 180°C for 12 minutes.
Store hoursWe open 9am–8pm every day.

Recap

What you just did

You compared closed-book guessing with RAG: retrieve relevant docs, then generate an answer grounded in them.

Teach

How it works

See it

RAG in one glance
  1. QuestionYour ask
  2. RetrieveFind docs
  3. StuffAdd to prompt
  4. AnswerWith evidence

Look up trusted notes first — then answer with that context

See it is RAG in one glance: question → retrieve docs → stuff into the prompt → answer with evidence. When a policy changes, update the docs — you don’t always retrain the whole model.

Use it

When you'd use this

  • Company FAQ / employee handbook bots
  • Personal note Q&A
  • Product docs that change every sprint

Watch out

Watch out

If retrieval pulls the wrong chunk, the answer can sound right and still be wrong. Bad backpack → bad trip.

Try next

Try this next

Ask a question with RAG off (pure guess) vs on (with a short note attached). Spot where the facts come from.