AlgoPlus//machine learning / rag
Read the theory

Retrieval-Augmented Generation

Fetch relevant documents from a vector DB, then answer grounded in them.

Phase
Retrieved
Legend
Query
Retrieved chunk
AI Tutor Workspace
In a nutshell
A language model only knows what was in its training text, so it can't cite your private documents or this week's news, and it may make things up. Retrieval-Augmented Generation fixes that: it turns the question into an embedding — a list of numbers capturing its meaning — searches a vector store of your documents for the chunks closest in meaning, pastes those chunks into the prompt, and lets the model answer grounded in that real, retrieved text. To update what it knows, you just update the documents — no retraining.
Ready
Press play to begin the cinematic walkthrough.
Open-book exam for the model. Instead of trusting its memory, look up the relevant pages first and let it answer from those — fresh, specific, and far less prone to making things up.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Retrieval-Augmented Generation.