Supported APIs
Rerank
Description of your new file.
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.
Reranking helps boost precision in semantic search, chatbots, RAG systems, and knowledge retrieval systems.
The reranker takes:
- A query (user input or search question)
- A list of documents (initially retrieved search results)
- Returns a ranked list with relevance scores
Code Snippet
Expected Output
In this example, the document “New Delhi is the capital of India.” has a higher relevance score to the query compared to “The sky is blue.”, and is therefore ranked higher.