Code generation device and code generation method

The code generation device and method facilitate users with limited software development skills to generate integrated ICT resource code by using a generation AI to break down the process into stages like API selection, workflow creation, and coding, addressing the limitations of existing techniques.

WO2026004089A1PCT designated stage Publication Date: 2026-01-02NT T INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/023491
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing code generation techniques, such as those disclosed in Non-Patent Documents 1 and 2, fail to produce complete code for simple requests and do not clearly apply thought processes to software development, making it difficult for users with little software development knowledge to integrate ICT resources effectively.

Method used

A code generation device and method that utilizes a generation AI to acquire requests in natural language, generate prompts in multiple stages, and output code by sequentially inputting directives and responses from an AI server, including processes like API selection, workflow creation, and coding, even for users with limited software development skills.

Benefits of technology

Enables users with minimal software development knowledge to easily generate code that integrates ICT resources by breaking down the process into manageable stages, ensuring complete and accurate code output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024023491_02012026_PF_FP_ABST
    Figure JP2024023491_02012026_PF_FP_ABST
Patent Text Reader

Abstract

Provided is a code generation device (100) that generates a code used in software development using generative AI, and that comprises: an acquisition unit (11) that acquires a request in a natural sentence; and a generation unit (12) that, with a plurality of stages of steps required for the software development having been set, generates a prompt to be input to the generation AI in each step, on the basis of the request acquired by the acquisition unit (11). The generation unit (12) acquires an answer from the generative AI to the prompt generated in the current step, executes an operation for generating a prompt for the next step, and externally outputs the code generated by the generation AI in the final step.
Need to check novelty before this filing date? Find Prior Art

Description

Code generation device and code generation method

[0001] The present disclosure relates to a code generation device and a code generation method.

[0002] In order to solve social issues, various businesses are being created using ICT (Information and Communication Technology) resources. Users working on creating new businesses are required to quickly confirm various aspects such as the business's profitability, growth potential, and sustainability. Therefore, it was not possible to spend time developing the code required to utilize ICT resources, and it was necessary for users with extensive software development experience to take on this task.

[0003] Non-Patent Document 1 discloses a large-scale language model that can automatically generate code that satisfies the requirements of input natural language when natural language that can be written by a user with little software development experience is input.

[0004] Non-Patent Document 2 discloses CoT (Chain-of-Thought) prompting as a prompt engineering technique.

[0005] Achiam, Josh, et al. "Gpt-4 technical report."arXiv preprint arXiv:2303.08774(2023). "https: / / arxiv.org / pdf / 2303.08774" Wei, Jason, et al. "Chain-of-thought prompting eliciting reasons in largelanguage models." Advancesin neural information processing systems 35 (2022): 24824-24837. “https: / / arxiv.org / abs / 2201.11903”

[0006] However, it has been confirmed that the technique disclosed in Non-Patent Document 1 does not output complete code even when a request for simple code generation is entered into the prompt. Also, the method using CoT disclosed in Non-Patent Document 2 does not clearly state that thought processes can be applied to software development.

[0007] The present disclosure has been made in consideration of the above circumstances, and its purpose is to provide a code generation device and a code generation method that enable even users with little knowledge of software development technology to easily generate code that integrates ICT resources in accordance with the user's needs.

[0008] A code generation device of one embodiment of the present disclosure is a code generation device that generates code to be used in software development using a generation AI, and is equipped with an acquisition unit that acquires requests in natural language, and a generation unit that sets out multiple stages of processes required for the software development and generates prompts to be input to the generation AI at each stage based on the requests, and the generation unit acquires the response from the generation AI to the prompt generated in the current stage, performs an operation to generate a prompt for the next stage, and outputs the code generated by the generation AI to the outside in the final stage.

[0009] One aspect of the code generation method of the present disclosure is a code generation method that generates code to be used in software development using a generation AI, in which an acquisition unit acquires a request in natural language, a generation unit generates a prompt to be input to the generation AI based on the request in each of the multiple stages required for the software development, the generation unit acquires the response from the generation AI to the prompt generated in the current stage, performs an operation to generate a prompt for the next stage, and in the final stage outputs the code generated by the generation AI to the outside.

[0010] According to the present disclosure, even a user with little knowledge of software development technology can easily generate code that integrates ICT resources in accordance with the user's needs.

[0011] FIG. 1 is a block diagram showing the configuration of a code generation device and its peripheral devices according to an embodiment. FIG. 2 is an explanatory diagram showing the functional configuration of a code generation device according to a first embodiment. FIG. 3A is a diagram showing details of data D11 shown in FIG. 2. FIG. 3B is a diagram showing details of data D12 shown in FIG. 2. FIG. 3C is a diagram showing details of data D13 shown in FIG. 2. FIG. 3D is a diagram showing details of data D14 shown in FIG. 2. FIG. 3E is a diagram showing details of data D15 shown in FIG. 2. FIG. 3F is a diagram showing details of data D16 shown in FIG. 2. FIG. 4 is an explanatory diagram showing the functional configuration of a code generation device according to a second embodiment. FIG. 5A is a diagram showing details of data D21 shown in FIG. 4. FIG. 5B is a diagram showing details of data D22 shown in FIG. 4. FIG. 5C is a diagram showing details of data D23 shown in FIG. 4. FIG. 5D is a diagram showing details of data D24 shown in FIG. 4. FIG. 5E is a diagram showing details of data D25 shown in FIG. 4. FIG. 5F is a diagram showing details of data D27 shown in FIG. 4. FIG. 6 is a block diagram showing the hardware configuration of this embodiment.

[0012] [Description of First Embodiment] Hereinafter, an embodiment will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a code generation device 100 and its peripheral devices according to an embodiment. The code generation device 100 according to this embodiment sets prompts according to a series of steps in software development in response to a request in natural language initially input by a user. The code generation device 100 generates and outputs code by sequentially inputting directives, requests, and the generation results of the current step corresponding to each step to an AI server 2 of a generation system so that the directives, requests, and the generation results of the current step are provided as prompts for the next step. In other words, the code generation device 100 generates code to be used in software development using the generation AI of the AI ​​server 2.

[0013] As shown in FIG. 1, the code generating device 100 includes a prompt constructing device 1, a first storage unit M1, and a second storage unit M2.

[0014] The first storage unit M1 stores process information for a first process, a second process, and a third process, which will be described later. The process information includes a template d1 for setting a process prompt. Information about the process into which the prompt is divided, instructions for each process, and the like are entered in the template d1.

[0015] The second storage unit M2 stores module information, including API (Application Programming Interface) specification information, and functions as an API database for storing APIs.

[0016] The prompt construction device 1 includes an acquisition unit 11 , a generation unit 12 , and an input / output unit 13 .

[0017] The acquisition unit 11 receives requests regarding ICT resource utilization as natural language text. Specifically, the acquisition unit 11 acquires requests (text sentences) in natural language input by the user. Natural language refers to sentences written in a general language that can be input even by users with low software development skills. For example, as will be described later, this is a sentence such as "to execute VM (Virtual Machine) reallocation according to the predicted value of renewable energy power generation amount of DC (Data Center)."

[0018] The generation unit 12 generates prompts in multiple stages in response to a request in natural language input by a user. Specifically, the generation unit 12 inputs the request (natural language) input by the user, module information stored in the second storage unit M2, and the response from the AI ​​server 2 in the previous process into a template d1 stored in the first storage unit M1 to generate prompt information. Note that the response from the AI ​​server 2 is not included in the first process. That is, the generation unit 12 is configured with multiple stages required for software development, and generates prompts to be input to the generation AI in each process based on the request. The generation unit 12 obtains the response from the generation AI to the prompt generated in the current process, executes an operation to be adopted in the prompt for the next process, and outputs the code generated by the generation AI to the outside in the final process.

[0019] The input / output unit 13 is connected to an externally installed AI server 2 via a network or the like. The AI ​​server 2 is equipped with a generation AI such as LLM (Large Language Models). The input / output unit 13 outputs prompt information generated by the generation unit 12 to the AI ​​server 2. The input / output unit 13 acquires an output result in response to inputting the prompt information to the AI ​​server 2, and outputs the output result to the generation unit 12. If the output result of the AI ​​server 2 is code D2 acquired in the final process, the input / output unit 13 outputs this code D2 to the outside.

[0020] Fig. 2 is an explanatory diagram showing the functional configuration of the code generation device 100 according to the first embodiment. Figs. 3A to 3F are diagrams showing details of each of the data D11 to D16 shown in Fig. 2. Below, with reference to Figs. 2 and 3A to 3F, a description will be given of the processing from when a user inputs a request in natural language to the code generation device 100 until code is generated by the code generation device 100.

[0021] In the first embodiment, a module that handles APIs that perform ICT resource control is stored in the second storage unit M2 (see FIG. 1). Based on the module stored in the second storage unit M2 and the template d1 stored in the first storage unit M1, prompts are generated for three processes: API selection (first process), creation of a workflow between APIs (second process), and coding (third process).

[0022] As shown in Figure 2, the code generation device 100 executes steps 1 to 3. In step 1, an API (Application Programming Interface) is selected. In step 1, a prompt for API selection is generated using a request D1 in text format and an instruction statement accompanied by API specification information stored in the second storage unit M2 (see Figure 1). This prompt information is sent to the AI ​​server 2, and the API selection result generated by the generation AI of the AI ​​server 2 is obtained in text format.

[0023] 2 shows an example of code generation when the user inputs the text "Relocate VMs (Virtual Machines) according to the predicted value of the amount of renewable energy power generated by DC (Data Center)" as a request D1. The request input by the user is a natural sentence.

[0024] In response to the above request, the code generation device 100 selects an API as a first step. Specifically, in the first step, the generation unit 12 generates data D11 shown in FIG. 2 in response to the "request:" input by the user and outputs the data D11 to the AI ​​server 2. FIG. 3A is a diagram showing details of the data D11. As shown in FIG. 3A, an example of the "instruction statement:" is input as "I would like to develop code that satisfies the request. Please select an API that is estimated to be necessary." This instruction statement is generated by the generation unit 12.

[0025] The request "to execute VM reallocation according to the predicted value of the amount of renewable energy power generation of DC" input by the user is input as "Request:" shown in data D11 in FIG. 3A. The API specifications stored in the second storage unit M2 (API database) are input as "API list." The input / output unit 13 shown in FIG. 1 outputs the input data D11 to the AI ​​server 2. That is, when the user inputs the above "Request:", the generation unit 12 generates data D11, and the input / output unit 13 outputs the data D11 to the AI ​​server 2.

[0026] The AI ​​server 2 generates a response to the input of data D11 using generation AI such as LLM (Large Language Models). The AI ​​server 2 generates an API selection result shown in data D12 in FIG. 2, for example. FIG. 3B is a diagram showing details of data D12. As shown in FIG. 3B, the "API selection result" by the AI ​​server 2 is acquired by the input / output unit 13.

[0027] In the second step, the code generation device 100 creates a workflow between APIs. In the second step, the code generation device 100 generates a prompt with instructions for constructing a workflow between APIs by attaching the API specification information and requirements of the API selection results obtained in the first step. The instructions for creating the workflow are set to refer to a flowchart generation language (such as "mermeid").

[0028] Specifically, in the second step, the generation unit 12 generates data D13 shown in FIG. 2 and outputs it to the AI ​​server 2. FIG. 3C is a diagram showing details of data D13. As shown in FIG. 3C, an example of an "instruction statement:" is input as follows: "We would like to develop code that satisfies the requirements. Please design the API execution flow like a Mermaid "flowchart."

[0029] Furthermore, as "Additional condition:", "When risk data required by a certain API is output from the response data of another API, the flow should be designed so that the latter is called before the former." The "Directive:" and "Additional condition:" are generated by the generation unit 12.

[0030] As the "request:" shown in data D13 of FIG. 3C, "to execute VM relocation according to the predicted value of the amount of renewable energy power generation of DC" is input. Note that here, this is the same as the "request:" of data D11 described above, but it does not have to be the same. The "API list:" shown in data D13 is input with the generation result from the first step. That is, the sentence of data D12 shown in FIG. 3B is input into the "API list:" of data D13. When data D13 is generated by the generation unit 12, the input / output unit 13 outputs data D13 to the AI ​​server 2.

[0031] The AI ​​server 2 uses the generation AI to generate a response to the input of data D13. The AI ​​server 2 obtains, for example, the workflow creation result shown in data D14 in FIG. 2. FIG. 3D is a diagram showing details of data D14. The "workflow creation result" generated by the AI ​​server 2 is acquired by the input / output unit 13.

[0032] The code generation device 100 performs coding in the third step. In the third step, the output results of the first and second steps are used. Furthermore, a prompt is generated based on a request and an instruction statement for code generation. The instruction statement for code generation specifies that the parameters related to the execution of each API are satisfied as a condition. This will be explained in detail below.

[0033] In the third step, the generation unit 12 generates data D15 shown in FIG. 2 and outputs it to the AI ​​server 2. FIG. 3E is a diagram showing details of data D15. As shown in FIG. 3E, "We would like to develop an application that meets the requirements. Please implement the program code based on the design" is input as an example of "Instruction:". Furthermore, "Please set parameters in the request body, query, etc. based on each API request specification. Make sure there are no unset parameter values ​​in the request body or query. Write out all code details and do not leave any to-do items or placeholders." is input as an "Additional condition:".

[0034] Furthermore, "replace VMs according to the predicted value of the amount of renewable energy power generated by DC" is input as "request:".

[0035] The generation result of the first step (the API selection result shown in FIG. 3B) is input as "API list:", and the generation result of the second step (the workflow creation result shown in FIG. 3D) is input as "execution flow:". When the generation unit 12 generates data D15, the input / output unit 13 outputs the data D15 to the AI ​​server 2.

[0036] The AI ​​server 2 uses the generation AI to generate a response to the input of data D15. The AI ​​server 2 generates a code generation result shown in data D16 in FIG. 2, for example. FIG. 3F is a diagram showing details of data D16. As shown in FIG. 3F, the "code generation result" by the AI ​​server 2 is acquired by the input / output unit 13.

[0037] The input / output unit 13 outputs the code generation result output from the AI ​​server 2 to the outside as API linkage code D2 (see FIG. 2). In this way, by the user inputting "request:" in natural language, it is possible to generate code linking ICT resources in accordance with the user's request.

[0038] As described above, the code generation device 100 according to this embodiment is a code generation device 100 that generates code to be used in software development using a generation AI, and includes an acquisition unit 11 that acquires requests in natural language, and a generation unit 12 that has multiple stages of processes required for software development set up and generates prompts to be input to the generation AI in each process based on the requests acquired by the acquisition unit 11. The generation unit 12 acquires a response from the generation AI to the prompt generated in the current process, executes an operation to generate a prompt for the next process, and outputs the code generated by the generation AI to the outside in the final process.

[0039] In the code generation device 100 according to this embodiment, when a user inputs a request in natural language, the device executes a first step of selecting an API for the request, a second step of creating a workflow between the APIs, and a third step of coding, thereby generating code linked to the API. That is, the steps set in the generation unit 12 include a first step of selecting an API, a second step of creating a workflow between the APIs selected in the first step, and a third step of coding based on the APIs selected in the first step and the workflow. Therefore, even a user with little knowledge of software development technology can easily generate code linking ICT resources in accordance with the user's needs.

[0040] In this embodiment, APIs are selected in the first step, and a workflow between the APIs is created in the second step. This allows for more complete code output, including parameters required to execute the APIs of ICT resources, which tend to be left ungenerated in conventional methods. This makes it possible for even users with little knowledge of software development to create code that links ICT resources in accordance with the user's needs without manual intervention.

[0041] In the first embodiment, a prompt may be set to generate UML diagrams (class diagrams, component diagrams, activity diagrams, state transition diagrams, and sequence diagrams) using the Unified Modeling Language (UML). UML diagrams are often used in software development processes, and setting an instruction to generate a UML diagram in the prompt makes it easier to extract the software development knowledge learned by the AI ​​server.

[0042] [Description of the Second Embodiment] Next, a second embodiment will be described. The device configuration is the same as that shown in FIG. 1, and therefore a description of the configuration will be omitted. In the second embodiment, the functions executed by the code generation device 100 differ from those in the first embodiment. Specifically, the difference is that the aforementioned first step is divided into a 1-1 step and a 1-2 step.

[0043] Fig. 4 is an explanatory diagram showing the functional configuration of a code generation device 100 according to the second embodiment. Figs. 5A to 5F are diagrams showing details of the data D21 to D25 and D27 shown in Fig. 4. In the second embodiment, the output results of each step are made more specific by using templates that further subdivide the first step described above.

[0044] In the second embodiment, the first step of selecting an API shown in the first embodiment is divided into two steps (step 1-1 and step 1-2). In step 1-1, a prompt is generated to select an essential API that is most relevant to the request input by the user. In step 1-2, a prompt is generated to select related APIs for connecting essential APIs based on the essential APIs selected by the AI ​​server 2. That is, step 1 includes step 1-1 of selecting essential APIs and step 1-2 of selecting related APIs for connecting essential APIs.

[0045] Hereinafter, with reference to FIGS. 4 and 5A to 5F, a processing procedure from when a user inputs a request in natural language to the code generation device 100 until the code generation device 100 generates code will be described.

[0046] As shown in Figure 4, the code generation device 100 executes steps 1 to 3. Step 1 includes steps 1-1 and 1-2. In step 1-1, essential APIs are extracted. In step 1-2, related APIs are extracted. An essential API refers to an API that is most related to a request input by a user. A related API refers to an API used to connect essential APIs together.

[0047] 4 shows an example of code generation when a user inputs a request D1, which is a text "Relocate VMs according to the predicted value of the amount of renewable energy power generated by DC." The request input by the user is a natural sentence.

[0048] In response to the above request, the code generation device 100 generates data D21 shown in FIG. 4 in step 1-1 and outputs it to the AI ​​server 2. FIG. 5A is a diagram showing details of the data D21. As shown in FIG. 5A, "We would like to develop code that satisfies the request. Please select the APIs that you think will be necessary" is input as "instruction statement:". This instruction statement is generated by the generation unit 12.

[0049] As "Request:" shown in data D21 in FIG. 5A, the request input by the user, "to execute VM reallocation according to the predicted value of the amount of renewable energy power generation of DC," is input. As "API list," "API specifications acquired from the API database" is input. The input / output unit 13 shown in FIG. 1 outputs the input data D21 to the AI ​​server 2. That is, when the user inputs the above "Request:," the generation unit 12 generates data D21, and the input / output unit 13 outputs the data D21 to the AI ​​server 2.

[0050] The AI ​​server 2 uses the generation AI to generate a response to the input of data D21. The AI ​​server 2 generates a selection result, for example, as shown in data D22 in FIG. 4. FIG. 5B is a diagram showing details of data D22. As shown in FIG. 5B, the "essential API selection result" by the AI ​​server 2 is acquired by the input / output unit 13.

[0051] In step 1-2, the code generation device 100 generates data D23 shown in FIG. 4 and outputs it to the AI ​​server 2. FIG. 5C is a diagram showing details of data D23. As shown in FIG. 5C, "We would like to develop code that satisfies the requirements. Please select an API related to the selected API from the API list. If there is none, please leave it blank." is input as "Directive:". "Relocate VMs according to the predicted value of the amount of renewable energy power generation from DC" is input as "Request:".

[0052] The API specifications obtained from the API DB are entered as "API List:". The required API selection results obtained in step 1-1 are entered as "Selected API:". Data D23 is output to the AI ​​server 2 from the input / output unit 13 shown in Figure 1.

[0053] The AI ​​server 2 uses the generation AI to generate a response to the input of data D21. The AI ​​server 2 generates, for example, the response shown in data D24 in FIG. 4. FIG. 5D is a diagram showing details of data D24. As shown in FIG. 5D, the "result of related API selection" by the AI ​​server 2 is acquired by the input / output unit 13.

[0054] In the second step, the code generation device 100 creates a workflow between APIs. Specifically, in the second step, the generation unit 12 generates data D25 shown in FIG. 4 and outputs it to the AI ​​server 2. FIG. 5E is a diagram showing details of data D25. As shown in FIG. 5E, an example of an "instruction statement:" is input as follows: "We would like to develop code that satisfies the requirements. Please design the API execution flow like a mermaid "flowchart."

[0055] Furthermore, as "Additional condition:", "When request data required by a certain API is output from the response data of another API, the flow should be designed so that the latter is called before the former." The "Directive:" and "Additional condition:" are generated by the generation unit 12.

[0056] As the "request:" shown in data D25 of FIG. 5E, "execute VM relocation according to the predicted value of the amount of renewable energy power generation of DC" is input. Note that here, this is the same as the "request:" of data D21, but it does not have to be the same. As the "API list:" shown in data D25, "API combining 1-1 step and 1-2 step" is input. That is, the sentences of data D22 shown in FIG. 5B and data D24 shown in FIG. 5D are input into the "API list:". When data D25 is generated by the generation unit 12, the input / output unit 13 outputs data D25 to the AI ​​server 2.

[0057] The AI ​​server 2 uses the generation AI to generate a response to the input of data D25. The AI ​​server 2 generates a workflow creation result shown, for example, in data D26 in FIG. 4. Data D26 is the same as data D14 in FIG. 3D described above, so a detailed description of the content will be omitted. The input / output unit 13 acquires the "workflow creation result" of data D26 shown in FIG. 4.

[0058] The code generation device 100 performs coding in the third step. Specifically, in the third step, the generation unit 12 generates data D27 shown in FIG. 4 and outputs it to the AI ​​server 2. FIG. 5F is a diagram showing details of data D27. As shown in FIG. 5F, "We would like to develop an application that satisfies the requirements. Please implement the program code based on the design" is input as an example of "instruction statement:".

[0059] In addition, the following is entered as "Additional conditions:": "Please set parameters in the request body, query, etc. based on each API request specification. Make sure there are no unset parameter values ​​in the request body or query. Write out all code details and do not leave any TODO items or placeholders."

[0060] Furthermore, "replace VMs according to the predicted value of the amount of renewable energy power generated by DC" is input as "request:".

[0061] The generation result of Step 1-1 (the selection result of the essential APIs shown in FIG. 5B) and the generation result of Step 1-2 (the selection result of the related APIs shown in FIG. 5D) are input as "API list:", and the generation result of Step 2 (data D26 shown in FIG. 4) is input as "execution flow:". When data D27 is generated by the generation unit 12, the input / output unit 13 outputs data D27 to the AI ​​server 2.

[0062] The AI ​​server 2 uses the generation AI to generate a response to the input of data D27. The AI ​​server 2 generates, for example, the code generation result shown in data D28 in FIG. 4. Data D28 is the same as data D16 in FIG. 3F described above, so a detailed description will be omitted. The input / output unit 13 acquires the "code generation result" of data D28 shown in FIG. 4. The input / output unit 13 outputs the code generation result output from the AI ​​server 2 to the outside as API-linked code D2. In this way, by the user inputting "request:" in natural language (see FIG. 4), it becomes possible to generate code that links ICT resources in accordance with the user's request.

[0063] In this way, the code generation device 100 according to the second embodiment selects required APIs by executing step 1-1, and then selects related APIs by adopting the required APIs in step 1-2. Furthermore, in step 2, a workflow between APIs is created by adopting the required APIs and related APIs. Therefore, the required APIs and related APIs can be separated and output to the generation AI, making it possible to generate code that more reliably meets user requirements.

[0064] The code generation device 100 of the present embodiment described above can be, for example, a general-purpose computer system including a CPU (Central Processing Unit, processor) 901, a memory 902, a storage 903 (HDD: Hard Disk Drive, SSD: Solid State Drive), a communication device 904, an input device 905, and an output device 906, as shown in Fig. 6. The memory 902 and the storage 903 are storage devices. In this computer system, the CPU 901 executes a predetermined program loaded on the memory 902, thereby realizing each function of the code generation device 100.

[0065] The code generation device 100 may be implemented by one computer or by multiple computers, or may be a virtual machine implemented on a computer.

[0066] The program for the code generation device 100 can be stored in a computer-readable recording medium such as a HDD, SSD, USB (Universal Serial Bus) memory, CD (Compact Disc), or DVD (Digital Versatile Disc), or can be distributed via a network. The computer-readable recording medium is, for example, a non-transitory recording medium.

[0067] The present disclosure is not limited to the above-described embodiments, and various modifications are possible within the scope of the present disclosure.

[0068] REFERENCE SIGNS LIST 1 Prompt construction device 2 AI server 11 Acquisition unit 12 Generation unit 13 Input / output unit 100 Code generation device D1 Request D2 Code M1 First storage unit M2 Second storage unit

Claims

1. A code generation device that uses a generation AI to generate code for use in software development, comprising: an acquisition unit that acquires requests in natural language; and a generation unit that sets out multiple stages of processes required for the software development and generates prompts to be input to the generation AI in each stage based on the requests, wherein the generation unit acquires the response from the generation AI to the prompt generated in the current stage, performs an operation to generate a prompt for the next stage, and outputs the code generated by the generation AI to the outside in the final stage.

2. The code generation device of claim 1, wherein each process set in the generation unit comprises: a first process of selecting APIs; a second process of creating a workflow between the APIs selected in the first process; and a third process of coding based on the APIs selected in the first process and the workflow.

3. The code generation device according to claim 2, wherein the first step includes a 1-1 step of selecting essential APIs, and a 1-2 step of selecting related APIs that connect the essential APIs.

4. A code generation method that uses a generation AI to generate code for use in software development, wherein an acquisition unit acquires a request in natural language; a generation unit generates a prompt to be input to the generation AI in each of the multiple stages required for the software development based on the request; the generation unit acquires the response from the generation AI to the prompt generated in the current stage, performs an operation to generate a prompt for the next stage, and outputs the code generated by the generation AI to the outside in the final stage.

Citation Information

Patent Citations

  • Performance verification program, performance verification method, and performance verification device

    JP2014102734A

  • Program processing device, control method thereof, and control program

    JP2018163547A

  • Information processing apparatus, information processing method, and program

    JP2021103432A

  • Automatic program code generation system

    JP2023018851A

  • Apparatus, method and program for creating technical documentation for software

    JP7503700B1