Rerank documents by query relevance
post
/vecdb/rerank
Score and order documents by relevance to a query using an ONNX reranker hosted in the database.
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object-
debugFlags: object
VectorDebugFlags
Debug flags to be used to trace vector modules
-
documents(required): array
documents
Minimum Number of Items:
1Array of raw document strings to score. -
modelName(required): string
The name of the ONNX reranking model hosted in the database.
-
modelParams: object
modelParams
Additional Properties Allowed:
trueModel-specific parameters. -
query(required): string
Natural language query to use for reranking.
Nested Schema : VectorDebugFlags
Type:
objectDebug flags to be used to trace vector modules
Show Source
-
VEC_INDEX_CALIBRATION: string
Allowed Values:
[ "low", "medium", "high" ] -
VECIDX_TRANS: string
Allowed Values:
[ "low", "medium", "high" ] -
VECIDX_TRANS_COM: string
Allowed Values:
[ "low", "medium", "high" ] -
VECIDX_TRANS_PJ: string
Allowed Values:
[ "low", "medium", "high" ] -
VECIDX_TRANS_PJ_DWNGRD: string
Allowed Values:
[ "low", "medium", "high" ] -
VECIDX_TRANS_PJ_GROW: string
Allowed Values:
[ "low", "medium", "high" ] -
VECIDX_TRANS_SJ: string
Allowed Values:
[ "low", "medium", "high" ] -
VECIDX_TRANS_SJ_BG: string
Allowed Values:
[ "low", "medium", "high" ] -
VECTOR_INDEX: string
Allowed Values:
[ "low", "medium", "high" ] -
VECTOR_INDEX_FIXED_VIEW: string
Allowed Values:
[ "low", "medium", "high" ] -
VECTOR_INDEX_NEIGHBOR_GRAPH: string
Allowed Values:
[ "low", "medium", "high" ] -
VECTOR_INDEX_NEIGHBOR_GRAPH_APPCHNG: string
Allowed Values:
[ "low", "medium", "high" ] -
VECTOR_INDEX_NEIGHBOR_GRAPH_BUILD: string
Allowed Values:
[ "low", "medium", "high" ] -
VECTOR_INDEX_NEIGHBOR_GRAPH_MEM: string
Allowed Values:
[ "low", "medium", "high" ] -
VECTOR_INDEX_NEIGHBOR_GRAPH_SEARCH: string
Allowed Values:
[ "low", "medium", "high" ] -
VECTOR_INDEX_NEIGHBOR_GRAPH_STATS: string
Allowed Values:
[ "low", "medium", "high" ] -
VECTOR_INDEX_NEIGHBOR_PARTITIONS: string
Allowed Values:
[ "low", "medium", "high" ] -
VECTOR_TRACE: string
Allowed Values:
[ "low", "medium", "high" ]
Nested Schema : documents
Type:
arrayMinimum Number of Items:
1Array of raw document strings to score.
Show Source
Nested Schema : modelParams
Type:
objectAdditional Properties Allowed:
trueModel-specific parameters.
Show Source
-
provider: string
Optional model provider (e.g., 'database').
Security
-
BasicAuth: http
Type:
http -
BearerAuth: http
Type:
http -
OAuth2: oauth2
Type:
oauth2
Response
Supported Media Types
- application/json
- application/problem+json
200 Response
Rerank scores for each input document in descending relevance.
Root Schema : VectorRerankResponse
Type:
arrayList of rerank results sorted by descending relevance.
Show Source
Nested Schema : VectorRerankItem
Type:
Show Source
object-
index(required): integer
(int32)
Zero-based index of the input document in the request payload.
-
score(required): number
(double)
Relevance score for the document (higher is more relevant).
400 Response
The request body included invalid parameters.