Skip to content
Back to skills

Rag Query Transformation

ASecurity

Query expansion, HyDE, and multi-query generation for improved retrieval

  • 1,760 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 2, 2026
ai-agentsbashbackend

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add a5c-ai/babysitter --skill rag-query-transformation --agent claude-code

Installs 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 with every re-scan.

Security grade badge for Rag Query Transformation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a5c-ai-rag-query-transformation-babysitter/badge)](https://www.skillsdirectory.com/skills/a5c-ai-rag-query-transformation-babysitter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Files in this skill

  • README.md556 B
  • SKILL.md1.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.