Vector recall at k
vector_recall_at_kMeasure recall@k for an existing pgvector index against brute-force ground truth, returning mean overlap over sampled table rows to assess index search quality.
Instructions
Measure recall@k of an existing pgvector index against a brute-force ground truth (function-form distance, which pgvector documents as non-indexed). Returns the mean overlap over a sample of rows from the table. Requires the vector 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>",
"column": "<column>",
"id_column": "<id_column>"
},
"name": "vector_recall_at_k"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| table | Yes | ||
| column | Yes | ||
| metric | No | l2 | |
| 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 | ||
| sample_size | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | Yes | ||
| metric | Yes | ||
| mean_recall | Yes | ||
| sample_size | Yes |