Stage Category: SORT (Reorders documents)Transformation: N documents → top_k documents (re-ranked by relevance)
When to Use
When NOT to Use
Parameters
Default model
The stage callsBAAI__bge_reranker_v2_m3 when you omit inference_name. A deployment serves only the models it has turned on, so that model may be absent.
To find what a deployment serves, save the retriever. If the model is not served, the save returns a 422. Its details.served_alternatives lists the served reranking models, and details.default says whether the refused model was the default. Set inference_name to one of the listed models.
With on_error: "skip" the save skips this check. Execution then skips the stage and names the skip in warnings.
Scores after rerank
The stage orders documents byscores.rerank (or your score_field) and leaves score as the retrieval score, so score is not in descending order after this stage. Read or threshold scores.rerank when you want the value that ordered the results. The stage’s metadata names that field as ordered_by, and a score_normalize stage needs it set as its score_field.
Available Models
Availability depends on the deployment, as described in Default model.
Jev scores each query and document pair in its own request, so no document affects another document’s score. Pairs run concurrently. Set
relevance_criteria to the exact condition you rank on. Jev reads it word for word.
With a decision model, stage metadata names the model that scored the documents in model_used and says whether its probabilities are calibrated in probabilities_calibrated.
On 100 SciFact claims, reranking the top 30 vector results with Jev raised nDCG@10 from 0.817 to 0.880 at 669 ms per query. The same rerank through mixpeek__decision with gemini-2.5-flash-lite scored 0.806 at 2.1 s.
For other models, deploy your own via a custom extractor and reference it with feature_uri.
Text only
Rerank scores text. It readsdocument_field as a string and never opens an image, a video or a URL. No served reranker scores image content.
The exception is the default
document_field: when no candidate has content, the stage uses text and says so in warnings.
For documents with only an image:
- Rank them with
feature_searchon an image embedding. A multimodal embedding takes a text query. - Reorder them with
maxsim_rerankif they hold token vectors from a multi-vector visual feature. - Store a caption or OCR text at ingest, and set
document_fieldto that field.
Configuration Examples
How Cross-Encoders Work
Cross-encoders see the full context of both query and document together, enabling better understanding of semantic relationships.
Two-Stage Retrieval Pattern
The recommended pattern is fast recall followed by precise reranking:- Search stage: Fast, retrieves 100 candidates (< 20ms)
- Rerank stage: Slower but precise, picks best 10 (50-100ms)
- Total: High-quality results in 70-120ms
Performance
Output
Each returned document includes:Common Pipeline Patterns
Search + Rerank + Limit
Search + Filter + Rerank
Custom Reranker (BYO Model)
Use your own reranker model deployed as a custom extractor instead of the built-in models. Setfeature_uri to route reranking through your extractor’s inference endpoint.
Parameters
Your plugin must accept
{pairs: [[query, doc], ...]} and return {scores: [float, ...]}.
Configuration Example
Trade-offs
Related
- Feature Search - Initial candidate retrieval
- Feature Search - Combined vector + text search
- Sort Attribute - Simple attribute sorting

