Properties
| Name | Type | Description |
|---|---|---|
| model | string | The [model](https://docs.pinecone.io/guides/search/rerank-results#reranking-models) to use for reranking. |
| query | string | The query to rerank documents against. |
| top_n | integer | The number of results to return sorted by relevance. Defaults to the number of inputs. |
| return_documents | boolean | Whether to return the documents in the response. |
| rank_fields | array | The field(s) to consider for reranking. If not provided, the default is `["text"]`. The number of fields supported is [model-specific](https://docs.pinecone.io/guides/search/rerank-results#reranking-m |
| documents | array | The documents to rerank. |
| parameters | object | Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/search/rerank-results#reranking-models) for available model parameters. |
JSON Schema
{
"$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"
]
}