Closed yilinjz closed 10 months ago
Rank Vicuna and Rank_LLM already have a rerank that gets a dataset, retrieves its top k candidates and then uses the provided model to rerank them. Please look at run_rank_llm.py
to see how the current functionally works.
If you want the added functionality for reranking the provided documents, or hits, it should not replace the current functionality. But added as extra.
I feel it is fine to disentangle these? Rerank should ideally only work on reranking and not entangled with retriever? We should reorganise And have say another retrieve_and_rerank method that mirrors what you have but in a different module.
@sahel-sh @ronakice Updated the PR with changes we discussed last week.
A few questions:
Accidentally closed this when resolving a conflict... made another PR here https://github.com/castorini/rank_llm/pull/24
Rerank can take either query + docs or query + hits; examples can be found in the newly added demo/ folder.
The following fields of RankVicuna are given default values:
Removed two fields from RankLLM (top_k_candidates and dataset); RankVicuna currently does not use those two flags, and since RankVicuna inherited from RankLLM (and RankLLM does not use them either) I removed them from RankLLM as well.