cURL
curl --request POST \ --url https://{controlPlaneURL}/api/llm/v2/rerank \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "<string>", "query": "<string>", "documents": [ "<string>" ], "top_n": 123, "max_tokens_per_doc": 123 } '
{ "id": "<string>", "results": [ { "index": 123, "relevance_score": 123 } ] }
Rerank documents based on the given query and parameters.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Optional metadata for the request
Parameters for reranking documents.
Model to generate the response
The query string for reranking.
An array of documents to rerank.
The number of top documents to return.
The maximum number of tokens per document.
Documents reranked successfully.
Id of the rerank response.
Array of results returned by the model.
Show child attributes
Index of the result.
Relevance score of the result.
Was this page helpful?