RAG reranker tuning
Adds and tunes a RAG reranker so the right document rises to the top instead of getting buried in noise.
Claude's review
7/10 reranker stage guidance has a clear precision versus recall test and tuning sweep, relies on companion skills for detail
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Adds and tunes a reranker stage for RAG using the retrieve-wide, rerank-narrow pattern. Use when relevant documents appear in the initial top-N but are buried by noise, top-1 precision or MRR is low despite adequate recall, or too many marginal chunks consume context. Covers cross-encoder, API, and local rerankers; N-to-k selection; and latency/cost tradeoffs. Do not use when retrieval recall itself is failing.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: agentsop-reranker-stage
version: 0.1.0
description: >-
Adds and tunes a reranker stage for RAG using the retrieve-wide,
rerank-narrow pattern. Use when relevant documents appear in the initial
top-N but are buried by noise, top-1 precision or MRR is low despite adequate
recall, or too many marginal chunks consume context. Covers cross-encoder,
API, and local rerankers; N-to-k selection; and latency/cost tradeoffs. Do not
use when retrieval recall itself is failing.
when_to_use:
- "a RAG pipeline's answer quality has plateaued and the relevant doc is present in top-k but not ranked first"
- "the LLM context window is pressured by too many marginal chunks and you want fewer, higher-precision chunks"
- "retrieval recall is already good (hit-rate high) but MRR / top-1 precision is low"
- "a user asks where to add a reranker, how to tune N vs k, or which rerank model to use (API vs local)"
- "reviewing a pipeline with `similarity_top_k=20` and no postprocessor — a reranker is missing"
when_not_to_use:
- "retrieval RECALL is the problem (the right doc is NOT in top-N at all) — fix retrieval/chunking/hybrid first"
- "top-k already small (<=5) and answers are correct — no plateau, no lever to pull"
- "hard real-time path where the extra rerank round-trip blows the latency budget and quality is already acceptable"
overlay: true
cross_links: [llamaindex, hybrid-retrieval]
---
# Reranker Stage · SOP
> Third-person analytical view of how a mature RAG pipeline *thinks* about the
> reranker. The skill is for an LLM agent that writes / reviews / debugs
> retrieval code — it teaches the cross-framework reranking discipline, not one
> vendor's API. For the per-framework API, descend to `[[llamaindex]]`
> (node postprocessors) or `[[agentsop-hybrid-retrieval]]` (the recall stage that feeds
> the reranker).
This is the **C4 gap skill** in the Phase-D enhance pass. The reranker SOP
existed only buried inside `[[llamaindex]]` (`OP-03 AddReranker`, Stage 3 step 7,
anti-pattern A6). It is the **highest-ROI single addition** to a naive RAG
pipeline, so it earns a standalone overlay.
---
...From agentsope's repository, MIT licence.
Related skills
-
Checked
Council of AI models
Asks several AI models the same question separately, compares their answers and gives you the best one.
7/101 credit -
Checked
RAG evaluation
Measures how well a RAG system retrieves and answers, with test questions, metrics and chunking advice.
8/101 credit -
Checked
AI automation planner
Works out which manual work in your business to automate first, then designs the system, tools and safeguards.
7/101 credit -
Checked
LangGraph agent design
Guides LangGraph builds through topology, checkpoint and human review choices so agents survive failures.
7/101 credit -
Checked
Test and Fix Loop
Sets up a coding agent to run tests, read failures and fix them until green, with a safe point to stop.
8/101 credit -
Checked
Agent system design
Asks staged questions to design agent pipelines and sub agents, so you only add agents where they help.
7/101 credit