AI Insights
AI Insights explains a query's performance in plain language and suggests changes to investigate. It uses the query detail and drill-down context you opened in Performance Analyzer and sends that context to your tenant's configured AI reasoning source. You can ask DioS about a query's insights in a chat that keeps the history of its analyses, add your own context to an analysis, choose which version of the analysis prompt it uses, and see what each run was based on.
Before you start
AI Insights uses the AI · reasoning source your administrator bound, unless you have bound one of your own. An administrator binds the tenant's source under Manage → Integrations → Catalog → AI · reasoning. If the tenant has no usable AI reasoning source, the inline panel says AI Insights is unavailable (with the reason, for example that the administrator's source has not been shared with you) and links to AI · reasoning in Manage → Integrations (just Manage → Integrations if the Integrations list cannot be read); the rest of Performance Analyzer continues to work normally.
View insights for a query
- Open Performance Analyzer and drill into a query from a query table or a drill-down graph.
- Open the query detail view. The AI Insights panel appears above the Query Text and Query Plan content when the query has enough detail to be analysed.
- Expand the collapsed panel to request the analysis. Nothing is sent to the AI source before you expand the panel or send a question from the chat (which expands it); opening the chat only reads the earlier analyses.
The panel shows the model's reply as sections, named the way the model named them (see How a reply is shown). The standard analysis prompt, which you can change in Tune the prompt and context, asks for four: a summary; Key findings (at most five, most important first, each with a short title, a sentence of detail and a severity); Recommendations (at most five, each with a title, a priority, a category, why it is suggested, its expected impact and an action); and Risks (at most three, each with its mitigation). It asks for short texts so that the reply is not cut off at the model's output limit. Analyses made with the earlier prompt can still show Performance analysis, Query patterns and Next steps, and key findings as numbered text rows (see below). A section the model leaves empty is not shown, and if you choose another version of the prompt, the sections are the ones that prompt asks for.
The panel header shows, for example, "7 findings" and how long ago the analysis ran. The number counts the items of the lists in the reply, each card or bullet as one; a reply with no list counts as one. If the analysis returns nothing, the panel says "No insights for this query."
How a reply is shown
The panel has no fixed layout for the analysis. It lays out whatever structured reply the model returns from the shape of that reply, so a reply in a shape you did not expect is still shown, field by field. What is not shown: empty values, a field named id on a card, any text the model wrote around the structured reply, and what a very long reply loses (below). The same rules apply to every AI Insights panel, in the chat and on the FinOps pages.
- Sections. Each name in the reply becomes a heading ("key_findings" becomes Key findings). A list shows how many items it holds beside its heading when it holds more than one. A line separates the sections.
- A list of texts is bullet points. If one of the texts is long (over 80 characters), the list is drawn as numbered rows instead, one for each text. When a text has more than one sentence, the first sentence is the bold headline of its row and the rest is the detail; a text of one sentence, or whose first sentence is very short or very long, is shown whole, as it is. A number the model typed in front of a text, such as "Finding 1:", "2." or "3)", is left out because the row already has its own number. A list of short texts stays as plain bullets.
- A list of objects is a card for each object. The card's headline is its title, text, summary, issue, name or action field, or, when it has none of them, its first long text. A severity, tone or priority gives the card its coloured dot (red for high, critical, danger or error; amber for medium, moderate, warning or warn; green for success, good or ok; any other value gets the default information colour) and its label on the right. A card that has an action text other than its headline, or a cause or impact made of three texts named who, what and how, can be opened to show them: Cause and Impact each give who, what and how, and Action has an Ask DioS button that asks the general Ask DioS assistant about that item (with the card's ask text when it has one, otherwise its headline). A card whose headline is its own action has nothing more to show, so it cannot be opened and has no Ask DioS. This is the case for a recommendation that has an action but no title, text, summary, issue or name, which is how recommendations made before the current standard prompt come: the recommendation is headed by its action, and its rationale and expected impact show as rows. With the current standard prompt a recommendation has a title, so it can be opened to show its action. A meta text is shown on the right of the card in place of the severity label. A card with no text at all is headed "Item 1", "Item 2" and so on.
- Other fields of a card. A short value (up to 24 characters and three words) is a small chip with its name, such as Category indexing. A longer text is a labelled row under the card. A field named
idis left out when the card has a headline. - An object of short values is one list of names and values. An object of texts of any length (an earlier analysis's execution time and efficiency, for example) is one bordered panel with a row for each name, the name above its text. This applies below the top level of the reply.
- A long text on its own, such as a summary, is a shaded callout: when it has more than one sentence, the first is the bold headline and the rest sits under it; a single sentence is shown as it is.
- Database names, such as
OBJ$,I_OBJ1orALL_ROWS(capital letters with an underscore, a dollar sign or a hash), are shown in code type in long texts (numbered rows and callouts) and in a panel of texts. They are plain text inside cards and in short bullets. - Long lists. The first 20 items of a list are shown, and Show N more shows the rest.
- Text is text. Every value is shown as plain text: HTML or a link in a reply is not made active, and empty values are skipped.
A very long reply is shortened before it is stored (64 KB in all, 12 levels of nesting, 4000 characters in one text and at most 500 items in one list, fewer when the reply is large), and the panel then says "The reply was cut off, or is longer than can be shown here." The same note appears when the model's own answer was cut off at its output limit.
Tune the prompt and context
Choose Tune in the panel header to open the Prompt and context block. It shows the prompt path and the version in use (such as v0) with a Change button that opens Choose a prompt version, a Data source button (up to three knowledge bases, applied with Done), a File button (one file of up to 2 MB), and the attached items as chips with a remove button. Changing a control does not call the model by itself: the panel says "Re-run to use these changes". Choose Re-run insights in the block to run the analysis with them and open the panel. Choose Tune again to fold the block away.
The chat described next has the same controls as chips, and they share one selection: what you stage in Tune is what the chat asks with, and what you attach in the chat shows in Tune.
Ask DioS about the insights
Choose Ask DioS in the panel header to open the chat for this query. It sits beside the Tune button, and it is not shown when AI Insights is unavailable. (The Ask DioS on an opened card and the floating Ask DioS button open the general assistant, not this chat.) The chat opens as a panel on the right, headed Ask DioS with the query's scope under it (the same header as the Ask DioS assistant), and the floating Ask DioS button steps aside while it is open. Press Escape or close the panel to return to the query. Opening the chat does not call the model: it only reads the analyses already stored for this query.
The chat is the history of this query's analyses, oldest first. Each turn shows what the analysis was asked, the context it was asked with, and its reply, laid out the same way as in the panel. The most recent analyses load first; choose Load earlier insights to read older ones. A query with no analyses yet says "No earlier insights yet. Choose the context below and generate the first." If the earlier analyses cannot be loaded the chat says "Couldn't load the earlier insights." with a Retry action, keeps the ones it already has, and never shows an empty chat for a failed load. A stored analysis that cannot be read is left out and the chat says how many.
At the bottom, the box is the same one as in Ask DioS, with chips for what the next analysis will use:
- scope: Query … names the query the analysis is about.
- prompt: v0 (or prompt: v3) is the version of the analysis prompt that will be used. The first time you open a query it is the first saved version of the prompt (v0), and after that it is the version you last asked with, so saving a new version in the Command Registry does not change it. A new version is used only when you choose it. Choose the chip to open Choose a prompt version: pick a version on the left (only the saved versions are listed, newest first), read its prompt text on the right, and choose Use this version. The choice is remembered in your browser for that query view. If the prompt versions cannot be read, the analysis is asked without a version and uses the newest one.
- Data source opens Attach data source context, where you pick up to three data sources with search turned on as extra context, then choose Done. A fourth pick is refused with "You can select up to 3 datasources as context"; if the list cannot be loaded the dialog says so.
- File uploads one file of up to 2 MB as extra context; the file picker offers
.txt,.md,.csv,.pdf,.py,.js,.ts,.json,.xmland.html. Attaching a new file replaces the previous one. While a file uploads, the chat cannot send.
Attached items appear as chips with a remove button. Changing a chip does not call the model by itself; the next analysis uses what the chips show. If the prompt versions cannot be loaded, the chat says "Couldn't load prompt versions." under the box.
Type a question (up to 2000 characters) and press Enter (Shift+Enter starts a new line), or choose the send button, Generate insights. With nothing typed, the analysis is generated from the context alone. The box empties when you send, and while the analysis runs the chat says DioS is generating. What happens next depends on what changed since the analysis last shown:
- If nothing changed (the same question, prompt version and context, for example sending with nothing typed again), DioS asks the model again, skipping the stored analysis, and the new analysis joins the chat as the latest turn.
- If you changed the question, the version or the context, the analysis for those inputs is shown. It is generated when there is none. When the same inputs were already answered, nothing new is generated: the chat says "Nothing new was generated: these inputs already have an answer above" (or "This answer was already stored" when the stored one was returned), and the answer is the turn already in the chat.
- If the analysis fails, the chat shows "Couldn't generate insights" with the reason and a Retry action.
Your question is sent together with the analysis prompt; it does not replace the prompt. The model also gets the query's context, the text of an attached file and excerpts from the attached knowledge bases, and it does not get the earlier analyses. The question is part of what the analysis is based on, so a different question gets a different analysis.
What each analysis was based on
Below the reply, the panel shows the prompt version that was used. It also lists the attached items the analysis Used, and any it Left out with the reason, for example that search is not turned on for a data source, or that an uploaded file is empty. An analysis shown from a previous run says "shown from the last run". If you asked for a prompt version and the run used another one, the panel says "Version N was asked for, but this run used version M."
If the model's answer is not structured data at all (it answered in prose, say), the header reads answer unreadable and the panel says "The model’s answer could not be read as findings, so this run is not reused." It then shows everything the model said, in a box you can scroll with the keyboard, with a Copy the answer button. A screen reader announces "Copied" or "Could not copy"; the copy is not available when the page is served over plain http. That analysis is not reused: the next request asks the model again.
A structured reply in a shape the analysis does not expect is shown as described above but is not reused either: the next request asks the model again, because it may be an error or the wrong shape.
Ask again
To get a fresh analysis, choose Re-run insights in Tune when nothing has changed, or send from the chat with the same question, prompt version and context as the analysis shown (or with nothing typed again): each ignores the stored analysis and asks the model again. When you have staged a change in Tune, Re-run insights runs it with the new settings and no typed question. Reopening the same query with the same context, question and prompt version within an hour shows the stored analysis instead of calling the model again, and says so. A different query, time window, drill-down path, attached item, question, or prompt version has a different analysis context. Only a new analysis is added to the chat; showing a stored one adds nothing.
If generation fails, the panel and the chat say "Couldn't generate insights", show the reason, and offer a Retry action. If the AI reasoning source is not configured or cannot be reached, follow the integration link shown in the panel or ask an administrator to configure it.
Good to know
- The analysis reflects the query and time window used to build the detail view.
- Drill-down paths are analysed separately from the parent query.
- AI Insights are advisory. Review suggested index, schema, or caching changes before applying them to production.
- AI responses can be incomplete or occasionally incorrect; use the query plan and workload metrics to validate a recommendation.