Back to library

🔀Use Query Expansion to Improve RAG Recall

Compare four query-expansion patterns — synonym, multi-query, step-back, and HyDE — on the same hard query so each one's strength is visible, then design a query-expansion stage for a customer-support RAG with 30% short queries.

Advanced14 drops~2-week path · 5–8 min/daytechnology

Phase 1Why Short Queries Break RAG Before the Retriever Ever Runs

See why short user queries embed badly and what retrieval misses

4 drops
  1. RAG fails at the query, not the retriever — and you keep blaming the retriever

    6 min

    RAG fails at the query, not the retriever — and you keep blaming the retriever

  2. Watch 'how do I cancel?' embed straight into shipping policies

    6 min

    Watch 'how do I cancel?' embed straight into shipping policies

  3. Four ways to expand a query, ranked by how much help they actually offer

    6 min

    Four ways to expand a query, ranked by how much help they actually offer

  4. The query you'll torture all week — and why one is enough

    5 min

    The query you'll torture all week — and why one is enough

Phase 2Multi-Query Rewriting on a Hard Question, Side by Side

Run multi-query rewriting and merge results from each variant

5 drops
  1. Run plain retrieval on the hard query and capture the floor

    5 min

    Run plain retrieval on the hard query and capture the floor

  2. Ask an LLM for three paraphrases — the entire trick is the prompt

    6 min

    Ask an LLM for three paraphrases — the entire trick is the prompt

  3. Retrieve for each rewrite and fuse with RRF — that's the whole pipeline

    7 min

    Retrieve for each rewrite and fuse with RRF — that's the whole pipeline

  4. Compare baseline and multi-query on one query — and write down what you see

    6 min

    Compare baseline and multi-query on one query — and write down what you see

  5. Two prompt knobs explain ninety percent of multi-query quality

    7 min

    Two prompt knobs explain ninety percent of multi-query quality

Phase 3Step-Back, HyDE, and Picking the Right Expansion Per Query

Map step-back, HyDE, and where each beats plain retrieval

4 drops
  1. Step-back prompting trades specificity for grounding — and wins on niche questions

    6 min

    Step-back prompting trades specificity for grounding — and wins on niche questions

  2. HyDE fixes the question-voice vs answer-voice mismatch

    7 min

    HyDE fixes the question-voice vs answer-voice mismatch

  3. Four expansion techniques, one query — and the table that makes the choice obvious

    7 min

    Four expansion techniques, one query — and the table that makes the choice obvious

  4. Three signals tell you which expansion to run before retrieval

    7 min

    Three signals tell you which expansion to run before retrieval

Phase 4Design a Query-Expansion Stage for a Real Support RAG

Design a query-expansion stage for a real support RAG

1 drop
  1. Design a query-expansion stage for a support RAG with 30% short queries

    8 min

    Design a query-expansion stage for a support RAG with 30% short queries

Frequently asked questions

What is query expansion in RAG and why does it improve recall?
This is covered in the “Use Query Expansion to Improve RAG Recall” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
How does multi-query rewriting differ from synonym expansion?
This is covered in the “Use Query Expansion to Improve RAG Recall” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
What is HyDE and when does it beat plain vector retrieval?
This is covered in the “Use Query Expansion to Improve RAG Recall” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
When should I use step-back prompting instead of multi-query?
This is covered in the “Use Query Expansion to Improve RAG Recall” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
Does query expansion always help, or can it hurt precision?
This is covered in the “Use Query Expansion to Improve RAG Recall” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.