The rerank endpoint takes a search query and a list of candidate documents and returns them sorted by relevance. Use it as a second-pass ranker after an initial retrieval step (such as a vector search) to improve the quality of your results in RAG pipelines and search applications.Documentation Index
Fetch the complete documentation index at: https://doc.hitopen.com/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Request parameters
The reranking model to use. Common values include
rerank-english-v2.0, rerank-multilingual-v2.0, and bge-reranker-v2-m3. Check with your admin for available models.The search query. Documents are ranked by their relevance to this query.
The list of candidate documents to rank. You can pass plain strings or objects with a
text field. The order does not matter — the response returns items sorted by relevance score.If specified, only the top
n most relevant documents are returned. If omitted, all documents are returned with their scores.When
true, the original document content is included in the response alongside the scores. When false, only the original index and score are returned.Response fields
Unique identifier for the rerank request.
Documents sorted in descending order of relevance. The most relevant document is at index
0.Additional metadata about the request, such as billed units.