agentsop-reranker-stage
Enhancement-overlay SOP for the reranker stage of a RAG pipeline — the "retrieve wide, rerank narrow" discipline. Activate when a calling agent owns a retrieval pipeline whose answers have plateaued: top-k contains the right document but it is buried below noise, or the context window is under pressure from too many marginal chunks. Encodes the one non- negotiable insight — a cheap bi-encoder retrieves *wide* for recall, then a more expensive cross-encoder (which reads query + document *together*) reranks *narrow* for precision; keep top-N=20-50, rerank to top-k=3-5. Covers when to add a reran
npx skills add agentsope/SkillAlchemy --skill agentsop-reranker-stage --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.
# 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. --- ## 1 · 何时激活 (Activation Rules) Activate when **any** holds: 1. A RAG pipeline's answer quality has **plateaued** after the cheap knobs (prompt, embedding model, chunk size) are exhausted — `[[llamaindex]]` Stage 3 lists reranking as the **last** optimization step, deliberately. 2. Diagnostics show the **relevant document is in top-k but buried** — high hit-rate, low MRR, wrong top-1. This is LlamaIndex failure modes **#1 / #10** ([[llamaindex]] `OP-03`). 3. The LLM **context window is
- 1 · 何时激活 (Activation Rules)
- 2 · 核心心智模型 (Core Mental Model)
- The one sentence
- Why two stages exist at all
- The order law (inherited from [[llamaindex]] Stage 3)
- What a reranker is NOT
- 3 · SOP 工作流 (Agentic Protocol)
- Stage 0 — Confirm the lever is real
- Stage 1 — Retrieve wide
- Stage 2 — Insert the reranker
- Stage 3 — Keep narrow
- Stage 4 — Measure the lift, gate the change
- 4 · 操作模型 (Operation Models)
- OP-01 ConfirmPrecisionNotRecall
What does the agentsop-reranker-stage skill do?
Enhancement-overlay SOP for the reranker stage of a RAG pipeline — the "retrieve wide, rerank narrow" discipline. Activate when a calling agent owns a retrieval pipeline whose answers have plateaued: top-k contains the right document but it is buried below noise, or the context window is under pressure from too many marginal chunks. Encodes the one non- negotiable insight — a cheap bi-encoder retrieves *wide* for recall, then a more expensive cross-encoder (which reads query + document *together*) reranks *narrow* for precision; keep top-N=20-50, rerank to top-k=3-5. Covers when to add a reran
How do I install it?
Run `npx skills add agentsope/SkillAlchemy --skill agentsop-reranker-stage --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 agentsope/SkillAlchemy, a repository with 255 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.
