Methods, system and computer program for generating instructions for transforming source data from a source format to a target format
The method leverages language model-based agents to generate machine-readable instructions for data transformation, addressing inefficiencies and errors in existing methods, ensuring accurate and adaptable data conversion for IoT sensor data in smart buildings and disaster monitoring.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2026-03-12
AI Technical Summary
Existing data transformation methods require significant manual input and are prone to errors, particularly when converting data between different formats, and are limited in expressiveness, especially for sensor data from IoT devices.
A computer-implemented method using language model-based agents to generate machine-readable instructions for transforming data from a source to a target format, incorporating input and output validators to ensure accuracy and adaptability, reducing the need for manual intervention and computational resources.
Enables fully automated, efficient, and explainable data transformation with improved accuracy and adaptability, allowing seamless integration of sensor data from various sources into harmonized formats for applications like smart buildings and disaster monitoring.
Smart Images

Figure EP2024082838_12032026_PF_FP_ABST
Abstract
Description
[0001] METHODS, SYSTEM AND COMPUTER PROGRAM FOR GENERATING INSTRUCTIONS FOR TRANSFORMING SOURCE DATA FROM A SOURCE FORMAT TO A TARGET FORMAT
[0002] The present invention relates to a computer-implemented method for generating machine-readable instructions for transforming source data from a source format to a target format, and to a corresponding system, computer program and non- transitory, computer-readable medium.
[0003] The present invention further relates to a computer-implemented method for generating an instruction for transforming source data from a source format to a target format, and to a corresponding system, computer program and non-transitory, computer-readable medium.
[0004] The present invention further relates to computer-implemented methods for transforming source data from a source format to a target format, and to corresponding systems, computer programs and non-transitory, computer-readable media.
[0005] Data transformation into harmonized representations is one of most labor-intensive tasks in many data science workflows, and it is a necessary step to any downstream data usage, including model training, insight generation, visualization, and other analytics. Standardized data representation further enables data sharing and interoperability across devices, systems and organizations.
[0006] Recently, Large Language Models have been applied as a tool to assist the data transformation process. In Ankita Sharma et al. “Automatic Data Transformation Using Large Language Model - An Experimental Study on Building Energy Data” (Published in: 2023 IEEE International Conference on Big Data (BigData)), a method to generate SQL statements for transforming databases into a new representation has been proposed, taking various information (source and target schema, transformation hints) as input to generate SQL (Structured Query Language), executing the SQL it in a sandbox, and performing validation checks on the output. In case of validation failure, a report of the failed attempt is re-used as input data to the next iteration of the loop. A limitation of the method is that it still requires a fair amount of input data and procedures, in particular target schemata and expert hints on the transformation. Additionally, the system is tailored to SQL database transformations.
[0007] Danrui Qi, Jiannan Wang. “CleanAgent: Automating Data Standardization with LLM- based Agents" proposes a simplified API (Application Programming Interface) for the pandas framework that makes automatic generation of data transformations from high-level descriptions easier for large language models. However, the method is lacking validation checks and is thus susceptible to errors, and the set of possible transformations are limited by the expressiveness of the pandas API.
[0008] It is therefore an objective of the present invention to improve and further develop a technique for automatically converting data from a source format to a target format.
[0009] In accordance with the invention, the aforementioned objective is accomplished by a computer-implemented method (also denoted first method) comprising the features of claim 1. According to this claim, such a method comprises extracting an initial data sample from the source data. The initial data sample is an example of data according to the source format. The method comprises providing the initial data sample, information on the target format and a first instruction to a language modelbased agent. The first instruction instructs the language model-based agent to provide a transformed data sample containing the data contained within the initial data sample according to the target format. The method comprises generating a second instruction for a second language model-based agent. The second instruction instructs the second language model-based agent to use the initial data sample and the transformed data sample as an example to generate machine- readable instructions of a data transformer for generating transformed data samples according to the target format from data samples according to the source format. The method comprises providing the second instruction to the second language model-based agent to obtain the machine-readable instructions of the data transformer. The method comprises providing the machine-readable instructions of the data transformer. The computer-implemented method according to claim 1 addresses the aforementioned objective by using the capabilities of language model-based agents to perform two tasks - generating examples, from the source data, of suitable transformations between the source format and the target format, and using the examples to generate machine-readable instructions of a corresponding data transformer, i.e. of a software routine that performs the respective transformation in downstream tasks. This way, the labor-intensive process of collecting or defining such examples is removed, enabling a fully automated conversion process. Moreover, by generating the machine-readable instructions of the data transformer, and thus a software routine performing the data transformation task, the processing power required for performing the conversion is severely reduced compared to an approach that uses a language model-based agent for each and every conversion. Thus, a method and system for explainable and efficient automated data transformation is provided.
[0010] The proposed concept is particularly useful when dealing with sensor data, such as sensor data generated by a variety of different Internet of Things sensor nodes. Thus, the source data may comprise sensor data. By generating machine-readable instructions of data transformers for transforming sensor data from an arbitrary and sensor-specific source format into a harmonized target format (which may be the format output by an existing sensor), existing sensors can be replaced with equivalent sensors outputting a different source format, which may reduce the cost of maintaining systems comprising sensors, and which may enable maintaining systems with sensors that are no longer produced, without requiring costly development of an adapter.
[0011] In particular, various aspects of the present invention address the objective of automating the process of data transformation for sensor data from domains like Smart Buildings (with sensors including but not limited to indoor temperature, humidity, CO2, smoke, window and door status, parking occupancy sensors) and disaster monitoring (with sensors including but not limited to water level, temperatures, pollution levels, seismic activity). For example, the source data may comprise sensor data of building sensors. The target format may be a data format being used for controlling an energy use and / or heating of at least one building. As buildings are long-lived, using the proposed concept to create a data transformer to include new or additional adapters can prolong the useful life of an energy use control system (e.g., a system for steering the energy use of different sub-systems of the building, such as vehicle charging, heating, cooling etc.) and / or of a heating system (e.g., a system for controlling how much and when to heat the building or buildings), e.g. when previously used sensors become more expensive or are discontinued.
[0012] In another use case, the proposed data transformer may be used in disaster monitoring. For example, the source data may comprise data related to disaster monitoring. Accordingly, the target format may be a data format being used for disaster prediction or disaster alerting. Similar to the “Smart Building” use case, disaster monitoring systems are long-lived and may occasionally be adapted to work with replacement sensors and / or additional sensors.
[0013] To further improve the quality of the data transformer, checks may be performed on the data being input into, and / or output by, the data transformer. For example, this may be done by generating machine-readable instructions of an input data validator and / or of an output data validator, which may be used for this purpose. Accordingly, the method may comprise generating a third instruction for a third language modelbased agent based on the data sample. The third instruction may instruct the third language model-based agent to use the data sample as an example to generate machine-readable instructions of an input data validator for validating data samples according to the source format. The method may comprise providing the third instruction to the third language model-based agent to obtain the machine-readable instructions of the input data validator, and using the machine-readable instructions of the input data validator to update the machine-readable instructions of the data transformer. By generating and using an input data validator, data samples may be identified that diverge from the previously processed data samples. To make sure that the data transformer can also handle such data samples, the data transformer (and, optionally, the input data validator) may be updated, e.g. using the divergent data samples as additional examples. This way, the capabilities of the data validator can be automatically updated if new types of data samples are being processed, making the data validator more capable of processing different types of data samples.
[0014] Similarly, the method may comprise generating a fourth instruction for a fourth language model-based agent based on the data sample. The fourth instruction may instruct the fourth language model-based agent to use at least one of the information on the target format and the transformed data sample as an example to generate machine-readable instructions of an output data validator for validating data samples according to the target format. The method may comprise providing the fourth instruction to the fourth language model-based agent to obtain the machine- readable instructions of the output data validator, and using the machine-readable instructions of the input data validator to update the machine-readable instructions of the data transformer. In particular, the output data validator may be used to detect cases, in which the data transformer has failed to output a transformed data sample that adheres to the target format (which may, for example, be the case if the data sample being input failed input data validation). To address cases where the data transformer has failed to output transformed data samples in the correct format, the data transformer (and, optionally, the input data validator) may be updated, e.g. using the data sample having failed output validation as additional examples. This way, the capabilities of the data validator can be automatically updated if data samples are detected that do not lead to valid transformed data samples that adhere to the target format, making the data validator more capable of processing different types of data samples.
[0015] The input data validator and the output data validator are preferably used in an iterative process that is aimed at increasing and improving the capabilities of the data transformer over a plurality of data samples included in the source data. In particular, the method may comprise iteratively processing the data samples of the plurality of data samples using the machine-readable instructions of the data transformer, of the input validator and / or of the output validator. The method may further comprise, in case input validation and / or output validation fails, updating the machine-readable instructions of the machine-readable instructions of the data transformer, of the input validator and / or of the output validator using the first, second, third and fourth language model-based agent, by using the data sample having caused the failed input validation or output validation as additional example. For example, the first language model-based agent may be used to generate a corresponding transformed data sample according to the target format based on the data sample having caused the failed input validation or output validation. The pair of data sample having caused the failed input validation and corresponding transformed data sample may be included as additional example in at least one of the second instruction being used to instruct the second language model-based agent, the third instruction being used to instruct the third language model-based agent, and the fourth instruction being used to instruct the fourth language modelbased agent. Inclusion of the additional example in the respective instructions depends on which of the validators is to be updated in addition to the data transformer. For example, the additional example may be included in the second instruction and third instruction, second instruction and fourth instruction, or second, third and fourth instruction.
[0016] In accordance with the invention, the aforementioned objective is further achieved by a computer-implemented method (in the following denoted “second method”) for generating an instruction for transforming source data from a source format to a target format according to claim 8. The second method comprises extracting a data sample from the source data. The data sample is an example of data according to the source format. The second method comprises providing the data sample, information on the target format and a first instruction to a language model-based agent. The first instruction instructs the language model-based agent to provide a transformed data sample containing the data contained within the data sample according to the target format. The second method comprises generating a second instruction for a second language model-based agent. The second instruction instructs the second language model-based agent to use the data sample and the transformed data sample as an example to provide, based on a second data sample according to the source format, a second transformed data sample according to the target format. The second method comprises providing the second instruction for use with the second language model-based agent. Similar to the computer-implemented method according to claim 1 , the computer- implemented method according to claim 8 also addresses the aforementioned objective by using the capabilities of language model-based agents to perform two tasks. The first task is the same - generating examples, from the source data, of suitable transformations between the source format and the target format. The second task, however, is different. Instead of generating a data transformer, a data transformation instruction is generated based on the examples, which can be used to transform the sample data into transformed sample data with the help of a language model-based agent. Thus, in the second method, the labor-intensive process of collecting or defining such examples is also removed, enabling a fully automated conversion process. While using a language model-based agent for data transformation may require additional computational power, such an approach benefits from the ongoing improvement to language model-based agents, improving the likelihood of successfully transforming types or content of data samples that were not known at the time the data transformation instruction has been created.
[0017] The approach implemented by the second method may be applied on the same types of source data, and for the same types of tasks, as the method of claim 1. Thus, the method according to claim 8 also addresses the objective of automating the process of data transformation for sensor data from domains like Smart Buildings (with sensors including but not limited to indoor temperature, humidity, CO2, smoke, window and door status, parking occupancy sensors) and disaster monitoring (with sensors including but not limited to water level, temperatures, pollution levels, seismic activity). Accordingly, the source data may comprise sensor data of building sensors. In this case, the target format may be a data format being used for controlling an energy use and / or heating of at least one building. Additionally, or alternatively, the source data may comprise data related to disaster monitoring. Accordingly, the target format may be a data format being used for disaster prediction or disaster alerting.
[0018] Similar to the first method, an iterative process may be used to update and improve the second instruction (instead of the machine-readable instructions of the data transformer). As part of the iterative process, the aforementioned input and / or output data validator may be used. For example, the second method may further comprising generating a third instruction for a third language model-based agent based on the data sample, the third instruction instructing the third language modelbased agent to use the data sample as an example to generate machine-readable instructions of an input data validator for validating data samples according to the source format, and providing the third instruction to the third language model-based agent to obtain the machine-readable instructions of the input data validator. Additionally, or alternatively, the second method may comprise generating a fourth instruction for a fourth language model-based agent based on the data sample, the fourth instruction instructing the fourth language model-based agent to use at least one of the information on the target format and the transformed data sample as an example to generate machine-readable instructions of an output data validator for validating data samples according to the target format and providing the fourth instruction to the fourth language model-based agent to obtain the machine- readable instructions of the output data validator.
[0019] As part of the second method, the data samples of the plurality of data samples may then be processed using the second instruction, the second language mode-based agent and at least one of the machine-readable instructions of the input validator the machine-readable instructions of the output validator. In case input validation or output validation fails, the second instruction and at least one of the machine- readable instructions of the input validator and the machine-readable instructions of the output validator may be updated, as part of the second method, using the first, third and / or fourth language model-based agent, and using the data sample having caused the failed input validation or output validation as additional example. For example, similar to the first method, the first language model-based agent may be used to generate a corresponding transformed data sample according to the target format based on the data sample having caused the failed input validation or output validation. The pair of data sample having caused the failed input validation and corresponding transformed data sample may be included as additional example in at least one of the second instruction being used to instruct the second language model-based agent, the third instruction being used to instruct the third language model-based agent, and the fourth instruction being used to instruct the fourth language model-based agent. Inclusion of the additional example in the respective instructions depends on which of the validators is to be updated in addition to the second instruction being used to transform the sample data. For example, the additional example may be included in the second instruction and third instruction, second instruction and fourth instruction, or second, third and fourth instruction.
[0020] Another aspect of the present invention relates to the use of the generated data transformer and / or second instruction.
[0021] Some aspects of the present disclosure thus relate to a computer-implemented method (“third method”) for transforming source data from a source format to a target format. The third method comprises obtaining machine-readable instructions of a data transformer generated using the first method. The third method comprises processing data samples included in the source data to generate transformed data samples using the machine-readable instructions of a data transformer. In particular, the data samples to be transformed are provided as input to a software routine implementing the data transformer, the software routine being based on the machine-readable instructions, with the software routine returning the respective transformed data samples.
[0022] Some other aspects of the present disclosure relate to a computer-implemented method (“fourth method”) for transforming source data from a source format to a target format. The fourth method comprises obtaining an instruction for a language model-based agent using the second method. The instruction instructs the language model-based agent to use a data sample and a transformed data sample as an example to provide, based on a second data sample according to the source format, a second transformed data sample according to the target format. The fourth method comprises processing data samples included in the source data to generate transformed data samples using the instruction and the language model-based agent. In particular, the data samples to be transformed are provided, together with the instruction, to the second language model-based agent, with the second language model-based agent returning the respective transformed data samples.
[0023] As outlined in connection with the first and second method, the third and fourth methods may be applied to sensor data, e.g., sensor data of building sensors or disaster monitoring sensors. For example, the source data may comprise sensor data of building sensors, with the target format being a data format being used for controlling an energy use and / or heating of at least one building. The third and / or fourth method may comprise controlling at least one of an energy use and a heating of at least one building based on the transformed data samples.
[0024] Alternatively, or additionally, the source data may comprise data related to disaster monitoring, with the target format being a data format being used for disaster prediction or disaster alerting. The third or fourth method may comprise performing at least one of disaster prediction and disaster alerting based on the transformed data samples.
[0025] In accordance with the invention, the aforementioned objective is further achieved by corresponding non-transitory, computer-readable media with program code for performing at least one of the above methods, a computer program for performing at least one of the above methods, and a corresponding system configured to perform at least one of the above methods.
[0026] Thus, another aspect of the present disclosure relates to a non-transitory, computer- readable medium comprising a program code that, when the program code may be executed on a processor, a computer, or a programmable hardware component, causes the processor, computer, or programmable hardware component to perform at least one of the above methods.
[0027] Another aspect of the present disclosure relates to a computer program comprising instructions which, when the program may be executed by a computer, cause the computer to carry out at least one of the above methods.
[0028] Another aspect of the present disclosure relates to a system comprising interface circuitry, machine-readable instructions, and processor circuitry to execute the machine-readable instructions to carry out at least one of the above methods. There are several ways how to design and further develop the teaching of the present invention in an advantageous way. To this end it is to be referred to the dependent claims on the one hand and to the following explanation of preferred embodiments of the invention by way of example, illustrated by the figure on the other hand. In connection with the explanation of the preferred embodiments of the invention by the aid of the figure, generally preferred embodiments and further developments of the teaching will be explained. In the drawing
[0029] Fig. 1 a shows a flow chart of a method for generating machine-readable instructions for transforming source data from a source format to a target format and of a method for generating an instruction for transforming source data from a source format to a target format;
[0030] Fig. 1 b shows a schematic diagram of a system for generating machine-readable instructions for transforming source data from a source format to a target format and / or of a method for generating an instruction for transforming source data from a source format to a target format;
[0031] Fig. 2 shows a high-level architecture of a data transformation concept being discussed in the present disclosure;
[0032] Fig. 3a shows a flow chart of a method for transforming source data from a source format to a target format;
[0033] Fig. 3b shows a schematic diagram of a system for transforming source data from a source format to a target format;
[0034] Fig. 4a shows a flow chart of another method for transforming source data from a source format to a target format; and
[0035] Fig. 4b shows a schematic diagram of another system for transforming source data from a source format to a target format. Embodiments of the present disclosure relate to a method and system to automatically transform data from a source representation into a target representation, using an iterative process where generative Al functions perform sample transformations and, in some examples, generate program code for source validation, target validation, and the actual transformation.
[0036] The use of the generative Al function to generate instructions for language modelbased agents (e.g., Small Language Model, SML-based agents, Large Language Model, LLM, -based agents, or more generally, transformer-based language modelbased agents) is described in connection with Figs. 1a and 1 b, with Fig. 2 providing a concrete implementation of such a scheme. Figs. 3a to 3c relate to the use of the generated results, e.g., the generated program code (i.e., machine-readable instructions) or instructions for a language model-based agent, for the purpose of transforming data in production.
[0037] Fig. 1 a shows, in a common flow chart, two methods: a method for generating machine-readable instructions for transforming source data from a source format to a target format (“first method”), and a method for generating an instruction for transforming the source data from the source format to the target format (“second method”). The methods share a number of similarities, as will become evident. Both methods may be performed by the corresponding system 10 shown in Fig. 1 b. The system 10 shown in Fig. 1 b is a computer system comprising interface circuitry 12, processor circuitry 14, machine-readable instructions, and, optionally, memory and / or storage circuitry 16. The interface circuitry 12 may be used to facilitate communication with other components, such as sensors, or with systems of computers, such as one or more language model (LM)-based agents 101 , 102, 103, 104. This communication may occur via a bus or a network, for example. The processor circuitry 14 may be used to provide the functionality of the system, for example, in conjunction with the interface circuitry 12 (for exchanging information) and / or optional memory or storage circuitry 16 (for storing information, such as machine-readable instructions). The processor circuitry 14 is therefore coupled with the interface circuitry 12 and, optionally, with the memory or storage circuitry 16. For instance, the system 10 may comprise machine-readable instructions, i.e., a computer program, which may prompt the one or more processors to execute at least one of the methods introduced in connection with Fig. 1 a. In accordance with the aforementioned, at least one of the methods introduced in connection with Fig. 1a may be carried out by the one or more processors executing the machine- readable instructions.
[0038] Both methods start with extracting 110 an initial data sample from the source data, with the initial data sample is an example of data according to the source format. The initial data sample is provided 120, together with information on the target format and a first instruction to a first language model-based agent 101. The first instruction instructs the first language model-based agent 101 to provide a transformed data sample containing the data contained within the initial data sample according to the target format. In other words, the first instruction is used to tell the first language model-based 101 agent to convert the initial data sample into the target format. The output of the first language model-based agent is then obtained 125, with the output comprising the transformed version of the initial data sample. The resulting pair of initial data sample and transformed version thereof is thereafter used as example of how a conversion between the source format and the target format.
[0039] The resulting pair of (initial) data sample and transformed data sample is then included in a second instruction that is generated 130 as part of the methods, with the second instruction being an instruction to be provided to a second language model-based agent. The content of the second instruction differs between the two methods. In the first method, the second instruction instructs the second language model-based agent to use the initial data sample and the transformed data sample as an example to generate machine-readable instructions of a data transformer for generating transformed data samples according to the target format from data samples according to the source format. In the second method, the second instruction instructs the second language model-based agent to use the data sample and the transformed data sample as an example to provide, based on a second data sample according to the source format, a second transformed data sample according to the target format. In other words, in the first method, the second instruction is used to tell the second language model-based agent to generate program code to be used for transforming the data samples, in the second method, an instruction is provided that can be used to transform the data samples with the help of the second language model-based agent. While, in the second method, the second instruction is the result of the method, which is to be used by another entity, the second instruction may also be used as part of the method in an iterative process 160 to improve the second instruction. Thus, in the first method, the second instruction is necessarily provided 135 to the second language model-based agent 102. In the second method, providing 135 the second instruction to the second language model-based agent 102 is an optional operation. In the first method, the method further comprises providing 180 the machine-readable instructions of the data transformer, e.g., for use in transforming data samples in production. In the second method, the method further comprises providing 190 the second instruction, also for use in transforming data samples in production.
[0040] In some cases, a single example pair comprising a data sample and a transformed data sample may be insufficient for generating the data transformer or second instruction being used to transform the data samples in production. Therefore, an iterative process 160 may be used, in which a plurality of data samples of the source data are processed, and in which the data transformer and / or the second instruction are iteratively updated. For this purpose, an input data validator and / or an output data validator may be generated in a similar manner as the data transformer. Thus, the method may comprise generating 140 a third instruction for a third language model-based agent 103 based on the data sample and / or generating 150 a fourth instruction for a fourth language model-based agent 104. The third instruction may instruct the third language model-based agent 103 to use the data sample as an example to generate machine-readable instructions of an input data validator for validating data samples according to the source format. The fourth instruction may instruct the fourth language model-based agent 104 to use at least one of the information on the target format and the transformed data sample as an example to generate machine-readable instructions of an output data validator for validating data samples according to the target format. The respective instruction or instructions may be provided 145, 155 to the third and / or fourth language modelbased agent 103, 104. The resulting machine-readable instructions of the input validator and / or of the output validator may be used as part of respective software routines. The data transformer software routine, the input validator software routine and / or the output validator software routine may be executed in a sandboxed execution environment, and may be used to update the respective second, third and / or fourth instructions over time.
[0041] In particular, the plurality of data samples may be processed using the machine- readable instructions (i.e. , the software routine) of the data transformer (in case of the first method) or using the second instruction and the second language modelbased agent (in case of the second method) using the machine-readable instructions (i.e., the software routine) of the input validator and / or using the machine-readable instructions (i.e., the software routine) of the output validator. For example, the respective machine-readable instructions (software routines) may be executed in a sandboxed environment. In case input validation or output validation fails (i.e., if the data sample does not conform with the data samples previously being used as examples, or if the transformed data sample does not conform to the target format), the respective method may comprise updating the machine-readable instructions of the machine-readable instructions of the data transformer (in case of the first method), the second instruction (in case of the second method), the machine-readable instructions of the input validator and / or the machine-readable instructions of the output validator using the first, second, third and / or fourth language model-based agent 101 -104, using the data sample having caused the failed input validation or output validation as additional example. In particular, as shown in Fig. 1 a, the first language model-based agent may be used to generate a transformed data sample based on the data sample having caused the failed validation, by providing 170 the data sample together with the first instruction to the first language model-based agent 101. The resulting transformed data sample may be used as an additional example to be used as part of the second, third and / or fourth instruction. The second, third and / or third language model-based agents may then be used to update the data transformer, input validator and / or output validator.
[0042] An implementation of the method and system 10 shown in connection with Figs. 1a and 1 b is now introduced with reference to Fig. 2. Fig. 2 depicts a high-level architecture of the proposed concept. The source data 210, or some portion of it, is transferred to the transformer factory 220, which is the central component of the proposed concept. The transformer factory accesses Al Agents 230 (e.g., the language model-based agents 101 -104) based on Large Language Models for several atomic tasks of sample transformation and code generation, and it additionally accesses a Sandbox Execution Environment 240 to test the components generated by the Large Language Model.
[0043] After having generated and tested validators for input and output data as well as the transformation function, the Transformer Factory 220 sends those functions to the Data Ingestion Pipeline 250 for deployment, and the actual transformation of the Source Data 210 then takes place inside the Data Ingestion Pipeline 250.
[0044] In an alternative setup, the Transformer Factory 220 can directly transform the data and send it to the output (as is the case in the second method introduced in connection with Fig. 1 a). However, the setup with the dedicated Data Ingestion Pipeline 250 has the advantage that (a) it is better suitable for live data sources (e.g. from sensors or live web services) that are expected to send data in regular intervals for a longer time period, and (b) automatic up-scaling of resources and parallelization of transformation tasks can be performed in case of high-volume data.
[0045] The procedure that is run in the Transformer Factory 220 according to an example of the present disclosure is described in the Pseudo-Code below. The procedure starts with the source data 210 (or a portion of the source data in case it has very high volume) and a description of the target format. The target format description can be provided in form of an example object, a data schema specification, or any other form (e.g. textual description). For example, the source data 210 may include both historical and real-time data from sensors.
[0046] The Transformer Factory 220 may first extract some sample data object (e.g., the initial data sample) from the source data and passes it to an LLM-based Al Agent 230 (e.g., the first language-model based agent) together the target format description, instructing the Agent 230 to transform the source object into the target format. The source object and the obtained transformation (e.g., the transformed data sample) are then added to an (initially empty) set of example transformations. The example transformations are then again passed to another Al Agent 230 (e.g., the second language-model based agent), this time giving the instruction to generate code that executes transformations in the way showcased in the provided examples (e.g., as discussed in connection with the first method).
[0047] In another operation, the source objects from the example transformations are passed to a third Al Agent 230 (e.g., the third language-model based agent) with the instruction to generate a format validator for them. In an embodiment, the syntax validator can have the form of a JSON (JavaScript Object Notation) schema, but also generation of program code for validation is thinkable.
[0048] Analogously to the previous step, the target objects from the example transformations are passed to a fourth Al Agent 230 (e.g., the fourth languagemodel based agent), together with the target format description, with the instruction to generate a format validator for the target objects of the transformation. The target format validator can as well take the form of a JSON schema, or alternatively program code for validation.
[0049] Having generated the transformation code and the validator, the Transformer Factory may attempt to transform and validate input and output of all source data. For data objects that are part of the set of example transformations, equivalence between the example transformation (previously generated by the LLM) and the transformation generated by the code is additionally checked. When an error is detected in any of the transformation and validation steps, the data item that caused the error is used as a sample to improve the transformation code and the validators. This is done by re-executing the whole procedure using that sample to generate a new example transformation.
[0050] AUTO-TRANSFORM ALGORITHM
[0051] Input:
[0052] - S: List of source data objects
[0053] - y: target format (in form of an example object or schema)
[0054] Output:
[0055] Y: set of transformed objects T: Transformation function
[0056] V,V’: Validators for input and output of the transformation function
[0057] Static:
[0058] - X: Set of example transformations
[0059] Procedure:
[0060] 1. Obtain a data object s from S.
[0061] 2. Provide s and y to LLM with the instruction to transform s into the format given by y. Obtain t.
[0062] 3. Add the pair (s,t) to X
[0063] 4. Provide X to LLM with the instruction to interpret the elements of X as inputoutput pairs and generate a compatible transformer. Obtain T.
[0064] 5. Provide {s’|(s’,t’) in X} to LLM with the instruction to generate an input validator for T based on the provided input examples. Obtain V.
[0065] 6. Provide y and {t’|(s’,t’) in X} to the LLM with the instruction to generate an output validator for T based on the provided output examples. Obtain V’.
[0066] 7. FOR EACH s’ in S
[0067] 7.1. Execute V(s’).
[0068] 7.2. Execute T(s’). Obtain t’.
[0069] 7.3. IF (s’ , t”) is a member of X for some t” THEN validate t’=t”
[0070] 7.4. Execute V’(t’).
[0071] 7.5. IF a validation error occurs
[0072] THEN s <- s’; empty Y; GOTO 2.
[0073] ELSE Add t’ to Y.
[0074] In an extension of the above algorithm, feedback obtained from failed executions of line 7.1 , - 7.4 (e.g. error messages) can be made use of in the next iteration, by adding the feedback to the pair (s,t) in line 3 as an additional element and providing it additionally to the LLM in line 4-6.
[0075] As discussed in connection with the first and second method of Fig. 1a, and with Fig. 2, there are two approaches for using the results of this process for processing data samples of source data. In a first approach, which uses the first method, the resulting machine-readable instruction of the data transformer are used to process the data samples in production. This approach is shown in Figs. 3a and 3b, and in Fig. 2 (where the data ingestion pipeline 250 is used to transform the source data 210 into transformed data 260).
[0076] Fig. 3a shows a flow chart of a method for transforming source data from a source format to a target format. The method comprises obtaining 310 machine-readable instructions of a data transformer generated using the first method discussed in connection with Fig. 1a. The method further comprises processing 320 data samples included in the source data to generate transformed data samples using the machine-readable instructions of a data transformer, e.g., by executing the data transformed software routine and using the data transformed software routine to process the data samples.
[0077] The method of Fig. 3a may be performed by the corresponding system 30 shown in Fig. 3b. The system 30 shown in Fig. 3b is a computer system comprising interface circuitry 32, processor circuitry 34, machine-readable instructions, and, optionally, memory and / or storage circuitry 36. The interface circuitry 32 may be used to facilitate communication with other components, such as sensors, or with systems of computers. This communication may occur via a bus or a network, for example. The processor circuitry 34 may be used to provide the functionality of the system, for example, in conjunction with the interface circuitry 32 (for exchanging information) and / or optional memory or storage circuitry 36 (for storing information, such as machine-readable instructions). The processor circuitry 34 is therefore coupled with the interface circuitry 32 and, optionally, with the memory or storage circuitry 36. For instance, the system 30 may comprise machine-readable instructions, i.e., a computer program, which may prompt the one or more processors to execute at least one of the methods introduced in connection with Fig. 3a. In accordance with the aforementioned, at least one of the methods introduced in connection with Fig. 3a may be carried out by the one or more processors executing the machine-readable instructions.
[0078] Alternatively, the processing of the data samples may be performed, in production, using a language model-based agent. This second approach is illustrated in connection with Figs. 4a and 4b. Fig. 4a shows a flow chart of another method for transforming source data from a source format to a target format. The method comprises obtaining 410 an instruction (e.g., the second instruction generated by the second method) for a language model-based agent using the second method discussed in connection with Fig. 1 a. The instruction instructs the (second) language model-based 102 agent to use a data sample and a transformed data sample as an example to provide, based on a second data sample according to the source format, a second transformed data sample according to the target format. The method comprises processing 420 data samples included in the source data to generate transformed data samples using the instruction and the language model-based agent 102.
[0079] The method of Fig. 4a may be performed by the corresponding system 40 shown in Fig. 4b. The system 40 shown in Fig. 4b is a computer system comprising interface circuitry 42, processor circuitry 44, machine-readable instructions, and, optionally, memory and / or storage circuitry 46. The interface circuitry 42 may be used to facilitate communication with other components, such as sensors, or with systems of computers, such as the language model-based agent 102. This communication may occur via a bus or a network, for example. The processor circuitry 44 may be used to provide the functionality of the system, for example, in conjunction with the interface circuitry 42 (for exchanging information) and / or optional memory or storage circuitry 46 (for storing information, such as machine-readable instructions). The processor circuitry 44 is therefore coupled with the interface circuitry 42 and, optionally, with the memory or storage circuitry 46. For instance, the system 40 may comprise machine-readable instructions, i.e., a computer program, which may prompt the one or more processors to execute at least one of the methods introduced in connection with Fig. 4a. In accordance with the aforementioned, at least one of the methods introduced in connection with Fig. 4a may be carried out by the one or more processors executing the machine-readable instructions.
[0080] The proposed concept may be used for the following use cases, for example:
[0081] In a first use case, the proposed concept may be used for smart buildings energy management. In this use case, the proposed concept may be utilized to automatically transform all sensors (including indoor temperature, humidity, CO2, smoke, window and door status, parking occupancy sensors) and other elements of a building management system (including HVAC parameters, HVAC status) into a harmonized representation. Thus, the source data may comprise sensor data of building sensors, with the target format being a data format being used for controlling an energy use and / or heating of at least one building. As a result, the methods of Fig. 3a and / or 3b may comprise controlling at least one of an energy use and a heating of at least one building based on the transformed data samples. Using the transformation functionality for several buildings enables building management companies to use the same building management functions across several buildings to optimize the energy usage and maximize thermal comfort of the building users. Also, data-driven ML-based management functions can be trained with a larger database through the harmonized representation and thus achieve better performance when e.g. used to optimize the control of HVAC systems.
[0082] In a second use case, the proposed concept may be used in the field of Disaster Management. In this use case, the proposed concept may be used to automatically transform loT information related to disaster monitoring (including water level, temperatures, pollution levels, seismic activity) across a whole city or several cities into a harmonized representation. Thus, the source data may comprise data related to disaster monitoring, with the target format being a data format being used for disaster prediction or disaster alerting. Accordingly, the method may comprise performing at least one of disaster prediction and disaster alerting based on the transformed data samples. Using the transformation functionality for several objects across a large geographical area enables the disaster monitoring solution to use the same analytics functions across several cities or districts to optimize the safety and create high-quality evacuation plans. Also, data-driven ML-based disaster prediction functions can be trained with a larger database through the harmonized representation, making more accurate predictions of expected disasters and better recommendations on disaster response activities.
[0083] Various aspects of the present disclosure, and in particular the first method, are based on separating between sample transformation generation and transformation code generation to allow for automated consistency checking and error-correction of the transformation. Using this mechanism, only cases not yet covered by the transformation code are passed to the resource-intensive LLM.
[0084] Various examples of the present disclosure include a generation of source and target validators for improved consistency checking and support of data-dependent transformation function generation.
[0085] The present disclosure provides methods and systems (for executing the methods) for automatically transforming data to a target representation, comprising one or more of the following operations or components. For example, the respective method or methods may comprise extracting a sample object from the source data and instructing a large language model to transform it to a specified target format. For example, the respective method or methods may comprise using the sample transformation as an instruction for a large language model to generate a transformation function for the sample. For example, the respective method or methods may comprise using the input sample as an instruction for a large language model to generate an input validator. For example, the respective method or methods may comprise using the transformed sample as an instruction for a large language model to generate an output generator / validator. For example, the respective method or methods may comprise executing the input validation, transformation, and output validation on all input data objects. For any error occurring, the procedure is repeated using the erroneous object as the new sample, the operations of generating the transformation function, generating the input validator and / or generating the output validator using the new sample and all previous samples as input.
[0086] Using the proposed concept may lead to a larger range of data transformation problems that can be solved fully automatically through built-in correctness checks that help to automatically improve the transformation function. Using the proposed concept may provide a cost and energy efficient usage of expensive LLMs: Instead of letting the LLM do all the transformation work, the LLM generates the code that can be executed in a much faster and more resource efficient manner. Using the proposed concept may result in an improved explainability by generation of explicit assumptions about the source and target data range in the form of validators. The deployment of the transformation function has improved safety against undefined system behavior due to unexpected input data, due to the built-in validators.
[0087] For example, the interface circuitry 12, 32, 42 of the systems 10, 30, 40 introduced in connection with Figs. 1 b, 3b and / or 4b may include or correspond to a network interface circuitry and / or a device interface circuitry configured to be communicatively coupled to one or more other devices, such as the one or more processors. For example, the interface circuitry may include a transmitter, a receiver, or a combination thereof (e.g., a transceiver), and may enable wired communication, wireless communication, or a combination thereof. For example, the processor circuitry 14, 34, 44 of the systems 10, 30, 40 introduced in connection with Figs. 1 b, 3b and / or 4b may include or correspond to one or more of a digital signal processor circuitry (DSP), a graphical processing unit (GPU), and / or a central processing unit (CPU). For example, the memory and / or storage circuitry 16, 36, 46 of the systems 10, 30, 40 introduced in connection with Figs. 1 b, 3b and / or 4b may include or correspond to volatile or nonvolatile storage circuitry, such as Random Access Memory (RAM), magnetic disks, optical disks, or flash memory devices. The one or more memory / storage devices may include both removable and nonremovable memory devices.
[0088] The proposed concept may be implemented as a computer-implemented method, computer system (comprising one or more processors and one or more storage devices) configured to perform the computer-implemented method and / or as a computer program for performing the computer-implemented method. For example, the computer-implemented method may include one or more steps and / or operations discussed above.
[0089] Various aspects of the present invention relates to machine learning. In particular, the language model, which may be small language model or a large language model, used by the respective agents may be a machine learning model.
[0090] Machine learning is a branch of artificial intelligence that involves the development of algorithms and models that allow computers to learn and make predictions or decisions without being explicitly programmed. It focuses on creating systems that can improve their performance over time by learning from data.
[0091] Training a machine-learning model refers to the process of teaching the model to make accurate predictions or decisions. During training, the model is exposed to a large amount of data, which is used to adjust the model's internal parameters or weights. The model learns patterns, relationships, or rules from the training data, allowing it to generalize and make predictions on new, unseen data.
[0092] Training data is the set of examples or instances that is used to teach a machinelearning model. It is often labeled data, meaning that each example is associated with a known outcome or target value. The training data consists of both input features and the corresponding output or target variable. The model learns from this data by analyzing the patterns and relationships between the input features and the target variable. Training algorithms, such as supervised learning, semi-supervised learning, unsupervised learning or reinforcement learning may be used for training the machine-learning model.
[0093] Machine-learning models, such as the machine-learning model being trained in the present disclosure, are often implemented as Artificial Neural Networks (ANNs), and in particular Deep Neural Networks, Support Vector Machines, Decision Tree models, or Random Forest models.
[0094] Examples may involve or relate to computer programs, including program codes to execute one or more of the mentioned methods when the program is executed on a computer, processor, or other programmable hardware component. As a result, steps, operations, or processes from various methods described above can also be executed by computers, processors, or other programmable hardware components. Examples may additionally cover program storage devices, such as digital data storage media, which are machine-, processor-, or computer-readable and encode and / or contain machine-executable, processor-executable, or computer-executable programs and instructions. These devices may include or be digital storage devices, magnetic storage media like magnetic disks and tapes, hard disk drives, or optically readable digital data storage media, for instance. Other examples encompass computers, processors, control units, field programmable logic arrays (FPLAs), field programmable gate arrays (FPGAs), graphics processing units (GPUs), applicationspecific integrated circuits (ASICs), integrated circuits (ICs), or system-on-a-chip (SoC) systems that are programmed to carry out the steps of the aforementioned methods. In simpler terms, examples may involve computer programs and storage media comprising computer programs, as well as hardware components like processors and control units, which can be programmed to execute the methods described above.
[0095] When certain aspects are mentioned in relation to a device or system, they should also be considered as descriptions of the corresponding methods. For example, a block, component, or functional aspect of the device or system may correspond to a method step or feature of the related method. Therefore, aspects described regarding a method should also be understood as depicting a corresponding element, property, or functional feature of the corresponding device or system. In simpler terms, if something is described in relation to a device or system, it can also be applied to the corresponding method, and vice versa.
[0096] Many modifications and other embodiments of the invention set forth herein will come to mind to the one skilled in the art to which the invention pertains having the benefit of the teachings presented in the foregoing description and the associated drawings. Therefore, it is to be understood that the invention is not to be limited to the specific embodiments disclosed and that modifications and other embodiments are intended to be included within the scope of the appended claims. Although specific terms are employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.
[0097]
[0098] 10, 30, 40 System
[0099] 12, 32, 42 Interface circuitry
[0100] 14, 34, 44 Processor circuitry
[0101] 16, 36, 46 Memory / storage circuitry ,102,103,104 First-fourth language model-based agent
[0102] 110 Extracting an initial sample 120 Providing the initial sample and instruction to a first language model-based agent
[0103] 125 Obtaining a transformed data sample 130 Generating a second instruction 35, 145, 155 Providing the second, third, or fourth instruction to a second, third, or fourth language model-based agent
[0104] 140 Generating a third instruction 150 Generating a fourth instruction 160 Iterative processing 170 Providing the failed data sample and instruction to the first language model-based agent
[0105] 180 Providing the data transformer 190 Providing the second instruction 210 Source data 220 Transformer factory 230 Al agents using LLMs
[0106] 240 Sandbox execution environment 250 Data ingestion pipeline 260 Transformed data 310 Obtaining machine-readable instructions 320 Processing data samples
[0107] 410 Obtaining instruction 420 Processing data samples
Claims
C l a i m s1. A computer-implemented method for generating machine-readable instructions for transforming source data from a source format to a target format, comprising: extracting an initial data sample from the source data, wherein the initial data sample is an example of data according to the source format; providing the initial data sample, information on the target format and a first instruction to a first language model-based agent, the first instruction instructing the first language model-based agent to provide a transformed data sample containing the data contained within the initial data sample according to the target format; generating a second instruction for a second language model-based agent, the second instruction instructing the second language model-based agent to use the initial data sample and the transformed data sample as an example to generate machine-readable instructions of a data transformer for generating transformed data samples according to the target format from data samples according to the source format; providing the second instruction to the second language model-based agent to obtain the machine-readable instructions of the data transformer; and providing the machine-readable instructions of the data transformer.
2. The computer-implemented method according to claim 1 , wherein the source data comprises sensor data.
3. The computer-implemented method according to one of the claims 1 or 2, wherein the source data comprises sensor data of building sensors, with the target format being a data format being used for controlling an energy use and / or heating of at least one building.
4. The computer-implemented method according to one of the claims 1 to 3, wherein the source data comprises data related to disaster monitoring, with the target format being a data format being used for disaster prediction or disaster alerting.
5. The computer-implemented method according to one of the claims 1 to 4, wherein the method comprises generating a third instruction for a third language model-based agent based on the data sample, the third instruction instructing the third language model-based agent to use the data sample as an example to generate machine-readable instructions of an input data validator for validating data samples according to the source format, providing the third instruction to the third language model-based agent to obtain the machine-readable instructions of the input data validator, and using the machine-readable instructions of the input data validator to update the machine-readable instructions of the data transformer.
6. The computer-implemented method according to one of the claims 1 to 5, wherein the method comprises generating a fourth instruction for a fourth language model-based agent based on the data sample, the fourth instruction instructing the fourth language model-based agent to use at least one of the information on the target format and the transformed data sample as an example to generate machine- readable instructions of an output data validator for validating data samples according to the target format, providing the fourth instruction to the fourth language model-based agent to obtain the machine-readable instructions of the output data validator, and using the machine-readable instructions of the input data validator to update the machine-readable instructions of the data transformer.
7. The computer-implemented method according to one of the claims 5 and 6, wherein the data source comprises a plurality of data samples, the method comprising iteratively processing the data samples of the plurality of data samples using the machine-readable instructions of the data transformer, of the input validator and / or of the output validator, and, in case input validation or output validation fails, updating the machine-readable instructions of the machine-readable instructions of the data transformer, of the input validator and / or of the output validator using the first, second, third and / or fourth language model-based agent, using the data sample having caused the failed input validation or output validation as additional example.
8. A computer-implemented method for generating an instruction for transforming source data from a source format to a target format, comprising:extracting a data sample from the source data, wherein the data sample is an example of data according to the source format; providing the data sample, information on the target format and a first instruction to a language model-based agent, the first instruction instructing the language modelbased agent to provide a transformed data sample containing the data contained within the data sample according to the target format; generating a second instruction for a second language model-based agent, the second instruction instructing the second language model-based agent to use the data sample and the transformed data sample as an example to provide, based on a second data sample according to the source format, a second transformed data sample according to the target format; and providing the second instruction for use with the second language model-based agent.
9. The computer-implemented method according to claim 8, wherein the data source comprises a plurality of data samples, the method further comprising: generating a third instruction for a third language model-based agent based on the data sample, the third instruction instructing the third language model-based agent to use the data sample as an example to generate machine-readable instructions of an input data validator for validating data samples according to the source format, and providing the third instruction to the third language model-based agent to obtain the machine-readable instructions of the input data validator, and / or generating a fourth instruction for a fourth language model-based agent based on the data sample, the fourth instruction instructing the fourth language model-based agent to use at least one of the information on the target format and the transformed data sample as an example to generate machine-readable instructions of an output data validator for validating data samples according to the target format and providing the fourth instruction to the fourth language model-based agent to obtain the machine-readable instructions of the output data validator, and iteratively processing the data samples of the plurality of data samples using the second instruction, the second language mode-based agent and the machine- readable instructions of the input validator and / or of the output validator, and, in case input validation or output validation fails, updating the second instruction and at least one of the machine-readable instructions of the input validator and themachine-readable instructions of the output validator using the first, third and / or fourth language model-based agent, using the data sample having caused the failed input validation or output validation as additional example.
10. A computer-implemented method for transforming source data from a source format to a target format, the method comprising: obtaining machine-readable instructions of a data transformer generated using the method of one of the claims 1 to 7; and processing data samples included in the source data to generate transformed data samples using the machine-readable instructions of a data transformer.
11. A computer-implemented method for transforming source data from a source format to a target format, the method comprising: obtaining an instruction for a language model-based agent using the method of one of the claims 8 or 9, the instruction instructing the language model-based agent to use a data sample and a transformed data sample as an example to provide, based on a second data sample according to the source format, a second transformed data sample according to the target format; and processing data samples included in the source data to generate transformed data samples using the instruction and the language model-based agent.
12. The computer-implemented method according to one of the claims 10 or 11 , wherein the source data comprises sensor data of building sensors, with the target format being a data format being used for controlling an energy use and / or heating of at least one building, the method comprising controlling at least one of an energy use and a heating of at least one building based on the transformed data samples.
13. The computer-implemented method according to one of the claims 10 or 11 , wherein the source data comprises data related to disaster monitoring, with the target format being a data format being used for disaster prediction or disaster alerting, the method comprising performing at least one of disaster prediction and disaster alerting based on the transformed data samples.
14. A computer program comprising instructions which, when the program is executed by a computer, cause the computer to carry out at least one of the methods according to one of the claims 1 to 13.
15. A system comprising interface circuitry, machine-readable instructions, and processor circuitry to execute the machine-readable instructions to carry out at least one of the methods according to one of the claims 1 to 13.