5 exercises — Master the English vocabulary for describing RAG architectures, chunking strategies, embedding models, and retrieval quality.
0 / 26 completed
1 / 26
During a RAG architecture review, a teammate says: "Our chunks are 2,000 tokens with no overlap — retrieval quality is terrible because the answer spans a chunk boundary." Which change best addresses this problem?
Chunk overlap prevents information loss at boundaries.
When a chunk boundary falls in the middle of a fact or sentence, neither chunk contains the full context needed to answer a query. Adding chunk overlap — duplicating a portion of tokens between adjacent chunks (typically 10–20% of chunk size) — ensures boundary content appears in at least one chunk.
Chunk size controls the granularity of retrieval: smaller chunks improve precision (less noise per chunk) but can miss multi-sentence context; larger chunks capture more context but dilute the signal. Overlap is the standard mitigation for boundary splitting.
Embedding dimension, distance metric, and temperature are separate concerns unrelated to chunk boundary splits.
Key vocabulary:
• chunk size — number of tokens (or characters) in each text segment fed to the embedder
• chunk overlap — number of tokens shared between consecutive chunks to avoid information loss at boundaries
• chunk boundary — the edge between two adjacent chunks, where split answers may be lost
2 / 26
A colleague explains: "We embed using text-embedding-3-large — it maps each chunk to a 3,072-dimensional vector that captures semantic similarity." What does the phrase "captures semantic similarity" mean precisely?
Embeddings are geometric representations of meaning.
An embedding model converts text into a dense floating-point vector. The key property is that semantically similar texts — texts that mean roughly the same thing even if worded differently — are mapped to vectors that are close in high-dimensional space, as measured by cosine similarity or dot product.
This allows a vector search to return the most relevant chunks for a query even when the query uses different words than the chunks. It is fundamentally different from keyword matching (BM25), which only respects lexical overlap.
The model does not store tokens verbatim nor compare character lengths; it encodes the latent meaning of the text.
Key vocabulary:
• embedding — a dense numerical vector representation of text that encodes semantic meaning
• semantic similarity — conceptual closeness between texts, regardless of exact word choice
• embedding space — the high-dimensional coordinate space in which all embedded vectors reside
• cosine similarity — the cosine of the angle between two vectors; 1.0 means identical direction (maximal similarity)
3 / 26
In an architecture discussion, the team debates vector database options. A senior engineer says: "We're on Postgres already — pgvector avoids operational overhead. But if we need ANN at billion-scale with metadata filtering, Pinecone or Weaviate might win." What does ANN mean in this context?
ANN (Approximate Nearest Neighbour) is the core trade-off in vector search at scale.
Exact nearest-neighbour search requires comparing the query vector against every stored vector — O(n) cost that becomes prohibitive at millions or billions of vectors. ANN algorithms (HNSW, IVF, LSH) build index structures that skip most comparisons, returning results that are very likely to be the closest — occasionally missing the true nearest neighbour in exchange for orders-of-magnitude speed gains.
pgvector supports both exact search and HNSW/IVF approximate indexes; at small-to-medium scale it's operationally simpler since it lives in existing Postgres. Dedicated vector databases like Pinecone and Weaviate are optimised for ANN with metadata filtering at very large scale.
Key vocabulary:
• ANN (Approximate Nearest Neighbour) — index-based fast search that trades recall precision for speed
• HNSW — Hierarchical Navigable Small World; common ANN algorithm used in pgvector, Weaviate, Qdrant
• metadata filtering — restricting vector search results by structured attributes (date, category, source)
• operational overhead — the cost of running, scaling, and maintaining a separate service or database
4 / 26
During a retrieval quality retrospective, an engineer reports: "Our precision@5 is high but our recall is low — we're returning relevant documents when we retrieve, but we're missing a lot of relevant documents entirely." Which metric best captures what they're missing?
Recall measures coverage; precision measures accuracy of what was retrieved.
The engineer describes high precision (the retrieved docs are relevant) but low recall (relevant docs that exist in the corpus are not being retrieved). A RAG system with low recall will fail to ground answers in available evidence — the LLM will hallucinate because the retrieval step never surfaces the answer.
MRR measures how highly ranked the first correct result is — useful when one correct answer is sufficient. NDCG is a ranking quality metric that weights higher positions more. Both are valuable but do not directly describe coverage of the relevant set.
Key vocabulary:
• precision@k — (relevant retrieved docs in top-k) / k; measures retrieval accuracy
• recall@k — (relevant retrieved docs in top-k) / (total relevant docs); measures retrieval coverage
• MRR (Mean Reciprocal Rank) — average of 1/rank of the first relevant result across queries
• retrieval quality — how well the retrieval step surfaces the evidence the generator needs
5 / 26
A teammate proposes a solution for handling both keyword-specific and semantic queries: "We'll run dense semantic search alongside sparse BM25, then combine the scores — hybrid retrieval usually beats pure vector search for technical documentation." When does hybrid retrieval offer the biggest advantage over pure vector search?
Hybrid retrieval compensates for the vocabulary mismatch problem in dense search.
Embedding models encode semantics but can struggle with rare, out-of-vocabulary, or highly specific tokens — product codes, error codes, commit hashes, function names. BM25 (a sparse TF-IDF-style algorithm) excels at exact term matching regardless of how rare the term is.
Hybrid retrieval — combining dense (semantic) and sparse (BM25/keyword) scores, often via reciprocal rank fusion (RRF) — gives the best of both: semantic understanding for natural-language queries and exact recall for technical identifiers.
Pure vector search is sufficient when queries are fully natural-language and the domain vocabulary is well-represented in the embedding model's training data.
Key vocabulary:
• dense retrieval — vector-similarity-based search using embeddings
• sparse retrieval / BM25 — keyword-frequency-based retrieval; strong for exact term matching
• hybrid retrieval — combining dense and sparse scores, often with reciprocal rank fusion
• vocabulary mismatch — when the query uses terms the embedding model has not learned to associate correctly
6 / 26
Reviewer: 'The prompt template isn't utilizing the retrieved context effectively. It's just injecting the raw document text – we need to guide the LLM to synthesize information from multiple chunks. Consider adding instructions like, 'Based on the following documents...''. What is prompt engineering in this scenario?
Prompt engineering focuses on guiding the LLM's output. It involves designing prompts that effectively utilize the retrieved context—in this case, by instructing the model to synthesize information from multiple chunks rather than simply inserting raw text. The reviewer's comment highlights a crucial step in RAG pipeline development: directing the LLM to process the retrieved data intelligently.
7 / 26
Liam (Lead Engineer) comments on a PR draft: "This RAG pipeline uses a single embedding model. It's great for initial exploration, but we'll quickly hit scaling issues with larger datasets. We need to consider sharding the embeddings and potentially using different models for different query types."
The question presents a realistic code review scenario. Liam's comment highlights the limitations of a single embedding model at scale. Option C is correct because it proposes investigating scaling strategies - this demonstrates understanding of the need for future-proofing and acknowledges potential technical challenges without demanding an immediate, drastic change. Options A and B are overly prescriptive; option D is incorrect due to Liam's concerns about scalability.
8 / 26
"The LLM is generating responses that are factually inconsistent with the retrieved documents. We suspect 'hallucination.' To mitigate this, we should focus on increasing the context window size and providing more explicit instructions to the model about how to synthesize information from multiple chunks."
This scenario addresses a common problem with RAG pipelines: hallucination. Option B is incorrect because it dismisses a known issue. Reducing the context window size *can* help reduce hallucinations by limiting the LLM's exposure to potentially misleading information; however, increasing the context window and providing explicit instructions (as suggested) are more effective long-term solutions for guiding the synthesis process.
9 / 26
"During a Slack discussion, Sarah asks: 'What does it mean to say we're using an ANN index for our vector database?'"
This question tests understanding of ANN (Approximate Nearest Neighbor) indexing. It's a crucial concept for efficient retrieval from large vector databases. Option C is correct because it accurately describes how ANN works – providing approximate results quickly rather than exhaustively searching all vectors. Options A and B are misinterpretations, and option D relates to data compression.
10 / 26
"The team's RAG pipeline is generating a high number of irrelevant results. The precision@5 metric is good – we're retrieving highly relevant documents when we do – but recall is low: we are missing many relevant documents entirely. What's the most likely cause?"
This scenario highlights a classic RAG recall problem. Low recall indicates that the system isn't retrieving *all* relevant information. A small chunk size often leads to insufficient context within each retrieved document, preventing the LLM from synthesizing accurate responses. Options A and B are possible contributing factors, but the core issue is the chunk size.
11 / 26
"David (Data Scientist) proposes: 'Let's use a hybrid retrieval system – run dense semantic search alongside sparse BM25. Then, combine the scores to get the best of both worlds.' What is the primary benefit of this approach?"
The question assesses understanding of hybrid retrieval. Option C is correct because it explains the core advantage: combining the strengths of BM25 (good at keyword matching) and semantic search (better at capturing meaning). Options A and B are incorrect—BM25 isn't always superior, and dense semantic search can be faster. Option D is a simplification – post-processing is often necessary to combine scores effectively.
12 / 26
Liam (Lead Engineer) comments on a PR draft: "This RAG pipeline uses a single embedding model. It's great for initial exploration, but we'll quickly hit scaling issues with larger datasets. We need to consider sharding the embeddings and potentially using different models for different query types."
The question presents a realistic code review scenario. Liam's comment highlights the limitations of a single embedding model at scale. Option C is correct because it proposes investigating scaling strategies - this demonstrates understanding of the need for future-proofing and acknowledges potential technical challenges without demanding an immediate, drastic change. Options A and B are overly prescriptive; option D is incorrect due to Liam's concerns about scalability.
13 / 26
"The LLM is generating responses that are factually inconsistent with the retrieved documents. We suspect 'hallucination.' To mitigate this, we should focus on increasing the context window size and providing more explicit instructions to the model about how to synthesize information from multiple chunks."
This scenario addresses a common problem with RAG pipelines: hallucination. Option B is incorrect because it dismisses a known issue. Reducing the context window size *can* help reduce hallucinations by limiting the LLM's exposure to potentially misleading information; however, increasing the context window and providing explicit instructions (as suggested) are more effective long-term solutions for guiding the synthesis process.
14 / 26
"During a Slack discussion, Sarah asks: 'What does it mean to say we're using an ANN index for our vector database?'"
This question tests understanding of ANN (Approximate Nearest Neighbor) indexing. It's a crucial concept for efficient retrieval from large vector databases. Option C is correct because it accurately describes how ANN works – providing approximate results quickly rather than exhaustively searching all vectors. Options A and B are misinterpretations, and option D relates to data compression.
15 / 26
"The team's RAG pipeline is generating a high number of irrelevant results. The precision@5 metric is good – we're retrieving highly relevant documents when we do – but recall is low: we are missing many relevant documents entirely. What's the most likely cause?"
This scenario highlights a classic RAG recall problem. Low recall indicates that the system isn't retrieving *all* relevant information. A small chunk size often leads to insufficient context within each retrieved document, preventing the LLM from synthesizing accurate responses. Options A and B are possible contributing factors, but the core issue is the chunk size.
16 / 26
"David (Data Scientist) proposes: 'Let's use a hybrid retrieval system – run dense semantic search alongside sparse BM25. Then, combine the scores to get the best of both worlds.' What is the primary benefit of this approach?"
The question assesses understanding of hybrid retrieval. Option C is correct because it explains the core advantage: combining the strengths of BM25 (good at keyword matching) and semantic search (better at capturing meaning). Options A and B are incorrect—BM25 isn't always superior, and dense semantic search can be faster. Option D is a simplification – post-processing is often necessary to combine scores effectively.
17 / 26
Liam (Lead Engineer) comments on a PR draft: "This RAG pipeline uses a single embedding model. It's great for initial exploration, but we'll quickly hit scaling issues with larger datasets. We need to consider sharding the embeddings and potentially using different models for different query types."
The question presents a realistic code review scenario. Liam's comment highlights the limitations of a single embedding model at scale. Option C is correct because it proposes investigating scaling strategies - this demonstrates understanding of the need for future-proofing and acknowledges potential technical challenges without demanding an immediate, drastic change. Options A and B are overly prescriptive; option D is incorrect due to Liam's concerns about scalability.
18 / 26
"The LLM is generating responses that are factually inconsistent with the retrieved documents. We suspect 'hallucination.' To mitigate this, we should focus on increasing the context window size and providing more explicit instructions to the model about how to synthesize information from multiple chunks."
This scenario addresses a common problem with RAG pipelines: hallucination. Option B is incorrect because it dismisses a known issue. Reducing the context window size *can* help reduce hallucinations by limiting the LLM's exposure to potentially misleading information; however, increasing the context window and providing explicit instructions (as suggested) are more effective long-term solutions for guiding the synthesis process.
19 / 26
"During a Slack discussion, Sarah asks: 'What does it mean to say we're using an ANN index for our vector database?'"
This question tests understanding of ANN (Approximate Nearest Neighbor) indexing. It's a crucial concept for efficient retrieval from large vector databases. Option C is correct because it accurately describes how ANN works – providing approximate results quickly rather than exhaustively searching all vectors. Options A and B are misinterpretations, and option D relates to data compression.
20 / 26
"The team's RAG pipeline is generating a high number of irrelevant results. The precision@5 metric is good – we're retrieving highly relevant documents when we do – but recall is low: we are missing many relevant documents entirely. What's the most likely cause?"
This scenario highlights a classic RAG recall problem. Low recall indicates that the system isn't retrieving *all* relevant information. A small chunk size often leads to insufficient context within each retrieved document, preventing the LLM from synthesizing accurate responses. Options A and B are possible contributing factors, but the core issue is the chunk size.
21 / 26
"David (Data Scientist) proposes: 'Let's use a hybrid retrieval system – run dense semantic search alongside sparse BM25. Then, combine the scores to get the best of both worlds.' What is the primary benefit of this approach?"
The question assesses understanding of hybrid retrieval. Option C is correct because it explains the core advantage: combining the strengths of BM25 (good at keyword matching) and semantic search (better at capturing meaning). Options A and B are incorrect—BM25 isn't always superior, and dense semantic search can be faster. Option D is a simplification – post-processing is often necessary to combine scores effectively.
22 / 26
Liam (Lead Engineer) comments on a PR draft: "This RAG pipeline uses a single embedding model. It's great for initial exploration, but we'll quickly hit scaling issues with larger datasets. We need to consider sharding the embeddings and potentially using different models for different query types."
The question presents a realistic code review scenario. Liam's comment highlights the limitations of a single embedding model at scale. Option C is correct because it proposes investigating scaling strategies - this demonstrates understanding of the need for future-proofing and acknowledges potential technical challenges without demanding an immediate, drastic change. Options A and B are overly prescriptive; option D is incorrect due to Liam's concerns about scalability.
23 / 26
"The LLM is generating responses that are factually inconsistent with the retrieved documents. We suspect 'hallucination.' To mitigate this, we should focus on increasing the context window size and providing more explicit instructions to the model about how to synthesize information from multiple chunks."
This scenario addresses a common problem with RAG pipelines: hallucination. Option B is incorrect because it dismisses a known issue. Reducing the context window size *can* help reduce hallucinations by limiting the LLM's exposure to potentially misleading information; however, increasing the context window and providing explicit instructions (as suggested) are more effective long-term solutions for guiding the synthesis process.
24 / 26
"During a Slack discussion, Sarah asks: 'What does it mean to say we're using an ANN index for our vector database?'"
This question tests understanding of ANN (Approximate Nearest Neighbor) indexing. It's a crucial concept for efficient retrieval from large vector databases. Option C is correct because it accurately describes how ANN works – providing approximate results quickly rather than exhaustively searching all vectors. Options A and B are misinterpretations, and option D relates to data compression.
25 / 26
"The team's RAG pipeline is generating a high number of irrelevant results. The precision@5 metric is good – we're retrieving highly relevant documents when we do – but recall is low: we are missing many relevant documents entirely. What's the most likely cause?"
This scenario highlights a classic RAG recall problem. Low recall indicates that the system isn't retrieving *all* relevant information. A small chunk size often leads to insufficient context within each retrieved document, preventing the LLM from synthesizing accurate responses. Options A and B are possible contributing factors, but the core issue is the chunk size.
26 / 26
"David (Data Scientist) proposes: 'Let's use a hybrid retrieval system – run dense semantic search alongside sparse BM25. Then, combine the scores to get the best of both worlds.' What is the primary benefit of this approach?"
The question assesses understanding of hybrid retrieval. Option C is correct because it explains the core advantage: combining the strengths of BM25 (good at keyword matching) and semantic search (better at capturing meaning). Options A and B are incorrect—BM25 isn't always superior, and dense semantic search can be faster. Option D is a simplification – post-processing is often necessary to combine scores effectively.
What will I practise in "RAG Pipeline Vocabulary — LLM App Development"?
5 advanced exercises on RAG vocabulary — chunking strategies, embeddings, vector database trade-offs, retrieval quality metrics, and hybrid retrieval.
How many exercises are in this module?
This module has 26 multiple-choice exercises, each with instant feedback and a full explanation of the correct answer.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
Do I need to create an account to do these exercises?
No account is required. Just click an option to answer — your score for this session is tracked automatically in the progress bar above.
What happens if I choose the wrong answer?
You'll immediately see which answer was correct, plus a full explanation covering the vocabulary and reasoning behind it — mistakes are where most of the learning happens.
Can I retry the exercises if I want a higher score?
Yes — use the "Try again" button on the results screen to reset and go through all the questions again.
Is my progress saved if I close the page?
No. Progress is tracked only for your current visit; reloading or leaving the page resets the counter. This keeps the exercise simple and account-free.
Where can I find more LLM App Development exercises?
Browse the full LLM App Development hub for related drills, or check the "Next up" link below to continue with a connected topic.
How is this different from reading an article on the same topic?
Articles explain vocabulary and concepts in prose; this exercise tests and reinforces that vocabulary through active recall with immediate feedback — the two work best together.
Who writes these exercises?
Every exercise is written by the CoderSlingo team, drawing on real workplace English used in IT roles, then reviewed for accuracy and clarity.