kusto_get_shots
Retrieves KQL query examples matching your prompt to reveal correct databases, tables, and column names for writing accurate queries.
Instructions
Retrieves KQL query examples that semantically resemble the user's prompt.
IMPORTANT: Call this tool BEFORE writing any KQL query. The returned shots contain
expert-written KQL examples that reveal the correct databases, tables, column names,
and query patterns for this cluster. Without this context, you are likely to query
the wrong table or database.
Use this to:
- Discover which databases and tables contain the data you need
- Learn the correct column names and schema for a given domain
- Find proven query patterns as starting points
The returned shots come from a curated collection of expert-written examples
paired with natural language descriptions.
:param prompt: The user prompt to find similar shots for.
:param shots_table_name: Name of the table containing the shots. The table should have "EmbeddingText" (string)
column containing the natural language prompt, "AugmentedText" (string) column containing
the respective KQL, and "EmbeddingVector" (dynamic) column containing the embedding vector
for the NL.
If not provided, uses the KUSTO_SHOTS_TABLE environment variable.
:param cluster_uri: The URI of the Kusto cluster.
:param sample_size: Number of most similar shots to retrieve. Defaults to 3.
:param database: Optional database name. If not provided, uses the "AI" database or the default database.
:param embedding_endpoint: Optional endpoint for the embedding model to use. If not provided, uses the
AZ_OPENAI_EMBEDDING_ENDPOINT environment variable. If no valid endpoint is set,
this function should not be called.
:param client_request_properties: Optional dictionary of additional client request properties.
:return: List of dictionaries containing the shots records.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| cluster_uri | Yes | ||
| shots_table_name | No | ||
| sample_size | No | ||
| database | No | ||
| embedding_endpoint | No | ||
| client_request_properties | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||