RAG Pipeline Design Questions with Answers

29 practice questions on RAG Pipeline Design (Generative AI & LLMs) with answers and step-by-step solutions. Try 10 samples below, then practise all 29 free in the AptiNest app.

Sample questions

Question 1Easy

In a RAG system, a re-ranker usually:

  1. Splits documents into chunks
  2. Embeds all documents again
  3. Re-scores top candidates
  4. Replaces the LLM

Answer: C. Re-scores top candidates

Explanation

A cross-encoder reads query and passage together, improving ordering of the first-stage results.

Step-by-step solution

  1. The retriever returns a list of candidate chunks.
  2. A re-ranker reads the query with each candidate.
  3. It re-scores and reorders them, keeping the best few.

Why the other options are wrong

  • A. Chunking happens at indexing time.
  • B. Re-ranking works on candidates; it does not rebuild embeddings.
  • D. The LLM still writes the answer.

Tip: Re-ranker = second, sharper look at the short list.

Question 2Easy

The "retrieval" step in RAG:

  1. Finds relevant text
  2. Trains the model's weights
  3. Generates images
  4. Deletes old documents

Answer: A. Finds relevant text

Explanation

Retrieved passages are inserted into the prompt to ground the answer.

Step-by-step solution

  1. The user's question is embedded.
  2. The retriever searches the index for the most relevant chunks.
  3. Those chunks are later added to the prompt.

Why the other options are wrong

  • B. RAG retrieval does not change model weights.
  • C. Retrieval fetches text, not images.
  • D. Deleting documents is index maintenance.

Tip: Bad retrieval, bad answer.

Question 3Easy

Splitting long documents into smaller passages before embedding is called:

  1. Pruning
  2. Chunking
  3. Sharding keys
  4. Batching tokens

Answer: B. Chunking

Explanation

Chunks are the retrievable units in a RAG index.

Step-by-step solution

  1. Long documents are too big to embed as one useful vector.
  2. They are split into smaller passages.
  3. This is called chunking.

Why the other options are wrong

  • A. Pruning removes model weights.
  • C. Sharding splits a database across machines.
  • D. Batching groups inputs for processing.

Tip: Chunk = the unit you retrieve.

Question 4Easy

Why ask the model to cite which retrieved chunk supports each claim?

  1. It hides sources
  2. It speeds up retrieval
  3. It makes answers shorter
  4. To make answers verifiable

Answer: D. To make answers verifiable

Explanation

Citations make grounding visible and auditable.

Step-by-step solution

  1. The model links each claim to the chunk it came from.
  2. Users or reviewers can open that source and check.
  3. Unsupported claims become easy to spot.

Why the other options are wrong

  • A. Citations reveal sources rather than hide them.
  • B. Citations are produced after retrieval; they do not speed it up.
  • C. Citations add text; they do not shorten answers.

Tip: Cite to make answers checkable.

Question 5Medium

Retrieving 20 chunks and putting all of them in the prompt, instead of the best 4, often:

  1. Adds noise and cost
  2. Removes hallucinations
  3. Reduces token usage
  4. Always improves accuracy

Answer: A. Adds noise and cost

Explanation

Irrelevant chunks can distract the model and raise latency and cost; re-ranking helps pick the best few.

Step-by-step solution

  1. The best 4 chunks hold most of the useful information.
  2. 16 extra chunks are mostly less relevant.
  3. They add noise that can distract the model, plus more tokens and cost.

Why the other options are wrong

  • B. More chunks do not remove hallucination.
  • C. More chunks mean more tokens.
  • D. Extra noise can lower accuracy.

Tip: Fewer, better chunks beat many mediocre ones.

Question 6Medium

Splitting documents along headings and paragraphs rather than fixed character counts is called:

  1. Structural chunking
  2. Tokenisation
  3. Random chunking
  4. Quantisation

Answer: A. Structural chunking

Explanation

Respecting natural boundaries keeps chunks coherent.

Step-by-step solution

  1. Documents have natural units: sections, headings, paragraphs.
  2. Splitting at those boundaries keeps each chunk coherent.
  3. This is structural (structure-aware) chunking.

Why the other options are wrong

  • B. Tokenisation splits text into tokens for the model.
  • C. Random splitting ignores structure.
  • D. Quantisation compresses vectors.

Tip: Split where the author split.

Question 7Medium

Prompt injection through retrieved documents means:

  1. Sources carry hostile instructions
  2. The index is corrupted by disk errors
  3. Users type too fast
  4. Embeddings overflow

Answer: A. Sources carry hostile instructions

Explanation

Treat retrieved content as data, not instructions, and limit what actions outputs can trigger.

Step-by-step solution

  1. Retrieved documents become part of the prompt.
  2. An attacker can plant instructions in a document or web page.
  3. The model may follow them: indirect prompt injection.

Why the other options are wrong

  • B. Disk corruption is a storage fault, not injection.
  • C. Typing speed is irrelevant.
  • D. Embeddings do not overflow in this way.

Tip: Retrieved text is data, not orders.

Question 8Medium

Which is a key advantage of RAG over fine-tuning for company knowledge?

  1. It never needs any data
  2. It removes all latency
  3. It changes model weights faster
  4. Sources can be updated and cited

Answer: D. Sources can be updated and cited

Explanation

Updating documents updates answers, and retrieved passages can be shown as citations.

Step-by-step solution

  1. Company knowledge changes often.
  2. With RAG, updating documents updates answers at once.
  3. Retrieved passages can be shown as citations.

Why the other options are wrong

  • A. RAG needs documents to retrieve from.
  • B. Retrieval adds some latency.
  • C. RAG does not change weights at all.

Tip: RAG: updatable and citable.

Question 9Hard

A chatbot's documents change weekly. What keeps answers current with least effort?

  1. Use a larger context window
  2. Re-index changed files
  3. Fine-tune the model weekly
  4. Increase the temperature

Answer: B. Re-index changed files

Explanation

RAG's knowledge lives in the index, so updating the index updates answers.

Step-by-step solution

  1. In RAG, knowledge lives in the index, not the model.
  2. When files change, re-embed and re-index just those files.
  3. Answers reflect the update immediately.

Why the other options are wrong

  • A. A bigger window does not bring in new documents.
  • C. Weekly fine-tuning is slow, costly and still lags.
  • D. Temperature does not add knowledge.

Tip: Docs changed? Re-index, do not retrain.

Question 10Hard

Chunks that are far too large tend to:

  1. Improve precision in every case
  2. Dilute relevance
  3. Prevent hallucination entirely
  4. Reduce storage costs to zero

Answer: B. Dilute relevance

Explanation

Big chunks mix topics, lowering similarity scores and filling the prompt with irrelevant text.

Step-by-step solution

  1. A huge chunk contains many topics.
  2. Its single embedding becomes an average of all of them.
  3. Similarity to a specific query drops, and the prompt fills with irrelevant text.

Why the other options are wrong

  • A. Large chunks usually lower precision.
  • C. Chunk size cannot remove hallucination.
  • D. Storage cost never drops to zero.

Tip: Too big: blurred meaning.

Practise all 29 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all Generative AI & LLMs topics · All topics