tigergraph__search_top_k_similarity
Find top-K most similar vertices to a query vector using TigerGraph's vector index. Returns ranked results with distance scores, requiring matching vector dimensions.
Instructions
Perform vector similarity search using TigerGraph's vectorSearch() function. Returns top-K most similar vertices with distance scores.
IMPORTANT: The query_vector dimensions MUST match the dimension defined in the vector attribute (e.g., if the attribute was created with DIMENSION=1536, the query vector must have exactly 1536 elements). A dimension mismatch will cause the search to fail or return incorrect results.
Use list_vector_attributes to check the expected dimension before searching.
Related Tools: list_vector_attributes (check dimension), fetch_vector (retrieve vector values), get_vector_index_status (check index readiness)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ef | No | Exploration factor for HNSW algorithm. Higher = more accurate but slower. | |
| top_k | No | Number of top similar results to return. | |
| profile | No | Connection profile name. Omit to use the active default profile. Use 'list_connections' to see available profiles. | |
| graph_name | No | Name of the graph. If not provided, uses default connection. | |
| vertex_type | Yes | Type of vertices to search. | |
| query_vector | Yes | Query vector for similarity search. | |
| return_vectors | No | Whether to return the vector values (can be large). | |
| vector_attribute | Yes | Name of the vector attribute to search. |