Reranking
Do Rerank
Reranks documents by relevance.
Authorization
bearer AuthorizationBearer <token>
In: header
Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/rerank" \ -H "Authorization: Bearer {{YOUR_API_KEY}}" \ -H "Content-Type: application/json" \ -d '{ "model": "bge-reranker-v2-m3", "query": "What is vLLM, and what problems does it primarily solve?", "documents": [ "Transformers is a deep-learning model developed by Google, primarily for natural-language processing tasks.", "vLLM is an efficient library designed for large language model (LLM) inference and serving. Its PagedAttention technology significantly improves throughput.", "PyTorch is an open-source machine-learning framework widely used in computer vision and natural-language processing.", "PagedAttention is one of vLLM\'s core technologies. It efficiently manages the key-value cache during LLM inference to reduce wasted memory.", "The vLLM project aims to make large language model serving faster and easier while reducing deployment costs." ], "top_n": 3 }'"{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"embedding\",\n \"embedding\": [\n 0.0023064255,\n -0.009327292,\n .... (1536 floats total for ada-002)\n -0.0028842222\n ],\n \"index\": 0\n }\n ],\n \"model\": \"text-embedding-ada-002\",\n \"usage\": {\n \"prompt_tokens\": 8,\n \"total_tokens\": 8\n }\n}"