MDX (MultiDimensional Expressions) is the standard language for querying multidimensional data in OLAP systems, but its complex syntax poses challenges for non-expert users. While a lot of research has focused on natural language interfaces for SQL, little attention has been given to MDX. This paper explores the potential of Large Language Models (LLMs), specifically GPT-4o, in translating natural language questions into MDX statements. We investigate whether LLMs can act as full MDX query generators or assistants, and study how the writing style of questions affects output correctness. Through four research questions, we evaluate ChatGPT's basic capabilities and the effectiveness of prompt engineering in improving text-to-MDX performance. Our evaluation confirms that, with ad-hoc prompt engineering, GPT-4o is indeed able to generate complex MDX queries ---particularly when the natural language question is given a structured formulation.
Bimonte, S., Rizzi, S. (2025). Text-to-MDX: LLM-Assisted Generation of MDX Queries from User Questions. Springer Nature [10.1007/978-3-032-08623-5_ 9].
Text-to-MDX: LLM-Assisted Generation of MDX Queries from User Questions
Stefano Rizzi
2025
Abstract
MDX (MultiDimensional Expressions) is the standard language for querying multidimensional data in OLAP systems, but its complex syntax poses challenges for non-expert users. While a lot of research has focused on natural language interfaces for SQL, little attention has been given to MDX. This paper explores the potential of Large Language Models (LLMs), specifically GPT-4o, in translating natural language questions into MDX statements. We investigate whether LLMs can act as full MDX query generators or assistants, and study how the writing style of questions affects output correctness. Through four research questions, we evaluate ChatGPT's basic capabilities and the effectiveness of prompt engineering in improving text-to-MDX performance. Our evaluation confirms that, with ad-hoc prompt engineering, GPT-4o is indeed able to generate complex MDX queries ---particularly when the natural language question is given a structured formulation.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.


