query-decomposition
Query decomposition for multi-concept retrieval. Use when handling complex queries spanning multiple topics, implementing multi-hop retrieval, or improving coverage for compound questions.
npx skills add majiayu000/claude-skill-registry --skill query-decomposition --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Query Decomposition Break complex queries into independent concepts for parallel retrieval and fusion. ## Overview - Complex queries spanning multiple topics or concepts - Multi-hop questions requiring chained reasoning - Queries where single retrieval misses relevant documents - Improving recall for compound questions Break complex queries into independent concepts for parallel retrieval and fusion. ## The Problem Complex queries span multiple topics that may not co-occur in single documents: ``` Query: "How do chunking strategies affect reranking in RAG?" → Single search may miss docs about chunking OR reranking → Poor coverage across all concepts ``` ## The Solution Decompose into independent concepts, retrieve separately, then fuse: ``` Query: "How do chunking strategies affect reranking in RAG?" → Concepts: ["chunking strategies", "reranking methods", "RAG pipeline"] → Search each concept independently → Fuse results with Reciprocal Rank Fusion (RRF) → Full coverage across all topics ``` ## Implementation ### 1. Heuristic Detection (Fast Path) ```python MULTI_CONCEPT_INDICATORS = [ " vs ", " versus ", " compared to ", " or ", " and ", " with ", " affect ", " impact ", "diffe
- Overview
- The Problem
- The Solution
- Implementation
- 1. Heuristic Detection (Fast Path)
- 2. LLM Decomposition
- 3. Parallel Retrieval + RRF Fusion
- Complete Service
- Combining with HyDE
- When to Decompose
- Performance Tips
- Related Skills
- Key Decisions
- References
What does the query-decomposition skill do?
Query decomposition for multi-concept retrieval. Use when handling complex queries spanning multiple topics, implementing multi-hop retrieval, or improving coverage for compound questions.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill query-decomposition --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
