User-centric and LLM-enhanced adaptive ETL code synthesis

The system addresses the instability of LLM-based ETL code generation by using query templates and historical prompts to ensure consistent and efficient ETL program code output.

JP7824378B2Active Publication Date: 2026-03-04HITACHI LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2026-03-04

Smart Images

  • Figure 0007824378000001
    Figure 0007824378000001
  • Figure 0007824378000002
    Figure 0007824378000002
  • Figure 0007824378000003
    Figure 0007824378000003
Patent Text Reader

Abstract

To facilitate stable output from large-scale language model-related processing.SOLUTION: A method for generating a program code includes: making reference to a prompt database. The prompt database associates between a history prompt, a program code generated from the history prompt, and information indicating whether or not an execution result of the program code is expected to generate a coupling prompt from a user prompt and a history prompt from a history prompt determined associated with a coupling prompt from a reference. The method also includes: making reference to a program-template database associating a combination of a history prompt with a history program code proved to function to predictably generate a program code using a coupling prompt and executing, for a data processing program, the program code generated and the coupling prompt.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates generally to data management systems, and more particularly to facilitating stable output from large language model (LLM) related processing. [Background technology]

[0002] Many businesses today are undergoing digital transformation to improve operational efficiency and add value using digital technologies. Digital transformation involves connecting different systems and sharing data. For example, data is shared and exchanged by connecting business-related systems, including enterprise resource planning (ERP) systems, product lifecycle management (PLM) systems, manufacturing execution systems (MES), etc. Such data may not conform to a standard data model but instead conforms to the system's own data model. Therefore, an extract-transform-insert (ETL) process must be performed to make such data available to applications.

[0003] In the ETL processing workflow generation method of the related art, the data processing method is manually generated to conform to each data model. Furthermore, even if each data source system uses its own data model, each system must use its own tool, which causes the problem of high tool training costs. On the other hand, in the ETL processing workflow generation method using generative AI, the generative AI can absorb differences in data models. Users can quickly generate the desired ETL processing workflow and acquire the desired data without knowledge of the details of the data model or the unique tools of the data source system.

[0004] However, a problem with generative AI-based ETL processing is that the output of generative AI is not constant or stable. Even if a user inputs the same query, the ETL workflow generated by generative AI may change, resulting in a failure to obtain the intended output. There is a need for a function that can stably output the ETL processing workflow desired by the user in a stable manner.

[0005] In a related art embodiment, there is a method for obtaining a desired answer to a natural language query. In such a related art embodiment, there is a natural language front end for using information stored in a knowledge base to expand the natural language query. Even if the query can be improved by using the related art system, it does not solve the problem of lack of a uniquely defined answer that occurs when using generative AI.

[0006] Related art also provides systems and methods for adjusting prompts based on query-related prompts. Such related art implementations may include methods for adapting user prompts based on success prompts. However, success prompts alone are not sufficient when querying a generating AI. Failure prompts must also be used to more quickly reach desired information. Summary of the Invention [Problem to be solved by the invention]

[0007] A problem with using LLM-based implementations (eg, generative AI) to generate ETL program code is that the output of the LLM is not constant and stable. [Means for solving the problem]

[0008] The exemplary implementations described herein involve a system and method that divides a natural language user query into a fixed portion and a parameter portion, and records both of them as templates in a program template database, along with the query's results (e.g., ETL program code). Several LLMs can be used in the parameterization process. When a user enters a similar query, the template is extracted from the program template database, and the parameters of the new query are assigned to the parameters of the template. Using this prompt, the system creates ETL program code without using LLMs (e.g., instead, substituting parameters in the template). The system avoids the problem of LLM responses that are not necessarily constant or stable, and a desired output can thereby be obtained.

[0009] If the program template database does not contain a query similar to the query entered by the user, an exemplary embodiment can create a new template without using the program template database. Generating ETL program code using the LLM does not necessarily produce the expected results. If the results are not as expected, the prompts entered by the user, the generated ETL program code, and the determination that the results are not as expected are recorded in the prompt database. The ETL program code is then generated again using the LLM. Because the prompt database contains examples of ETL program code that are not as expected, the LLM generates different ETL program code. By repeating this process, the desired ETL program code is generated.

[0010] The output can be recorded in a program template database as described above to obtain the desired output for future similar queries.

[0011] Aspects of the present disclosure may involve a program code generation system for a data processing program having a prompt database containing past prompts, program code generated from those prompts, and results of determining whether the results of executing the program code were as expected, and a program template database may contain combinations of prompts and program code that have been proven to work as expected to generate functioning program code.

[0012] Aspects of the present disclosure may further involve a program code generation system having a parameterization unit that separates and stores parameters from the demonstrated prompts and program code when the execution result of the generated program code functions as expected, in order to uniquely output program code that functions as expected by replacing only the parameter portion when a similar prompt is executed.

[0013] Aspects of the present disclosure may further include a program code evaluation unit that stores prompts, program code generated from those prompts, and the results of determining whether the results of executing the program code were as expected in a prompt database to enable past case reference when generating program code from similar prompts.

[0014] Aspects of the present disclosure may further involve a program code generation unit that generates program code that repeatedly uses past prompts stored in a prompt database to repeat multiple attempts without user action when the results of execution of the program code are not as expected.

[0015] Aspects of the present disclosure may include a method for generating program code for a data processing program, the method may include, upon receipt of a user prompt, referencing a prompt database that associates historical prompts, program code generated from the historical prompts, and information indicating whether a result of execution of the program code is expected to generate a combined prompt from the user prompt and a historical prompt determined from the reference to be related to the combined prompt; referencing a program template database that associates combinations of historical prompts and historical program code that has been demonstrated to function as expected to generate program code using the combined prompt; and executing the generated program code and combined prompt for the data processing program.

[0016] Aspects of the present disclosure include a system for generating program code for a data processing program, the program code generation may include: means for referencing a prompt database, upon receipt of a user prompt, the prompt database associating historical prompts, program code generated from the historical prompts, and information indicating whether a result of execution of the program code is expected to generate a combined prompt from the user prompt and a historical prompt determined from the reference to be related to the combined prompt; means for referencing a program template database associating combinations of historical prompts and historical program code that has been demonstrated to function in a manner expected to generate program code using the combined prompt; and means for executing the generated program code and combined prompt for the data processing program.

[0017] Aspects of the present disclosure may include a computer program for generating program code for a data processing program, the program code generation including instructions for, upon receipt of a user prompt, referencing a prompt database that associates historical prompts, program code generated from the historical prompts, and information indicating whether a result of execution of the program code is expected to generate a historical prompt from a combined prompt from the user prompt and a historical prompt determined from the reference to be related to the combined prompt; referencing a program template database that associates combinations of historical prompts and historical program code that have been demonstrated to function as expected to generate program code using the combined prompt; and executing the generated program code and combined prompt for the data processing program. The computer program and instructions may be stored on a non-transitory computer-readable medium and executed by one or more processors.

[0018] Aspects of the present disclosure may include an apparatus for generating program code for a data processing program, the apparatus including a processor configured to: upon receipt of a user prompt, referencing a prompt database that associates historical prompts, program code generated from the historical prompts, and information indicating whether a result of execution of the program code is expected to generate a historical prompt from a combined prompt from the user prompt and from a historical prompt determined from reference to the prompt database to be related to the combined prompt; referencing a program template database that associates combinations of historical prompts and historical program code that has been demonstrated to function in a manner expected to generate program code using the combined prompt; and executing the generated program code and combined prompt for the data processing program. [Brief explanation of the drawings]

[0019] [Figure 1] FIG. 1 is a diagram of a program code generation system, according to an exemplary embodiment. [Figure 2] 1 is a flowchart of program code generation according to an exemplary implementation. [Figure 3] FIG. 1 is a diagram of a prompt database, according to an exemplary embodiment. [Figure 4A] FIG. 10 illustrates an exemplary output according to one exemplary implementation. [Figure 4B] FIG. 10 illustrates an exemplary output according to one exemplary implementation. [Figure 4C] FIG. 10 illustrates an exemplary output according to one exemplary implementation. [Figure 5] FIG. 2 is a diagram of a program template database, according to an exemplary embodiment. [Figure 6] FIG. 10 illustrates another exemplary output according to an exemplary implementation. [Figure 7] FIG. 1 illustrates an exemplary computing environment having an exemplary computer device suitable for use in some exemplary implementations. DETAILED DESCRIPTION OF THE INVENTION

[0020] The following detailed description provides details of the figures and exemplary embodiments of the present application. Reference numbers and descriptions of elements that are duplicated between figures are omitted for clarity. Terms used throughout the description are provided by way of example and are not intended to be limiting. For example, use of the term "automatic" can include fully automatic or semi-automatic implementations, including user or administrator control over certain aspects of the implementation, depending on the desired implementation of one skilled in the art practicing the embodiments of the present application. Selection can be performed by a user via a user interface or other input means, or can be implemented via a desired algorithm. The exemplary implementations as described herein can be used either alone or in combination, and the functionality of the exemplary implementations can be implemented via any means according to the desired implementation.

[0021] In a first exemplary embodiment, the query is provided by Alice, a worker who manages processes in an assembly plant. Figure 1 shows a program code generation system (1) according to one exemplary embodiment.

[0022] The data source (31) includes data from various systems such as ERP systems, PLM systems, MES, etc. The user obtains the necessary information for process management by performing ETL processing on this data.

[0023] The prompt database (21), according to a preferred embodiment, contains the ID, the prompt entered by the user, the record ID of the associated prompt, the prompt used to generate the ETL program code, the generated ETL program code, the user rating of the generated ETL program code, the user name, etc.

[0024] The program template database (22), according to a desired embodiment, includes parameterized and validated prompts, parameterized and validated ETL program code, parameters, etc. The type of data source (31) may be included.

[0025] 2 shows a flowchart for program code generation according to one exemplary embodiment. The flowchart for program code generation is described with respect to FIG.

[0026] In step S101, a user inputs a prompt. An exemplary prompt may be "OEE of product A in the last three days." This input may be made by keyboard, touch screen, voice, etc., according to a desired implementation. The prompt input is stored in a related prompt retrieval unit (11) and a prompt combination unit (12).

[0027] In step S102, the related prompt search unit (11) searches the prompt database (21) for prompts related to the prompt input in step S101. This search may use vector search techniques or other methods.

[0028] In step S103, the prompt combining unit (12) generates a combined prompt by combining the prompt input by the user in step S101 with the related prompt found in step S102. In this example, since no related prompt was found in step S102, the prompt input by the user in step S101 is the combined prompt.

[0029] In step S104, the prompt refinement unit (13) searches the program template database (22) for a program template related to the combined prompt generated in step S103. This search may use vector search techniques or other methods. If there is one (Yes), the flow proceeds to step S201. If there is not (No), the flow proceeds to step S501. In this example, no related program template was found, so the flow proceeds to step S501.

[0030] In step S501, the ETL program code generation unit (15) generates ETL program code using the combined prompts generated in step S103. The ETL program code can be generated using a large-scale language model (LLM) or any other method.

[0031] In step S502, the program code execution unit (16) executes the ETL program code generated in step S501. The program code execution unit (16) obtains data from the data source (31) and processes the data.

[0032] In step S503, the user interface (17) displays the results of step S502. The results may be displayed in textual, tabular, graphical, or generated as binary for input into some visualization tool, or other methods may be used. In this example, the overall equipment effectiveness (OEE) of the entire process is displayed numerically as shown in FIG. 4A.

[0033] In step S504, the program code evaluation unit (18) receives the user's evaluation of whether the result of step S503 is appropriate. If appropriate, the flow proceeds to step S601. If not appropriate, the flow proceeds to step S701. In this example, the result of Figure 4A is inappropriate because the user wanted a graphical output of the OEE for each process. Therefore, the flow proceeds to step S701.

[0034] In step S701, the program code evaluation unit 18 inputs information about the prompt to the prompt database 21. In this example, the information shown in 21-1 in Fig. 3 is input. Specifically, the prompt input by the user in step S101, the related prompt extracted in step S102, the combined prompt generated in step S103, the ETL program code generated in step S501, the evaluation result received in step S504, and the user name are input.

[0035] In step S702, the system determines whether the user re-enters the prompt. The system may determine a default setting in advance, or may allow the user to select it on each occasion. If the user re-enters the prompt, the flow proceeds to step S101. If the user does not re-enter the prompt, the flow proceeds to step S102. In this example, the user has chosen not to re-enter the prompt. Therefore, the flow proceeds to step S102.

[0036] In step S102, the related prompt retrieval unit (11) again retrieves prompts related to the prompt input in step S101 in the prompt database (21).

[0037] In step S103, the prompt combining unit (12) generates a combined prompt that combines the prompt entered by the user in step S101 with the related prompt found in step S102. In this example, a related prompt (21-1) with ID=1 is found in step S102, so this information is combined and a prompt such as "A user is asking 'OEE of product A in the past 3 days'. The same question by the same person exists, and the code in output_code[1] was executed, but it did not provide a suitable answer" becomes the combined prompt.

[0038] In step S104, the prompt refinement unit (13) again searches the program template database (22) for a program template related to the combined prompt generated in step S103. In this example, no related program template was found, so the flow proceeds to step S501.

[0039] In step S501, the ETL program code generating unit (15) regenerates the ETL program code using the combined prompt generated in step S103.

[0040] In step S502, the program code execution unit (16) again executes the ETL program code generated in step S501. The program code execution unit (16) acquires data from the data source (31) and processes the data.

[0041] In step S503, the user interface (17) displays the results of step S502. In this example, unlike Figure 4A, the OEE of the entire process is displayed in a graph as shown in Figure 4B.

[0042] In step S504, the program code evaluation unit (18) receives a user's evaluation of whether the result of step S503 is appropriate. In this example, the result of Figure 4B is inappropriate because a graphical output of the OEE for each process was requested. Therefore, the flow proceeds to step S701.

[0043] In step S701, the program code evaluation unit 18 inputs information about the prompt to the prompt database 21. In this example, the information shown in 21-2 in FIG.

[0044] In step S702, the system determines whether the user wants to re-enter the prompt. In this example, the user chooses to re-enter the prompt. Therefore, the flow proceeds to step S101.

[0045] In step S101, the user inputs a prompt. In this example, the input prompt is "OEE of product A for each process for the last three days."

[0046] In step S102, the related prompt retrieval unit (11) again retrieves prompts related to the prompt input in step S101 in the prompt database (21).

[0047] In step S103, the prompt combination unit (12) generates a combined prompt that combines the prompt input by the user in step S101 with the related prompt found in step S102. In this example, since related prompts (21-1, 21-2) having ID=1, 2 were found in step S102, this information is combined, and a prompt such as "The user is asking about the OEE of product A for each process for the last three days. Related prompts such as combined_prompt[1, 2] and output_code[1, 2] exist, but no appropriate answer was provided" becomes the combined prompt.

[0048] In step S104, the prompt refinement unit (13) again searches the program template database (22) for a program template related to the combined prompt generated in step S103. In this example, no related program template was found, so the flow proceeds to step S501.

[0049] In step S501, the ETL program code generating unit (15) generates ETL program code again using the combined prompt generated in step S103.

[0050] In step S502, the program code execution unit (16) again executes the ETL program code generated in step S501. The program code execution unit (16) acquires data from the data source (31) and processes the data.

[0051] In step S503, the user interface (17) displays the results of step S502. In this embodiment, unlike Figures 4A and 4B, the OEE of each process is displayed in a graph as shown in Figure 4C.

[0052] In step S504, the program code evaluation unit (18) receives the user's evaluation of whether the result of step S503 was appropriate. In this example, the result of Figure 4C is evaluated as appropriate. Therefore, the flow proceeds to step S601.

[0053] In step S601, the program code evaluation unit 18 inputs information about the prompt to the prompt database 21. In this example, the information shown in 21-3 in FIG.

[0054] In step S602, the parameterization unit (19) parameterizes the prompt and the code. This parameterization can be performed using LLM or any other method. In this example, "Product A" in the prompt entered by the user in step S101 refers to the target product, and "the last 3 days" refers to the target period, so these are extracted as parameters. In addition, "product_data" in the ETL program code generated in step S501 refers to the target product, and "days=3" refers to the target period, so these are extracted as parameters.

[0055] In step S603, the parameterization unit (19) inputs the prompts and codes parameterized in step S602 into the program template database (22). In this example, the information shown in 22-1 has been input.

[0056] Second Exemplary Embodiment

[0057] In a second exemplary embodiment, the query is submitted by Bob, an operator who manages the process at an assembly plant.

[0058] In step S101, the user inputs a prompt: "Equipment validity for last 5 days for product B." The prompt input is stored in the related prompt retrieval unit (11) and the prompt combination unit (12).

[0059] In step S102, the related prompt retrieval unit (11) searches the prompt database (21) for prompts related to the prompt input in step S101.

[0060] In step S103, the prompt combination unit (12) generates a combined prompt by combining the prompt input by the user in step S101 with the related prompt found in step S102. In this embodiment, since prompts (21-1, 21-2, 21-3) having ID=1, 2, 3 were found in step S102, this information is combined, and a combined prompt such as "The user is asking about 'the validity of the equipment for the last 5 days for product B' exists. There are related prompts by other users, such as combined_prompt[1,2,3] and output_code[1,2,3]. This combined_prompt[1,2] and output_code[1,2] did not provide an appropriate answer. Combined_prompt[3] and output_code[3] provided an appropriate answer" is generated.

[0061] In step S104, the prompt refinement unit (13) searches the program template database (22) for the presence of a program template related to the combined prompt generated in step S103. In this example, a related program template with ID=1 (22-1 from FIG. 5) is found, so the flow proceeds to step S201.

[0062] In step S201, the prompt refinement unit (13) extracts parameters from the combined prompt generated in step S103 in the format indicated by the program template (22-1) extracted in step S104. This parameter extraction can be performed using LLM or any other method. In this embodiment, the extracted parameter "Product B" is assigned to the parameter "v_product," and "5 days" is assigned to "v_days" in the program template (22-1). In addition, the prompt refinement unit (13) generates ETL program code using the extracted parameters. This program code can be uniquely generated by the combination of "verified_program_code" and "parameter" recorded in the program template database (22).

[0063] In step S202, the parameter evaluation unit (14) receives a user evaluation of whether the parameters extracted in step S201 are intended by the user. If they are intended, the flow proceeds to step S301. If they are not intended, the flow proceeds to step S501, where ETL program code is generated as in the previous example. In this example, the parameters assigned in step S201 are intended by the user. Then, the flow proceeds to step S301.

[0064] In step S301, the program code execution unit (16) executes the ETL program code generated in step S201. The program code execution unit (16) obtains data from the data source (31) and processes the data.

[0065] In step S302, the user interface (17) displays the results of step S301. In this example, the OEE of product B for each process is displayed in a graph as shown in FIG.

[0066] In step S303, the program code evaluation unit (18) receives the user's evaluation of whether the result of step S302 was appropriate. If appropriate, the flow proceeds to step S401. If not appropriate, the flow proceeds to step S701, where the prompt is considered as in the previous example. In this example, the result of Figure 6 is appropriate. Therefore, the flow proceeds to step S401.

[0067] In step S401, the program code evaluation unit 18 inputs information about the prompt to the prompt database 21. In this example, the information shown in 21-4 in FIG.

[0068] Through the exemplary embodiments described herein, the prompt database (21) can be used to reference the history of prompts, including past failures, to quickly obtain the user's desired output. The program template database (22) can be used to use proven and executable ETL program code to overcome the drawback of LLM, which is that the output is not stable. Furthermore, through the exemplary embodiments, executable ETL program code can be generated more quickly and easily.

[0069] 7 illustrates an exemplary computing environment having an exemplary computing device suitable for use in some exemplary implementations. The computing device 705 in the computing environment 700 can include one or more processing units, cores, or processors 710, memory 715 (e.g., RAM, ROM, and / or the like), internal storage 720 (e.g., magnetic, optical, solid-state storage, and / or organic), and / or an IO interface 725, any of which can be coupled over a communication mechanism or bus 730 for communicating information or can be incorporated into the computing device 705. The IO interface 725 can be further configured to receive images from a camera or provide images to a projector or display, depending on the desired implementation.

[0070] The computing device 705 may be communicatively coupled to an input / user interface 735 and an output device / interface 740. Either or both of the input / user interface 735 and the output device / interface 740 may be a wired or wireless interface and may be detachable. The input / user interface 735 may include any device, component, sensor, or interface, physical or virtual, that can be used to provide input (e.g., buttons, a touchscreen interface, a keyboard, pointing / cursor control, a microphone, a camera, Braille, a motion sensor, an accelerometer, an optical reader, and / or the like). The output device / interface 740 may include a display, television, monitor, printer, speakers, Braille, or the like. In some exemplary implementations, the input / user interface 735 and the output device / interface 740 may be incorporated with or physically coupled to the computing device 705. In other exemplary implementations, other computing devices may function as or provide the functionality of input / user interface 735 and output device / interface 740 for computing device 705 .

[0071] Examples of computing devices 705 may include, but are not limited to, highly mobile devices (e.g., smartphones, devices mounted on vehicles and other machines, devices carried by people or animals, and the like), mobile devices (e.g., tablets, notebooks, laptops, personal computers, portable televisions, radios, and the like), and devices not designed for mobility (e.g., desktop computers, other computers, information kiosks, televisions with one or more processors embedded and / or televisions with one or more processors coupled thereto, radios, and the like).

[0072] Computing device 705 may be communicatively coupled (e.g., via IO interface 725) to external storage 745 and to a network 750 for communication with any number of networked components, devices, and systems, including one or more computing devices of the same or different configurations. Computing device 705 or any other connected computing device may function as, provide services to, or be referred to as a server, client, thin server, general-purpose machine, special-purpose machine, or otherwise.

[0073] IO interface 725 may include, but is not limited to, wired and / or wireless interfaces using any communication or IO protocol or convention (e.g., Ethernet, 802.11x, Universal System Bus, WiMax, modem, cellular network protocols, and the like) for communicating information to and / or from at least all connected components, devices, and networks in computing environment 700. Network 750 may be any network or combination of networks (e.g., the Internet, a local area network, a wide area network, a telephone network, a cellular network, a satellite network, and the like).

[0074] The computing device 705 may use and / or communicate using computer-usable or computer-readable media, including transitory and non-transitory media. Transitory media include transmission media (e.g., metallic cables, fiber optics), signals, carrier waves, and the like. Non-transitory media include magnetic media (e.g., disks and tape), optical media (e.g., CD-ROM, digital video disks, Blu-ray disks), solid-state media (e.g., RAM, ROM, flash memory, solid-state storage), and other non-volatile storage or memory.

[0075] The computing device 705 can be used to implement techniques, methods, applications, processes, or computer-executable instructions in some exemplary computing environments. The computer-executable instructions can be retrieved from a transitory medium and stored on and retrieved from a non-transitory medium. The executable instructions can be from one or more of any programming, scripting, and machine language (e.g., C, C++, C#, Java, Visual Basic, Python, Perl, JavaScript, etc.).

[0076] The processor 710 can run under any operating system (OS) (not shown) in a native or virtual environment. One or more applications can be deployed, including a logic unit 760, an application programming interface (API) unit 765, an input unit 770, an output unit 775, and an inter-unit communication mechanism 795 for different units to communicate with each other, with the OS, and with other applications (not shown). The above-mentioned units and elements can vary in design, function, configuration, or implementation and are not limited to the above description. The processor 710 can have the form of a hardware processor, such as a central processing unit (CPU), or can be a combination of hardware and software units.

[0077] In some exemplary implementations, when information or instructions for execution are received by API unit 765, it may be communicated to one or more other units (e.g., logic unit 760, input unit 770, output unit 775). In some examples, logic unit 760 may be configured to control the flow of information between units and, in some exemplary implementations described above, direct the services provided by API unit 765, input unit 770, and output unit 775. For example, the flow of one or more processes or implementations may be controlled by logic unit 760 alone or in conjunction with API unit 765. Input unit 770 may be configured to obtain inputs for the calculations described in the exemplary implementations, and output unit 775 may be configured to provide outputs based on the calculations described in the exemplary implementations.

[0078] The processor 710 may be configured to perform program code generation for a data processing program, which may include, upon receipt of a user prompt (S101), referencing a prompt database, which associates historical prompts, program code generated from the historical prompts, and information indicating whether a result of execution of the program code is expected to generate a combined prompt from the user prompt and a historical prompt determined from the reference to be related to the combined prompt (S102); referencing a program template database that associates combinations of historical prompts and historical program code that has been demonstrated to function as expected to generate program code using the combined prompt (S104, S201); and executing the generated program code and combined prompt for the data processing program (S301, S502), as shown in FIG. 2.

[0079] The processor 710 may be configured to execute the method or instructions as described above, and may further include, as shown in FIG. 2, in the case of execution of the generated program code and a combined prompt determined to function as expected (S504, S601), separating and storing parameters from the generated program code and the combined prompt (S601, S602, S603), and, upon receipt of a subsequent user prompt that is similar to the combined prompt, replacing parameters of the generated program code with parameters associated with the subsequent user prompt (S301), and executing the generated program code with parameters associated with the subsequent user prompt (S301, S302).

[0080] The processor 710 may be configured to execute the methods or instructions as described above, and may further involve storing the combined prompt, the generated program code prompt, and information indicating whether execution of the generated program code and the combined prompt had the expected results in the prompt database, as shown in FIG.

[0081] The processor 710 may be configured to execute a method or instructions as described above, which may include generating program code using historical prompts in a prompt database associated with program code associated with information indicating that the execution result is unexpected (S701), as shown in FIG.

[0082] Depending on the desired implementation, the data processing program may be part of an extract-transform-insert (ETL) system as described herein.

[0083] Depending on the desired implementation, the data processing program may be part of a data analysis system. For example, the prompts and executable code may be used to generate data analysis algorithms on the underlying data to perform data analysis and obtain analysis results.

[0084] Depending on the desired implementation, executing the generated program code and bound prompts for the data processing program may be performed by a generative artificial intelligence process configured to take the bound prompts and generated code and execute the process based on the input.

[0085] The processor 710 may be configured to execute the method or instructions as described above, and may further include, as shown in S501, S502, and S503 of FIG. 2, if a reference to the prompt database does not result in any of the historical prompts that have been determined to be relevant to the user prompt, including the user prompt in the prompt database and running a generative artificial intelligence process on the user prompt to perform a process based on the user prompt.

[0086] Some portions of the detailed description are presented in terms of algorithms and symbolic representations of operations within a computer. These algorithmic descriptions and symbolic representations are the means used by those skilled in the data processing arts to convey the substance of their innovations to others skilled in the art. An algorithm is a series of defined steps leading to a desired end state or result. In exemplary implementations, the performed steps require physical manipulations of tangible quantities to achieve a tangible result.

[0087] Unless otherwise specified, and as will be apparent from the description, throughout this specification, descriptions utilizing words such as "processing," "calculating," "computing," "determining," "displaying," or the like, are understood to include the actions and processes of a computer system or other information processing device that manipulates and converts data represented as physical (electronic) quantities in the registers and memory of the computer system into other data similarly represented as physical quantities in the memory or registers of the computer system or other information storage, transmission, or display devices.

[0088] Exemplary embodiments may further relate to apparatuses for performing the operations herein. This apparatus may be specially constructed for the desired purposes, or may include one or more general-purpose computers selectively activated or reconfigured by one or more computer programs. Such computer programs may be stored on a computer-readable medium, such as a computer-readable storage medium or a computer-readable signal medium. Computer-readable storage media may include tangible media, such as, but not limited to, optical disks, magnetic disks, read-only memory, random-access memory, solid-state devices and drives, or any other type of tangible or non-transitory medium suitable for storing electronic information. Computer-readable signal media may include media such as carrier waves. The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. A computer program may include a pure software implementation containing instructions for performing the operations of a desired embodiment.

[0089] Various general-purpose systems may be used with the programs and modules according to the examples herein, or it may eventually be convenient to construct specialized apparatus to perform the desired method steps. Moreover, the example embodiments are not described with reference to any particular programming language. It will be understood that a variety of programming languages ​​may be used to implement the teachings of the example embodiments as described herein. Instructions of the programming language may be executed by one or more processing devices, such as, for example, a central processing unit (CPU), a processor, or a controller.

[0090] As is known in the art, the operations described above may be performed by hardware, software, or some combination of software and hardware. Various aspects of the exemplary embodiments may be implemented using circuits and logic devices (hardware), while other aspects may be implemented using instructions stored on a machine-readable medium (software) that, when executed by a processor, cause the processor to perform methods that implement the embodiments of the present application. Furthermore, some exemplary embodiments of the present application may be implemented solely in hardware, while other exemplary embodiments may be implemented solely in software. Furthermore, the various functions described may be performed in a single unit or may be distributed across multiple components in any number of ways. When implemented by software, the methods may be executed by a processor, such as a general-purpose computer, based on instructions stored on a computer-readable medium. If desired, the instructions may be stored on the medium in compressed and / or encrypted format.

[0091] Moreover, other implementations of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the teachings herein. Various aspects and / or components of the described exemplary embodiments may be used alone or in any combination. It is intended that the specification and exemplary embodiments be considered as examples only, with the true scope and spirit of the present application being indicated by the following claims. [Explanation of symbols]

[0092] 1 Program code generation system 11 Related Prompt Search Unit 12 Prompt-Combined Units 13 Prompt Improvement Unit 14 Parameter Evaluation Unit 15 ETL program code generation units 16 Program Code Execution Unit 17 User Interface 18 Program Code Evaluation Unit 19 Parameterization Unit 21 Prompt Database 22 Program Template Database 31 Data Sources 705 Computer Devices 710 processor 715 memory 720 Internal Storage 725 IO interface 735 Input / User Interface 740 Output Devices / Interfaces 745 External Storage 750 Network 760 logical units 765 API units 770 Input Unit 775 Output Unit

Claims

1. A method for program code generation for a data processing program, executed by a system, comprising: The system includes a prompt database and a program template database; the prompt database associates historical prompts, which are past prompts, program code generated from the historical prompts, and information indicating that the execution result of the program code was as expected; the program template database stores program templates including combinations of program code and the history prompts that have been proven to function as expected; The method further comprises the step of: upon receipt of a user prompt from a user, the system: referencing the prompt database to select a historical prompt associated with the user prompt, and generating a combined prompt from the selected historical prompt and the user prompt; referencing the program template database to select a program template associated with the combined prompt; and generating program code from the combined prompt and the selected program template; Executing the generated program code for the data processing program.

2. The system, Separating and storing the generated program code and parameters from the combined prompts; Upon receipt of a subsequent user prompt similar to the combined prompt, replacing parameters of the generated program code with parameters associated with the subsequent user prompt; The method of claim 1 , further comprising: executing the generated program code with the parameters associated with the subsequent user prompt.

3. The method of claim 1, further comprising the system storing in the prompt database the combined prompt, the generated program code, and information indicating whether the execution of the generated program code had the expected result.

4. The method of claim 1, further comprising the system generating the program code using the historical prompts in the prompt database associated with program code associated with information indicating that the execution result is unexpected.

5. 2. The method of claim 1, wherein the data processing program is part of an Extract-Transform-Insert (ETL) system.

6. The method of claim 1 , wherein the data processing program is part of a data analysis system.

7. The method described in claim 1, wherein the system generates program code for a data processing program from the combined prompt by a generative artificial intelligence process if a program template related to the combined prompt is not found in the program template database.

8. 2. The method of claim 1, further comprising: if referencing the prompt database does not result in a historical prompt that is determined to be related to the user prompt, including the user prompt in the prompt database; and running a generative artificial intelligence process on the user prompt to perform a process based on the user prompt.

9. 1. A non-transitory computer-readable medium storing instructions for a system for generating program code for a data processing program, comprising: The system includes a prompt database and a program template database; the prompt database associates historical prompts, which are past prompts, program code generated from the historical prompts, and information indicating that the execution result of the program code was as expected; the program template database stores program templates including combinations of program code and the history prompts that have been proven to function as expected; The instructions, upon receipt of a user prompt: referencing the prompt database to select a historical prompt associated with the user prompt, and generating a combined prompt from the selected historical prompt and the user prompt; referencing the program template database to select a program template associated with the combined prompt; and generating program code from the combined prompt and the selected program template; a non-transitory computer readable medium for executing the generated program code for the data processing program; 10. An apparatus for storing instructions for generating program code for a data processing program, comprising: a processor; A prompt database; a program template database, the prompt database associates historical prompts, which are past prompts, program code generated from the historical prompts, and information indicating that the execution result of the program code was as expected; the program template database stores program templates including combinations of program code and the history prompts that have been proven to function as expected; The processor, upon receipt of a user prompt, referencing the prompt database to select a historical prompt associated with the user prompt, and generating a combined prompt from the selected historical prompt and the user prompt; referencing the program template database to select a program template associated with the combined prompt; and generating program code from the combined prompt and the selected program template; An apparatus for executing the generated program code for the data processing program.

Citation Information

Patent Citations

  • Data generation method using language model, computer device, and computer program

    JP2023018624A

  • JPP7375835B

  • Program generation apparatus, program generation method and program

    US20230342117A1

  • Source code generation device, source code generation method, and recording medium

    WO2015141150A1