Initial situation: Report transformation
The current reporting tool integrated in cpX.Energy enables flexible extraction of data and individual data transformation into various target formats (CSV, XML, JSON, etc.). However, the current transformations are very static and require extensive technical expertise concerning target format configuration and transformation tools such as JasperReports, XSLT or FOP.
The requirements for data preparation vary greatly and account for around 90% of report requests, which is very time-consuming. Additionally, some of these requirements cannot currently be fulfilled with the available reporting tools. This includes searching for missing data, complex groupings or completeness checks. Conditional formatting, charts and similar functions for the transformation into Excel are also requested.
Idea: AI transformation assistant
The concept is to verbally describe the desired transformation result based on the extracted and potentially pre-transformed data (prompt). The LLM (large language model) then generates a Python code from the instructions (prompt) and the table meta data (column names and types) for the subsequent transformation. For compliance reasons, it is important to ensure that no extracted data is sent to the LLM. The generated Python code is tested in a trial run. If any errors occur, the error message is sent to the LLM along with the python code and a request to correct it. The prompt and the generated Python code are saved as parameters for the transformation.
Report execution
When running a report, the generated Python code is fed with the specific data and then executed. The result of the transformation (byte stream) can be transferred, saved, or processed in other ways.
A preview of the transformation is provided when creating a report definition.
This prototype has impressively demonstrated that generative AI can replace or significantly simplify the time-consuming process of programming for complex and individual data transformations.
