Prompt generation system, method for generating prompt, and prompt generation program
The prompt generation system addresses the challenge of obtaining accurate responses from language models by using a control unit to generate and process multiple prompts within the system AI, thereby eliminating the need for prompt engineering skills.
Patent Information
- Application Number
- JP2023178391
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-16
- Publication Date
- 2025-04-28
- Estimated Expiration
- 2043-10-16
AI Technical Summary
When using a language model with a task-based prompt, accurate responses may not be obtained without skills such as prompt engineering.
A prompt generation system that includes a user terminal and a control unit connected to a generation system AI, which acquires tasks from the user terminal, calculates feature quantities, generates multiple prompts, inputs each prompt into the AI, and outputs responses to the user terminal.
The system efficiently uses generation system AI to obtain accurate responses, overcoming the need for specialized prompt engineering skills.
Smart Images

Figure 2025068453000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a prompt generation system, a prompt generation method, and a prompt generation program for utilizing a generation AI. [Background technology]
[0002] Nowadays, generative AI is being used in various fields. For example, a data generation method using a language model is being considered (for example, Patent Document 1). The data generation method using a language model described in this document uses original data to construct a prompt that serves as an input sentence for the language model. Next, the prompt is input to the language model. Then, new data and label information for the new data are generated from the language model.
[0003] Also, prompt engineering, which involves designing and optimizing prompts for efficiently using language models to solve a desired problem (task), has been attracting attention (for example, Non-Patent Document 1). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2023-18624 A [Non-patent literature]
[0005] [Non-Patent Document 1] Mizuho Research & Technologies Co., Ltd., "GPTTM Utilization Support Service "ATHEUS for Generative AI"", [online], May 1, 2023, Mizuho Research & Technologies Co., Ltd., [Retrieved August 11, 2023], Internet <URL:https: / / www.mizuho-rt.co.jp / ai_powerhouse / technology / technology / technology-03 / gptatheus-for-generative-ai.html> Summary of the Invention [Problem to be solved by the invention]
[0006] However, when using language models with task-based prompts, accurate responses may not be obtained without skills such as prompt engineering. [Means for solving the problem]
[0007] A prompt generation system that solves the above problem includes a user terminal and a control unit connected to a generative AI, which acquires a task from the user terminal, calculates features of the task, generates a plurality of prompts according to the features, inputs each of the prompts to the generative AI, acquires responses to each of the prompts, and sequentially outputs the responses to the user terminal. Effect of the Invention
[0008] According to the present invention, by efficiently utilizing generative AI, it is possible to obtain an accurate response. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is an explanatory diagram of a prompt generation system according to an embodiment. [Diagram 2] FIG. 2 is an explanatory diagram of a hardware configuration of the embodiment. [Diagram 3] FIG. 4 is an explanatory diagram of a prompt according to the embodiment. [Figure 4] FIG. [Diagram 5] FIG. [Figure 6] FIG. 11 is an explanatory diagram of a processing procedure of another example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] An embodiment of a prompt generation system, a prompt generation method, and a prompt generation program will be described with reference to Figs. 1 to 5. In this embodiment, a case is assumed where a prompt is generated based on a task. Here, a task is an operation that a user causes a generative AI to execute, such as a task to generate text, code, an image, music, etc. A prompt is the content of a specific instruction given to a generative AI to execute a task.
[0011] As shown in FIG. 1, the prompt generation system of this embodiment uses a user terminal 10, a support server 20, and multiple AI systems 30, all of which are connected to one another via a network. (Hardware configuration example) FIG. 2 shows an example of the hardware configuration of an information processing device H10 that functions as the user terminal 10, the support server 20, the AI system 30, and the like.
[0012] The information processing device H10 includes a communication device H11, an input device H12, a display device H13, a storage device H14, and a processor H 15. Note that this hardware configuration is an example, and the information processing device H10 may include other hardware.
[0013] The communication device H11 is an interface that establishes a communication path with another device and transmits and receives data, and is, for example, a network interface or a wireless interface.
[0014] The input device H12 is a device that accepts input from a user, etc., and is, for example, a mouse, a keyboard, etc. The display device H13 is, for example, a display or a touch panel that displays various information.
[0015] The storage device H14 is a storage device that stores data and various programs for executing various functions of the user terminal 10, the assistance server 20, and the AI system 30. Examples of the storage device H14 include a ROM, a RAM, and a hard disk.
[0016] The processor H15 uses programs and data stored in the storage device H14 to control each process in the user terminal 10, the support server 20, and the AI system 30. Examples of the processor H15 include a CPU and an MPU. The processor H15 expands a program stored in a ROM or the like into a RAM and executes various processes corresponding to various processes. For example, when an application program in the user terminal 10, the support server 20, or the AI system 30 is started, the processor H15 operates a process that executes each process described below.
[0017] The processor H15 is not limited to a processor that performs software processing for all the processes it executes. For example, the processor H15 may include a dedicated hardware circuit (e.g., an application specific integrated circuit (ASIC)) that performs hardware processing for at least a part of the processes it executes. That is, the processor H15 may be configured, for example, as follows:
[0018] [1] One or more processors that operate according to a computer program (software). [2] One or more dedicated hardware circuits that perform at least some of the various processes [3] Circuits that include combinations of these The processor includes a CPU and memory, such as RAM and ROM, that stores program codes or instructions configured to cause the CPU to execute processes. Memory, i.e., computer-readable media, includes any available media that can be accessed by a general-purpose or special-purpose computer.
[0019] (Configuring prompts) The configuration of the prompts in this embodiment will be described with reference to FIG. 3. In this embodiment, it is assumed that a desired output T2 is obtained by a prompt group d10 that is decomposed into a plurality of prompts, with task T1 as the upper prompt. For example, in the prompt group d10, the output T2 is obtained by sequentially executing prompts p10, p20, and p30. Furthermore, it is also possible to decompose prompt p10 as the upper prompt into lower prompts such as prompt group d11 and prompt group d12. In this case, machine learning is used to predict the prompt group that is decomposed to derive the appropriate output T2 from task T1.
[0020] (Functions of each information processing device) Using FIG. 1, the functions of a user terminal 10, a support server 20, and an AI system 30 used in this machine learning will be described.
[0021] The user terminal 10 is a computer terminal used by a user who uses this system. The support server 20 is a computer system for utilizing generative AI. The support server 20 includes a control unit 21, an AI information storage unit 22, a decomposition candidate storage unit 23, and an evaluation information storage unit 24.
[0022] Control unit 21 performs processes (including a management stage, a learning stage, a prediction stage, etc.) described below. By executing a prompt generation program for this purpose, control unit 21 functions as management unit 211, learning unit 212, prediction unit 213, etc.
[0023] The management unit 211 executes processing that utilizes multiple AI systems 30. The learning unit 212 executes a process for learning how to divide a prompt to be input to the AI system 30. The prediction unit 213 breaks down the task into multiple prompts according to the task, obtains responses using the AI system 30, and executes a process of generating an output.
[0024] The AI information storage unit 22 records AI management information about the AI system 30 corresponding to the prompt. The AI management information is recorded when an AI system 30 suitable for a prompt is registered. In this AI management information, an AI identifier is recorded for each feature.
[0025] The feature is a feature of the prompt. For example, a distributed representation can be used as the feature. The AI identifier is an identifier for identifying the AI system 30 that uses the prompt for this feature.
[0026] The decomposition candidate storage unit 23 stores decomposition candidate management information for decomposing higher-level prompts, which are tasks, into lower-level prompts. The decomposition candidate management information is registered when the preparation process is executed. In this decomposition candidate management information, multiple lower-level prompts (prompt groups) are recorded for a decomposition candidate ID and a higher-level feature.
[0027] The decomposition candidate ID is an identifier for identifying each decomposition candidate. The higher-level features are features of higher-level prompts, which are higher-level concepts in the decomposition candidates. For example, distributed representations can be used for the higher-level features. A lower-level prompt is a set of multiple prompts (prompt groups) that are subordinate to a higher-level prompt, which is a higher-level concept, and is broken down into multiple prompt groups.
[0028] The evaluation information storage unit 24 records evaluation management information that evaluates each decomposition candidate in response to a response obtained from the AI system 30. This evaluation management information is recorded when a preparation stage process is performed. The evaluation information storage unit 24 records the evaluation result for the decomposition candidate ID.
[0029] The decomposition candidate ID is an identifier for identifying each decomposition candidate. The evaluation results are the evaluation results of the responses obtained from the AI system 30 for the higher-level prompt and each lower-level prompt.
[0030] The AI system 30 is a generative AI that generates a response to a prompt. The AI system 30 is configured according to a computational model and parameters, which are elements that determine the structure of the generative AI.
[0031] (Preparation process) The preparation process will be described with reference to FIG. First, the control unit 21 of the support server 20 executes a task definition process (step S11). Specifically, the management unit 211 of the control unit 21 acquires a task from the user terminal 10. In this case, an evaluation criterion, which is an index for evaluating a response to an input, is prepared.
[0032] Next, the control unit 21 of the support server 20 executes an input definition process (step S12). Specifically, the management unit 211 of the control unit 21 defines the task acquired from the user terminal 10 as an input (upper prompt) and calculates a feature amount.
[0033] Next, the control unit 21 of the assistance server 20 executes a process for generating decomposition candidates for lower-level prompts (step S13). Specifically, the management unit 211 of the control unit 21 acquires a plurality of lower-level prompts (prompt group) for acquiring output from input from the user terminal 10. In this case, it is also possible to acquire a plurality of decomposition candidates from the user terminal 10. Then, the management unit 211 assigns a decomposition candidate ID to the acquired lower-level prompt, and records the lower-level prompt in the decomposition candidate storage unit 23 in association with the feature amount of the task, which is the higher-level prompt.
[0034] Next, the control unit 21 of the support server 20 repeats the following process for each decomposition candidate and each lower level prompt. Here, the control unit 21 of the assistance server 20 executes a process of identifying an AI system in response to the lower prompt (step S14). Specifically, the management unit 211 of the control unit 21 calculates the feature amount of each lower prompt constituting the decomposition candidate. Next, the management unit 211 identifies, from the AI information storage unit 22, the AI system 30 corresponding to the feature amount of each lower prompt.
[0035] Next, the control unit 21 of the assistance server 20 executes a process of acquiring a response to the lower-level prompt (step S15). Specifically, the management unit 211 of the control unit 21 inputs each lower-level prompt in sequence to the AI system 30 corresponding to the feature amount. Then, the management unit 211 acquires a response corresponding to the lower-level prompt.
[0036] Then, the control unit 21 of the support server 20 repeats the above process for each decomposition candidate until the process is completed for all lower-level prompts that constitute the decomposition candidate.
[0037] Next, the control unit 21 of the support server 20 executes a response evaluation process (step S16). Specifically, the management unit 211 of the control unit 21 outputs all responses of the lower-level prompts for the decomposition candidates as output, one after another, to the user terminal 10. The management unit 211 then obtains the results of evaluating the sequentially output responses as output, using the evaluation criteria, from the user terminal 10, and records the evaluation results in the evaluation information storage unit 24.
[0038] Next, the control unit 21 of the support server 20 executes a machine learning process (step S17). Specifically, the learning unit 212 of the control unit 21 performs machine learning using, as teacher data, the higher-level features recorded in the decomposition candidate storage unit 23, the lower-level prompts constituting the decomposition candidates, and the evaluation results recorded in the evaluation information storage unit 24. In this case, the learning unit 212 generates a learning model that predicts, from the higher-level features, decomposition candidates (lower-level prompts) with high evaluation results according to the evaluation criteria.
[0039] (Prediction processing) The prediction process will be described with reference to FIG. First, the control unit 21 of the support server 20 executes a task definition process (step S21). Specifically, the management unit 211 of the control unit 21 acquires a task from the user terminal 10.
[0040] Next, the control unit 21 of the support server 20 executes an input definition process (step S22). Specifically, the management unit 211 of the control unit 21 defines an upper prompt for the task from the user terminal 10 and calculates a feature amount.
[0041] Next, the control unit 21 of the support server 20 executes a process for determining whether or not decomposition into lower-level prompts is necessary (step S23). Specifically, the prediction unit 213 of the control unit 21 searches for decomposition candidate management information corresponding to the calculated feature amount in the decomposition candidate storage unit 23. Here, if the decomposition candidate management information cannot be specified in the decomposition candidate storage unit 23, the prediction unit 213 determines that decomposition is unnecessary and uses the upper-level prompt.
[0042] Next, the control unit 21 of the support server 20 executes a process of decomposing the lower prompts (step S24). Specifically, when the prediction unit 213 of the control unit 21 identifies the decomposition candidate management information in the decomposition candidate storage unit 23, the prediction unit 213 predicts a lower prompt of the decomposition candidate using the learning model. In this case, the prediction unit 213 may use the predicted lower prompt as a higher prompt and apply the learning model again to predict a lower prompt of a lower hierarchical level. By repeating this process, lower prompts of multiple hierarchical levels are constructed.
[0043] Next, the control unit 21 of the support server 20 executes a process of identifying an AI system (step S25). Specifically, the prediction unit 213 of the control unit 21 calculates the feature amount of the predicted lower prompt. Then, the prediction unit 213 identifies an AI system 30 in the AI information storage unit 22 according to the feature amount.
[0044] Next, the control unit 21 of the support server 20 executes a response acquisition process (step S26). Specifically, the prediction unit 213 of the control unit 21 sequentially inputs lower-level prompts to the identified AI system 30 to acquire the response.
[0045] Next, the control unit 21 of the support server 20 executes an output process (step S27). Specifically, when the management unit 211 of the control unit 21 acquires responses to all the lower-level prompts, the management unit 211 outputs the responses to the user terminal 10 in sequence.
[0046] (Operation of the embodiment) Since the decomposition candidates according to the higher-level prompt of the higher-level concept are used, a response can be obtained by the prompt of the decomposed lower-level concept.
[0047] (Effects of the embodiment) (1) In this embodiment, the control unit 21 of the support server 20 executes a process of generating decomposition candidates for lower-level prompts (step S13) and a process of acquiring responses to the lower-level prompts (step S15). This makes it possible to generate teacher information using decomposition candidates for decomposing a task (upper-level prompt) into multiple lower-level prompts.
[0048] (2) In this embodiment, the control unit 21 of the support server 20 executes a process for identifying the AI system in response to the lower-level prompt (step S14). This allows the use of an AI system 30 that can realize an appropriate response according to the features of the prompt.
[0049] (3) In this embodiment, the control unit 21 of the support server 20 executes a response evaluation process (step S16), thereby making it possible to learn decomposition candidates capable of realizing an appropriate output.
[0050] (4) In this embodiment, the control unit 21 of the assistance server 20 executes a machine learning process (step S17), which makes it possible to predict a plurality of lower-level prompts that realize a task.
[0051] (5) In this embodiment, the control unit 21 of the assistance server 20 executes a process of decomposing the upper prompt into lower prompts (step S24). This allows the upper prompt for achieving a task to be decomposed into a plurality of prompts, and an appropriate response can be obtained.
[0052] This embodiment can be modified as follows: This embodiment and the following modifications can be combined with each other to the extent that there is no technical contradiction. In the above embodiment, a user terminal 10, a support server 20, and multiple AI systems 30 are used. The hardware configuration is not limited to this. For example, a single AI system 30 may be used. Also, the AI system 30 may be provided within the support server 20.
[0053] In the above embodiment, the AI information storage unit 22 records AI management information related to the AI system 30 that uses prompts. Here, information related to the AI system 30 that can obtain a stable response even when the prompt changes may be registered. For example, a best practice (AI system 30) that is highly robust against noise is registered in association with the feature amount of the prompt. Here, noise is information for changing the notation of a prompt with the same content. For example, addition or modification of character strings or symbols is used as noise.
[0054] The AI registration process for registering information related to the AI system 30 will be described with reference to FIG. First, the control unit 21 of the support server 20 executes the following process for each prompt. Here, the control unit 21 of the support server 20 executes a prompt acquisition process (step S31). Specifically, the management unit 211 of the control unit 21 acquires prompt candidates to be used for evaluation. Then, the management unit 211 calculates feature quantities of the prompt candidates.
[0055] Next, the control unit 21 of the support server 20 executes the following process for each noise. Here, the control unit 21 of the support server 20 executes a noise acquisition process (step S32). Specifically, the management unit 211 of the control unit 21 acquires the noise to be added to the prompt candidate.
[0056] Then, the control unit 21 of the support server 20 executes a noise addition process (step S33). Specifically, the management unit 211 adds noise to the prompt candidate to be processed. Next, the control unit 21 of the support server 20 executes a response acquisition process for each AI system (step S34). Specifically, the learning unit 212 of the control unit 21 sequentially identifies the AI systems 30 to be evaluated. Then, the learning unit 212 transmits the prompt candidates to which noise has been added to the AI systems 30 to be evaluated, acquires the responses, and temporarily stores them. The above process is then repeated until it is completed for all noise.
[0057] Next, the control unit 21 of the support server 20 executes a robust evaluation process (step S35). Specifically, the learning unit 212 of the control unit 21 compares the effects of noise on the responses from each AI system 30. Here, the learning unit 212 identifies differences in responses to prompt candidates that include different noises.
[0058] Next, the control unit 21 of the support server 20 executes a best practice registration process (step S36). Specifically, the learning unit 212 of the control unit 21 identifies an AI system 30 that has the least change in response even when noise is included. Then, the learning unit 212 registers the identified AI system 30 as a best practice in the AI information storage unit 22 in association with the feature amount of the prompt candidate. The above process is then repeated until all prompt candidates have been processed.
[0059] In the above embodiment, a character string is added to the prompt as noise. The method of adding noise is not limited to this. For example, external data may be searched for and necessary knowledge may be extracted and added to the prompt. In this case, noise may be added to this external data.
[0060] In the above embodiment, the control unit 21 of the support server 20 executes a response evaluation process (step S16). Here, an evaluation result according to the evaluation criteria is acquired from the user terminal 10. Alternatively, the control unit 21 of the support server 20 may evaluate the response according to the evaluation criteria and record the evaluation information in the evaluation information storage unit 24. In this case, the control unit 21 is provided with an evaluation model that scores the response. In the above embodiment, a higher-level prompt is divided into multiple lower-level prompts. In the multiple divided prompts, the response to the preceding prompt may be used as a variable value for the subsequent prompt. In this case, a variable for inputting the response to the preceding prompt is set in the subsequent prompt. [Explanation of symbols]
[0061] 10...user terminal, 20...support server, 21...control unit, 211...management unit, 212...learning unit, 213...prediction unit, 22...AI information storage unit, 23...decomposition candidate storage unit, 24...evaluation information storage unit, 30...AI system.
Claims
1. A prompt generation system including a control unit connected to a user terminal and a generation AI, The control unit: Acquire a task from the user terminal; Calculating a feature amount of the task; generating a plurality of prompts in response to the features; inputting each of the prompts into the generation AI and obtaining a response to each of the prompts; The prompt generating system is characterized in that the responses are sequentially output to the user terminal.
2. The control unit is Identifying the generative AI for each prompt using an AI information storage unit in which information about the generative AI for the feature amount of the prompt is recorded; The prompt generation system according to claim 1, characterized in that the response is obtained using the identified generation system AI.
3. The prompt generation system described in claim 1 or 2, characterized in that the control unit generates a plurality of lower-level prompts based on the characteristics of the upper-level prompt, using the task as a higher-level prompt, and generates a further plurality of lower-level prompts based on the characteristics of the higher-level prompt, using the lower-level prompt as a higher-level prompt.
4. A prompt generation method for assisting in obtaining a response from a generation AI using a prompt generation system including a user terminal and a control unit connected to the generation AI, The control unit: Acquire a task from the user terminal; Calculating a feature amount of the task; generating a plurality of prompts in response to the features; inputting each of the prompts into the generation AI and obtaining a response to each of the prompts; The method for generating a prompt further comprises outputting the responses to the user terminal in sequence.
5. A prompt generation program that supports obtaining a response from a generation system AI using a prompt generation system having a user terminal and a control unit connected to the generation system AI, The control unit, Acquire a task from the user terminal; Calculating a feature amount of the task; generating a plurality of prompts in response to the features; inputting each of the prompts into the generation AI and obtaining a response to each of the prompts; a prompt generating program for functioning as a means for sequentially outputting the responses to the user terminal;
Citation Information
Patent Citations
Method and device for pre-training models, method and device for generating text, electronic device, storage medium, and computer program
JP2022153441A
Method for Providing Service of Off-line Wine Tasting Event
KR1020230109324A
Transparent and Controllable Human-Ai Interaction Via Chaining of Machine-Learned Language Models
US20230112921A1
Data generation method using language model, computer device, and computer program
JP2023018624A