Skip to content

Course Graded Quiz: Project: Generative AI Applications with RAG and LangChain :Project: Generative AI Applications with RAG and LangChain (IBM AI Engineering Professional Certificate) Answers 2025

1. What should Ricky do before embedding documents in RAG?

❌ Select the chunking approach
❌ Set up the vector store
Load and organize travel-related documents
❌ Connect retriever to the query engine

Explanation:
Before chunking or embedding, documents must first be loaded and organized.


2. What does context length refer to in LLMs?

❌ Long training time
❌ Amount of text to generate
Large input lengths during training
❌ Vocabulary size

Explanation:
Context length = how many tokens the model can take in at once.


3. LangChain system crashes due to network interruption. What to do?

Implement retry mechanisms
❌ Load all documents
❌ Increase chunk size
❌ Manually verify API

Explanation:
Retries handle temporary failures automatically and prevent crashing.


4. App skips important content between split sections. What to adjust?

❌ Chunk size
Chunk overlap
❌ Length function
❌ Separator

Explanation:
Overlap preserves context between consecutive chunks.


5. Preserve document structure based on headers?

❌ RecursiveCharacterTextSplitter
❌ CSVRowSplitter
MarkdownHeaderTextSplitter
❌ CodeTextSplitter

Explanation:
MarkdownHeaderTextSplitter splits text according to hierarchical header structure.


6. Relationship between retriever and vector store

❌ Vector store handles all text using LLM queries
Retriever is an interface that returns chunks from vector stores
❌ Retriever generates vectors
❌ Vector store replaces retrievers

Explanation:
The vector store holds embeddings; the retriever queries it to fetch relevant chunks.


7. Sara wants complete document sections, not small chunks. Use:

❌ Self-Query Retriever
❌ Vector Store Retriever
Parent Document Retriever
❌ Multi-Query Retriever

Explanation:
Parent Document Retriever returns the full parent section instead of small chunk slices.


8. Need detailed PDF metadata for each page → choose:

❌ MarkdownHeaderTextSplitter
❌ WebBaseLoader
PyMuPDFLoader – provides rich metadata
❌ PyPDFLoader

Explanation:
PyMuPDFLoader returns page-level metadata like coordinates, fonts, blocks, etc.


9. Basic web interface demo for QA bot:

Gradio
❌ TensorBoard
❌ React.js
❌ Flask

Explanation:
Gradio lets you quickly create interactive web UIs for ML demos.


10. Why does the QA bot answer accurately with citations?

❌ Knowledge graph
Combines retrieval + LLM generation + embedded documents
❌ Prompt changes
❌ LLM memory

Explanation:
RAG = Retrieve → feed to LLM → generate answer grounded in sources.


🧾 Summary Table

Q# Correct Answer Key Concept
1 Load & organize documents RAG pipeline step 1
2 Input token length Context length
3 Retry mechanisms Robust API loading
4 Chunk overlap Preserve context
5 MarkdownHeaderTextSplitter Structure-aware split
6 Retriever fetches from vector store RAG retrieval
7 Parent Document Retriever Return full sections
8 PyMuPDFLoader Detailed metadata
9 Gradio Web demo UI
10 Retrieval + LLM + embeddings RAG accuracy