Prototype: Use of generative AI for report transformation

| minute read

Initial situation: Report transformation

The reporting tool currently integrated in cpX.Energy enables flexible extraction of data and its individual transformation into various target formats (CSV, XML, JSON, etc.). However, the current transformations are very static and require extensive technical knowledge to configure the target formats and transformation tools such as JasperReports, XSLT, FOP. The requirements for data preparation are very diverse and account for around 90% of report requests, which is very time-consuming. In addition, some of these requirements cannot currently be met with the existing reporting tools. This includes, for example, searching for missing data, complex groupings and completeness checks. Conditional formatting, diagrams and similar functions for transformation to Excel are also in demand.

Idea: AI transformation assistant

Based on the extracted and, if necessary, pre-transformed data, it should be possible to describe the desired transformation result verbally (prompt). The LLM (Large Language Model) then generates a Python code for the subsequent transformation from the instructions (prompt) and the table meta information (column names and types). For compliance reasons, it is important to ensure that no extracted data is sent to the LLM. The generated Python code is executed as a test. If errors occur, the error message is sent back to the LLM together with the Python code with a request for correction. The prompt and the generated Python code are saved as parameters in the transformation.

Report execution

At execution time, the generated Python code is enriched with the specific data and executed. The result of the transformation (byte stream) can then be forwarded, saved or otherwise processed. A preview of the transformation is also provided at the time of report definition. This prototype has impressively demonstrated that generative AI can replace or significantly simplify time-consuming programming for complex and individual data transformations.

Search