Semantic search
semantic_searchFinds rows by meaning in a vector column, via locally embedded text or a similar row. Keeps text on your machine and returns nearest neighbours.
Instructions
Nearest-neighbour search over a pgvector column. Give text to search by meaning, it is embedded by a model running on this machine, so the text never leaves it, or row_id to find rows similar to an existing one. The first text search downloads the embedding model (~23 MB for the default) and may take a minute.
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": {
"table": "<table>",
"column": "<column>"
},
"name": "semantic_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Text to search for. Embedded locally. Not with row_id. | |
| limit | No | Default 10. | |
| table | Yes | Table holding the vector column. | |
| column | Yes | The vector column to search. | |
| metric | No | Distance operator: cosine (default), L2, or inner product. | |
| row_id | No | Primary key of a row to find neighbours of. |