Edit

What is Copilot for writing queries in KQL Queryset?

Copilot helps you transform your natural language questions into Kusto Query Language (KQL) queries effortlessly. Describe your data analysis or extraction needs in plain language, and Copilot generates the corresponding KQL query for you. This functionality empowers users of all skill levels, even those unfamiliar with KQL, to explore and analyze data with ease and efficiency.

For billing information about Copilot, see Announcing Copilot in Fabric pricing.

Prerequisites

Note

How Copilot for writing queries in KQL works

Copilot, powered by OpenAI's advanced language capabilities, simplifies the process of creating Kusto Query Language (KQL) queries by translating natural language questions into KQL. This feature eliminates the complexity of learning KQL, making it accessible to both experienced data analysts and citizen data scientists. This streamlines data analysis and boosts productivity by making query creation intuitive and straightforward.

Copilot supports conversational interactions which allows you to clarify, adapt, and extend your queries dynamically, all while maintaining the context of your previous inputs. You can refine queries and ask follow-up questions without starting over:

  • Dynamic query refinement: You can refine the initial KQL generated by Copilot by refining your prompt to remove ambiguity, specify tables or columns, or provide more context.

  • Seamless follow-up questions: If the generated KQL is correct but you want to explore the data more deeply, you can ask follow-up questions related to the same task. You can expand the scope of your query, add filters, or explore related data points by building on previous dialogue.

How to access Copilot for writing KQL queries

Access Copilot in Fabric in two ways:

  • Through a KQL queryset : Go to a new or existing KQL queryset and use the Copilot feature to generate queries from natural language prompts.

  • Through the Edit tile in Real-Time Dashboards: When editing a tile in a Real-Time dashboard, use Copilot to help create or refine KQL queries directly within the dashboard editing experience.

How to use Copilot for writing queries in KQL

Follow the steps to use Copilot in either context:

  1. In the Copilot pane, enter your question in natural language and press Enter.

    After a few seconds, Copilot generates a KQL query based on your input. You can copy the query to the clipboard, Insert it to the query editor, or Replace the query in context with it. To run the query in the query editor, you must have write access to the KQL queryset.

  2. Select the Run button to execute the query.

    Screenshot of copilot use in KQL queryset in Real-Time Intelligence.

    Note

    • Copilot doesn't generate control commands.
    • Copilot doesn't automatically run the generated KQL query. Run the queries at your own discretion.

You can continue to ask follow-up questions or further refine your query. To start a new chat, select the speech bubble on the top right of the Copilot pane (1).

Hover over a previous question (2) and select the pencil icon to copy it to the question box to edit it or copy it to your clipboard.

Screenshot showing how to copy or edit a previous question.