Skip to main content
Reranking is used as part of a two-stage vector retrieval process to improve the quality of results. You first query an index for a given number of relevant results, and then you send the query and results to a reranking model. The reranking model scores the results based on their semantic relevance to the query and returns a new, more accurate ranking. This approach is one of the simplest methods for improving quality in retrieval augmented generation (RAG) pipelines. Pinecone provides hosted reranking models so it’s easy to manage two-stage vector retrieval on a single platform. You can use a hosted model to rerank results as an integrated part of a query, or you can use a hosted model or external model to rerank results as a standalone operation.
To run through this guide in your browser, see the Rerank example notebook.

Integrated reranking

To rerank initial results as an integrated part of a query, without any extra steps, use the search operation with the rerank parameter, including the hosted reranking model you want to use, the number of reranked results to return, and the fields to use for reranking, if different than the main query. For example, the following code searches for the 3 records most semantically related to a query text and uses the hosted bge-reranker-v2-m3 model to rerank the results and return only the 2 most relevant documents:
The response looks as follows. For each hit, the _score represents the relevance of a document to the query, normalized between 0 and 1, with scores closer to 1 indicating higher relevance.

Standalone reranking

To rerank initial results as a standalone operation, use the rerank operation with the hosted reranking model you want to use, the query results and the query, the number of ranked results to return, the field to use for reranking, and any other model-specific parameters. For example, the following code uses the hosted bge-reranker-v2-m3 model to rerank the values of the documents.chunk_text fields based on their relevance to the query and return only the 2 most relevant documents, along with their score:
The response looks as follows. For each hit, the _score represents the relevance of a document to the query, normalized between 0 and 1, with scores closer to 1 indicating higher relevance.

Rerank results on the default field

To rerank search results, specify a supported reranking model, and provide documents and a query as well as other model-specific parameters. By default, Pinecone expects the documents to be in the documents.text field. For example, the following request uses the bge-reranker-v2-m3 reranking model to rerank the values of the documents.text field based on their relevance to the query, "The tech company Apple is known for its innovative products like the iPhone.".
With truncate set to "END", the input sequence (query + document) is truncated at the token limit (1024); to return an error instead, you’d set truncate to "NONE" or leave the parameter out.
The returned object contains documents with relevance scores:
Normalized between 0 and 1, the score represents the relevance of a passage to the query, with scores closer to 1 indicating higher relevance.

Rerank results on a custom field

To rerank results on a field other than documents.text, provide the rank_fields parameter to specify the fields on which to rerank.
The bge-reranker-v2-m3 and pinecone-rerank-v0 models support only a single rerank field. cohere-rerank-4-fast and cohere-rerank-3.5 support multiple rerank fields, ranked based on the order of the fields specified.
For example, the following request reranks documents based on the values of the documents.my_field field:

Reranking models

Pinecone hosts several reranking models so it’s easy to manage two-stage vector retrieval on a single platform. You can use a hosted model to rerank results as an integrated part of a query, or you can use a hosted model to rerank results as a standalone operation. The following reranking models are hosted by Pinecone.
To understand how cost is calculated for reranking, see Reranking cost. To get model details via the API, see List models and Describe a model.
cohere-rerank-4-fast is Cohere’s latest reranking model (Cohere Rerank 4.0 Fast), improving relevance quality for a wide range of enterprise search applications. Cohere Rerank 4.0 is hosted on Azure AI under the Global Standard deployment type, and requests may be processed in regions outside the United States.Details
  • Modality: Text
  • Max tokens per document: 8,192
  • Max documents: 250
The relevance scores produced by cohere-rerank-4-fast are not directly comparable to those from cohere-rerank-3.5. This does not affect sorting, but any application logic that uses a fixed score threshold to make decisions must be re-calibrated for the new model.For rate limits, see Rerank requests per minute and Rerank requests per month.ParametersThe cohere-rerank-4-fast model supports the following parameters:
cohere-rerank-3.5 is deprecated as of July 1, 2026. Starting August 1, 2026, requests to cohere-rerank-3.5 are automatically served by cohere-rerank-4-fast. Migrate your rerank requests to cohere-rerank-4-fast before then to control the transition yourself. Because cohere-rerank-4-fast returns different relevance scores, re-tune any hard-coded score thresholds before the transition.
cohere-rerank-3.5 is Cohere’s previous-generation reranking model, balancing performance and latency for a wide range of enterprise search applications.Details
  • Modality: Text
  • Max tokens per query and document pair: 40,000
  • Max documents: 200
For rate limits, see Rerank requests per minute and Rerank request per month.ParametersThe cohere-rerank-3.5 model supports the following parameters:
bge-reranker-v2-m3 is a high-performance, multilingual reranking model that works well on messy data and short queries expected to return medium-length passages of text (1-2 paragraphs).Details
  • Modality: Text
  • Max tokens per query and document pair: 1024
  • Max documents: 100
For rate limits, see Rerank requests per minute and Rerank request per month.ParametersThe bge-reranker-v2-m3 model supports the following parameters:
pinecone-rerank-v0 is a state of the art reranking model that out-performs competitors on widely accepted benchmarks. It can handle chunks up to 512 tokens (1-2 paragraphs).Details
  • Modality: Text
  • Max tokens per query and document pair: 512
  • Max documents: 100
For rate limits, see Rerank requests per minute and Rerank request per month.ParametersThe pinecone-rerank-v0 model supports the following parameters: