TurboQuant rerank candidates
turboquant_rerank_candidatesRetrieve approximate candidates from a turboquant index, then rerank them with SQL-side exact distance calculations to return final results with approximate and exact ranks.
Instructions
Run tq_rerank_candidates against a turboquant index — approximate retrieval followed by SQL-side exact rerank to final_limit results. Returns the candidates with both approximate and exact ranks / distances. half_precision=True switches to the halfvec overload. Requires the pg_turboquant extension.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schema": "<schema>",
"table": "<table>",
"id_column": "<id_column>",
"embedding_column": "<embedding_column>",
"query_vector": "<query_vector>",
"metric": "<metric>",
"candidate_limit": "<candidate_limit>",
"final_limit": "<final_limit>"
},
"name": "turboquant_rerank_candidates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| metric | Yes | ||
| probes | No | ||
| schema | Yes | ||
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. | |
| id_column | Yes | ||
| final_limit | Yes | ||
| query_vector | Yes | ||
| half_precision | No | ||
| candidate_limit | Yes | ||
| embedding_column | Yes | ||
| oversample_factor | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |