batch_similarity_search
Runs exact cosine similarity search between query embeddings (M x D) and corpus embeddings (N x D) on distributed GPUs using OUTPUT_GRID_2D zero-reduction tiling.
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": {
"queries": "<queries>",
"corpus_embeddings": "<corpus_embeddings>"
},
"name": "batch_similarity_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dtype | No | Target GEMM precision. | fp32 |
| top_k | No | Number of top matching corpus indices and scores to return per query. | |
| queries | Yes | File path (.npy/.npz/.safetensors) or inline 2D array of shape (M, D). | |
| output_path | No | Optional file path (.npy/.safetensors) to save the full similarity matrix. | |
| corpus_embeddings | Yes | File path (.npy/.npz/.safetensors) or inline 2D array of shape (N, D). |