vector_search
Retrieve the k nearest nodes to a query embedding using HNSW vector similarity. Use for semantic search after creating a vector index on a specific label and property.
Instructions
Find the k nearest nodes by vector similarity (HNSW index).
Use this tool when you have an embedding vector and want to find semantically similar nodes. Requires a vector index created via create_vector_index on the same label + property.
Do NOT use this for keyword or property search — use search_nodes_by_label or execute_gql for that.
Args: label: Node label to search within (e.g. "Document"). property: Property that holds the embedding vector (e.g. "embedding"). query_vector: The query embedding as a list of floats. k: Number of nearest neighbors to return (default 10). ef: HNSW search beam width. Higher values improve recall at the cost of speed. Leave as None to use the index default.
Returns: JSON array of {node_id, distance, labels, properties} sorted by distance ascending (most similar first).
Example call: vector_search("Document", "embedding", [0.12, -0.34, ...], k=5)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | ||
| property | Yes | ||
| query_vector | Yes | ||
| k | No | ||
| ef | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |