rag-query-transformation
Query expansion, HyDE, and multi-query generation for improved retrieval
Best use case
rag-query-transformation is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Query expansion, HyDE, and multi-query generation for improved retrieval
Teams using rag-query-transformation should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/rag-query-transformation/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How rag-query-transformation Compares
| Feature / Agent | rag-query-transformation | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Query expansion, HyDE, and multi-query generation for improved retrieval
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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
Related Skills
react-query
TanStack Query (React Query) patterns for server state management, caching, mutations, optimistic updates, and infinite queries.
db-query-analyzer
Analyze database query performance with execution plans and index recommendations
clinical-documentation-query
Generate compliant physician queries to clarify clinical documentation for accurate coding, severity of illness, and risk of mortality capture
ssa-transformation-library
SSA-form transformations and optimizations for compiler development
sql-query-optimizer
Analyzes and optimizes SQL queries across different data warehouse platforms (Snowflake, BigQuery, Redshift, Databricks) with platform-specific recommendations.
query-translator
Translate SQL queries between different database dialects with function mapping and optimization
process-builder
Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.
babysitter
Orchestrate via @babysitter. Use this skill when asked to babysit a run, orchestrate a process or whenever it is called explicitly. (babysit, babysitter, orchestrate, orchestrate a run, workflow, etc.)
yolo
Run Babysitter autonomously with minimal manual interruption.
user-install
Install the user-level Babysitter Codex setup.
team-install
Install the team-pinned Babysitter Codex workspace setup.
retrospect
Summarize or retrospect on a completed Babysitter run.