Reranks a list of documents based on their relevance to a given query. This endpoint use an LLM/cross-encoder model to compute relevance scores and returns the documents in descending order of relevance.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Rerank request schema for API v3
Model ID to use for reranking
"bge-reranker-v2-m3"
Search query
"What is Python?"
Documents to rank
[
"Python is a programming language",
"Java is a language"
]Rerank method: fast (bi-encoder), standard (cross-encoder), optimal (hybrid bi+cross), best (subspace+attention)
fast, standard, optimal, best Cross-encoder model (required for standard/optimal methods)
Return top N results
x >= 1Stage 1 top-k for hybrid methods (optimal/best)
x >= 1Max tokens per document
x >= 1Batch size for processing
x >= 1Include documents in response
Return the reranked chunks based on similarity