A chatbot doesn't know your stuff — your school, your club, your pet. So we give it a tiny notebook, let it look up the right note first, paste that note into the prompt, and then answer. Grounded, not guessed.
Here's a notebook of 6 facts about a made-up school. Ask a question. The bot searches for the best-matching note, pastes it into its prompt, and answers from it. Compare: no notebook = a shrug; with notebook = the real answer.
Ask something to see the bot guess…
…and see it answer for real.
Pasting the note in makes the prompt longer — and you pay per token. That's the deal: a little extra cost buys a grounded, correct answer instead of a guess.
The answer is only as good as the note you grab. Hit the button: we ask about the Robotics Club but hand the bot the class-pet note instead. It won't say "hmm, that's wrong" — it'll answer with total confidence.
Retrieval is just picking the right note. A question appears with 3 notes — tap the one that actually answers it. Get 3 right to earn the badge and finish the day.
Our notebook matched on shared words. Real RAG is the same shape — search, paste, answer — but each step levels up:
Just glue the note into the prompt yourself. ✅ Dead simple. ⚠️ Only works if you already know which note to grab.
Score notes by shared words, grab the best. ✅ Automatic. ⚠️ Misses "car" vs "automobile" — different words, same meaning.
Turn every note into a list of numbers that captures meaning, then find the closest ones. ✅ Matches ideas, not just words. ⚠️ Needs a database and tuning.
Keyword search only matches shared words. This is a real embedding model (all-MiniLM) running on your device — it turns each note into a list of numbers that captures meaning, so it can match ideas that share no words at all. Load it once (~25 MB) and try to fool it!
You gave the bot a notebook. Now it looks a fact up, pastes it in, and answers from it — grounded, not guessed. That's RAG: the trick that lets a chatbot use your documents, your club, your world.