Vector recall at k
vector_recall_at_kMeasures recall@k of a pgvector index by comparing indexed search results with brute-force ground truth, outputting the mean overlap over a sample of rows.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| table | Yes | ||
| column | Yes | ||
| metric | No | l2 | |
| schema | Yes | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. | |
| id_column | Yes | ||
| sample_size | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | Yes | ||
| metric | Yes | ||
| mean_recall | Yes | ||
| sample_size | Yes |