agentsclimarketplace

Rag query transformation

Skill a5c-ai/babysitter/library/specializations/ai-agents-conversational/skills/rag-query-transformation

Query expansion, HyDE, and multi-query generation for improved retrievalFrom its SKILL.md

Install
npx -y skills add a5c-ai/babysitter --skill rag-query-transformation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.6 KB, 223 tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it: 1 file

556 B alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.