Graded Quiz: RAG Framework :Fundamentals of AI Agents Using RAG and LangChain (IBM AI Engineering Professional Certificate) Answers 2025
1. Correct sequence for a RAG pipeline
❌ The retriever encodes prompts, stores them, then retrieves
❌ The retriever decodes prompts into vectors and stores them
❌ The retriever retrieves prompts, encodes them, then stores
✅ The retriever stores the prompts, retrieves them when needed, and then encodes them into vectors
Explanation:
In RAG, documents (not prompts) are stored first. When a user query arrives, it is encoded into a vector and compared with stored document vectors.
2. Typical RAG knowledge-document vectorization pipeline
❌ Generate → Tokenize → Embed → Translate
❌ Tokenize → Translate → Index → Generate
✅ Chunk → Embed → Index → Retrieve → Generate
❌ Search → Tokenize → Embed → Generate
Explanation:
RAG requires breaking documents into chunks, embedding them, indexing them for search, retrieving relevant chunks, and generating an answer.
3. What does the retrieval step do?
✅ Identifies the most relevant documents in the knowledge base to match the user’s question.
❌ Generates standard responses
❌ Translates the queries
❌ Saves/summarizes input
Explanation:
Retrieval selects the top documents most similar to the user query using vector similarity search.
4. Component responsible for vectorizing a user query
❌ Generator model
✅ Question encoder
❌ Context encoder
❌ FAISS indexer
Explanation:
The user query is converted into a vector via the question encoder, which is compared against document vectors.
5. How does RAG benefit a legal firm handling confidential case files?
✅ Access and integrate internal case files to generate specific responses.
❌ Automatically trains a new LLM
❌ Restricts responses to FAQs
❌ Publishes confidential files as searchable web data
Explanation:
RAG allows private data to be used for retrieval without retraining the LLM, maintaining privacy and domain relevance.
🧾 Summary Table
| Q# | Correct Answer | Key Concept |
|---|---|---|
| 1 | Store → retrieve → encode | RAG retrieval pipeline |
| 2 | Chunk → Embed → Index → Retrieve → Generate | Standard RAG workflow |
| 3 | Retrieves relevant documents | Purpose of retrieval |
| 4 | Question encoder | Query vectorization |
| 5 | Uses private case files for responses | RAG benefits |