Reranking
Reranks documents based on their relevance to a query.
Given a query and a list of documents, returns the documents ranked by their relevance to the query. The documents are scored and sorted in descending order of relevance.
post/openai/v1/reranking
Request body
Example request
{
"model": "qwen3-reranker-4b",
"query": "artificial intelligence research",
"docs": [
"Machine learning is a subset of artificial intelligence",
"The weather forecast predicts rain tomorrow",
"Deep learning uses neural networks with multiple layers"
],
"instruction": "Find the most relevant document about AI research"
}Response
OK
Example response
{
"results": [
{
"doc": "Machine learning is a subset of artificial intelligence",
"score": 0.92
}
]
}