Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce "explain" ability to the KQL Editor that fetches explainations of the current query from OpenAI #582

Closed
Tracked by #584
asimpson opened this issue Jun 8, 2023 · 1 comment · Fixed by #757
Assignees

Comments

@asimpson
Copy link
Contributor

asimpson commented Jun 8, 2023

Since we now can generate KQL via OpenAI (#577), the inverse could be super useful as well.

Adding a button or another way to send the current KQL query to OpenAI and get back an explanation in plain language could be really useful.

Mockup:

image

Example prompt:

"You are a KQL expert and a Grafana expert that can explain any KQL query that contains Grafana macros clearly to someone who isn't familiar with KQL or Grafana. Explain the following KQL. \nKQL: DestinyActivities | where $__timeFilter(TimeGenerated) | order by TimeGenerated asc"

The response back looks something like this:

"content": "This KQL query is selecting data from the DestinyActivities table, which likely contains information about activities within the video game Destiny. \n\nThe `where $__timeFilter(TimeGenerated)` portion is using a Grafana macro to filter the results based on the time range selected in the Grafana dashboard. This ensures that only data from the specified time period is included in the query results.\n\nFinally, the `order by TimeGenerated asc` portion sorts the query results in ascending order based on the TimeGenerated field, which likely indicates when each activity occurred. \n\nOverall, this query is selecting and filtering data about Destiny activities and sorting it in chronological order based on the time it occurred."

Another aspect to solve is how to display the result, we could:

  • Inject the response as a comment into the editor directly
  • Inject the response above or below the editor and somehow draw attention to it
  • Show the result in a modal or pop-up of some kind
@asimpson asimpson added type/bug Something isn't working datasource/ADX enhancement New feature or request and removed type/bug Something isn't working labels Jun 8, 2023
@aangelisc
Copy link
Contributor

Hmmmmmm, that comment back assuming it's about destiny the game is 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants