There are three main structured data solutions for MediaWiki: Cargo, Semantic MediaWiki and Wikibase. In addition, there are various other MediaWiki querying tools available, incuding the whole DynamicPageList family and even the MediaWiki API itself. It would be great if Wanda could query one or more of these resources - depending, of course, on what is installed on the wiki - in order to answer aggregative questions like "How many science fiction novels written since 1980 are on this wiki?", or, for the API, "How many users are registered on this wiki?".
This seems like an "agentic" sort of task, but maybe it's doable if the overall LLM prompt just includes precise-enough instructions for querying any specific data set. Querying Cargo might be the easiest of these tasks, since it has a precisely-defined data structure: the set of tables and their fields is always known. But maybe they can all be done, if the instructions are clear enough. (For Wikibase, this may require pointing the LLM to a full SPARQL manual!)
It might make sense to have a checkbox that users can check, in the same manner as the current "Use public knowledge additionally", to make it clear that what they want is an aggregating query rather just a text search.
This is not even to mention, by the way, all the external resources that could potentially be queried; Wikidata is the most obvious example. But that seems less necessary.