Query Reformulation Expander
Expand a user query into 3-5 rewrites plus a HyDE-style synthetic passage, then aggregate retrieval results for measurably better recall.
🧠 Why it works
Users write short queries; documents are written in long form. Single-query retrieval often misses passages where the vocabulary differs. Expanding the query into multiple phrasings covers more of the document's vocabulary space, and HyDE retrieves by synthesized-answer similarity — which finds passages that actually answer the question rather than ones that merely restate it.
⚙️ How it works
- Generate 3 paraphrases of the user query via LLM. 2. Generate one broader and one more-specific variant. 3. Generate a 100-word HyDE passage that pretends to answer the query. 4. Retrieve top-K against each variant and the HyDE passage. 5. Merge via reciprocal rank fusion with a small boost for passages retrieved by multiple variants. 6. Return the top N deduped chunks plus a provenance breakdown showing which variant retrieved each chunk.
Description
Takes a terse user query and expands it into multiple retrieval signals — paraphrases, a broader version, a more specific version, and a hypothetical answer passage — runs retrieval against each, and merges results with reciprocal rank fusion. Designed as a drop-in layer over any existing RAG pipeline.
Install this skill
A Claude skill is a skill.md file with YAML frontmatter and a markdown body.
Drop the file into your tool of choice — or pick a different format if you use Cursor, Windsurf, Copilot, or something else.
mkdir -p ~/.claude/skills/query-reformulation-expander \
&& curl -L https://aidiveforge.com/skill/query-reformulation-expander.skill-md \
-o ~/.claude/skills/query-reformulation-expander/skill.md
Save to ~/.claude/skills/query-reformulation-expander/skill.md
Recommended Use
Sign in to suggestTools and workflow packs this skill pairs well with. Forge picks are auto-generated from category + capability signals; Community picks are added by people who've used the pairing.
No matches yet. Be the first to suggest a pairing, or the Forge will populate suggestions as signals align.
Report compatibility
Tell the community which tool you used this skill with, and whether it worked.
Suggest a pairing
Recommend a tool or workflow pack that this skill works well with. Up to 5 recommendations per day.