agentleFS
Goodnight77Goodnight77/rag-skills/skills/retrieval-strategies/SKILL.md

retrieval-strategies

Skill8 starsChanged 7 months agoMITView on GitHub

Route RAG retrieval quality work across hybrid search, reranking, query transformation, HyDE, Self-RAG, RAPTOR, CRAG, and Graph RAG.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this parent skill when the main RAG problem is search quality, ranking, recall, context selection, or evidence traceability.

    line 16

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Retrieval Strategies

Overview

Use this parent skill when the main RAG problem is search quality, ranking, recall, context selection, or evidence traceability. Route to the child skill that best matches the retrieval failure.

Problem Statement

Embedding search alone often misses exact terms, ranks weak evidence too high, or retrieves incomplete context. RAG systems need retrieval strategies that adapt to query type and evidence requirements.

Key Concepts

  • Hybrid search: Combine sparse and dense signals.
  • Reranking: Reorder broad candidate sets with stronger relevance models.
  • Query transformation: Rewrite, expand, or decompose user questions.
  • Corrective retrieval: Validate and repair weak evidence before generation.

Implementation Guide

Step 1: Diagnose the Failure

Identify whether the issue is recall, ranking, query mismatch, missing context, or poor citations.

Step 2: Select the Retrieval Pattern

Choose hybrid search for exact-term misses, reranking for noisy top-k results, query transformation for vague questions, and corrective patterns for unreliable evidence.

Step 3: Evaluate With Grounded Metrics

Measure recall at k, MRR or nDCG, citation accuracy, answer faithfulness, and latency impact.

When to Use This Skill

  • Improving retrieval quality in an existing RAG pipeline
  • Selecting a search pattern for a new RAG system
  • Debugging weak citations or irrelevant context

When NOT to Use This Skill

  • The source content has not been parsed or chunked yet
  • The main issue is vector database deployment
  • The task is pure generation without retrieval

Related Skills

  • Hybrid Search BM25 Dense
  • Multi-Pass Retrieval with Reranking
  • Query Transformation Strategies
  • Adaptive Retrieval
  • Graph RAG

Metrics & Success Criteria

  • Improved recall and ranking quality on evaluation queries
  • Better answer faithfulness and citation accuracy
  • Latency remains acceptable for the product workflow

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.