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 reranker (and when not to), N-vs-k tuning, model choice (Cohere/Voyage API vs bge-reranker local vs SentenceTransformer cross-encoder), latency/cost budgeting, and the cross-framework mapping (LlamaIndex node postprocessors, LangChain ContextualCompressionRetriever, Cohere/Voyage rerank APIs, local cross-encoders). This is an ENHANCE overlay over the per- framework skills — cross-link [[llamaindex]] and [[agentsop-hybrid-retrieval]] for the deep API. Search keywords: cross-encoder, Cohere rerank, bge reranker, rerank RAG, ColBERT, retrieval reranking, improve RAG precision, retrieve wide rerank narrow.trigger_keywords: - "reranker" - "rerank" - "cross-encoder" - "CohereRerank" - "bge-reranker" - "SentenceTransformerRerank" - "node postprocessor" - "ContextualCompressionRetriever" - "voyage rerank" - "top_n after retrieval" - "retrieve wide rerank narrow"
$npx -y skills add agentsope/skillalchemy --skill agentsop-reranker-stageInstalls into the current project.
Run `npx skills use "https://github.com/agentsope/skillalchemy" --skill "agentsope/skillalchemy/agentsop-reranker-stage"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/agentsope/skillalchemy" that are relevant to the current task. Run `npx skills add "https://github.com/agentsope/skillalchemy"` and select the relevant skills, then follow their instructions.