Semantic search in a vector collection
semantic_searchSearch vector collections for items closest in meaning to a natural-language query; return matching IDs, similarity scores, and metadata, with optional metadata filters applied after top-k retrieval.
Instructions
Find the k items in a vector collection closest in meaning to a natural-language query: the tool embeds query_text with the engine's configured embedding model, searches the collection, and returns {results: [{id, similarity, metadata}], count, collection}. Use it for vector collections; for vectors stored in SQL table columns, use query with EMBED() and COSINE_SIMILARITY(). filter keeps only results whose metadata equals the given values and is applied after the top-k search, so fewer than k results can come back. Read-only.
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": {
"collection": "<collection>",
"query_text": "<query_text>"
},
"name": "semantic_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Number of nearest matches to return (default 10, max 1000). | |
| filter | No | Metadata values results must equal, e.g. {"category": "electronics"}; applied after the top-k search. | |
| collection | Yes | Name of the vector collection to search. | |
| query_text | Yes | Natural-language text to search for; it is embedded for you. |