After some testing and refinements for Data Explorer, we are now happy to share that you can make use of Discourse AI to generate Data Explorer queries from right within the plugin.
Here’s a quick run through ![]()
The option to write manually, or use AI
For the folks who prefer it, we’ve kept the ability to let you write your own SQL.
On the /new and /edit pages, this should be available at the top right of the page for you to choose any time.
Your choice here is stored on device, and would be selected when you return to Data Explorer.
Update your existing Data Explorer queries using a prompt
Similarly, on both the /new and /edit pages, the prompt area allows you to update the Data Explorer query, without having to re-specify everything.
Want to apply your query only to non-staff? Just say “apply to non-staff users only” and it will do so.
How does it work?
This feature is powered by the new Data Explorer Agent in Discourse AI seen in /admin/plugins/discourse-ai/ai-features.
The agent will first learn from existing useful queries that you have on your community, and validate query before returning it to you. It’s also aware of the various parameters that data explorer queries can take, like dates and topic_ids.
New, default queries for your community
As part of this feature, we’ve also updated the default set of queries shipped to you, including useful data like:
- traffic and discovery reports, such as weekly unique visitors, top topics by views, top search terms, topic views and link clicks over time, and crawler/bot traffic reports
- community health reports, such as average time to first response, new topic response rate, community participation trends, topics with no response, and reading participation histograms
- member growth and activity reports, such as trust level growth, TL3 promotion progress, top posters, and category activity breakdowns
- moderation reports, such as silenced users, suspended users, recent official warnings, users with the most agreed-upon flags, flags by type, and flags handled by staff
- admin audit reports, such as subcategory permission audits and topics or posts not in the site’s primary language
Try it out 
If you already have Data Explorer and Discourse AI enabled, AI query generation is enabled by default. You can turn it off with the data explorer ai queries enabled site setting.
Please try it out
We’d love to understand more practical use cases you have when writing Data Explorer queries for your community.
Separately, if you have any tangent feedback or requests for Data Explorer, please feel free to create new data-explorer topics.


