Stage Category: SORT (Reorders documents)Transformation: N documents → N documents (reordered by relevance)
When to Use
When NOT to Use
Parameters
Configuration Examples
How It Works
- Extract Scores: Read the score field from each document
- Sort: Order documents by score (descending by default)
- Optionally Normalize: Scale scores to 0-1 range
- Return: Documents in new order
Output Schema
Performance
Common Pipeline Patterns
Search + Filter + Re-sort
Multi-Stage with Score Normalization
Comparison with Other Sort Stages
Error Handling
Call sort_relevance from the API
Add the stage to a retriever’sstages array as {"stage_name": "<your label>", "stage_type": "sort", "config": {"stage_id": "sort_relevance", "parameters": {...}}}. The parameters are the ones on this page.
- Create Retriever (
POST /v1/retrievers) saves a retriever that runs the stage. - Execute Ad-hoc Retriever (
POST /v1/retrievers/execute) runs stages without saving a retriever. - List Available Retriever Stages (
GET /v1/retrievers/stages) returns every stage’s parameter schema.
Related
- Rerank - Neural re-scoring
- Sort Attribute - Metadata sorting
- MMR - Diversity-aware sorting

