Quiz: Introduction to RAG
Test your knowledge about RAG fundamentals, LLM limitations, and the RAG architecture.
30 questions - Click on each question to reveal the correct answer.
Question 1
What does RAG stand for?
a) Rapid Automated Generation
b) Retrieval-Augmented Generation
c) Random Access Generation
d) Response Augmented Gateway
Show Answer
Correct Answer: b
RAG stands for Retrieval-Augmented Generation, a technique that combines information retrieval with LLM generation.
Question 2
Which analogy best describes RAG?
a) A closed-book exam
b) An open-book exam
c) Memorizing a textbook
d) Writing from imagination
Show Answer
Correct Answer: b
RAG is like an open-book exam - the LLM can "look up" relevant information before answering, rather than relying solely on what it memorized during training.
Question 3
What is the main purpose of RAG?
a) To replace LLMs entirely
b) To make LLMs faster
c) To enhance LLMs with external knowledge
d) To reduce LLM costs
Show Answer
Correct Answer: c
RAG enhances LLMs by providing them with relevant information retrieved from external knowledge sources, improving accuracy and enabling access to private/current data.
Question 4
Which of these is NOT a problem that RAG solves?
a) Hallucinations
b) Knowledge cutoff
c) Slow inference speed
d) No access to private data
Show Answer
Correct Answer: c
RAG does not primarily address inference speed. In fact, RAG can add latency due to the retrieval step. RAG solves hallucinations, knowledge cutoff, and private data access.
Question 5
What causes LLM hallucinations?
a) Server overload
b) LLMs predict tokens without fact verification
c) Too much training data
d) Network latency
Show Answer
Correct Answer: b
LLMs are probability machines that predict the next token based on patterns, not fact databases. They can confidently generate plausible-sounding but false information.
Question 6
How many main phases does a RAG system have?
a) 2
b) 3
c) 4
d) 5
Show Answer
Correct Answer: b
A RAG system has three main phases: Indexing (offline), Retrieval (online), and Generation (online).
Question 7
Which phase of RAG happens offline (before user queries)?
a) Retrieval
b) Generation
c) Indexing
d) Response
Show Answer
Correct Answer: c
The Indexing phase happens offline - documents are loaded, chunked, embedded, and stored in a vector database before any user queries.
Question 8
What is the purpose of text chunking in RAG?
a) To compress documents
b) To encrypt documents
c) To split documents into smaller, retrievable units
d) To translate documents
Show Answer
Correct Answer: c
Chunking splits large documents into smaller units for more precise retrieval and to fit within LLM context windows.
Question 9
What are embeddings in the context of RAG?
a) HTML elements
b) Database indexes
c) Dense vector representations of text
d) Encryption keys
Show Answer
Correct Answer: c
Embeddings are dense vector representations that capture the semantic meaning of text. Similar texts have similar vectors.
Question 10
What type of database is specifically designed for storing embeddings?
a) Relational database
b) Document database
c) Vector database
d) Graph database
Show Answer
Correct Answer: c
Vector databases are specifically designed for storing and efficiently searching high-dimensional vectors (embeddings).
Question 11
What does similarity search do in RAG?
a) Finds exact text matches
b) Finds documents with similar vector representations
c) Compares file sizes
d) Sorts documents alphabetically
Show Answer
Correct Answer: b
Similarity search finds documents whose vector representations are close to the query vector, indicating semantic similarity.
Question 12
What is a typical chunk size in RAG systems?
a) 10-50 characters
b) 100-200 characters
c) 500-1500 characters
d) 10000+ characters
Show Answer
Correct Answer: c
Typical chunk sizes range from 500-1500 characters, balancing retrieval precision with enough context for understanding.
Question 13
RAG is best suited for which type of task?
a) Creative writing
b) Casual conversation
c) Knowledge-intensive queries
d) Code compilation
Show Answer
Correct Answer: c
RAG excels at knowledge-intensive tasks where accurate, verifiable information is needed, such as Q&A over documents.
Question 14
When should you prefer fine-tuning over RAG?
a) When you need access to private data
b) When you need real-time information
c) When you want to change the model's behavior/style
d) When you need source citations
Show Answer
Correct Answer: c
Fine-tuning is better for changing how the model behaves (style, tone, format), while RAG is better for adding knowledge.
Question 15
What happens during the Generation phase of RAG?
a) Documents are indexed
b) Embeddings are created
c) The LLM produces a response using retrieved context
d) Vectors are stored
Show Answer
Correct Answer: c
During Generation, the LLM receives the user query along with retrieved context and produces a grounded response.
Question 16
What does "grounded response" mean in RAG?
a) A response that is written on paper
b) A response based on retrieved factual documents
c) A response without any sources
d) A response generated offline
Show Answer
Correct Answer: b
A grounded response is one that is based on and supported by the retrieved documents, reducing hallucinations.
Question 17
Which of these is an example of a vector database?
a) MySQL
b) MongoDB
c) Pinecone
d) Redis (standard)
Show Answer
Correct Answer: c
Pinecone is a purpose-built vector database. Other examples include Weaviate, Chroma, Qdrant, and Milvus.
Question 18
What is the "knowledge cutoff" problem?
a) LLMs running out of memory
b) LLMs not knowing events after their training date
c) LLMs refusing to answer questions
d) LLMs generating too much text
Show Answer
Correct Answer: b
Knowledge cutoff means LLMs don't have information about events that occurred after their training data was collected.
Question 19
How does RAG help with private/internal data?
a) It trains the LLM on private data
b) It encrypts the LLM
c) It retrieves from indexed private documents
d) It removes private data
Show Answer
Correct Answer: c
RAG allows you to index private documents and retrieve from them, giving the LLM access to information it wasn't trained on.
Question 20
What is chunk overlap and why is it used?
a) Duplicate chunks for backup
b) Repeated text between chunks to preserve context
c) Encryption padding
d) Error correction
Show Answer
Correct Answer: b
Chunk overlap means consecutive chunks share some text at their boundaries, preventing information from being cut off mid-context.
Question 21
Which metric measures how similar two vectors are?
a) Accuracy
b) Precision
c) Cosine similarity
d) Latency
Show Answer
Correct Answer: c
Cosine similarity measures the angle between two vectors, indicating how similar their directions are (and thus semantic similarity).
Question 22
In a RAG prompt, what is the "context"?
a) The user's previous questions
b) The retrieved documents
c) The LLM's training data
d) The system configuration
Show Answer
Correct Answer: b
In RAG, context refers to the relevant documents/chunks retrieved from the knowledge base and included in the prompt.
Question 23
What does "top-k retrieval" mean?
a) Retrieving the top k most relevant documents
b) Retrieving k random documents
c) Retrieving documents starting with letter K
d) Retrieving k megabytes of data
Show Answer
Correct Answer: a
Top-k retrieval means finding and returning the k most similar/relevant documents based on the query.
Question 24
What year was the original RAG paper published?
a) 2018
b) 2019
c) 2020
d) 2022
Show Answer
Correct Answer: c
The original RAG paper "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks" was published in 2020 by Facebook AI Research.
Question 25
Why might RAG add latency compared to pure LLM calls?
a) Encryption overhead
b) The retrieval step takes time
c) RAG uses slower models
d) RAG requires more GPU memory
Show Answer
Correct Answer: b
RAG adds the retrieval phase (embedding the query, searching the vector database) before generation, which adds latency.
Question 26
What is semantic search?
a) Searching by exact keyword match
b) Searching by file name
c) Searching by meaning rather than exact words
d) Searching by date
Show Answer
Correct Answer: c
Semantic search finds documents based on meaning/intent rather than exact keyword matches, using vector similarity.
Question 27
Which component converts text to vectors?
a) Splitter
b) Loader
c) Embedding model
d) Generator
Show Answer
Correct Answer: c
The embedding model converts text (both documents and queries) into dense vector representations.
Question 28
What is a benefit of RAG over fine-tuning for dynamic data?
a) Lower accuracy
b) Data can be updated without retraining
c) Faster generation
d) Smaller model size
Show Answer
Correct Answer: b
RAG allows you to update the knowledge base without retraining the model, while fine-tuning requires expensive retraining for data updates.
Question 29
What is the role of the retriever in RAG?
a) To generate responses
b) To find relevant documents for a query
c) To train the LLM
d) To compress documents
Show Answer
Correct Answer: b
The retriever's job is to find and return the most relevant documents or chunks for a given query from the knowledge base.
Question 30
Which is NOT a typical component in a RAG indexing pipeline?
a) Document loader
b) Text splitter
c) User interface
d) Embedding model
Show Answer
Correct Answer: c
The indexing pipeline typically includes: document loader, text splitter, embedding model, and vector store. The user interface is not part of indexing.
Results
| Score | Level |
|---|---|
| 27-30 | Excellent - Strong understanding of RAG fundamentals |
| 21-26 | Good - Some review recommended |
| 15-20 | Average - Review the chapters again |
| Below 15 | Needs comprehensive review |