POST /v2/rerank
Provider capabilities
The table below summarizes gateway support for this endpoint by provider.Legend:
- ✅ Supported by Provider and Truefoundry
- Provided by provider, but not by Truefoundry
- Provider does not support this feature
For every gateway endpoint and provider, see Supported APIs.
Reranking is a powerful technique that enhances the relevance of search results. It works by taking a query and a list of documents, then scoring each document based on how relevant it is to the query. This is especially useful in multi-step search pipelines where you:
- Use a traditional or vector-based search system to retrieve candidate documents.
- Use the Rerank API to reorder those candidates based on relevance.
- A query (user input or search question)
- A list of documents (initially retrieved search results)
- Returns a ranked list with relevance scores