---
title: "Reranking"
description: "Search result reordering techniques using alternative models to improve search relevance and accuracy."
url: https://docs.weaviate.io/weaviate/concepts/reranking
---

# Reranking

Reranking seeks to improve search relevance by reordering the result set returned by a search with a different model.

Reranking computes a relevance score between the query and each data object, and returns the list of objects sorted from the most to the least relevant. Computing this score for all `(query, data_object)` pairs would typically be prohibitively slow, which is why reranking is used as a second stage after retrieving the relevant objects first.

As the reranker works on a smaller subset of data after retrieval, different, potentially more computationally expensive approaches can be used to improve search relevance.

> [!NOTE]
>
> Learn how to [set up a reranker for your collection](https://docs.weaviate.io/weaviate/manage-collections/generative-reranker-models#specify-a-reranker-model-integration) and [apply reranking to your search results](https://docs.weaviate.io/weaviate/search/rerank).

## Reranking in Weaviate

With our reranker modules, you can conveniently perform [multi-stage searches](https://weaviate.io/blog/cross-encoders-as-reranker) without leaving Weaviate.

In other words, you can perform a search - for example, a vector search - and then use a reranker to re-rank the results of that search. Our reranker modules are compatible with all of vector, bm25, and hybrid searches.

### An example GraphQL query with a reranker

You can use reranking in a GraphQL query as follows:

```graphql
{
  Get {
    JeopardyQuestion(
      nearText: {
        concepts: "flying"
      }
      limit: 10
    ) {
      answer
      question
      _additional {
        distance
        rerank(
          property: "answer"
          query: "floating"
        ) {
          score
        }
      }
    }
  }
}
```

This query retrieves 10 results from the `JeopardyQuestion` class, using a hybrid search with the query “flying”. It then re-ranks the results using the `answer` property, and the query “floating”.

You can specify which `property` of the `JeopardyQuestion` class you want to pass to the reranker. Note that here, the returned `score` will include the score from the reranker.

## Further resources

> [!NOTE]
>
> **Related pages**
>
> - [API References: GraphQL - Additional properties](https://docs.weaviate.io/weaviate/api/graphql/additional-properties#rerank)
> - [How-to search: Rerank](https://docs.weaviate.io/weaviate/search/rerank)
> - [Cohere reranker integration](https://docs.weaviate.io/weaviate/model-providers/cohere/reranker)
> - [Transformers reranker integration](https://docs.weaviate.io/weaviate/model-providers/transformers/reranker)
> - [VoyageAI reranker integration](https://docs.weaviate.io/weaviate/model-providers/voyageai/reranker)
