Rerank API
Rerank Retrieval Results, Double Your RAG Quality
Vector search shortlists fast; reranking scores every candidate against the query for true relevance — feed your LLM only what matters.
Coarse Recall
Vector/keyword retrieval quickly pulls dozens of roughly relevant candidates from huge corpora — fast but imprecise.
Rerank
Score every candidate for true relevance to the query and bring the best to the top.
Feed the LLM
Only the most relevant few entries become context — sharper answers, fewer tokens.
API Docs
Request Example
curl https://www.dxnt.com/v1/rerank \
-H "Authorization: Bearer $DXNT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "报销流程是什么",
"documents": [
"差旅报销指南…",
"年假制度…",
"报销审批流…"
],
"top_n": 3
}'Call with your dxnt API key (create one under Console > API Tokens).
Response Example
{
"model": "dxnt-rerank-v1",
"results": [
{ "index": 2, "relevance_score": 0.92 },
{ "index": 0, "relevance_score": 0.61 },
{ "index": 1, "relevance_score": 0.08 }
]
}results are sorted by relevance_score descending; index refers to the document position in the request.
Request Parameters
queryThe search query, requireddocumentsDocument array (max 200), requiredtop_nReturn top N results, defaults to allBilling
- ¥0.01/call, charged on success only
- Bonus balance first, main balance as fallback
- Shared balance with search API and :online
Add a Reranker to Your RAG
Create an API key and run your first rerank with a single curl.