You can use Dynatrace Intelligence generative AI in Dashboards and Notebooks to explore your data through natural language. It allows you to translate your conversational prompts directly into DQL queries that reflect the context of your environment. You can choose to auto-execute generated queries or generate DQL only.
This page assumes that you have completed the setup described in Getting started with Dynatrace Intelligence generative AI.
Go to
Notebooks and open or create a notebook you can edit.
Open the Add menu and select Prompt. A new Generative AI notebook section is created with an empty prompt box.
In the prompt box, type a prompt. Try average cpu usage percentage by host or see the examples displayed in the web UI for inspiration.
Optional If your prompt doesn't specify the timeframe, you can still specify it in your section header. The default is Last 2 hours.
Select Run. Generative AI creates and runs the query for you.
Optional If you want to see the generated query before running it, open the menu next to the Run button and select Generate DQL only.
Review the results.
Optional Select the Options in the section header to change the visualization (refer to the visualization-specific documentation for more information).
To have Dynatrace automatically select a visualization for your query, turn on Auto select in the upper-right corner of your visualization settings pane.
Go to
Dashboards and open or create a dashboard you can edit.
Open the Add menu and select Prompt.
Optional At the top of the prompt definition panel, enter a tile title.
In the prompt box, type a prompt. Try average cpu usage percentage by host or see the examples displayed in the web UI for inspiration.
Optional If your prompt doesn't specify a timeframe, you can still specify it for the dashboard in your dashboard header (default is Last 2 hours) or the Custom timeframe settings (for a tile-specific timeframe).
Select Run. Generative AI creates and runs the query for you.
Review the results.
Optional Select the Visual tab to change the visualization (refer to the visualization-specific documentation for more information).
Even though Dynatrace Intelligence generative AI is not charged for, all queries that are executed by generative AI are subject to licensing consumption according to your existing licensing agreement.
Environment-aware queries enrich Dynatrace Intelligence generative AI with your environment data. This lets you generate more accurate queries that identify and reference relevant entities, events, spans, logs, and metrics from your environment. You can also run more complex data analyses by asking Dynatrace Intelligence generative AI about the specifics of your data. To learn more about how to control and manage which data Dynatrace Intelligence generative AI has access to and how to enable environment-aware queries, see Enable environment-aware queries.
Once enabled, Dynatrace Intelligence generative AI periodically scans your Grail data to create its own semantic index. Certain data fragments are sent to Microsoft Azure OpenAI during the semantic indexing. Examples of such data fragments include metric keys, dimensions, and field names. When a user provides a prompt, Dynatrace Intelligence generative AI first identifies the most relevant fragments from the data it has indexed. OUr generative AI then sends the user prompt, the relevant data fragments, and some examples of field values observed in your environment to Microsoft Azure OpenAI for processing.
Having environment-aware queries enabled allows Dynatrace Intelligence generative AI to identify unique data fields and custom metrics in your environment and helps you do your analysis by combining your prompt with the relevant, unique data fields and types.
Let's assume you're tracking travel bookings for new trips. In this case, you'd want to track:
With this in mind, you could give Dynatrace Intelligence generative AI the following command: "Show me the average money made and the price reduction for new trips, over the last month".
If you have environment-aware queries enabled, the following DQL will be generated, providing you with results relevant to your environment:
fetch bizevents , from:now() – 30d| filter event.type == "new trip"| makeTimeseries interval:1h, {profit= avg(profit), discount= avg(discount)}
Dynatrace Intelligence generative AI is capable of inferring that "money made" refers to the profit field, and that "price reduction" refers to the discount field, even if your prompt didn't use the correct field names.
If you don't have environment-aware queries enabled, Dynatrace Intelligence generative AI will try to refer to the fields by the names you provided. The following, incorrect DQL would be generated since the fields don't exist in your environment:
fetch bizevents, from:now() – 30d| filter event.type == "new trip"| makeTimeseries interval:1h, {avg_money_made = avg(money_made), avg_price_reduction = avg(price_reduction)}
Alternatively, you could ask Dynatrace Intelligence generative AI the following question: "On average, how long does it take customers to book new trips?"
If you have environment-aware queries enabled, the following DQL will be generated, providing you with results relevant to your environment:
timeseries avg(new_trip_booking_duration)
If you don't have environment-aware queries enabled, you'll likely get an error message since Dynatrace Intelligence generative AI would be unable to correctly map your question to your custom metric key. In this case, our generative AI can't provide a valid DQL query because it can't find a matching generic, built-in metric.
Since Dynatrace Intelligence generative AI respects user privileges, it may provide different responses to different users based on their access rights.

Dynatrace Intelligence generative AI NL2DQL response process can be summarized in 4 steps.
If you have enabled environment-aware queries, the relevant data fragments will be used enrich the prompt alongside Dynatrace-owned content.
To help us improve Dynatrace Intelligence generative AI, you can provide feedback directly from your notebook or dashboard. Under the prompt box:
Do not share personal or confidential information in your feedback.
Notebooks
Dashboards