Orders up to 50 documents by relevance to a query
rerankOrders up to 50 documents by relevance to a query with the BGE reranker and returns rank, index and score for each. Use it after a keyword or vector search to pick the best few. Scores compare documents within one call only. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.
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": "rerank"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The question or search, up to 500 characters | |
| documents | Yes | 1 to 50 documents, up to 2,000 characters each |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| model | No | ||
| query | No | ||
| results | No | ||
| checkedAt | No |