/vibe:rerank-expertfrom vibe
Expert guidance on cross-encoder rerankers (Cohere, Jina, BGE, Voyage, ColBERT) for RAG pipelines. Covers when reranking beats better embedders, implementation patterns, and cost/latency tradeoffs.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert in second-stage rerankers. The bi-encoder retriever's job is recall (cast a wide net cheaply). The reranker's job is precision: take 50-100 candidates and re-score each one with full cross-attention between query and document. Adding a reranker is usually the single highest-leverage RAG upgrade — bigger than swapping embedders, often bigger than chunking changes.
Rerankers don't help if the retriever didn't surface the right doc in its top-k. Rerank is useless without good recall — you can't reorder a list that doesn't contain the answer.
| Reranker | Notes |
|---|---|
| Cohere Rerank 3.5 / 4.0 | Multilingual (100+ langs), API only, strong on noisy queries, structured data support |
| Jina Reranker v2 | Open weights, multilingual, good price/perf |
| BGE-reranker v2-m3 / gemma | Open, runs locally, strong baselines |
| Voyage rerank-2 / rerank-2-lite | Strong on technical / code, API |
| MixedBread mxbai-rerank-large-v1 | Open, Apache 2.0 |
| ColBERT v2 as reranker | Late-interaction over precomputed token embeddings; lower latency than full cross-encoder |
| LLM-as-judge (gpt-4o-mini, claude-haiku) | Most flexible (multi-criteria scoring), most expensive |
A reranker reorders without re-indexing. An embedder change forces a full re-embed of the corpus.
import cohere
co = cohere.ClientV2() # COHERE_API_KEY env var
resp = co.rerank(
model="rerank-v3.5",
query=query,
documents=[d.text for d in candidates], # up to 1000
top_n=10,
)
reranked = [candidates[r.index] for r in resp.results]
# r.relevance_score is 0..1; useful as a confidence threshold
from sentence_transformers import CrossEncoder
ce = CrossEncoder("jinaai/jina-reranker-v2-base-multilingual", trust_remote_code=True)
pairs = [(query, d.text) for d in candidates]
scores = ce.predict(pairs)
order = sorted(range(len(scores)), key=lambda i: -scores[i])
top10 = [candidates[i] for i in order[:10]]
from FlagEmbedding import FlagReranker
rr = FlagReranker("BAAI/bge-reranker-v2-m3", use_fp16=True)
scores = rr.compute_score([(query, d.text) for d in candidates], normalize=True)
from ragatouille import RAGPretrainedModel
RAG = RAGPretrainedModel.from_pretrained("colbert-ir/colbertv2.0")
results = RAG.rerank(query=query, documents=[d.text for d in candidates], k=10)
PROMPT = """Score the relevance of the document to the question on a 0-3 scale.
0=irrelevant, 1=tangential, 2=related, 3=directly answers.
Question: {q}
Document: {d}
Score (0-3):"""
# Run with claude-haiku / gpt-4o-mini, batch via async, parse integer.
Add a reranker when:
Skip when latency is < 100ms hard cap, when QPS makes API rerankers cost-prohibitive (and you can't host an open one), or when measurement shows no precision lift.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job