Reranker Usage Using FlagEmbedding Using Huggingface transformers Fine tune Data format Performance Contact Support The Project Citation Different from embedding model, reranker uses question and document as input and directly output similarity instead of embedding. You can get a relevance score by inputting query and passage to the reranker. And the score can be mapped to a float value in [0,1] by sigmoid function. Usage Using FlagEmbedding Get relevance scores (higher scores indicate more relevance): Using Huggingface transformers Get relevance scores (higher scores indicate more relevance): Fine tune Data Format Train data should be a json file, where each line is a dict like this: query is the query, and pos is a list of positive texts, neg is a list of negative texts. If you have no negative texts for a query, you can random sample some from the entire corpus as the negatives. Besides, for each query in the train data, we used LLMs to generate hard negative for them by asking LLMs to create a document that is the opposite one of the documents in 'pos'. Performance Below is a comparision table of the results we achieved compared to some other pre trained Cross Encoders on the M…
We use cookies for essential functionality and analytics. You can accept or reject analytics cookies.Cookie policy