Query expansion, HyDE, and multi-query generation for improved retrieval
Scanned 9/2/2026
Install to Claude Code
npx -y skills add a5c-ai/babysitter --skill rag-query-transformation --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Rag Query Transformation?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/a5c-ai-rag-query-transformation-babysitter)More formats (shields.io, HTML) on the badges page.
---
name: rag-query-transformation
description: Query expansion, HyDE, and multi-query generation for improved retrieval
allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
graph:
domains: [domain:software-engineering]
specializations: [specialization:ai-agents-conversational]
skillAreas: [skill-area:retrieval-augmented-generation, skill-area:prompt-engineering]
roles: [role:ml-engineer, role:backend-engineer]
workflows: [workflow:ml-model-lifecycle, workflow:feature-development]
---
# RAG Query Transformation Skill
## Capabilities
- Implement query expansion techniques
- Configure Hypothetical Document Embeddings (HyDE)
- Set up multi-query generation
- Design query decomposition strategies
- Implement step-back prompting
- Configure query routing for specialized indices
## Target Processes
- advanced-rag-patterns
- knowledge-base-qa
## Implementation Details
### Transformation Techniques
1. **Multi-Query Generation**: Generate query variations
2. **HyDE**: Generate hypothetical answer, embed that
3. **Query Decomposition**: Break complex queries into sub-queries
4. **Step-Back Prompting**: Generate higher-level queries
5. **Query Expansion**: Add synonyms and related terms
### Configuration Options
- Number of query variations
- LLM for query generation
- Decomposition depth
- Query routing rules
- Result fusion strategy
### Best Practices
- Match technique to query complexity
- Test with representative queries
- Monitor retrieval quality changes
- Balance latency vs quality tradeoffs
### Dependencies
- langchain
- LLM provider
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!