a5c-ai/babysitter / library/specializations/ai-agents-conversational/skills/rag-query-transformation
rag-query-transformation
VerifiedQuery expansion, HyDE, and multi-query generation for improved retrieval
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
- Multi-Query Generation: Generate query variations
- HyDE: Generate hypothetical answer, embed that
- Query Decomposition: Break complex queries into sub-queries
- Step-Back Prompting: Generate higher-level queries
- 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
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |