agentleFS
Goodnight77Goodnight77/rag-skills/skills/rag-agents/SKILL.md

rag-agents

Skill8 starsChanged 7 months agoMITView on GitHub

Route agentic RAG work across query routing, tool-use retrieval, and multi-agent orchestration.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    Add agentic control only when queries genuinely vary in required steps or sources.

    line 30
  2. Distinctive:

    Add a router that chooses retrieval strategy or tool per query before reaching for multiple coordinated agents.

    line 33

≈ “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

RAG Agents

Overview

Use this parent skill when a single retrieve-then-generate pass is not enough and the system must decide what to retrieve, which tools to call, or how to split work across agents. Route to the child skill that matches whether the problem is routing decisions or multi-agent orchestration.

Problem Statement

Static RAG pipelines answer every query the same way: one retrieval, one generation. Complex questions need conditional retrieval, multiple sources, tool calls, or decomposition into subtasks. Bolting this onto a linear pipeline produces brittle, hard-to-debug systems.

Key Concepts

  • Routing: Deciding whether and where to retrieve before answering.
  • Tool use: Treating retrievers, search, and calculators as callable tools.
  • Decomposition: Breaking a complex query into ordered subtasks.
  • Orchestration: Coordinating specialized agents and merging their outputs.

Implementation Guide

Step 1: Decide If You Need an Agent at All

Add agentic control only when queries genuinely vary in required steps or sources. A fixed pipeline is cheaper and easier to evaluate.

Step 2: Start with Routing, Not Multi-Agent

Add a router that chooses retrieval strategy or tool per query before reaching for multiple coordinated agents.

Step 3: Introduce Orchestration Only When Justified

Move to planner and worker agents when subtasks are genuinely independent or need specialized handling, and keep each agent narrowly scoped.

When to Use This Skill

  • Queries need conditional retrieval, multiple sources, or tool calls
  • A single retrieval pass produces incomplete or shallow answers
  • Work naturally decomposes into specialized subtasks

When NOT to Use This Skill

  • A fixed retrieve-then-generate pipeline already answers well
  • Latency and cost budgets cannot absorb extra LLM calls
  • The real bottleneck is retrieval quality, not control flow

Related Skills

  • Agentic RAG Routing
  • Multi-Agent RAG Orchestration
  • Adaptive Retrieval
  • Self-RAG

Metrics & Success Criteria

  • Agentic control measurably improves answers over a fixed pipeline
  • Each added LLM call earns its latency and cost
  • Routing and agent decisions are traceable and debuggable

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.