neighbors
Find k nearest rows or a point in high-dimensional data, returning distances, positions, selected columns, and relative contrast vs a random row. Supports scikit-learn metrics and standardization.
Instructions
k nearest neighbours of one row (index = row label or integer position) or of an explicit point (vector in feature order), in the original high-dimensional space. Returns distances, positions and a few columns of each neighbour, plus how those distances compare with the distance to a random row (relative contrast). metric: any scikit-learn metric (euclidean, cosine, manhattan, ...); cosine is usually the right choice for embeddings and other hub-prone spaces. standardize: False (default), True or 'auto'.
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": {
"name": "<name>"
},
"name": "neighbors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| name | Yes | ||
| index | No | ||
| point | No | ||
| metric | No | euclidean | |
| columns | No | ||
| features | No | ||
| standardize | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |