协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
reranking【开发与工程】Rerank BEIR retrieval results with cross-encoder, MonoT5, SBERT, or custom pair-scoring models and re-evaluate top-k changes.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when you already have BEIR-style corpus, queries, and retrieval results, and need to rescore a candidate set with a pair-scoring model.
beir.reranking.Rerank.predict(sentence_pairs, batch_size=...).EvaluateRetrieval.rerank routing belong to retrieval-evaluation.data-loading.training.references/api-reference.md for Rerank, model protocol, pair construction, and result shape.references/workflows.md for BM25/dense + reranker recipes and evaluation handoff.references/troubleshooting.md for common reranking failures.scripts/rerank_smoke.py for a no-download deterministic check of top-k truncation and score replacement.from beir.reranking import Rerank
from beir.reranking.models import CrossEncoder
from beir.retrieval.evaluation import EvaluateRetrieval
reranker = Rerank(CrossEncoder("cross-encoder/ms-marco-MiniLM-L-6-v2"), batch_size=128)
rerank_results = reranker.rerank(corpus, queries, results, top_k=100)
ndcg, _map, recall, precision = EvaluateRetrieval.evaluate(qrels, rerank_results, k_values)
rerank_results contains only the candidates passed into reranking, scored by the reranker; it is not merged back with non-reranked retrieval hits.