retrieval-search-orchestration

Design retrieval strategies for knowledge-graph queries in RAG systems, covering pattern selection (global-first, local-first, U-shaped hybrid), query decomposition for multi-hop reasoning, ranking and constraint configuration, and provenance tracking for citations. Suitable for designing retrieval pipelines, orchestrating knowledge-graph search, or when GraphRAG scenarios involve retrieval strategy, query decomposition, multi-hop reasoning, and provenance tracking.

Last repository push
GitHub Stars
206
Forks
28
Issues / PRs
3

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "retrieval-search-orchestration" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-692087d139eadabd7b7c630e092c12508cba931ab51011576aee57f78e6a4a61. Verify the upstream source and version against https://github.com/lyndonkl/claude before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Design retrieval strategies for knowledge-graph queries in RAG systems, covering pattern selection (global-first, local-first, U-shaped hybrid), query decomposition for multi-hop reasoning, ranking and constraint configuration, and provenance tracking for citations. Suitable for designing retrieval pipelines, orchestrating knowledge-graph search, or when GraphRAG scenarios involve retrieval strategy, query decomposition, multi-hop reasoning, and provenance tracking.

0 Downloads

Introduction source: third_party · lyndonkl · 0.0.1 Reference

SkillPi interpretation

Tasks
Designs retrieval strategies for querying knowledge graphs in RAG systems, covering pattern selection (global-first, local-first, U-shaped hybrid), query decomposition for multi-hop reasoning, ranking and constraint configuration, and provenance tracking for citation. Use when designing retrieval pipelines, orchestrating search over knowledge graphs, or when user mentions retrieval strategy, search orchestration, query decomposition, multi-hop reasoning, provenance tracking, or citation in GraphRAG.
Inputs and outputs
```markdown
Software, accounts and paid services
Classify the queries your system must handle. Common categories include: **Factoid lookups**: single-entity, single-hop (e.g., "What is the capital of France?") **Exploratory/thematic**: broad questions requiring aggregation across many entities (e.g., "What are the main themes in this corpus?") **Multi-hop reasoning**: questions requiring traversal of multiple relationships (e.g., "Which drugs treat diseases caused by gene X?") **Temporal queries**: questions bounded by time ranges or requiring sequence understanding **Constrained queries**: questions with type or attribute filters (e.g., "List all clinical trials after 2020 for drug Y") Identify the distribution of these query types in you
Limits and differences
Define how retrieved results are scored, ranked, and filtered: Embedding similarity thresholds Graph distance penalties Type-based pre-filters or post-filters Confidence score minimums Temporal decay functions for time-sensitive data
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: retrieval-search-orchestration
description: Designs retrieval strategies for querying knowledge graphs in RAG systems, covering pattern selection (global-first, local-first, U-shaped hybrid), query decomposition for multi-hop reasoning, ranking and constraint configuration, and provenance tracking for citation. Use when designing retrieval pipelines, orchestrating search over knowledge graphs, or when user mentions retrieval strategy, search orchestration, query decomposition, multi-hop reasoning, provenance tracking, or citation in GraphRAG.

Table of Contents

Retrieval & Search Orchestration

Workflow

Copy this checklist and work through each step:

  • [ ] 1. Analyze query types and requirements
  • [ ] 2. Select retrieval pattern
  • [ ] 3. Design query decomposition strategy
  • [ ] 4. Configure ranking and constraints
  • [ ] 5. Design provenance tracking
  • [ ] 6. Define fallback strategies
  • [ ] 7. Produce retrieval strategy specification

Step Descriptions

Step 1: Analyze Query Types and Requirements

Classify the queries your system must handle. Common categories include:

  • Factoid lookups: single-entity, single-hop (e.g., "What is the capital of France?")
  • Exploratory/thematic: broad questions requiring aggregation across many entities (e.g., "What are the main themes in this corpus?")
  • Multi-hop reasoning: questions requiring traversal of multiple relationships (e.g., "Which drugs treat diseases caused by gene X?")
  • Temporal queries: questions bounded by time ranges or requiring sequence understanding
  • Constrained queries: questions with type or attribute filters (e.g., "List all clinical trials after 2020 for drug Y")

Identify the distribution of these query types in your use case to guide pattern selection.

Step 2: Select Retrieval Pattern

Use the Retrieval Pattern Selection Guide below to choose the right approach for your query distribution. See resources/methodology.md for detailed implementation guidance on each pattern.

Step 3: Design Query Decomposition Strategy

For complex queries, break them into sub-queries that can be independently resolved and then aggregated. Approaches include LLM-as-controller decomposition, self-ask chains, and ReAct-style interleaved reasoning and retrieval. See the Query Decomposition Patterns section below and resources/methodology.md for details.

Step 4: Configure Ranking and Constraints

Define how retrieved results are scored, ranked, and filtered:

  • Embedding similarity thresholds
  • Graph distance penalties
  • Type-based pre-filters or post-filters
  • Confidence score minimums
  • Temporal decay functions for time-sensitive data

Step 5: Design Provenance Tracking

Ensure every piece of retrieved information carries metadata about its origin. This includes source document IDs, extraction timestamps, confidence scores, and evidence chain construction. See resources/provenance-patterns.md for annotation approaches, confidence scoring, and LLM integration patterns.

Step 6: Define Fallback Strategies

Design what happens when primary retrieval fails or returns insufficient results:

  • Iterative deepening (expand hop count)
  • Query relaxation (remove constraints progressively)
  • Parallel exploration (try multiple patterns simultaneously)
  • Graceful degradation (return partial results with confidence indicators)

Step 7: Produce Retrieval Strategy Specification

Compile the full specification using the Output Template below.


Retrieval Pattern Selection Guide

Pattern Best For Mechanism Trade-offs Section Ref
Global-First Broad thematic queries, corpus-level summaries Community detection, top-down traversal of summarized indexes High-level coverage; may miss specific details 3.1
Local-First Entity-centric lookups, neighborhood exploration Seed entity linking, 1-2 hop neighborhood expansion with embedding gates High precision for known entities; limited scope 3.2
U-Shaped Hybrid Complex queries needing both breadth and depth Coarse-to-fine bidirectional search, top-down then bottom-up refinement Best coverage; higher latency and complexity 3.3
Query Decomposition Multi-hop reasoning, composite questions LLM breaks query into sub-queries, sequential retrieval, aggregation Handles complex questions; depends on decomposition quality 3.4
Temporal Time-bounded or sequence-dependent queries Time-slice filtering, episodic windowing, time-decay ranking Captures temporal dynamics; needs temporal metadata 3.5
Constraint-Guided Type-filtered or rule-bounded queries Pre-filter + vector search, symbolic query then neural re-rank Reduces search space; requires well-typed schema 3.6

Selection heuristic: Start with the dominant query type in your system. If queries are mixed, consider U-Shaped Hybrid as a default with fallback to specialized patterns.


Query Decomposition Patterns

LLM-as-Controller

The LLM receives the original query and generates a plan of sub-queries:

Original: "Which drugs treat diseases linked to mutations in BRCA1?"
Sub-query 1: "What diseases are linked to mutations in BRCA1?"
Sub-query 2: "What drugs treat [diseases from sub-query 1]?"
Aggregation: Combine results, deduplicate, rank by evidence strength

Self-Ask Chain

The model iteratively asks itself follow-up questions, retrieving after each:

Q: "What is the relationship between company X and technology Y?"
Follow-up 1: "What products does company X produce?" -> retrieve
Follow-up 2: "Which of those products use technology Y?" -> retrieve
Follow-up 3: "What partnerships exist between X and Y providers?" -> retrieve
Synthesize: Combine all retrieved evidence into final answer

ReAct Pattern

Interleave reasoning and retrieval actions:

Thought: I need to find the connection between entity A and entity C
Action: Search KG for paths between A and C (max 3 hops)
Observation: Found path A -> B -> C via relationship R1 and R2
Thought: I should verify this path with supporting evidence
Action: Retrieve source documents for edges A-B and B-C
Observation: Edge A-B supported by [doc1, doc2], edge B-C supported by [doc3]
Answer: A connects to C through B, supported by 3 source documents

Tool-Augmented Retrieval

Generate formal queries (Cypher, SPARQL) for structured graph traversal:

LLM generates: MATCH (d:Drug)-[:TREATS]->(dis:Disease)<-[:CAUSES]-(g:Gene {name: 'BRCA1'})
               RETURN d.name, dis.name, g.name
Execute against graph database
Post-process results with LLM for natural language answer

Output Template

# Retrieval Strategy Specification

## System Context
- **Domain**: [e.g., biomedical, legal, financial]
- **Knowledge Graph Type**: [e.g., property graph, RDF, hybrid]
- **Primary Query Types**: [list dominant query categories]
- **Scale**: [approximate node/edge counts, query volume]

## Retrieval Pattern
- **Primary Pattern**: [selected pattern from guide]
- **Rationale**: [why this pattern fits the query distribution]
- **Secondary/Fallback Pattern**: [if applicable]

## Query Decomposition
- **Strategy**: [LLM-as-controller / self-ask / ReAct / tool-augmented / none]
- **Max Sub-queries**: [limit per original query]
- **Aggregation Method**: [union / intersection / ranked merge / LLM synthesis]

## Ranking & Constraints
- **Similarity Threshold**: [minimum embedding similarity score]
- **Max Hop Distance**: [maximum graph traversal depth]
- **Type Filters**: [entity/relationship type constraints]
- **Temporal Constraints**: [time windows, decay functions]
- **Confidence Minimum**: [minimum source confidence for inclusion]

## Provenance Design
- **Annotation Method**: [metadata fields / evidence nodes / named graphs / reification]
- **Confidence Scoring**: [source reliability tiers, aggregation rules]
- **Citation Format**: [inline / post-hoc / both]
- **Conflict Resolution**: [timestamp priority / source authority / LLM adjudication]

## Fallback Strategy
- **Primary Fallback**: [iterative deepening / query relaxation / parallel exploration]
- **Max Retry Depth**: [number of fallback attempts]
- **Degradation Policy**: [partial results with confidence / explicit uncertainty / escalation]

## Evaluation Criteria
- Reference: `resources/evaluators/rubric_retrieval.json`
- **Target Score**: [minimum acceptable weighted score]

Version history

  1. 0.1 GitHub ↗
    Original release notes

    ## What's Changed * Improve writer skill navigation and structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/1 * Consolidate stickiness content and reduce revision to 3 passes by @lyndonkl in https://github.com/lyndonkl/claude/pull/2 * Update README.md to reflect current writer skill structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/3 * Add explicit instructions for AI agents to follow resource file workf… by @lyndonkl in https://github.com/lyndonkl/claude/pull/4 * Change analysis files from /tmp/ to project directory by @lyndonkl in https://github.com/lyndonkl/claude/pull/5 * Add five refined skills to production by @lyndonkl in https://github.com/lyndonkl/claude/pull/6 * Add causal-inference-root-cause skill and fix missing methodology files by @lyndonkl in https://github.com/lyndonkl/claude/pull/7 * Add workflow pattern to 6 completed skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/8 * Add chain-estimation and roleplay-debate skills with optimizations by @lyndonkl in https://github.com/lyndonkl/claude/pull/9 * Add 3 new skills and update writer skill workflow pattern by @lyndonkl in https://github.com/lyndonkl/claude/pull/10 * Add skills #12-13: constraint-based-creativity and data-schema-knowle… by @lyndonkl in https://github.com/lyndonkl/claude/pull/11 * Add skills #14-16: decision-matrix, decomposition-reconstruction, deliberation-debate-red-teaming by @lyndonkl in https://github.com/lyndonkl/claude/pull/12 * Add skills #17-19: design-of-experiments, dialectical-mapping-steelmanning, discovery-interviews-surveys by @lyndonkl in https://github.com/lyndonkl/claude/pull/13 * Add chef-assistant skill and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/14 * Fix README: Remove links to gitignored scratchpad files by @lyndonkl in https://github.com/lyndonkl/claude/pull/15 * Add skills #14-22: 9 new production-ready skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/16 * Add skills #20-24 and workflow pattern updates by @lyndonkl in https://github.com/lyndonkl/claude/pull/17 * Add skill #25: expected-value by @lyndonkl in https://github.com/lyndonkl/claude/pull/18 * Add skills #26-28: facilitation-patterns, financial-unit-economics, focus-timeboxing-8020 by @lyndonkl in https://github.com/lyndonkl/claude/pull/19 * Add skills #29-30: heuristics-and-checklists, hypotheticals-counterfactuals by @lyndonkl in https://github.com/lyndonkl/claude/pull/20 * Add skills #31-33: information-architecture, kill-criteria-exit-ramps, layered-reasoning by @lyndonkl in https://github.com/lyndonkl/claude/pull/21 * Add Claude Code plugin support by @lyndonkl in https://github.com/lyndonkl/claude/pull/22 * Fix plugin marketplace source path by @lyndonkl in https://github.com/lyndonkl/claude/pull/23 * Add skill #34: mapping-visualization-scaffolds by @lyndonkl in https://github.com/lyndonkl/claude/pull/24 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/25 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/26 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/27 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/28 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/29 * Add skill #59: skill-extraction by @lyndonkl in https://github.com/lyndonkl/claude/pull/30 * Add skill-creator: Transform documents into actionable skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/31 * Update skill count from 58 to 61 in README by @lyndonkl in https://github.com/lyndonkl/claude/pull/32 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/33 * Add d3-visualization skill: comprehensive D3.js implementation guide by @lyndonkl in https://github.com/lyndonkl/claude/pull/34 * Add comprehensive Superforecasting Toolkit with 4 skills and orchestr… by @lyndonkl in https://github.com/lyndonkl/claude/pull/35 * Add "Run in Smithery" badge by @gurdasnijor in https://github.com/lyndonkl/claude/pull/36 * Add Scientific Writing Toolkit with 6 skills and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/37 * Improve skill invocation rules and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/38 * Add Geometric Deep Learning skill suite and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/39 * Decompose writer skill into 4 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/40 * Add GraphRAG skill suite with 5 skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/41 * Decompose cognitive-design skill into 3 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/42 ## New Contributors * @lyndonkl made their first contribution in https://github.com/lyndonkl/claude/pull/1 * @gurdasnijor made their first contribution in https://github.com/lyndonkl/claude/pull/36 **Full Changelog**: https://github.com/lyndonkl/claude/commits/0.1

Current listing version

0.0.1

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 面向 RAG 系统中知识图谱检索策略设计,涵盖模式选择、查询分解、排序约束、溯源追踪等核心环节
  • 适用于设计检索流水线、编排知识图谱搜索等明确高频场景,具有高实用价值
Trigger Precision95/100

Highlights

  • 触发词精准完整,覆盖 retrieval strategy、search orchestration、query decomposition、multi-hop reasoning 等多种变体
  • 边界清晰,不易与其他 Skill 重叠
Structure and Standards94/100

Highlights

  • 结构清晰,包含七步工作流、详细步骤说明、模式选择指南、分解模式示例和输出模板
  • 提供多个端到端示例(LLM-as-Controller、Self-Ask Chain、ReAct Pattern 等),frontmatter 完整
Execution Reliability91/100

Areas to improve

  • 引用文件缺失 Reported severity: Major

    主文档引用了 resources/methodology.md 和 resources/provenance-patterns.md,但未传入

    Recommendation: 请补充被引用的资源文件,或移除引用以避免用户困惑

  • 引用文件缺失 Reported severity: Major

    Output Template 中引用了 resources/evaluators/rubric_retrieval.json,但未传入

    Recommendation: 请补充被引用的评估文件,或移除引用以避免用户困惑

Highlights

  • 参数配置明确(相似度阈值、最大跳数、置信度最小值等),覆盖主要异常处理策略
  • Fallback Strategies 包含迭代深化、查询松弛、并行探索、优雅降级等多种可靠机制
Evidence Verifiability (mean of the first four)93/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Classify the queries your system must handle. Common categories include: **Factoid lookups**: single-entity, single-hop (e.g., "What is the capital of France?") **Exploratory/thematic**: broad questions requiring aggregation across many entities (e.g., "What are the main themes in this corpus?") **Multi-hop reasoning**: questions requiring traversal of multiple relationships (e.g., "Which drugs treat diseases caused by gene X?") **Temporal queries**: questions bounded by time ranges or requiring sequence understanding **Constrained queries**: questions with type or attribute filters (e.g., "List all clinical trials after 2020 for drug Y") Identify the distribution of these query types in you

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.