Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:FlagOpen FlagEmbedding EvalReranker Call

From Leeroopedia


Template:Metadata

Signature

def __call__(
    self,
    corpus: Dict[str, Dict[str, Any]],
    queries: Dict[str, str],
    search_results: Dict[str, Dict[str, float]],
    ignore_identical_ids: bool = False,
    **kwargs,
) -> Dict[str, Dict[str, float]]:

Import:

from FlagEmbedding.abc.evaluation.searcher import EvalReranker

Constructor

EvalReranker(reranker: AbsReranker, rerank_top_k: int = 100)

I/O

Input: corpus, queries, and initial search_results {qid: {docid: score}}.

Output: reranked {qid: {docid: score}}.

Internal Behavior

Internally truncates each query's results to rerank_top_k, creates (query, doc_text) pairs, calls compute_score(), and maps scores back to the original document IDs.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment