Quiz: Advanced RAG Techniques
Test your knowledge about query transformation, multi-query, HyDE, and self-query.
30 questions - Click on each question to reveal the correct answer.
Q1: What is query transformation?
Answer: Modifying the user's query before retrieval to improve results - includes rewriting, expansion, and HyDE.
Q2: What does HyDE stand for?
Answer: Hypothetical Document Embeddings
Q3: How does HyDE work?
Answer: Generate a hypothetical answer to the query, embed that, and use it for retrieval (better alignment with documents).
Q4: Why does HyDE improve retrieval?
Answer: The hypothetical document uses vocabulary more similar to actual documents than the original query.
Q5: What is query expansion?
Answer: Adding related terms, synonyms, and alternative phrasings to the original query.
Q6: What is multi-query retrieval?
Answer: Generating multiple variations of a query, retrieving for each, and combining results.
Q7: What is RAG Fusion?
Answer: Combining multi-query retrieval with reciprocal rank fusion for result ranking.
Q8: What is the benefit of multi-query?
Answer: Captures different aspects of the question and improves recall by finding documents different queries would miss.
Q9: What is RRF in RAG Fusion?
Answer: Reciprocal Rank Fusion - combines rankings from multiple retrievals into a single ranking.
Q10: When should you avoid multi-query?
Answer: When latency is critical or cost is a concern (multiple LLM calls).
Q11: What is self-query retrieval?
Answer: Using an LLM to extract both semantic query and metadata filters from natural language input.
Q12: What does self-query extract?
Answer: A semantic search query AND structured metadata filters (e.g., department, year, type).
Q13: What is AttributeInfo used for?
Answer: Defining metadata fields and their descriptions so the LLM can properly extract filters.
Q14: What comparisons does self-query support?
Answer: $eq, $ne, $gt, $gte, $lt, $lte, $in, and more.
Q15: Example: "HR policies from 2023" - what gets extracted?
Answer: Query: "HR policies", Filters: {department: "HR", year: 2023}
Q16: What is query rewriting?
Answer: Using an LLM to rephrase vague or incomplete queries into more specific, searchable ones.
Q17: When is query rewriting most useful?
Answer: When user queries are ambiguous, incomplete, or use pronouns like "it" or "that".
Q18: How many queries does multi-query typically generate?
Answer: Usually 3-5 variations of the original query.
Q19: What's the downside of advanced RAG techniques?
Answer: Added latency and cost (more LLM calls, more retrievals).
Q20: Can you combine HyDE with multi-query?
Answer: Yes - generate multiple queries, create hypothetical docs for each, retrieve, and fuse.
Q21: What's a fallback for self-query failures?
Answer: Fall back to regular semantic search without filters.
Q22: Why is metadata schema important for self-query?
Answer: The LLM needs clear definitions to correctly extract and apply filters.
Q23: What improves HyDE quality?
Answer: A good prompt that generates realistic document-style content.
Q24: How does query expansion differ from multi-query?
Answer: Expansion adds terms to one query; multi-query creates separate query variations.
Q25: What's the k parameter in RRF formula?
Answer: A constant (usually 60) that prevents high-ranked items from dominating.
Q26: Which technique is best for complex, multi-part questions?
Answer: Multi-query - captures different aspects of complex questions.
Q27: Which technique is best for questions about specific attributes?
Answer: Self-query - extracts and applies metadata filters.
Q28: How do you test query transformation effectiveness?
Answer: Compare retrieval quality (precision, recall) with and without transformation.
Q29: What's step-back prompting?
Answer: Asking a more general question first to get broader context before the specific query.
Q30: What's the order of operations in a full advanced RAG?
Answer: Query transformation → Multi-query generation → Retrieval → Fusion → Reranking → Generation
Results
| Score | Level |
|---|---|
| 27-30 | Excellent - Strong understanding of advanced RAG |
| 21-26 | Good - Some review recommended |
| 15-20 | Average - Review the chapters again |
| Below 15 | Needs comprehensive review |