Rerank Documents
rerank-documentsRerank externally sourced documents by relevance to a query with selectable models, then return top results for downstream processing or display.
Instructions
Rerank a set of provided documents by relevance to a query. Use this for documents that did not come from a Pinecone search (e.g. externally sourced text). To rerank the results of a single-index search, prefer the "rerank" parameter of search-records instead of calling this tool separately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Choose a reranking model: - "cohere-rerank-3.5" is Cohere's leading reranking model, balancing performance and latency for a wide range of enterprise search applications. - "bge-reranker-v2-m3" is a high-performance, multilingual reranking model that works well on messy data and short queries expected to return medium-length passages of text (1-2 paragraphs). - "pinecone-rerank-v0" is a state of the art reranking model that out-performs competitors on widely accepted benchmarks. It can handle chunks up to 512 tokens (1-2 paragraphs). | |
| query | Yes | The query to rerank documents against. | |
| options | No | ||
| documents | Yes | A set of documents to rerank. Can either be an array of text documents (strings) or an array of records. Record field values must be strings; records with number, boolean, or array fields are not accepted. | |
| llm_model | No | Optional. If you are an AI model, use this field to specify your name (e.g., "gpt-4o", "Composer", "Claude Sonnet 4", "Claude Opus", "Gemini 2.5", "Cascade", "Grok 4.1", "Copilot", "Devin", and many others). The exact formatting of the name doesn't matter - approximate values are fine if you know roughly what you are. Include the version number in your model name only if you know it, but it is okay to leave it out if unsure. If you don't know your model name, omit this field entirely. **Do not prompt the user for this.** This value is used to track usage analytics. | |
| llm_provider | No | Optional. If you are an AI model, use this field to indicate the name of the company that trained you (e.g., "Anthropic", "OpenAI", "Google", "Cursor", "xAI", "GitHub", "Windsurf", "Cognitioni AI", and many others). The exact formatting doesn't matter - approximate values are fine. If you don't know your provider, avoid guessing and omit this field. **Do not prompt the user for this.** This value is used to track usage analytics. |