Skip to content

Session 4: Query Enhancement & Context Augmentation - Test Solutions

📝 Multiple Choice Test - Session 4

Question 1: What is the primary purpose of HyDE (Hypothetical Document Embeddings)?
A) To generate multiple query variations
B) To bridge the semantic gap between queries and documents ✅
C) To compress document embeddings
D) To speed up retrieval performance

Explanation: HyDE bridges the semantic gap by generating hypothetical documents that would answer the user's query, then using these generated documents for retrieval instead of the original query. This technique addresses the mismatch between how users ask questions (query language) and how documents are written (document language).

Question 2: When implementing query decomposition, which approach is most effective for complex questions?
A) Random sentence splitting
B) Breaking questions into answerable sub-questions using LLMs ✅
C) Fixed-length query segments
D) Keyword-based fragmentation

Explanation: LLM-based query decomposition intelligently breaks complex questions into logical, answerable sub-questions that maintain semantic meaning. This approach understands question structure and dependencies, unlike mechanical splitting methods that can destroy meaning.

Question 3: What is the key advantage of multi-query generation in RAG systems?
A) Reduced computational cost
B) Faster query processing
C) Comprehensive coverage of different query perspectives ✅
D) Simplified system architecture

Explanation: Multi-query generation creates multiple formulations of the same information need, covering different perspectives, specificity levels, and phrasings. This comprehensive coverage increases the likelihood of retrieving relevant documents that might be missed by a single query formulation.

Question 4: In context window optimization, what factor is most important for maintaining quality?
A) Maximum token count
B) Processing speed
C) Balance between relevance and information density ✅
D) Number of source documents

Explanation: The key is balancing relevance (how well the context addresses the query) with information density (how much useful information per token). Simply maximizing tokens or documents can include irrelevant information, while focusing only on speed can sacrifice quality.

Question 5: Which prompt engineering technique is most effective for improving RAG response quality?
A) Longer prompts with more examples
B) Chain-of-thought reasoning with context integration ✅
C) Simple template-based prompts
D) Keyword-heavy prompts

Explanation: Chain-of-thought reasoning guides the model through logical steps while properly integrating retrieved context. This technique helps the model understand relationships between the query, context, and required reasoning, leading to more accurate and well-structured responses.


Back to Test: Session 4 Test Questions →