5 exercises — what RAG solves, chunking strategy, semantic search vs. keyword search, reranking, and diagnosing grounded-but-wrong answers.
0 / 5 completed
1 / 5
A colleague asks: "Why do we need RAG if the LLM already knows so much?" What is the most accurate explanation of what RAG solves?
RAG solves two fundamental limitations of a plain LLM: its knowledge is frozen at training time (it doesn't know about events or documents created afterward), and it cannot know about private data (your company's internal wiki, a customer's specific account history) that was never part of its training corpus.
Rather than retraining or fine-tuning the model every time new information appears (expensive, slow), RAG retrieves relevant snippets from an external, easily-updatable knowledge source at the moment of the query, and inserts them directly into the prompt's context — the model then answers using both its general language ability and this freshly retrieved, specific information.
This is why RAG is described as "grounding" a model's answers: it anchors the response in retrieved facts rather than purely the model's internal (and sometimes outdated or hallucinated) knowledge.
2 / 5
A RAG pipeline design document describes "chunking the documents before embedding them." What does chunking mean, and why is it necessary?
Chunking is one of the most consequential design decisions in a RAG pipeline, because retrieval quality depends heavily on how documents are split.
Why it's necessary: a whole 50-page document embedded as a single vector would produce a very generic, "averaged out" representation that poorly matches specific queries about one small section of it. Splitting into smaller chunks lets each chunk's embedding closely represent a focused piece of content, so retrieval can find the specific, relevant passage rather than a whole document that's only partially relevant.
Chunking strategy tradeoffs: chunks too small lose surrounding context (a sentence pulled out of its paragraph may be ambiguous); chunks too large dilute relevance and waste context window space with irrelevant surrounding text. Common strategies include fixed-size chunking with overlap (so context isn't abruptly cut at chunk boundaries) and structure-aware chunking (splitting along natural document boundaries like headings or paragraphs).
3 / 5
A technical spec mentions storing document chunks in a "vector store" and performing "semantic search" to retrieve relevant chunks. How does this differ from a traditional keyword search?
The shift from keyword search to semantic search is the core innovation that makes RAG's retrieval step effective for natural-language questions.
Keyword search limitation example: a user asks "how do I cancel my subscription?" but the relevant help doc is titled "Ending your membership" — a keyword search for "cancel subscription" might completely miss it, since none of those exact words appear in the doc.
Semantic search instead converts both the query and every document chunk into embeddings — vectors of numbers positioned in a high-dimensional space such that semantically similar text ends up close together, regardless of exact wording. "Cancel my subscription" and "ending your membership" would produce nearby vectors because they express similar meaning, so semantic search retrieves the relevant chunk even without matching keywords.
Many production RAG systems use hybrid search — combining semantic and keyword search — since keyword matching still excels at exact terms like product codes, error messages, or proper nouns that embeddings can sometimes blur.
4 / 5
A team reviewing RAG output quality notices retrieval returns 20 candidate chunks, but only the top 3 are actually passed to the LLM after a "reranking" step. What does the reranker do, and why is it a separate step from the initial retrieval?
Reranking exists because there's a real tradeoff between retrieval speed and retrieval accuracy. The initial retrieval step (using vector similarity search) is fast enough to scan potentially millions of chunks, but the similarity metric it uses (often simple vector distance) is a rougher approximation of true relevance than a more sophisticated model could produce.
Two-stage retrieval pipeline: 1. Initial retrieval (recall-focused) — quickly narrow millions of chunks down to a manageable candidate set (e.g. top 20-50) using fast vector similarity search, prioritising not missing relevant results (recall) over perfect ordering 2. Reranking (precision-focused) — apply a more computationally expensive model (a "cross-encoder," which jointly considers the query and each candidate together, rather than comparing pre-computed vectors independently) to re-score just this smaller candidate set with much higher accuracy, then keep only the top few for the LLM's context
This pattern — cheap and broad, then expensive and precise — is a common design principle across information retrieval systems generally, not unique to RAG.
5 / 5
A postmortem for a RAG-powered support bot notes: "The bot confidently answered a question about our refund policy using an outdated document that should have been removed from the index months ago." How would you describe this failure using precise RAG vocabulary, and what's the fix?
Precisely distinguishing this failure mode matters enormously for choosing the right fix — conflating it with "hallucination" (the model inventing information not present in its context at all) would lead a team toward the wrong remedy (trying to fix the model's behaviour) instead of the right one (fixing the data pipeline).
Key distinction:hallucination — the model generates a plausible-sounding but fabricated answer with no supporting source. Grounded but wrong — the model faithfully summarised or used a real retrieved document, but that document itself was incorrect or outdated. The second case is a data/pipeline quality problem, not a model reasoning problem.
Vocabulary for describing the fix:index freshness / re-indexing pipeline — the process that keeps the vector store synchronised with the current state of source documents, typically triggered on document update/deletion, not just document creation. A robust RAG system needs this maintenance pipeline treated as seriously as the retrieval and generation logic itself — a perfectly designed retrieval and reranking pipeline is worthless if it's confidently retrieving stale, deleted, or superseded content.
What will I practice in "RAG Vocabulary — AI Prompting English Exercise"?
This is an AI Prompting exercise set. It walks through 5 scenario-based multiple-choice questions built around real usage of AI Prompting terminology that IT professionals encounter on the job.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to complete with no account, sign-up, or paywall.
How many questions are in this exercise?
This set contains 5 questions. Each one shows immediate feedback and a detailed explanation after you answer, so you learn the correct usage right away rather than waiting for a final score.
Do I need prior experience to complete this exercise?
No prior experience is required. Each question includes a full explanation covering the reasoning behind the correct answer, so the exercise itself teaches the AI Prompting vocabulary as you go.
Can I retry the exercise if I get questions wrong?
Yes — use the "Try again" button on the results screen to reset your answers and go through all the questions again. There is no limit on attempts.
Is my progress saved?
Your answers and score for the current session are tracked in the browser as you go. No account or login is needed, and there is nothing to install.
What if I don't understand a term used in a question?
Read the explanation shown after you answer each question — it breaks down the correct term in plain English with a real-world example. You can also check the site Glossary for quick definitions.
How is this different from reading a blog article on the topic?
Exercises like this one are interactive drills that test and reinforce specific vocabulary through multiple-choice questions, while blog articles explain concepts in prose. Practising here after reading builds active recall, not just passive recognition.
Where can I find more AI Prompting exercises?
See the AI Prompting exercises hub for the full set of related pages, or browse all exercise categories from the main Exercises index.
Can I use this exercise to prepare for a technical interview?
Yes — AI Prompting vocabulary comes up often in technical discussions and interviews. Pair this exercise with our dedicated Interview Preparation section for role-specific practice.