{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/RerankRequest", "title": "RerankRequest", "type": "object", "properties": { "model": { "example": "bge-reranker-v2-m3", "description": "The [model](https://docs.pinecone.io/guides/search/rerank-results#reranking-models) to use for reranking.", "type": "string" }, "query": { "example": "What is the capital of France?", "description": "The query to rerank documents against.", "type": "string" }, "top_n": { "example": 5, "description": "The number of results to return sorted by relevance. Defaults to the number of inputs.", "type": "integer" }, "return_documents": { "example": true, "description": "Whether to return the documents in the response.", "default": true, "type": "boolean" }, "rank_fields": { "description": "The field(s) to consider for reranking. If not provided, the default is `[\"text\"]`.\n\nThe number of fields supported is [model-specific](https://docs.pinecone.io/guides/search/rerank-results#reranking-models).\n", "default": [ "text" ], "type": "array", "items": { "type": "string" } }, "documents": { "description": "The documents to rerank.", "type": "array", "items": { "$ref": "#/components/schemas/Document" } }, "parameters": { "example": { "truncate": "END" }, "description": "Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/search/rerank-results#reranking-models) for available model parameters.", "type": "object", "additionalProperties": true } }, "required": [ "model", "documents", "query" ] }