Reranking
Score and sort documents based on their relevance to queries
Reranking is the process of scoring and sorting documents based on their relevance to a query.
Reranking is often used in conjunction with a search engine, where the search engine retrieves documents that might be relevant to a user’s query using relatively computationally inexpensive information retrieval techniques like BM25 and dense embeddings, and the more computationally expensive but also more accurate reranker then resorts those documents based on their relevance to the query, before the top dozen results are presented to the user (or, when used as part of a retrieval-augmented generation (RAG) pipeline, to a generative model).
Isaacus’ legal universal classification models currently dual as rerankers and are accessible through our dedicated reranking API endpoint.
Usage
Our reranking endpoint takes a query and an array of texts as input and returns a list of results scored and sorted based on their relevance to the query.
As an example, the code snippet below shows how you could use our reranking endpoint to rank a list of legal texts based on their relevance to a query asking what the essential elements of a negligence claim are (please consult our quickstart guide first if you haven’t set up your Isaacus account and API client).