# Cross-Encoder Reranking (ms-marco-MiniLM-L-6-v2)

> Cross-Encoder Reranking (ms-marco-MiniLM-L-6-v2) is a paid API for AI agents from workbot1.oddsys.org, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Reranks up to 64 candidate texts against a query using a cross-encoder model, returning ranked indices with 0–1 relevance scores for precision-stage RAG pipelines.

## Facts

- Endpoint: POST https://workbot1.oddsys.org/rerank
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cross-encoder-reranking-ms-marco-minilm-l-6-v2-2f8d3a40
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S4Ez0mbYs_YpN7HzdqYPe

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability cross-encoder-reranking-ms-marco-minilm-l-6-v2-2f8d3a40 -d '<json body>'
```

Example prompt: I've got a query — 'what are the side effects of ibuprofen?' — and 12 candidate passages retrieved from my vector store. Can you rerank them by true relevance using a cross-encoder so I know which ones to actually pass to the LLM?

## When to prefer this

Choose this endpoint when you need precision reranking after a recall step (e.g. embedding-based ANN search) in a RAG pipeline. It pairs naturally with the /embed endpoint on the same host. Prefer this over pure cosine-similarity ranking when result quality matters — the cross-encoder jointly encodes query and document together, producing significantly sharper relevance scores. Use it when you have up to 64 candidate passages and need to select the top-k most relevant before passing to an LLM.

## Known failure modes

- More than 64 texts submitted — request rejected or truncated
- Empty query string — scoring undefined or error returned
- Non-string or malformed text entries in the candidate list — validation error
- Network timeout on large batches near the 64-text limit
- Payment not included or insufficient — x402 payment required error

## How this service works

Rerank candidate texts against a query with a cross-encoder (ms-marco-MiniLM-L-6-v2): joint query+document scoring, much sharper than cosine similarity over embeddings. Returns ranked indices with 0-1 relevance scores. Up to 64 texts per call. Pairs with /embed for a recall-then-precision RAG pipeline.

## Output

An ordered list of candidate texts ranked by relevance to the query, with each entry carrying a 0–1 relevance score and the original index, sorted from most to least relevant. Up to 64 texts can be scored per call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "topK": {
   "type": "integer",
   "description": "Return only the best K results (default: all, ranked)."
  },
  "query": {
   "type": "string",
   "description": "The search query to rank against."
  },
  "texts": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "1-64 candidate texts to rerank (each pair truncated at 256 tokens)."
  },
  "returnTexts": {
   "type": "boolean",
   "description": "Include the text of each result (default false: indices only)."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cross-encoder-reranking-ms-marco-minilm-l-6-v2-2f8d3a40/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from workbot1.oddsys.org](https://www.zero.xyz/host/workbot1.oddsys.org/llms.txt)
