Open lsorber opened 1 month ago
The ranking produced by FlashRankRanker is incorrect. It returns the documents in input order.
FlashRankRanker
This statement in flashrank_ranker.py^1
flashrank_ranker.py
ranked_results = [ Result( document=docs[idx], # Returns documents in input order. score=result["score"], rank=idx + 1, ) for idx, result in enumerate(flashrank_results) ]
should be:
ranked_results = [ Result( document=docs[result["id"]], # Returns reranked documents. score=result["score"], rank=idx + 1, ) for idx, result in enumerate(flashrank_results) ]
The ranking produced by
FlashRankRanker
is incorrect. It returns the documents in input order.This statement in
flashrank_ranker.py
^1should be: