Rerank search results
rank_textsScore and sort up to 50 passages or search results by how well they answer a query, boosting RAG and search relevance.
Instructions
Score and sort up to 50 passages, documents or search results by how well they answer a query (BGE reranker). Drop-in quality boost for RAG and search pipelines. Costs $0.002 per call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>",
"documents": "<documents>"
},
"name": "rank_texts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The question or search query. | |
| top_k | No | Return only the best N. Default: all. | |
| documents | Yes | Passages to rank. |