Retrieval-Augmented Generation
Debug a RAG answer, trace claims to chunks, and break the pipeline on purpose to see how retrieval failures become hallucinations.
The stumper
A confident answer with no retrieval versus the same question with citations.
Language models are fluent, confident, and sometimes wrong. They do not know what they were not trained on, and they do not automatically know what is true today.
RAG grounds generation in retrieved evidence. The pipeline ingests, chunks, embeds, retrieves, reranks, generates, and cites. Every stage can fail, and most failures show up as irrelevant or incomplete answers.
The learner’s job is to debug the pipeline: inspect the chunks, check the citations, vary chunk size and top-k, and notice when a fluent answer is not supported by evidence.
Try it before you read on
Open the Lab tab. Change a parameter, break something, and form a hypothesis before reading the explanation.
Checkpoint
3 questions. Explanations appear after submission.
1. What does the retrieval step contribute to RAG?
2. A RAG answer is fluent but unsupported by the retrieved chunks. What is the likely problem?
3. Why does chunk size matter?