mlpeek: rerank documents against a query
rerank_documentsRank up to 100 documents by relevance to a query and return sorted scores, so you can select the best matches. Useful for search, filtering, or answer grounding.
Instructions
mlpeek: Rerank up to 100 documents against a query. For pair scores use text_similarity. Returns 1-100 documents scored against a query by the ms-marco-MiniLM-L6-v2 cross-encoder (Apache-2.0) and sorted best first: index, rank, score (sigmoid of the logit, a relevance in 0-1) and logit; top_k keeps the best k. English model. Each text is cut at the model's 512-token window and the answer says so (longest side first). Over 32,768 tokens per request is a 422 too_many_tokens (not charged). Runs an open model pinned by hash on Tanod's own CPU (no LLM, no third-party API); an unavailable model is a 503 (not charged). Typically 0.1-2 s, up to about 10 s at the token budget. Price: USD 0.002. Free: 5 mlpeek calls per IP per UTC day. The submitted text is never logged or stored. Docs: https://tanod.dev/learn/embeddings-rerank-ner-mcp-server.html
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The query (at most 2,000 characters). | |
| top_k | No | Keep the best k (default: all, ranked). | |
| documents | Yes | 1-100 documents, each at most 4,000 characters. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| error | No | Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object. | |
| model | No | ||
| usage | No | ||
| results | No | ||
| max_tokens_per_pair | No |