Code generation support system and code generation support method
Patent Information
- Application Number
- JP2025026198
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2026-09-01
AI Technical Summary
【0010】 本発明によれば、例えば、高度なスキルや専門知識を必要とせずに、言語処理モデル等を用いてコード生成ができる。
Smart Images

Figure 2026139471000001_ABST
Abstract
Description
[[Technical Field]]
[0001] The present invention relates to a code generation support system and a code generation support method. [[Background Art]]
[0002] In recent years, due to the increase in labor demand driven by economic growth and the declining birthrate and aging population, global labor shortage has become a prominent problem. Accordingly, DX (Digital Transformation), which aims to resolve labor shortage through automation and efficiency improvement utilizing digital technology, has been actively developed. In DX, for example, automation and efficiency improvement are achieved by replacing manual workers in charge of operations with programs.
[0003] On the other hand, along with the rapid development of digital technology, there is also a shortage of human resources with specialized knowledge in the digital field, which has become a barrier to the promotion of DX. Accordingly, there is an increasing demand for low-code and no-code platforms that allow development of programs and applications even without specialized knowledge such as programming.
[0004] In recent years, as one of such platforms, technology for automating program development using generative AI (Artificial Intelligence) represented by Large Language Models (LLM) has been advancing.
[0005] For example, Patent Document 1 discloses a technology for generating computer code using an LLM. In the technology disclosed in Patent Document 1, a text describing an execution result of code in natural language is input to the LLM to generate and output one or more codes, and a target code can be obtained by identifying or selecting an appropriate code based on the execution result of the code. [[Prior Art Documents]] [[Patent Documents]]
[0006] [[Patent Document 1]] U.S. Patent Application Publication No. 2024 / 0020096 [Overview of the project] [Problems that the invention aims to solve]
[0007] However, the technology disclosed in Patent Technology 1 requires advanced skills and expertise regarding business requirements and programming when creating text that describes the execution results of the code in natural language. Therefore, there was room for improvement to enable code generation without requiring advanced skills or expertise.
[0008] This invention was made in view of the above-mentioned problems, and aims to enable code generation using language processing models, etc., without requiring advanced skills or specialized knowledge. [Means for solving the problem]
[0009] To achieve the above objective, the present invention, in one embodiment, provides a code generation support system for generating program code describing processing based on a target document, wherein the processor of the code generation support system inputs a first prompt to a language processing model that generates a response based on an input prompt, instructing it to execute a first language processing task that generates format difference information relating to the difference in document format between the target document and the existing document based on a comparison result between the target document and an existing document whose document function representing the purpose of the document is the same as that of the target document, and acquires the format difference information generated by the language processing model; inputs a second prompt to the language processing model that instructs it to execute a second language processing task that extracts specific processing information corresponding to the processing relating to the format difference information from the existing code based on the format difference information and the existing code based on the existing document, and acquires the specific processing information generated by the language processing model; inputs a third prompt to the language processing model that instructs it to execute a third language processing task that generates modification location information relating to the modification location in the existing code based on the format difference information and the specific processing information, and acquires the modification location information generated by the language processing model, and outputs the modification location information via an output device. [Effects of the Invention]
[0010] According to the present invention, for example, code can be generated using a language processing model, etc., without requiring advanced skills or expertise. [Brief explanation of the drawing]
[0011] [Figure 1] A block diagram showing the configuration of the code generation support system according to the embodiment. [Figure 2] A diagram showing the configuration of the document management table according to the embodiment. [Figure 3] A diagram showing the configuration of the analysis result management table according to the embodiment. [Figure 4] A flowchart illustrating the code generation process according to the embodiment. [Figure 5]A diagram showing the configuration of the administration screen according to the embodiment. [Figure 6] A flowchart illustrating the information acquisition process according to the embodiment. [Figure 7] A flowchart illustrating the document format comparison process according to the embodiment. [Figure 8] A flowchart illustrating the specific processing extraction process according to the embodiment. [Figure 9] A flowchart illustrating the modification analysis process according to the embodiment. [Figure 10] A flowchart illustrating the analysis result confirmation process according to the embodiment. [Figure 11] A flowchart illustrating the code generation process according to the embodiment. [Modes for carrying out the invention]
[0012] Embodiments of the present invention will be described below with reference to the drawings. In each drawing used to illustrate the embodiments, the same components are given the same names and reference numerals, and repeated explanations of them are omitted.
[0013] In the following explanation, "arithmetic unit" refers to one or more processors. Processors are typically various types of processors, such as CPUs (Central Processing Units), GPUs (Graphics Processing Units), and NPUs (Neural Network Processing Units). A processor may be single-core or multi-core. A processor may also be a processor core. A processor may also be a broad processor device, such as a hardware circuit that performs some or all of the processing (e.g., FPGA (Field-Programmable Gate Array), CPLD (Complex Programmable Logic Device), ASIC (Application Specific Integrated Circuit)).
[0014] Furthermore, in the following description, processing may be explained with the "~ unit" as the subject. The ~ unit is implemented by executing a program with a processor, and performs predetermined processing while appropriately using a storage device and / or interface device, etc. For this reason, the subject of processing may be the processor. The program may be installed from a program distribution source to a device such as a computer. Here, the program distribution source may be, for example, a program distribution server or a computer-readable (e.g., non-transitory) recording medium. Furthermore, two or more programs may be implemented as one program, or one program may be implemented as two or more programs.
[0015] Furthermore, in the following description, expressions such as "~ table" may be used to describe information from which an output can be obtained for an input. However, such information may be any type of data (e.g., structured data, unstructured data, a neural network that generates an output in response to an input, a learning model represented by genetic algorithms or random forests). Therefore, "~ table" can also be referred to as "~ information". Furthermore, in the following description, the configuration of each table is an example, and integration and division thereof are optional. Also, in the following description, the table may be in any format, whether it is a database (DB) or data stored in memory.
[0016] (Configuration of Code Generation Support System S According to Embodiment) FIG. 1 is a block diagram showing the configuration of the code generation support system S according to the embodiment.
[0017] The code generation support system S includes a code generation support apparatus 100, a generative AI system 101, and a cloud system 102.
[0018] The code generation support device 100 is connected to the generation AI system 101 and the cloud system 102 via a communication network 103 such as the Internet, LAN (Local Area Network), WAN (Wide Area Network), or dedicated line. The connection method of the communication network 103 may be either wired or wireless.
[0019] Furthermore, the generation AI system 101 and the cloud system 102 are connected to the same communication network 103. However, the generation AI system 101 and the cloud system 102 may be connected to the code generation support device 100 via different communication networks.
[0020] The generative AI system 101 is a system that provides services using LLM (Large Language Models). LLM is a natural language processing model built using a large amount of text data and can perform various language processing tasks. LLM accepts prompts containing the task content, such as questions written in natural language, understands the meaning of the task content, generates text as an answer, and outputs it. LLM is an example of a language processing model that generates an answer based on an input prompt.
[0021] The text that the LLM in this embodiment handles as input and output includes code representing the operation of programs and applications, and the results of loading document data. Furthermore, the LLM in this embodiment includes a multimodal model that can handle image data and other non-text data as input and output.
[0022] The code generation support device 100 comprises an arithmetic unit 110, memory 111, storage device 112, and network interface 113. An input device 114 and an output device 115 are also connected to the code generation support device 100 via a predetermined interface.
[0023] The input device 114 includes a keyboard, mouse, and touch panel. The output device 115 includes a display and touch panel.
[0024] The arithmetic unit 110 is a processor such as a CPU (Central Processing Unit). The arithmetic unit 110 operates as a functional unit (module) that realizes a specific function by executing processing according to a program. In the following explanation, when the processing is described with the functional unit as the subject, it indicates that the arithmetic unit 110 is executing a program that realizes that functional unit.
[0025] Memory 111 is a storage device such as RAM (Random Access Memory) or ROM (Read Only Memory) and is used to load programs executed by the arithmetic unit 110 and information used by those programs. Memory 111 is also used as a work area. Storage device 112 is an HDD (Hard Disk Drive) or SSD (Solid State Drive).
[0026] The network interface 113 is a NIC (Network Interface Card), wireless communication module, USB (Universal Serial Bus) module, or serial communication module, etc.
[0027] The storage device 112 stores programs that implement the information acquisition unit 120, document format comparison unit 121, specific processing extraction unit 122, modification location analysis unit 123, analysis result confirmation unit 124, and code generation unit 125, which are realized by the execution of the programs. The storage device 112 also stores a document management table 126 and an analysis result management table 127.
[0028] (Document management table 126 according to the embodiment) Figure 2 shows the configuration of the document management table 126 according to the embodiment.
[0029] The document management table 126 stores information about existing documents. An existing document is a document for which the code for processing the information within the document has already been generated. The document management table 126 stores entries that include document ID 201, existing document 202, document function 203, and processing code 204. Each entry corresponds to one existing document.
[0030] Document ID 201 is a field that stores the identifier of an existing document. Existing Document 202 is a field that stores links to existing documents with specific functions.
[0031] Document function 203 is a field that stores text describing the function of an existing document. The function of a document is the purpose that the user of the document aims to achieve with that document. For example, if the document is an application form for a specific task, the function is either a request for that task or an application form for a request for that task.
[0032] Furthermore, most business documents contain descriptions of their function. For example, if a document is an application form for a specific task, the description will include the task name, task details, purpose, or similar items. The document function 203 in this embodiment stores text describing the function of the document contained within it. Alternatively, the document function 203 may be registered when a user enters text describing the function when registering an existing document in the document management table 126.
[0033] Processing code 204 is a field that stores links to processing codes corresponding to existing documents. Each processing code corresponds to an existing document in the same entry and may, for example, extract specific information from the document and output it as text, output the extraction results to a file in a defined format, or perform processing according to the extraction results. Furthermore, since each code corresponds to an existing document in the same entry in the document management table 126, it includes processing related to the parser portion of the document format.
[0034] In this embodiment, existing documents and processing codes are stored as data files in the cloud system 102 and linked to the document management table 126. However, the embodiment is not limited to this; existing documents and processing codes may also be stored as files in the storage device within the code generation support device 100.
[0035] (Analysis result management table 127 according to the embodiment) Figure 3 shows the configuration of the analysis results management table 127 according to the embodiment.
[0036] The analysis result management table 127 stores the output results of the document format comparison unit 121, the specific processing extraction unit 122, and the modification location analysis unit 123 of this embodiment. The analysis result management table 127 stores entries including ID 301, document format comparison result 302 (format difference information), specific processing extraction result 303 (specific processing information), and modification location analysis result 304 (modification location information).
[0037] Document ID 301 is a field that stores an identifier in the analysis result management table 127. Document format comparison result 302 is the output obtained from the document format comparison process by the document format comparison unit 121. Specific processing extraction result 303 is the output obtained from the specific processing extraction process by the specific processing extraction unit 122. Correction location analysis result 304 is the output obtained from the correction location analysis process by the correction location analysis unit 123. These fields are stored in the analysis result management table 127 in the order of document format comparison result 302, specific processing extraction result 303, and correction location analysis result 304. Details of the document format comparison process, specific processing extraction process, and correction location analysis process will be described later.
[0038] (Code generation process according to the embodiment) Figure 4 is a flowchart showing the code generation process according to the embodiment.
[0039] First, the information acquisition unit 120 of the code generation support device 100 performs information acquisition processing (step S100). Details of the information acquisition processing will be described later. Next, the document format comparison unit 121 of the code generation support device 100 performs document format comparison processing (step S200). Details of the document format comparison processing will be described later.
[0040] Next, the specific processing extraction unit 122 of the code generation support device 100 executes the specific processing extraction process (step S300). Details of the specific processing extraction process will be described later. Next, the modification location analysis unit 123 of the code generation support device 100 executes the modification location analysis process (step S400). Details of the modification location analysis process will be described later.
[0041] Next, the analysis result confirmation unit 124 of the code generation support device 100 performs the analysis result confirmation process (step S500). Details of the analysis result confirmation process will be described later. Next, the code generation unit 125 of the code generation support device 100 performs the code generation process (step S600). Details of the code generation process will be described later. Note that code generation may be performed manually by the user based on the results of the analysis result confirmation process in step S500, rather than by performing step S600.
[0042] In this embodiment, processing is executed starting from user input, but this is not limited to this. For example, the code generation support device 100 may store existing documents and processing codes, and execute processing when a new document is created.
[0043] (Administrative screen 700 according to the embodiment) Figure 5 shows the configuration of the management screen 700 according to the embodiment. When the code generation support device 100 receives access from a user, it presents the management screen 700 as shown in Figure 5. Data processing and screen control related to the management screen 700 are performed by the arithmetic unit 110.
[0044] Now, let's describe the administration screen 700. The administration screen 700 includes a new document input area 710, an existing document selection area 720, an analysis result display area 730, and a generation result display area 740.
[0045] The new document input area 710 includes a new document input field 711. The new document input field 711 has a document upload function, and the user uploads a new document file. This embodiment aims to support the generation of corresponding processing code for this new document.
[0046] The existing document selection area 720 includes an existing document list 721 and operation buttons 723. The existing document list 721 displays candidate existing documents stored in the document management table 126 and their functions. The user selects one or more existing documents that have functions common to the new document from the candidate existing documents by operating the checkboxes 722 in the existing document list 721. Operation buttons 723 are buttons for enabling input to the new document input area 710 and the existing document selection area 720.
[0047] In this embodiment, the user selects one or more existing documents that have functions common to the new document on the management screen 700. However, one or more existing documents may be automatically selected starting from the selection of the new document. For example, the user can compare the description of the new document's functions with the descriptions of the functions of each existing document and select existing documents that share common functions. In this case, the comparison of the descriptions of functions may be performed using text similarity calculation, text search using keywords contained in the description of the new document's functions as a query, or vector search which compares the text after vectorizing it. Furthermore, if existing documents are selected automatically, the operation of the existing document selection area 720 may be skipped. Also, the results of the automatic selection may be reflected in the checkbox 722.
[0048] The analysis results display area 730 includes an analysis results list 731 and operation buttons 733. The analysis results list 731 displays the analysis results stored in the analysis results management table 127. For example, Figure 11 shows that the analysis results in the first row of the analysis results list 731 are displayed identifiable by highlight h1, and the analysis results in the second row of the analysis results list 731 are displayed identifiable by highlight h2.
[0049] The user selects the modifications to be applied to the existing code for code generation by manipulating the checkbox 732 in the analysis results list 731. The operation button 733 is used to enable input to the analysis results display area 730 and execute code generation. When the checkbox 732 in the analysis results list 731 is manipulated to re-select the modifications to be applied to the existing code, and the operation button 733 is pressed, the code is regenerated based on the selected modifications (modification location information).
[0050] The generation result display area 740 includes a generation result display field 741. The generation result display field 741 displays the codes generated through this embodiment. Figure 11 shows, for example, that the code portion corresponding to the analysis result in the first row of the analysis result list 731 is displayed identifiable by highlighting h1, and the code portion corresponding to the analysis result in the second row of the analysis result list 731 is displayed identifiable by highlighting h2. The operation button 742 is a button for confirming the codes displayed in the generation result display area 740.
[0051] (Information acquisition process according to the embodiment) Figure 6 is a flowchart illustrating the information acquisition process according to the embodiment. Figure 6 shows details of step S100 (Figure 4) performed by the code generation support device 100.
[0052] The information acquisition unit 120 accepts the upload of a new document via the management screen 700 (step S101).
[0053] Next, the information acquisition unit 120 accepts the selection operation of an existing document via the management screen 700 (step S102).
[0054] Next, the information acquisition unit 120 refers to the document management table 126, obtains the processing code corresponding to the existing document selected in step S102 (step S103), and terminates the information acquisition process.
[0055] (Document format comparison processing according to the embodiment) Figure 7 is a flowchart illustrating the document format comparison process according to the embodiment. Figure 7 shows details of step S200 (Figure 4) performed by the code generation support device 100.
[0056] The document format comparison process causes the LLM to generate format difference information explaining the differences in document formats between the new document and the existing document, and stores the results in the analysis result management table 127. If two or more existing documents are selected during the information acquisition process, the process described in steps S201 to S203 below is repeated for each existing document, according to the branch in step S204 described below.
[0057] First, the document format comparison unit 121 creates a prompt to be input to the LLM to explain the differences between the new document and the existing document (step S201). This prompt includes the results of loading the existing document and the new document, respectively, and instructions to execute a language processing task that generates format difference information listing the differences between the new document and the existing document. Note that a multimodal model capable of handling images may be adopted as the LLM, and the existing document and the new document may be included as images in the prompt. Furthermore, the instructions included in the prompt may specifically indicate the differences, such as elements newly added in the new document, elements deleted in the new document, or elements changed in the new document.
[0058] The code generation support device 100 has a prompt template pre-configured, and the document format comparison unit 121 generates prompts using this template.
[0059] Next, the document format comparison unit 121 inputs a prompt to the LLM and obtains format difference information (step S202).
[0060] Next, the document format comparison unit 121 stores all the obtained format difference information in the document format comparison results 302 of the analysis result management table 127 (step S203). For example, if the obtained format difference information lists 5 differences between the new document and the existing document, 5 entries will be stored in the document format comparison results 302 of the analysis result management table 127.
[0061] Next, the document format comparison unit 121 returns to step S201 if there are existing documents that have not been compared with the new document (step S204YES), and executes steps S201 to S203 with the existing documents that have not been compared and the new document. If all existing documents have been compared with the new document (step S204NO), the document format comparison unit 121 terminates the document format comparison process.
[0062] In this embodiment, if two or more existing documents are selected, format difference information between the new document and the existing documents will be managed separately for each existing document. For example, in this embodiment, after storing the format difference information obtained using the first existing document in the analysis result management table, the format difference information obtained using the second existing document will be stored in a separate analysis result management table from the first table. In this way, format difference information from different existing documents will not be mixed. Alternatively, the ID 301 of the analysis result management table 127 may be used to include an identifier for each existing document, thereby managing which existing document each entry corresponds to. Once format difference information has been obtained for all existing documents, the document format comparison unit 121 terminates the document format comparison process.
[0063] (Specific processing extraction process according to the embodiment) Figure 8 is a flowchart of the specific processing extraction process according to the embodiment. Figure 8 shows details of step S300 (Figure 4) executed by the code generation support device 100.
[0064] The specific processing extraction process extracts the processing related to the differences in document format identified in the document format comparison process from the processing codes of each existing document and stores them in the analysis result management table 127. If two or more existing documents are selected in the information acquisition process, the process described in steps S301 to S303 below is repeated for the number of existing documents, i.e., the number of tables in the analysis result management table 127, according to the branching in step S304 described below.
[0065] First, the specific processing extraction unit 122 creates a prompt to be input to the LLM (Step S301) in order to extract the processing related to the information stored in the document format comparison result 302 of the analysis result management table 127 from the processing codes of each existing document. This prompt includes the processing code of the existing document, the information of each entry in the document format comparison result 302 that represents the difference in format between the existing document and the new document, and instructions to execute a language processing task that extracts the processing (specific processing information) related to each difference in the code. Note that there may be cases where the related processing is not included in the code, and in such cases, the instruction statement in the prompt may include a statement indicating that extraction is not necessary. The code generation support device 100 has a prompt template set in advance, and the specific processing extraction unit 122 generates the prompt using this template.
[0066] Next, the specific processing extraction unit 122 inputs a prompt to the LLM and obtains specific processing information (step S302). For example, if the document format comparison result for a certain entry is that the name of a specific item is different, the specific processing information for that entry will include processing that includes a conditional statement using the name of that item.
[0067] Next, the specific processing extraction unit 122 stores the obtained format difference information in the corresponding entries of the specific processing extraction results 303 in the analysis result management table 127 (step S303).
[0068] In this embodiment, if there is no processing related to a certain document format comparison result in the processing code of an existing document, the corresponding field in the specific processing extraction result will be left blank. For example, if the document format comparison result indicates that a certain item has been deleted, and there is no processing related to that item in the existing code, the specific processing extraction result corresponding to that document format comparison result will be left blank. This operation makes it possible to exclude document format differences that are not related to the processing code from subsequent analysis.
[0069] Next, if there are any unprocessed analysis result management tables 127 (step S304 YES), the specific processing extraction unit 122 returns to step S301 and executes steps S301 to S303 for the unprocessed analysis result management tables 127. If specific processing information has been obtained for all analysis result management tables 127 (step S304 NO), the specific processing extraction unit 122 terminates the specific processing extraction process.
[0070] (Analysis process of modified areas according to the embodiment) Figure 9 is a flowchart illustrating the modification analysis process according to the embodiment. Figure 9 shows details of step S400 (Figure 4) performed by the code generation support device 100.
[0071] The modification analysis process generates processing code corresponding to the new document by listing the necessary modifications to the processing code of the existing document, focusing on the differences between the new document and the existing document, and storing them in the analysis result management table 127.
[0072] If two or more existing documents are selected during the information acquisition process, the process described in steps S401 to S403 will be repeated for the number of existing documents, i.e., the number of tables in the analysis result management table 127, according to the branching in step S404 described below.
[0073] First, the modification analysis unit 123 creates a prompt to be input to the LLM in order to list the necessary modifications for the processing code of each existing document (step S401). This prompt includes the document format comparison result 302 from the analysis result management table 127, the specific processing extraction result 303, and instructions to execute a language processing task that generates the necessary modifications for the processing code of the existing document and their rationale for each entry in the analysis result management table 127. Note that there may be cases where modifications to the existing code are not necessary, in which case the instruction statement in the prompt may include a statement indicating that no such modification is necessary.
[0074] Furthermore, in this embodiment, in entries where specific processing information cannot be obtained in the specific processing extraction unit 122 and the specific processing extraction result 303 in the analysis result management table 127 is blank, the correction location analysis process will not be applied.
[0075] The code generation support device 100 has a pre-configured prompt template, and the modification location analysis unit 123 generates prompts using this template.
[0076] Next, the modification analysis unit 123 inputs a prompt to the LLM and obtains modification information (step S402). For example, consider a case where the document format comparison result 302 for a certain entry indicates that the name of a specific item is different, and the specific processing extraction result 303 for the same entry lists a conditional statement that uses the name of that item. In this case, the output modification information will be text explaining the content of the modification to the conditional statement based on the change in the name of the item.
[0077] Next, the modification location analysis unit 123 stores the obtained modification location information in the corresponding entries of the modification location analysis result 304 in the analysis result management table 127 (step S403). In this embodiment, for the processing code of an existing document, if the specific processing extraction result 303 is blank, or if the LLM responds that no modification is necessary based on the modification location analysis process, the field of the modification location analysis result for that entry is left blank.
[0078] Next, if there are any unprocessed analysis result management tables 127 (step S404 YES), the correction location analysis unit 123 returns to step S401 and executes steps S401 to S403 for the unprocessed analysis result management tables 127. If correction location information has been obtained for all analysis result management tables 127 (step S404 NO), the correction location analysis unit 123 terminates the correction location identification process.
[0079] (Analysis result confirmation process according to this embodiment) Figure 10 is a flowchart illustrating the analysis result confirmation process according to the embodiment. Figure 10 shows details of step S500 (Figure 4) performed by the code generation support device 100.
[0080] The analysis result confirmation process narrows down the existing documents used for subsequent code generation to one if two or more existing documents are selected during the information acquisition process. Furthermore, the analysis result confirmation process presents the corrections identified in the correction analysis process before actually applying them to the processing code of the existing documents, and accepts user input.
[0081] First, the analysis result confirmation unit 124 checks whether two or more existing documents were selected in the information acquisition process (step S501). If two or more existing documents are selected (step S510YES), the analysis result confirmation unit 124 moves the process to step S502, and if one existing document is selected (step S510NO), it moves the process to step S502.
[0082] In step S502, the analysis result confirmation unit 124 refers to each analysis result management table 127 created from each existing document. The analysis result confirmation unit 124 then selects the existing document corresponding to the analysis result management table 127 with the fewest number of correction location analysis results 304 (amount of correction) as the existing document to be used for the subsequent code generation process. This ensures that if there are two or more existing documents, the existing document and processing code that requires the fewest corrections to generate the code for the new document can be used to generate the code for the new document. Note that in step S502, the existing document may be selected by the user.
[0083] In step S503, the analysis result confirmation unit 124 outputs the correction information stored in the correction analysis result 304 to the analysis result list 731 for the existing documents that were determined to be one in step S501 or for the existing documents that were narrowed down to one by the processing in step S502.
[0084] Next, the analysis result confirmation unit 124 accepts the user's selection operation for the modifications to be applied to the processing code of the existing document in subsequent processing on the management screen 700 (step S504), and terminates the analysis result confirmation process once the operation is complete. The user can select whether or not to apply each modification information by operating the checkbox 732 and the operation button 733. Based on the content of the modifications and their rationale included in each modification information, the user can determine whether or not to apply them and reflect the result in the subsequent code generation process. For example, when the modification information is displayed in the analysis result list 731, if all the checkboxes 732 for the modification information are checked and there is modification information that does not need to be reflected from the user's perspective, the user unchecks all of those modification information. Then the user presses the operation button 733. When the user presses the operation button 733, the analysis result confirmation unit 124 terminates the analysis result confirmation process.
[0085] (Code generation process according to the embodiment) Figure 11 is a flowchart illustrating the code generation process according to the embodiment. Figure 11 shows details of step S600 (Figure 4) performed by the code generation support device 100. The code generation process generates and outputs processing code corresponding to the new document.
[0086] First, the code generation unit 125 creates a prompt to be input to the LLM in order to generate processing code corresponding to the new document (step S601). This prompt includes instructions for executing a language processing task that generates code for the new document by applying modifications to the processing code of the existing document in accordance with the perspective of the analysis results, based on the modification location analysis results 304 in the analysis result management table 127. For clarity, the instructions in the prompt may include a statement indicating that the locations to which modifications have been applied should be clearly indicated with comments or the like.
[0087] The code generation support device 100 has prompt templates pre-configured, and the code generation unit 125 generates prompts using these templates.
[0088] Next, the code generation unit 125 inputs a prompt to the LLM and obtains a processing code corresponding to the new document (step S602).
[0089] Next, the code generation unit 125 outputs the acquired code to the generation result display field 741 of the management screen 700 (step S603), and terminates the code generation process. In this embodiment, the generated code is displayed on the management screen 700. However, the generated code is not limited to this and may be saved as a file on the code generation support device 100 or displayed by an editor application or the like.
[0090] (Effects of the embodiment) In the above embodiment, a prompt is input to instruct the execution of a language processing task that generates format difference information related to differences in document format based on the comparison result between the target document and an existing document having the same document function, and the format difference information generated by the language processing model is obtained. A prompt is also input to instruct the execution of a language processing task that extracts specific processing information corresponding to the processing related to the format difference information from the existing code based on the format difference information and the existing code, and the specific processing information generated by the language processing model is obtained. A prompt is also input to instruct the execution of a language processing task that generates modification location information related to the modification locations in the existing code based on the format difference information and the specific processing information, and the modification location information generated by the language processing model is obtained. Finally, the modification location information is output via a power device. By separating the input of prompts and the execution of language processing tasks into multiple stages in this way, it becomes possible to efficiently generate appropriate code that describes processing based on a new document that has functions common to the existing document, from existing documents and existing code, without requiring advanced skills or expertise.
[0091] Executing multiple language processing tasks with a single prompt increases the variations in intermediate results, making it difficult to narrow down the patterns of code generated by the language processing model, resulting in a vast number of possibilities. This increases the risk of degraded code quality. On the other hand, in the above embodiment, by separating prompts for each of the multiple language processing tasks and screening the execution results by user selection after each execution of a language processing task, the patterns of generated code can be narrowed down, preventing a degradation in code quality.
[0092] In the above-described embodiment, the existing code relating to the modification information and a prompt instructing the execution of a language processing task that generates code based on the modification information are input, and the code generated by the language processing model is obtained. Therefore, without requiring advanced skills or expertise, appropriate code describing processing based on a new document that has functions common to the existing document can be efficiently generated using LLM from the existing document and the existing code describing processing based on the existing document.
[0093] In the above-described embodiment, the code generation support system maintains a document management table that manages existing documents, document functions, and existing codes in association. The code generation support system outputs candidate existing documents via an output device based on the document management table and generates codes based on the existing codes corresponding to the existing documents selected by the user. Therefore, after confirmation by the user, an appropriate existing document can be selected, and appropriate codes can be efficiently generated based on the selected appropriate existing document.
[0094] Furthermore, in the above-described embodiment, the code generation support system maintains an analysis result management table that manages format difference information, specific processing information, and modification location information in association. The code generation support system then outputs the modification location information via an output device based on the analysis result management table and generates code based on the modification location information selected by the user. Thus, after confirmation by the user, the appropriate modification location information can be selected, and appropriate code can be efficiently generated based on the selected appropriate modification location information.
[0095] Furthermore, in the above-described embodiment, the code generation support system manages multiple existing documents in a document management table and selects the existing document corresponding to the existing code with the smallest amount of modification information related to the modified location. Therefore, when generating code based on a new document by reusing existing code, the amount of modification is suppressed, resulting in the generation of more reliable code.
[0096] Furthermore, in the above-described embodiment, the code generation support system outputs the correction location information selected by the user and the code generated based on the correction location information in an identifiable manner via the output device. When the correction location information is re-selected, the code generation support system regenerates the code based on the selected correction location information. Thus, by repeatedly selecting the correction location information and regenerating the code, the possibility of generating the optimal code based on multiple correction location information can be increased.
[0097] Although several embodiments have been described above, these are merely illustrative examples for explaining the present invention and are not intended to limit the scope of the present invention to these embodiments only. The present invention can also be implemented in various other forms, such as forms in which some of the components of the above embodiments are omitted, forms in which at least some of the components are replaced, forms in which components are added, or forms in which some or all of the embodiments are combined. [Explanation of Symbols]
[0098] 100: Code generation support device, 101: Generation AI system, 110: Processing unit, 111: Memory
Claims
1. A code generation support system that assists in generating program code that describes processing based on a target document, The processor of the aforementioned code generation support system is A first prompt is input to a language processing model that generates a response based on an input prompt, instructing it to execute a first language processing task that generates format difference information relating to the differences in document format between the target document and the existing document, based on a comparison result between the target document and an existing document whose document function representing the purpose of the document is the same as that of the target document, and the format difference information generated by the language processing model is obtained. A second prompt is input to the language processing model instructing it to perform a second language processing task that extracts specific processing information corresponding to the processing of the format difference information from the existing code based on the format difference information and the existing code based on the existing document, thereby obtaining the specific processing information generated by the language processing model. A third prompt is input to the language processing model instructing it to execute a third language processing task that generates modification information relating to the modified parts in the existing code based on the formal difference information and the specific processing information, and the modification information generated by the language processing model is obtained. The correction information is output via the output device. A code generation support system characterized by the following features.
2. A code generation support system according to claim 1, The aforementioned processor, A fourth prompt is input to the language processing model instructing it to perform a fourth language processing task that generates the code based on the existing code related to the modification information and the modification information, and the code generated by the language processing model is obtained. A code generation support system characterized by the following features.
3. A code generation support system according to claim 2, The code generation support system is: It maintains a document management table that manages the existing document, the document function, and the existing code in association with each other. The aforementioned processor, Based on the document management table, the output device outputs candidate existing documents. The user selects the aforementioned existing document, The code is generated based on the existing code corresponding to the selected existing document. A code generation support system characterized by the following features.
4. A code generation support system according to claim 2, The code generation support system is: The system maintains an analysis result management table that manages the aforementioned format difference information, the aforementioned specific processing information, and the aforementioned modification location information in association with each other. The aforementioned processor, Based on the analysis result management table, the correction information is output via the output device. The user selects the information of the correction points, The code is generated based on the selected modification information. A code generation support system characterized by the following features.
5. A code generation support system according to claim 3, The code generation support system manages multiple existing documents in the document management table, The aforementioned processor, Select the existing document relating to the existing code with the smallest amount of modification information. A code generation support system characterized by the following features.
6. A code generation support system according to claim 4, The aforementioned processor, The modification information selected by the user and the code generated based on the modification information are output in an identifiable manner via the output device. When the aforementioned correction information is re-selected, the code is regenerated based on the selected correction information. A code generation support system characterized by the following features.
7. A code generation support method executed by a code generation support system that assists in generating program code that describes processing based on a target document, The processor of the code generation support system A first prompt is input to a language processing model that generates a response based on an input prompt, instructing it to execute a first language processing task that generates format difference information relating to the differences in document format between the target document and the existing document, based on a comparison result between the target document and an existing document whose document function representing the purpose of the document is the same as that of the target document, and the format difference information generated by the language processing model is obtained. A second prompt is input to the language processing model instructing it to perform a second language processing task that extracts specific processing information corresponding to the processing of the format difference information from the existing code based on the format difference information and the existing code based on the existing document, thereby obtaining the specific processing information generated by the language processing model. A third prompt is input to the language processing model instructing it to execute a third language processing task that generates modification information relating to the modified parts in the existing code based on the formal difference information and the specific processing information, and the modification information generated by the language processing model is obtained. The correction information is output via the output device. A code generation support method characterized by having each of the following processes.
Citation Information
Patent Citations
Systems and methods for generating code using language models trained on computer code
US20240020096A1