RAG
Retrieval-augmented generation, or RAG, is a way of letting a language model answer from your own documents instead of only from what it memorized in training. Before the model answers, a search step finds the passages most relevant to the question, usually by vector search over documents that were split into chunks ahead of time, and pastes them into the prompt as context. The model then writes its answer based on that text and can cite it. It’s like an open-book exam. RAG keeps answers current and grounded without retraining the model, but it’s only as good as its retrieval: badly split chunks or a stale index lead to confident wrong answers.
In this lesson: A pipeline with failure toggles: bad chunking, stale index.