You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "Provider-specific options. dmr: runtime_flags. anthropic: interleaved_thinking (boolean, default false). openai/anthropic/google: rerank_prompt (string) to fully override the system prompt used for RAG reranking (advanced - prefer using results.reranking.criteria for domain-specific guidance).",
281
281
"additionalProperties": true
282
282
},
283
283
"track_usage": {
@@ -820,6 +820,45 @@
820
820
},
821
821
"additionalProperties": false
822
822
},
823
+
"reranking": {
824
+
"type": "object",
825
+
"description": "Configuration for reranking results using a specialized reranking model. Reranking re-scores the retrieved results to improve relevance accuracy.",
826
+
"properties": {
827
+
"model": {
828
+
"type": "string",
829
+
"description": "Model reference for reranking (can be inline like 'dmr/model-name' or a reference to a defined model)",
"description": "Optional: only rerank top K results for efficiency. When unset or 0, defaults to the global results.limit (which itself defaults to 15).",
838
+
"minimum": 0,
839
+
"default": 0
840
+
},
841
+
"threshold": {
842
+
"type": "number",
843
+
"description": "Optional: minimum score threshold after reranking (filter results below this score)",
844
+
"minimum": 0,
845
+
"maximum": 1,
846
+
"default": 0.5
847
+
},
848
+
"criteria": {
849
+
"type": "string",
850
+
"description": "Optional: domain-specific relevance criteria to guide scoring. This text is appended to the base reranking prompt to customize what 'relevance' means for your use case. Supported by OpenAI, Anthropic, and Gemini providers (not DMR native reranking).",
851
+
"examples": [
852
+
"Prioritize recent information and practical examples over historical context",
853
+
"When scoring relevance, focus on code examples and implementation details"
854
+
]
855
+
}
856
+
},
857
+
"required": [
858
+
"model"
859
+
],
860
+
"additionalProperties": false
861
+
},
823
862
"deduplicate": {
824
863
"type": "boolean",
825
864
"description": "Remove duplicate documents across strategies",
**Best for:** Strategies using the same scoring scale. Takes maximum score.
788
788
789
+
### Result Reranking
790
+
791
+
Reranking re-scores retrieved documents using a specialized model to improve relevance. This is applied **after** retrieval and fusion, but **before** the final limit.
792
+
793
+
#### Why Rerank?
794
+
795
+
Initial retrieval strategies (embeddings, BM25) are fast but approximate. Reranking uses a more sophisticated model to:
0 commit comments