Prompt update device, prompt update method, and prompt update program
Patent Information
- Application Number
- PCT/JP2025/006272
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2026-09-03
Smart Images

Figure JP2025006272_03092026_PF_FP_ABST
Abstract
Description
Prompt updating apparatus, prompt updating method and prompt updating program
[0001] The present disclosure relates to a prompt updating apparatus, a prompt updating method and a prompt updating program.
[0002] Patent Document 1 describes a planning apparatus that generates relative arrangement information of a robot and a work table and an assembly task sequence, and formulates a layout plan.
[0003] Japanese Unexamined Patent Application Publication No. 2022-044127
[0004] However, the technique described in Patent Document 1 is a unidirectional processing flow. Therefore, it does not have a sufficient mechanism for repeatedly improving the accuracy of the calculated plan. It is also conceivable to utilize a method of calculating a work plan using a language model, but in that case, the accuracy of the work plan greatly depends on the system prompt given to the language model.
[0005] Accordingly, one object of the present disclosure is to provide a prompt updating apparatus, a prompt updating method, and a prompt updating program that can improve the accuracy of a work plan.
[0006] The prompt updating apparatus according to the present disclosure performs inference of text loss representing a problem for a first prompt that instructs acquisition of information representing a work plan corresponding to problem information representing a problem about the work plan, based on a second prompt that instructs a language model to acquire the text loss, and includes: specialized loss calculation means for inferring text loss specialized for the problem about the work plan; integration means for integrating a plurality of text losses each specialized for problems about a plurality of work plans; and meta updating means for updating the first prompt based on the integrated text loss.
[0007] The prompt updating method described herein infers a text loss specific to a problem about a work plan based on a second prompt instructing a language model to obtain a text loss representing a problem about a first prompt instructing a language model to obtain information representing a work plan for problem information representing a problem about a work plan, integrates multiple text losses specific to problems about multiple work plans, and updates the first prompt based on the integrated text loss.
[0008] The prompt update program provided in this disclosure causes the computer to perform a specialized loss calculation process that infers a text loss specific to a problem about a work plan, based on a second prompt that instructs a language model to obtain a text loss representing a problem about a first prompt that instructs a language model to obtain information representing a work plan for problem information representing a problem about a work plan; an integration process that integrates multiple text losses specific to problems about multiple work plans, and a meta-update process that updates the first prompt based on the integrated text loss.
[0009] This disclosure makes it possible to improve the accuracy of work plans.
[0010] This is a block diagram illustrating the functional configuration of the prompt update device. This is a block diagram illustrating the functional configuration of the work planning unit 130, which includes prompt updates. This is a flowchart illustrating the operation of the prompt update device in the learning phase. This is a flowchart illustrating the work planning process, which includes prompt updates. This is a flowchart illustrating the operation of the prompt update device in the optimization phase. This is a diagram illustrating the environment of a work planning problem included in a work planning problem distribution. This is a diagram illustrating a work planning problem given in PDDL format. This is a diagram illustrating a work planning problem given in PDDL format. This is a diagram illustrating a work planning problem given in Json format. This is a block diagram illustrating the hardware configuration of a computer. This is a block diagram illustrating the main parts of the prompt update device. This is a diagram illustrating an overview of the prompt optimization method described in Reference 2. This is a diagram illustrating an overview of the algorithm of the meta-learning method described in Reference 3.
[0011] To automate tasks such as pick-and-place using robots, a method utilizing Large Language Models (LLMs) has been proposed for calculating work plans. Large Language Models represent artificial intelligence models trained using text data and have the ability to perform tasks such as natural language processing. For example, Large Language Models can use neural networks, particularly transformer architectures, to enable the generation and interpretation of context-dependent text. Large Language Models do not necessarily have to be large; they can simply be language models. Furthermore, Large Language Models may be models trained using image data. Hereafter, for the sake of explanation, language models with the ability to process such language will be referred to as Large Language Models (LLMs).
[0012] For example, Document 1 (Yuchen Liu1, Luigi Palmieri, Sebastian Koch, Ilche Georgievski, and Marco Aiello, "DELTA: Decomposed Efficient Long-Term Robot Task Planning using Large Language Models", [online], April 4, 2020, [Retrieved February 5, 2020], Internet<URL: https: / / arxiv.org / abs / 2404.03275> ) describes a technique for solving robot task planning problems using LLM. In the work planning method described in reference 1, a work plan is calculated for a single agent system using the following steps (1) to (3): (1) A natural language task given in natural language and a 3DSG (3D Scene Graph) representing the environment are input, and the LLM generates a formal language (Planning Domain Definition Language; PDDL). (2) The LLM decomposes the generated PDDL into subtask PDDLs. (3) The planner solves the decomposed subtask PDDLs. (4) The work plan results planned for each subtask are integrated to calculate the overall work plan. A formal language represents, for example, a language constructed based on grammatical rules so that a computer or artificial intelligence system can interpret instructions and data. The work plan result represents the plan of actions calculated for the work planning problem. The work plan result may include, for example, a sequence of actions, the time frame in which each action is performed, the total time required for the work, or an indicator showing how well the work plan satisfies the constraints.
[0013] However, the work planning method described in Reference 1 is a unidirectional processing flow. Therefore, it has the problem of not having a sufficient mechanism to iteratively improve the accuracy of the calculated work plan. In addition, the accuracy of the work plan may depend heavily on the system prompts given to the LLM. As a result, if appropriate system prompts are not designed, the accuracy of the work plan may not improve sufficiently.
[0014] Reference 2 (Mert Yuksekgonul, Federico Bianchi, Joseph Boen, Sheng Liu, Zhi Huang, Carlos Guestrin, and James Zou, "TextGrad: Automatic “Differentiation” via Text ", [online], June 11, 2020, [Retrieved February 5, 2020], Internet<URL: https: / / arxiv.org / abs / 2406.07496> The document describes prompt optimization techniques in LLM.
[0015] Figure 12 shows an overview of the prompt optimization method described in Reference 2. This method implements prompt optimization that mimics gradient descent. For example, if you want to optimize the system prompt to obtain the "ideal answer" from a "question," you can improve the prompt using the following steps (1) to (3): (1) The loss calculation unit 203 takes the "question," "answer," and "ideal answer" as input, lists the problems related to the difference between the "answer" and the "ideal answer," and outputs them as text loss. (2) The gradient calculation unit 204 performs feedback analysis and critique on the problems, infers how to improve the system prompt, and outputs the inference result as text gradient. (3) The variable update unit 205 updates the variables (system prompts given to the answer generation unit 202) based on the text gradient.
[0016] However, when applying the prompt optimization method described in Reference 2 to a work planning problem to perform prompt optimization, the loss function to be defined is unknown. That is, while the loss calculation unit 203 can be given a "question" (e.g., a work planning problem) and an "answer" (e.g., a work planning result), the "ideal answer" (e.g., the correct work planning solution) is unknown.
[0017] Reference 3 (Chelsea Finn, Pieter Abbeel, Sergey Levine, “Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks”, [online], [Retrieved February 17, 2025], Internet)<URL: https: / / arxiv.org / abs / 1703.03400> The section describes meta-learning methods.
[0018] Figure 13 shows an overview of the meta-learning algorithm described in reference 3. This meta-learning method constructs a model that can be applied to new tasks with a small amount of data and short training time. In particular, this meta-learning method learns general-purpose initial parameters that can be quickly optimized for any task. Furthermore, this meta-learning method enables efficient learning by learning common knowledge across multiple tasks and applying it to new tasks.
[0019] However, no technique has yet been proposed that applies the meta-learning technique described in Reference 3 to a technique that combines the work planning method described in Reference 1 and the prompt optimization method described in Reference 2. For example, when attempting to apply the meta-learning technique described in Reference 3 to a text-based prompt optimization method, it is unclear how to calculate the sum of the task-specific losses in algorithm iii.
[0020] Thus, the work planning method described in Reference 1 has the problem of not having a sufficient mechanism to iteratively improve the accuracy of the calculated work plan. Furthermore, even when attempting to apply the prompt optimization method described in Reference 2 to the work planning method described in Reference 1, difficulties arise because the loss function cannot be defined. Moreover, even when attempting to apply the meta-learning method described in Reference 3, it is difficult to combine these techniques because the method for calculating the sum of the task-specific losses in algorithm iii is unclear.
[0021] The prompt update device of this disclosure utilizes prompt update technology to calculate a general-purpose initial system prompt in work plan calculation using a Large-Scale Language Model (LLM). This makes it possible to efficiently improve the accuracy of work plan calculation using the LLM. The work plan device of this disclosure also calculates a loss function expressed in text from the results of past work plans. In this case, the loss function is information that represents the relationship between, for example, work information representing the content of the work and text representing information about the loss regarding the prediction result obtained by applying a model to the work information. Next, the work plan device infers how to improve the system prompt given to the LLM that calculates the work plan based on the loss function. Furthermore, the work plan device updates the system prompt based on the inference result and improves the accuracy of work plan calculation by the LLM using the updated system prompt. The system prompt represents a string of characters used to give instructions to the Large-Scale Language Model (LLM) and control its responses and actions.
[0022] Furthermore, the prompt update device of this disclosure is applicable to calculating work plans in a variety of settings, such as logistics warehouses and manufacturing sites. However, the applications to which the prompt update device of this disclosure can be applied are not limited to these.
[0023] Embodiments of this disclosure will be described below with reference to the drawings. In each drawing, the same or corresponding elements are denoted by the same reference numerals, and redundant explanations are omitted as necessary for clarity. Unless otherwise specified, predetermined values such as set values and thresholds are stored in advance in a storage device accessible from the device that uses those values. Unless otherwise specified, the storage unit is composed of one or any number of storage devices.
[0024] Embodiment 1. [Description of Configuration] The prompt update device of this embodiment will now be described. Figure 1 is a block diagram illustrating the functional configuration of the prompt update device. The prompt update device 100 includes an input unit 110, a task selection unit 120, a work planning unit 130 including prompt updates, a task-specific text loss calculation unit 140, a task-specific loss database 150, a loss integration unit 160, a meta-gradient calculation unit 171, a meta-variable update unit 172, and an output unit 180. Note that the meta-gradient calculation unit 171 and the meta-variable update unit 172 each have independent functions, but the configuration encompassing these functions is called the meta-system prompt update unit 170.
[0025] The operation of the prompt update device 100 can be broadly divided into a learning phase and an update phase. In the learning phase, the prompt update device 100 calculates a general-purpose system prompt. In the optimization phase, the prompt update device 100 uses the system prompt calculated in the learning phase as the initial system prompt in the optimization phase and executes work planning processing, including prompt updates.
[0026] The prompt update device 100 can input the system prompt calculated in the learning phase and the work plan problem during a work plan processing that includes prompt updating, and output the work plan result while updating the system prompt. Therefore, the prompt update device 100 has both a prompt update function and a work plan calculation function. However, the configuration of the prompt update device 100 is not limited to this, and it may also be configured to have only a prompt update function.
[0027] First, the work planning process, including prompt updates, will be described. The work planning process, including prompt updates, is executed by the work planning unit 130, including prompt updates, in both the learning phase and the optimization phase. However, the content of the work planning process, including prompt updates, differs between the learning phase and the optimization phase.
[0028] Figure 2 is a block diagram illustrating the functional configuration of the work planning unit 130, including prompt updates. The work planning unit 130, including prompt updates, includes an input unit 131, a work planning unit 132, a loss function generation unit 133, a text loss calculation unit 135, a gradient calculation unit 136, a variable update unit 137, and an output unit 138. Although the text loss calculation unit 135, the gradient calculation unit 136, and the variable update unit 137 each have independent functions, the configuration encompassing these functions is called the system prompt update unit 134.
[0029] The input unit 131 has the function of inputting a work plan problem and a system prompt to be given to the work plan unit 132 (hereinafter also referred to as the work plan system prompt or first prompt PL) to the work plan unit 130, including prompt updates. The first prompt PL can also be described as a prompt that instructs the unit to obtain information representing a work plan for problem information representing a problem about the work plan.
[0030] The work planning problem addressed in this embodiment is, for example, the problem of finding a procedure to achieve an objective while satisfying constraints (for example, a procedure to minimize work time). The work planning problem can be expressed in a format such as natural language or PDDL. The work planning system prompt is an instruction for controlling the operation and output style of the LLM included in the work planning unit 132, and is composed of a string of characters. Specifically, the work planning system prompt represents a string of characters used to instruct the model of specific work instructions or conditions when calculating a work plan using the Large-Scale Language Model (LLM).
[0031] The work planning unit 132 has the function of inputting a work planning problem and a work planning system prompt, inferring a work plan using LLM, and calculating a work plan result. It can also be said that the work planning unit 132 has the function of acquiring information representing a work plan using a language model that operates based on a work planning system prompt (first prompt PL) in response to problem information representing a problem about a work plan.
[0032] The work planning unit 132 outputs the input work planning problem and the calculated work planning result to the loss function generation unit 133. Furthermore, if the work planning unit 132 decomposes the input work planning problem into sub-problems (hereinafter also referred to as subtasks), it also outputs information regarding the decomposed subtasks to the loss function generation unit 133.
[0033] The work planning unit 132 includes a Work Learning Manager (LLM), which operates based on the input work planning system prompts. The work planning unit 132 can utilize the LLM in various ways when calculating the work planning results. An example of how to use the LLM is shown below, but the operation of the work planning unit 132 is not limited to this.
[0034] The work planning unit 132, for example, uses LLM to break down the tasks defined in the work planning problem into subtasks. Then, the work planning unit 132 automatically plans the work planning problem for each subtask. Note that the work planning unit 132 may omit the process of breaking down the input work planning problem into subtasks.
[0035] Furthermore, the work planning unit 132 uses LLM to calculate a sequence of actions from the work planning problem (the input work planning problem, or the work planning problems for each subtask). Then, based on the obtained sequence of actions, the work planning unit 132 uses a simulator to verify the overall work time and the degree to which constraints are satisfied.
[0036] Furthermore, the work planning unit 132 can use past work planning results as needed when performing inference using LLM. By utilizing past work planning results, the work planning unit 132 can further improve the accuracy of the work planning results.
[0037] The work plan results calculated by the work planning unit 132 include, for example, a list of actions, work time, and the degree of constraint satisfaction. Here, "action list" refers to a list of actions or operations necessary to accomplish a specific task, arranged in chronological order. "Work time" is the time required to complete the task. "Degree of constraint satisfaction" is an indicator showing the extent to which the constraints defined in the work plan problem are met.
[0038] The loss function generation unit 133 has the function of inputting the work plan problem and the work plan result calculated by the work plan unit 132, and generating a system prompt for calculating text loss (hereinafter also referred to as the text loss calculation system prompt or second prompt LO). The second prompt LO is a prompt that instructs the language model to acquire the text loss representing the problem for the first prompt PL, which instructs to acquire information representing the work plan for the problem information representing the problem about the work plan. Therefore, it can also be said that the loss function generation unit 133 has the function of generating a second prompt LO that instructs the language model to acquire the text loss representing the problem for the first prompt PL, which instructs to acquire information representing the work plan for the problem information representing the problem about the work plan. If the work plan unit 132 has decomposed the work plan problem into subtasks, the loss function generation unit 133 also inputs information about each subtask.
[0039] The loss function generation unit 133 is responsible for generating text loss calculation system prompts used by the text loss calculation unit 135. In this embodiment, the text loss is calculated by the LLM included in the text loss calculation unit 135. Therefore, the loss function generation unit 133 does not generate the text loss function itself, but rather generates text loss calculation system prompts to be given to the text loss calculation unit 135. The text loss calculation system prompts instruct the text loss calculation unit 135 on what should be extracted as loss.
[0040] The loss function generation unit 133 has the function of systematically generating text loss calculation system prompts. The loss function generation unit 133 may also generate text loss calculation system prompts using LLM.
[0041] The text loss calculation system prompt (second prompt LO) includes, for example, the following elements (1) to (5). Note that element (2) can be omitted if the work planning unit 132 does not decompose a work planning problem into subtasks, that is, if task decomposition is not performed. (1) Work planning problem: what kind of work planning problem is given (2) Task decomposition result: how the work planning problem is decomposed and assigned when task decomposition is performed (3) Work planning result (action sequence): what kind of work plan is calculated (4) Work planning result (work time and constraint satisfaction degree): total work time, satisfaction degree when there are time constraints (5) Instruction: an instruction (instruction sentence) to list what problems exist in the current work plan (that is, the most recently calculated work plan) in order to minimize the total work time while satisfying the constraints
[0042] Specific examples of the text loss calculation system prompt are shown below. In the examples shown below, the loss function generation unit 133 systematically generates the text loss calculation system prompt by substituting each element of (work planning problem), (task decomposition result), and (work planning result) into a predetermined format. However, the format of the text loss calculation system prompt is not limited to the following examples. Text loss calculation system prompt: "In (work planning problem), after decomposing tasks into (task decomposition result) and calculating a work plan, the result is (work planning result). In order to reduce the work time while satisfying the order time constraints, please list the problematic parts."
[0043] In the above text loss calculation system prompt, (work planning problem) is the work planning problem input by the input unit 131, and corresponds to element (1). (task decomposition result) is the result of decomposing the work planning problem into subtasks by the work planning unit 132, and corresponds to element (2). (work planning result) is the work planning result calculated by the work planning unit 132, and corresponds to elements (3) and (4). The entire prompt corresponds to element (5), and is an instruction sentence that instructs to list problems.
[0044] The system prompt updating unit 134 has a function of inputting the text loss calculation system prompt generated by the loss function generation unit 133 and outputting an updated work plan system prompt. It can also be said that the system prompt updating unit 134 has a function of updating the first prompt PL based on an output from the language model for the second prompt LO. The updating may be a process of creating a part of a prompt, or may be a process of creating the entire prompt. The updating process of the system prompt updating unit 134 is executed by a text loss calculation unit 135, a gradient calculation unit 136, and a variable updating unit 137.
[0045] The text loss calculation unit 135 has a function of inferring text loss based on the text loss calculation system prompt (second prompt LO) generated by the loss function generation unit 133. The text loss calculation unit 135 enumerates problems of the work plan system prompt in optimizing a work plan through inference by an LLM. In the present embodiment, a set of enumerated problems of the work plan system prompt corresponds to the text loss.
[0046] The LLM inference settings in the text loss calculation unit 135 are, for example, as follows. ・Role: text loss calculation system prompt ・Instruction: work plan system prompt ・Response: text loss (a set of problems of the work plan system prompt based on work plan results for work plan problems and task decomposition)
[0047] The gradient calculation unit 136 has a function of inferring a text gradient based on the text loss. The gradient calculation unit 136 analyzes the text loss and performs feedback inference on how the work plan system prompt should be improved through inference by an LLM. It can also be said that the gradient calculation unit 136 has a function of inferring parameters of the first prompt PL based on the text loss which is an inference result of the text loss calculation unit 135. In the present embodiment, text indicating how the work plan system prompt should be improved corresponds to the text gradient.
[0048] The LLM inference settings in the gradient calculation unit 136 are as follows, for example: • Role: "Part of an optimization system that improves the given text (variable). Please provide feedback on how to improve the variable based on the text loss." • Instruction: Text loss • Response: Text gradient (text indicating how to improve the work planning system prompt)
[0049] The variable update unit 137 has the function of updating the work planning system prompt based on the text gradient. The variable update unit 137 analyzes the text gradient by LLM inference and updates the work planning system prompt.
[0050] The inference settings for LLM in the variable update unit 137 are as follows: • Role: "Part of an optimization system that improves the given text (variable). Modify the work plan system prompt based on the text gradient." • Instruction: Text gradient • Response: Updated work plan system prompt
[0051] The output unit 138 has the function of outputting the text loss calculation system prompt generated by the loss function generation unit 133 and the work plan system prompt updated by the variable update unit 137 to the task-specific text loss calculation unit 140 during the learning phase.
[0052] The output unit 138 has the function of outputting the work plan results calculated by the work plan unit 132 during the optimization phase. For example, the output unit 138 can output and store the work plan results in the prompt update device 100 or the storage unit (not shown) of an external device. The output unit 138 can also output and display the work plan results on a display device (not shown), such as a display device. The output unit 138 may also be configured to output updated work plan system prompts in the same way as the work plan results.
[0053] Furthermore, the output unit 138 can output the work plan results to a robot or other device that performs the work (for example, a robot or a device that controls the robot) during the optimization phase. This allows the robot to operate based on the work plan results. In other words, the prompt update device 100 can function as a control device for the controlled object (for example, a robot), and can control the controlled object based on the work plan results calculated from the work plan problem.
[0054] Next, other functional components included in the prompt update device 100 will be described. In the learning phase, the work planning unit 130, which includes prompt updates, calculates a work planning system prompt based on one work planning problem. That is, a work planning system prompt (first prompt PL) specific to one work planning problem is obtained. In contrast, the other functional components included in the prompt update device 100 calculate a work planning system prompt based on multiple work planning problems, taking into account the calculation results of the work planning unit 130, which includes prompt updates. That is, a general-purpose work planning system prompt (first prompt PL) is obtained.
[0055] The input unit 110 has the function of inputting the work plan problem distribution and the work plan system prompt to be given to the work plan unit 132 as an initial metavariable to the prompt update device 100. The work plan problem distribution is a probability distribution of work plan problems. This distribution represents the frequency with which various types of work plan problems appear.
[0056] The task selection unit 120 has the function of selecting a set of work planning problems from the work planning problem distribution.
[0057] The work planning unit 130, which includes prompt updates, inputs the work planning system prompt (first prompt PL) as an initial metavariable from the input unit 110. Alternatively, the work planning unit 130, which includes prompt updates, inputs the work planning system prompt (first prompt PL) as a metavariable updated by the metavariable update unit 172. Furthermore, the work planning unit 130, which includes prompt updates, inputs the set of work planning problems selected by the task selection unit 120.
[0058] The work planning unit 130, which includes prompt updates, receives a work planning system prompt (first prompt PL) and a set of work planning problems, and outputs a text loss calculation system prompt (second prompt LO) and a work planning system prompt (first prompt PL) for each work planning problem (hereinafter also referred to as a task). The output text loss calculation system prompt (second prompt LO) is generated by the loss function generation unit 133. The output work planning system prompt is updated by the variable update unit 137. Hereinafter, a text loss calculation system prompt (second prompt LO) generated based on a single work planning problem (task), that is, one specific to a single work planning problem (task), will also be called a task-specific text loss calculation system prompt (task-specific second prompt LO). Furthermore, a work planning system prompt updated based on a single work planning problem (task), that is, one specific to a single work planning problem (task), will also be called a task-specific work planning system prompt (task-specific first prompt PL). Furthermore, when distinguishing between work planning system prompts that correspond to individual work planning problems (tasks) (i.e., task-specific work planning system prompts) and those that correspond to the entire set of work planning problems, the latter are also called meta-work planning system prompts (meta-first prompts PL).
[0059] The task-specific text loss calculation unit 140 has the function of calculating a task-specific text loss (hereinafter also referred to as task-specific text loss) by inputting a task-specific text loss system prompt and a meta-work planning system prompt. The task-specific text loss calculation unit 140 enumerates the problems of the task-specific work planning system prompts in optimizing the work plan through LLM inference. In this embodiment, the set of problems of the work planning system prompts enumerated in a task-specific manner corresponds to the task-specific text loss. It can also be said that the task-specific text loss calculation unit 140 has the function of inferring a text loss specific to the problems of the work plan based on a first prompt that instructs the language model to obtain information representing the work plan for problem information representing the problems of the work plan, and a second prompt that instructs the language model to obtain a text loss representing the problems of the PL.
[0060] The inference settings for LLM in the task-specific text loss calculation unit 140 are as follows: • Role: Task-specific text loss calculation system prompt • Instruction: Meta-work planning system prompt • Response: Task-specific text loss (a set of problems in the task-specific work planning system prompt, based on the work planning results for the work planning problem and task decomposition)
[0061] The task-specific loss database 150 stores the task-specific text losses calculated by the task-specific text loss calculation unit 140. For example, the task-specific loss database 150 lists multiple task-specific text losses corresponding to multiple work planning problems (tasks) and stores them as a task-specific text loss list.
[0062] The loss integration unit 160 has the function of generating a text loss (hereinafter also referred to as metatext loss) by integrating all task-specific text losses stored in the task-specific loss database 150. The loss integration unit 160 can also be said to have the function of integrating multiple text losses, each specific to a problem related to multiple work plans. The metatext loss is a string formed by integrating multiple task-specific text losses, and can be represented, for example, as shown below: Metatext loss: task1_loss_1, task_1_loss_2, task_2_loss_1, task_2_loss_2, …
[0063] The loss integration unit 160 can systematically integrate all task-specific text losses. Furthermore, the loss integration unit 160 can also integrate all task-specific text losses using LLM. For example, the loss integration unit 160 can integrate the loss by providing the LLM with a prompt such as, "Please organize these issues and output them as a bulleted list, but please eliminate duplicate elements." along with the task-specific text loss list.
[0064] The metasystem prompt update unit 170 has the function of updating the first prompt PL based on the integrated text loss. The update may be a process of creating a part of the prompt, or a process of creating the entire prompt. The update process of the metasystem prompt update unit 170 is performed by the metagradient calculation unit 171 and the metavariable update unit 172.
[0065] The meta-gradient calculation unit 171 has the function of inferring the metatext gradient based on the metatext loss. The gradient calculation unit 136 analyzes the metatext loss by inferring from the LLM and provides feedback inference on how to improve the work planning system prompt. In this embodiment, the text indicating how to improve the work planning system prompt corresponds to the metatext gradient.
[0066] The LLM inference settings in the meta-gradient calculation unit 171 are as follows: • Role: "Part of an optimization system that improves the given text (variables). Please provide feedback on how to improve the variables. However, please output content that is not task-specific and can be handled in general for these problems." • Instruction: Metatext loss • Response: Metatext gradient (text indicating how to improve the work planning system prompt)
[0067] The metavariable update unit 172 has the function of updating the metawork planning system prompt based on the metatext gradient. The metavariable update unit 172 analyzes the metatext gradient by LLM inference and updates the metawork planning system prompt.
[0068] The metavariable update unit 172 outputs the updated metawork planning system prompt to the work planning unit 130, which includes prompt updates, as a work planning system prompt to be given to the work planning unit 132.
[0069] The LLM inference settings in the metavariable update unit 172 are as follows, for example: • Role: "Part of an optimization system that improves the given text (variable). Modify the work planning system prompt based on the metatext gradient. However, output content that is not task-specific and can be handled in general for these problems." • Instruction: Metatext gradient • Response: Updated metawork planning system prompt
[0070] The output unit 180 has the function of outputting the updated meta-work planning system prompt as a meta-variable. For example, the output unit 180 can output and store the meta-work planning system prompt in the prompt update device 100 or in the storage unit (not shown) of an external device. The output unit 180 can also output and display the meta-work planning system prompt on a display device (not shown), such as a display device. Furthermore, the output unit 180 can output the meta-work planning system prompt to the system that executes the work plan.
[0071] The prompt update device 100 repeatedly performs the processing of the work planning unit 130, including prompt updates, and the processing of the task-specific text loss calculation unit 140, loss integration unit 160, meta-gradient calculation unit 171, and meta-variable update unit 172 until predetermined termination conditions are met, thereby calculating a general-purpose meta-work planning system prompt.
[0072] [Explanation of Operation] Next, the operation of the prompt update device 100 will be explained. Figure 3 is a flowchart illustrating the operation of the prompt update device during the learning phase.
[0073] The input unit 110 receives the work planning problem distribution p(T) and the meta-work planning system prompt as an initial meta-variable. The meta-work planning system prompt here is, for example, an instruction that instructs a task decomposition that minimizes the work planning time while satisfying constraints.
[0074] Next, the task selection unit 120 selects a set of work planning problems {T} from the work planning problem distribution p(T). i Select} (step S101).
[0075] Next, the prompt update device 100 starts processing to calculate the task-specific text loss for each of the work planning problems included in the work planning problem set (step S102).
[0076] First, the work planning unit 130, which includes prompt updates, executes work planning processing including prompt updates (step S103). Specifically, the work planning unit 130, which includes prompt updates, receives a meta-work planning system prompt and one of the work planning problems, and outputs a task-specific text loss calculation system prompt and a task-specific work planning system prompt.
[0077] Next, the task-specific text loss calculation unit 140 infers the task-specific text loss based on the task-specific text loss calculation system prompt and the meta-work planning system prompt (step S104).
[0078] Next, the task-specific text loss calculation unit 140 stores the task-specific text loss in the task-specific loss database 150 (step S105).
[0079] The prompt update device 100 repeats steps S103 to S105 for calculating the task-specific text loss for all work plan problems (step S106). After the task-specific text loss for all work plan problems has been calculated, the process moves to step S107.
[0080] Once the task-specific text loss for all work planning problems has been calculated, the loss integration unit 160 generates a metatext loss by integrating all the task-specific text losses stored in the task-specific loss database 150 (step S107). At this time, the loss integration unit 160 eliminates duplicate elements, for example, using LLM. The metatext loss is represented, for example, as a string listing the problems in the metawork planning system prompt.
[0081] Next, the meta-gradient calculation unit 171 infers the metatext gradient using LLM based on the metatext loss (step S108). The metatext gradient is represented, for example, as a string of characters indicating points for improving the meta-work planning system prompt.
[0082] Next, the metavariable update unit 172 updates the metawork planning system prompt using LLM based on the metatext gradient (step S109). Then, the metavariable update unit 172 inputs the updated metawork planning system prompt to the work planning unit 130, which includes prompt updates.
[0083] Next, the prompt update device 100 determines whether or not a predetermined termination condition has been met (step S110). Here, the predetermined termination condition is met, for example, when a loop process is executed to update the meta-work planning system prompt until a certain number of iterations is reached.
[0084] If the predetermined termination conditions are met (step S110: Y), the learning phase processing of the prompt update device 100 is terminated. On the other hand, if the termination conditions are not met (step S110: N), the prompt update device 100 initializes the task-specific loss database 150 to an empty set (step S111). After that, the process proceeds to step S101. In other words, the above process is repeatedly executed until the predetermined termination conditions are met.
[0085] The prompt update device 100 calculates a meta-work planning system prompt based on multiple work planning problems by executing the learning phase processing shown in Figure 3. In other words, a general-purpose meta-work planning system prompt is obtained.
[0086] Next, we will describe the details of the work planning process, including the prompt update in step S103. Figure 4 is a flowchart illustrating the work planning process, including the prompt update.
[0087] The work planning unit 132 receives the work planning problem and the meta-work planning system prompt as input. For example, the work planning unit 132 receives the meta-work planning system prompt as an initial meta-variable from the input unit 110. Alternatively, the work planning unit 132 receives the meta-work planning system prompt as a meta-variable updated by the meta-variable update unit 172. Then, the work planning unit 132 uses the LLM, which operates based on the meta-work planning system prompt, to decompose the work planning problem into subtasks (step S201). Hereinafter, the set of decomposed subtasks will also be referred to as the subtask set.
[0088] Next, the work planning unit 132 starts processing to calculate the action sequence for each of the subtasks included in the subtask set (step S202).
[0089] First, the work planning unit 132 creates an automated planning problem in PDDL format to complete one of the subtasks (step S203). Then, the work planning unit 132 solves the automated planning problem using a PDDL planner and calculates the sequence of actions (step S204).
[0090] The work planning unit 132 repeats steps S203 and S204 for calculating the action sequence for all subtasks (step S205). After the action sequences for all subtasks have been calculated, the process moves on to step S206.
[0091] Once the action sequences for all subtasks have been calculated, the work planning unit 132 integrates the calculated action sequences and verifies the total work time required for the task and the degree to which the constraints are satisfied (step S206).
[0092] The work planning unit 132 calculates a work planning result for a work planning problem through the processing in steps S201 to S206. This work planning result includes the work planning problem, the set of subtasks decomposed in step S201, the sequence of actions calculated in steps S202 to S205, and the work time and degree of satisfaction of constraints calculated in step S206.
[0093] Next, the loss function generation unit 133 receives the work plan problem and the work plan result calculated by the work plan unit 132 as input and generates a text loss calculation system prompt to instruct what should be extracted as loss (step S207).
[0094] Next, the text loss calculation unit 135 infers the text loss using LLM based on the text loss calculation system prompt (step S208). The text loss is represented as a string listing the problems in the work planning system prompt.
[0095] Next, the gradient calculation unit 136 infers the text gradient using LLM based on the text loss (step S209). The text gradient is represented as a string of characters indicating points for improving the work planning system prompt.
[0096] Next, the variable update unit 137 updates the work planning system prompt using LLM based on the text gradient (step S210).
[0097] Next, the work planning unit 130, which includes prompt updates, outputs the text loss calculation system prompt generated by the loss function generation unit 133 in step S207 and the work planning system prompt updated by the variable update unit 137 in step S210 (step S210). These are treated as a specialized text loss calculation system prompt and a specialized work planning system prompt, respectively, that are specific to the input work planning problem.
[0098] In the learning phase, the prompt update device 100 calculates a specialized text loss calculation system prompt and a meta-work planning system prompt by executing a work planning process that includes prompt updates as shown in Figure 4.
[0099] Next, the operation of the prompt update device 100 during the optimization phase will be described. Figure 5 is a flowchart illustrating the operation of the prompt update device during the optimization phase.
[0100] The input unit 131 of the work planning unit 130, which includes prompt updates, receives the work planning problem and the work planning system prompt. The work planning system prompt here is a general-purpose one calculated in the learning phase and becomes the initial work planning system prompt in the optimization phase.
[0101] The work planning unit 132 receives the work planning problem, the work planning system prompt, and sorted past work planning results stored in the work planning results database (not shown). Then, the work planning unit 132 uses an LLM that operates based on the work planning system prompt to break down the work planning problem into subtasks (step S301).
[0102] Next, the work planning unit 132 starts processing to calculate the action sequence for each of the subtasks included in the subtask set (step S302).
[0103] First, the work planning unit 132 creates an automated planning problem in PDDL format to complete one of the subtasks (step S303). Then, the work planning unit 132 solves the automated planning problem using a PDDL planner and calculates the sequence of actions (step S304).
[0104] The work planning unit 132 repeats steps S303 and S304 for calculating the action sequence for all subtasks (step S305). After the action sequences for all subtasks have been calculated, the process moves on to step S306.
[0105] Once the action sequences for all subtasks have been calculated, the work planning unit 132 integrates the calculated action sequences and verifies the total work time required for the task and the degree to which the constraints are satisfied (step S306).
[0106] The work planning unit 132 calculates a work planning result for a work planning problem through the processing in steps S301 to S306. This work planning result includes the work planning problem, the set of subtasks decomposed in step S301, the sequence of actions calculated in steps S302 to S305, and the work time and degree of satisfaction of constraints calculated in step S306.
[0107] Next, the work planning unit 132 determines whether or not predetermined termination conditions are met (step S307). Here, predetermined termination conditions include, for example, some or all of the following conditions: - When a loop process is executed to update the work planning system prompt and calculate the work planning result until a certain number of iterations is reached. - When the calculated work time is less than or equal to a certain threshold. - When a work planning result is calculated that satisfies all constraint conditions.
[0108] If the predetermined termination conditions are met (step S307: Y), the processing of the prompt update device 100 is terminated. On the other hand, if the termination conditions are not met (step S307: N), the work planning unit 132 stores the work plan result, including the work time and the degree of satisfaction of the constraints calculated in step S306, in the work plan result database (not shown) (step S308).
[0109] Next, the work planning unit 132 or the sorting unit (not shown) sorts the work storage results stored in the work planning result database (not shown) based on the work time and the degree to which constraints are satisfied (step S309).
[0110] In step S309, the work planning unit 132 or sorting unit (not shown) sorts past work planning results in order from best to worst, for example, in terms of work time and degree of constraint satisfaction. By referring to these sorted past work planning results, the work planning unit 132 can perform inference efficiently and effectively. Examples of sorting methods (1) to (3) are shown below, but the sorting method is not limited to these. (1) In the case of a maximization (or minimization) problem with constraints: "Constraints are satisfied and the objective function value is high (or low)" > "Constraints are satisfied but the objective function value is low (or high)" > "Constraints are not satisfied" (2) In the case of a maximization (or minimization) problem without constraints: "The objective function value is high (or low)" > "The objective function value is low (or high)" (3) In the case of a maximization (or minimization) problem where the degree of satisfaction of constraints can be quantified: "Constraints are satisfied and the objective function value is high (or low)" > "Constraints are satisfied but the objective function value is low (or high)" > "Constraints are not satisfied but the degree of satisfaction is high" > "Constraints are not satisfied and the degree of satisfaction is low" However, "A > B" represents a list in which A is placed before B.
[0111] Next, the loss function generation unit 133 receives the work plan problem and the work plan result calculated by the work plan unit 132 as input and generates a text loss calculation system prompt to instruct what should be extracted as loss (step S310).
[0112] Next, the text loss calculation unit 135 infers the text loss using LLM based on the text loss calculation system prompt (step S311). The text loss is represented as a string listing the problems in the work planning system prompt.
[0113] Next, the gradient calculation unit 136 infers the text gradient using LLM based on the text loss (step S312). The text gradient is represented as a string of characters indicating points for improving the work planning system prompt.
[0114] Next, the variable update unit 137 updates the work planning system prompt using LLM based on the text gradient (step S313). Then, the variable update unit 137 inputs the new work planning system prompt to the work planning unit 132. After that, the process proceeds to step S301.
[0115] As shown in Figure 5, the prompt update device 100 repeatedly executes steps S301 to S306 for calculating a work plan result from a work plan problem, and steps S308 to S313 for updating the work plan system prompt, until a predetermined termination condition is met. The work plan system prompt represents a string of characters used to instruct the model of specific work instructions or conditions when calculating a work plan using a large-scale language model (LLM).
[0116] The prompt update device 100 calculates the work plan result while updating the work plan system prompt by executing the optimization phase process shown in Figure 5.
[0117] The operation examples shown in Figures 3 to 5 do not limit the operation of the prompt update device 100 of this disclosure. For example, the prompt update device 100 may omit the processing in steps S201 and S301, which decompose the input work plan problem into subtasks, and be configured to directly calculate the action sequence from the work plan problem. Furthermore, the prompt update device 100 can perform the processing in step S309 at any time before next referring to the work plan result database (not shown).
[0118] Furthermore, after a predetermined termination condition is met in step S307 of the optimization phase, the output unit 138 may execute a process to output the work plan result. At this time, the output unit 138 may output the work plan result to a storage unit (not shown) for storage, or to a display device (not shown) such as a display device for display. Alternatively, the output unit 138 may output the work plan result to a robot or the like that will perform the work (for example, a robot or a device that controls the robot). This allows the robot to operate based on the work plan result.
[0119] [Explanation of Effects] Next, the effects of this embodiment will be explained. In this embodiment, during the optimization phase, the work planning unit 132 of the work planning unit 130, which includes prompt updates, calculates a work planning result (i.e., information representing the work plan) from a work planning problem (i.e., problem information representing the problem about the work plan) using a large-scale language model (LLM) that operates based on a work planning system prompt (first prompt PL). The loss function generation unit 133 generates a text loss calculation system prompt (i.e., a second prompt LO that instructs the large-scale language model (LLM) to obtain a text loss representing the problem about the first prompt PL) based on the work planning problem and the work planning result. The system prompt update unit 134, which includes a text loss calculation unit 135, a gradient calculation unit 136, and a variable update unit 137, updates the work planning system prompt (first prompt PL) based on the output from the large-scale language model (LLM) for the text loss calculation system prompt (second prompt LO).
[0120] Furthermore, the work planning unit 130, which includes prompt updates, generates a text loss calculation system prompt containing the following elements using the loss function generation unit 133, and provides this to the LLM included in the text loss calculation unit 135 to calculate a text-based loss function. (1) Work planning problem: What kind of work planning problem is given (i.e., problem information representing the problem about the work plan) (2) Task decomposition result: How the work planning problem was decomposed and assigned when the task was decomposed (i.e., information about subtasks) (3) Work planning result (action sequence): What kind of work plan was calculated (i.e., information representing the acquired work plan) (4) Work planning result (work time and constraint satisfaction): Total work time, and satisfaction if there are time constraints (5) Instructions: Instructions that list the problems with the current work plan (i.e., information representing the most recently calculated work plan) in order to minimize the total work time while satisfying the constraints
[0121] In the system prompt update unit 134, the text loss calculation unit 135 calculates the text loss based on the text loss calculation system prompt. Next, the gradient calculation unit 136 infers how to improve the work plan system prompt (i.e., the parameters of the work plan system prompt (first prompt PL)) based on the text loss. Then, the variable update unit 137 updates the work plan system prompt based on the gradient inferred by the gradient calculation unit 136.
[0122] In other words, the prompt update device 100 does not simply feed back the results of the work plan and instruct the LLM to improve the accuracy of the work plan, but rather analyzes the problems based on the results of the work plan and incorporates the results of its inferences on how to improve them into the work plan system prompt. With this configuration, the prompt update device 100 can iteratively and efficiently improve the accuracy of the work plan.
[0123] Furthermore, in this embodiment, during the learning phase, the task-specific text loss calculation unit 140 receives a task-specific text loss calculation system prompt and a meta-work planning system prompt for each of the multiple work planning problems and calculates the task-specific text loss. That is, the task-specific text loss calculation unit 140 infers a text loss specific to the work planning problem based on a first prompt PL which instructs the language model to obtain information representing the work plan for problem information representing the work plan, and a second prompt LO which instructs the language model to obtain a text loss representing the problem for the work plan. Next, the loss integration unit 160 generates a meta-text loss by integrating all the task-specific text losses. That is, the loss integration unit 160 integrates multiple text losses specific to the problems of the multiple work plans. Next, the meta-gradient calculation unit 171 infers the meta-text gradient using LLM based on the meta-text loss. Also, the meta-variable update unit 172 updates the meta-work planning system prompt using LLM based on the meta-text gradient. In other words, the metasystem prompt update unit 170 updates the first prompt PL based on the integrated text loss. The prompt update device 100 then repeats these processes until predetermined termination conditions are met.
[0124] With this configuration, the prompt update device 100 can calculate a general-purpose work planning system prompt during the learning phase, thereby improving the accuracy of the work plan. By using this general-purpose work planning system prompt as an initial variable in the optimization phase, the prompt update device 100 can be applied to new work planning problems (tasks) with a small amount of data and a short learning period. As a result, the prompt update device 100 can speed up processing in the optimization phase. In other words, the prompt update device 100 can further efficiently improve the accuracy of the work plan.
[0125] The following describes a specific example of the operation of the prompt update device implemented in the above embodiment.
[0126] Example 1. The specific operation of the prompt update device 100 in the learning phase will be described. Figure 6 is a diagram illustrating the environment of a work planning problem included in the work planning problem distribution. Figure 6 visually shows an example of a pick and place problem in a logistics warehouse.
[0127] In this embodiment, the input unit 110 receives a work planning problem distribution p(T) which includes multiple work planning problems. A common element among the work planning problems included in the work planning problem distribution p(T) is that, for example, it includes a task to transport an object to a shipping shelf.
[0128] Furthermore, the input unit 110 inputs a meta-work planning system prompt as an initial meta-variable. This meta-work planning system prompt is defined, for example, as follows: Work planning system prompt: "Please decompose the task in a way that reduces the work time while satisfying the time constraints of the order."
[0129] The task selection unit 120 selects a set of work planning problems {T} from the work planning problem distribution p(T). i Select work plan problems 1 to N.
[0130] The work planning unit 130, which includes prompt updates, receives work planning problems 1 to N and meta-work planning system prompts, and outputs a task-specific text loss calculation system prompt and a task-specific work planning system prompt for each work planning problem.
[0131] The task-specific text loss calculation system prompt is generated by the loss function generation unit 133 and is defined, for example, as follows: Task-specific text loss calculation system prompt: "In (work planning problem), the task was broken down into (subtasks) and the plan was calculated, resulting in (work planning result). To shorten the work time while satisfying the time constraints of the order, please list the problematic areas." The loss function generation unit 133 can systematically generate the above task-specific text loss calculation system prompt by substituting values into each element of a predefined format.
[0132] The task-specific work planning system prompt is updated by the variable update unit 137 and is defined, for example, as follows: Task-Specific Work Planning System Prompt: "Please perform task decomposition to ensure cooperation and efficiency while satisfying the time constraints of the given order and equally distributing the workload among agents. Aim to optimize the order and timing of subtasks, make effective use of available time, and introduce parallel work as much as possible. Agent 1, located at node A, ..."
[0133] In this way, the work planning unit 130, which includes prompt updates, obtains a set of task-specific text loss calculation system prompts and meta-work planning system prompts for each of the work planning problems 1 to N.
[0134] The task-specific text loss calculation unit 140 receives the task-specific text loss calculation system prompt and the meta-work planning system prompt for each of the work planning problems 1 to N, and outputs the task-specific text loss.
[0135] The task-specific text loss calculation unit 140 infers the task-specific text loss using LLM based on the task-specific text loss calculation system prompt. Here, the task-specific text loss is represented as a string listing the problems in the task-specific work planning system prompt. The inference settings for this LLM are, for example, as follows: • Role: Task-specific text loss calculation system prompt • Instruction: Meta-work planning system prompt • Response: 1. Imbalance in agent load balancing: While Agent 1 was able to complete task order 1 with ample margin, ... 2. Subtask order and timing: The current task order may not be efficient, ...
[0136] In this manner, the task-specific text loss calculation unit 140 calculates the task-specific text loss for each of the work plan problems 1 to N and stores it in the task-specific loss database 150.
[0137] The loss integration unit 160 generates a metatext loss by integrating all task-specific text losses stored in the task-specific loss database 150. The loss integration unit 160 can integrate all task-specific text losses using LLM. In this case, the LLM inference settings are as follows, for example: • Role: "Organize these problems and output them as a bulleted list, but eliminate duplicate elements." • Instruction: {Set of task-specific text losses} • Response: 1. Imbalance in agent load balancing: While Agent 1 was able to complete the order 1 task with ample margin, ... 2. Subtask order and timing: The current task order may not be efficient, ... ... 7. ... ...
[0138] In the metatext loss (Response) described above, for example, items 1-6 are task-specific text losses corresponding to work planning problem 1, and item 7 is a task-specific text loss corresponding to work planning problem 2.
[0139] The meta-gradient calculation unit 171 infers the metatext gradient using LLM based on the metatext loss. Here, the metatext gradient is represented as a string indicating points for improving the meta-work planning system prompt. The inference settings for this LLM are as follows, for example: • Role: "Part of an optimization system to improve the given text (variable). Please provide feedback on how to improve the variable. However, please output content that is general and applicable to these problems, not task-specific." • Instruction: Metatext loss • Response: "The general instructions for improving the variable are as follows. The current meta-work planning system prompt is abstract and does not include specific improvements. For more details…"
[0140] The metavariable update unit 172 updates the metawork planning system prompt using LLM based on the metatext gradient. The inference settings for this LLM are as follows, for example: • Role: "Part of an optimization system that improves the given text (variable). Modify the metawork planning system prompt based on the metatext gradient. However, output content that is not task-specific and can be handled in general for these problems." • Instruction: Metatext gradient • Response: Updated metawork planning system prompt: "Perform task decomposition that satisfies the time constraints of the given order, evenly distributes the load on each agent, and promotes cooperation and efficiency. Aim to optimize the order and timing of subtask transitions, make effective use of available time, and introduce parallel work as much as possible..."
[0141] The metavariable update unit 172 inputs the updated metawork planning system prompt to the work planning unit 130, which includes prompt updates. Subsequently, the work planning unit 130, which includes prompt updates, executes work planning processing, including prompt updates, again for multiple work planning problems based on the updated metawork planning system prompt.
[0142] The prompt update device 100 repeatedly executes the above process until a predetermined termination condition is met. Through this iterative process, the prompt update device 100 repeatedly updates the meta-work plan system prompt while identifying common improvement points.
[0143] Example 2. Next, the specific operation of the prompt update device 100 during the optimization phase will be described.
[0144] In this embodiment, the input unit 131 of the work planning unit 130, which includes prompt updates, receives a work planning problem that includes the following elements: • Two robots, Agent 1 and Agent 2, perform move, pick, and place actions (PDDL description). • An order is given (transport items to the shipping shelf within a specified time). • Order 1: Transport Obj1 and Obj2 to Shipping_shelf within 10 minutes. • Order 2: Transport Obj3 and Obj4 to Shipping_shelf within 20 minutes.
[0145] In this embodiment, the work planning problem is given in PDDL and JSON format. Figures 7 and 8 illustrate the work planning problem given in PDDL format. Figure 9 illustrates the work planning problem given in JSON format.
[0146] Figure 7 shows the PDDL corresponding to work planning problem 1 shown in Figure 6. Figure 8 also shows the PDDL corresponding to work planning problem N shown in Figure 6. The PDDL consists of a domain file shown in Figures 7(A) and 8(A), and a problem file shown in Figures 7(B) and 8(B). The PDDL shown in Figures 7(A)(B) and 8(A)(B) provides predicate definitions representing relationships between objects, definitions of actions the robot can use, definitions of objects, initial states of objects, and the final goals that must be achieved. Figure 9 also shows an example of orders 1 and 2, which indicate transporting items to the shipping shelves within a specified time, written in Json format.
[0147] Furthermore, the input unit 131 inputs a generalized work planning system prompt as an initial variable during the learning phase. This work planning system prompt is defined as follows: Work Planning System Prompt: "Please perform task decomposition to ensure cooperation and efficiency while satisfying the time constraints of the given order and equally distributing the workload among the agents. Aim to optimize the order and timing of subtasks, make effective use of available time, and introduce parallel work as much as possible..."
[0148] The work planning unit 132 receives the work planning problem and the work planning system prompt. Then, using the LLM that operates based on the work planning system prompt, the work planning unit 132 breaks down the work planning problem into the following subtask 1 and subtask 2: Subtask 1: Transport Obj1 and Obj2 to Shipping_shelf -> Assign to Agent 1 Subtask 2: Transport Obj3 and Obj4 to Shipping_shelf -> Assign to Agent 2
[0149] The work planning unit 132 generates an automated planning problem in PDDL format from the subtasks. Next, the work planning unit 132 solves the automated planning problem using a PDDL planner and calculates the action sequence. After that, the work planning unit 132 integrates each calculated action sequence and verifies the overall work time and the degree to which the constraints are satisfied. Through this process, the work planning unit 132 calculates a work plan result that includes the following elements: Work plan result: ・Action sequence: (move Agent1 D)[0.2min] -> (move Agent1 E)[0.3min] -> … -> (place Agent2 obj4)[0.9min] ・Work time: 26min ・Degree to which constraints are satisfied: Order 1 is completed with a 1min buffer, Order 2 is completed with a 6min overtime.
[0150] The loss function generation unit 133 receives the work planning problem and the work planning result calculated by the work planning unit 132 as input and generates the following text loss calculation system prompt: Text loss calculation system prompt: "In (work planning problem), the task was broken down into (subtasks 1 and 2) and a work plan was calculated, resulting in (work planning result). To shorten the work time while satisfying the time constraints of the order, please list the problematic areas." The loss function generation unit 133 systematically generates the above text loss calculation system prompt by substituting values into each element of a predefined format.
[0151] The text loss calculation unit 135 infers text loss using LLM based on the text loss calculation system prompt. Here, text loss is represented as a string listing the problems in the work plan system prompt. The inference settings for this LLM are, for example, as follows: • Role: Text loss calculation system prompt • Instruction: Work plan system prompt as initial variable (updated work plan system prompt from the second week onwards) • Response: 1. Imbalance in agent load balancing: While Agent 1 was able to complete task order 1 with ample margin, … 2. Subtask order and timing: The current task order may not be efficient, …
[0152] The gradient calculation unit 136 infers the text gradient using LLM based on the text loss. Here, the text gradient is represented as a string of characters indicating points for improving the work planning system prompt. The inference settings for this LLM are, for example, as follows: • Role: "Part of an optimization system to improve the given text (variable). Please provide feedback on how to improve the variable." • Instruction: Text loss • Response: "In the current work planning system prompt, ..."
[0153] The variable update unit 137 updates the work planning system prompt using LLM based on the text gradient. The inference settings for this LLM are as follows, for example: • Role: "Part of an optimization system that improves the given text (variable). Modify the work planning system prompt based on the text gradient." • Instruction: Text gradient • Response: Updated work planning system prompt
[0154] The variable update unit 137 inputs the updated work plan system prompt to the work plan unit 132. The work plan unit 132 then calculates the work plan result using LLM based on the updated work plan system prompt.
[0155] In the optimization phase, the prompt update device 100 repeatedly performs the process of calculating a work plan result from the work plan problem and the process of updating the work plan system prompt until a predetermined termination condition is met. After the predetermined termination condition is met, the output unit 138 outputs the work plan result. At this time, the output unit 138 may output and store the work plan result in a storage unit (not shown), or it may output and display it on a display device such as a display device (not shown). The output unit 138 may also output the work plan result to a robot that will perform the work (for example, a robot or a device that controls the robot). As a result, the robot (i.e., Agent 1 and Agent 2) can operate based on the work plan result.
[0156] As described above, the prompt update device 100 of this embodiment can iteratively and efficiently improve the accuracy of the work plan. Therefore, in the above embodiment 2, as a result of improving the accuracy of the work plan, it becomes possible to operate the robots (i.e., Agent 1 and Agent 2) based on a suitable work plan result.
[0157] Furthermore, the prompt update device 100 of this embodiment can calculate a general-purpose work planning system prompt during the learning phase, thereby improving the accuracy of the work plan. By using this general-purpose work planning system prompt as an initial variable in the optimization phase, the prompt update device 100 can be applied to new work planning problems (tasks) with a small amount of data and a short learning period. Therefore, the prompt update device 100 can speed up the processing of prompt updates and work plan calculations in the optimization phase.
[0158] Each component in the above embodiments and examples can be configured with one piece of hardware, but can also be configured with one piece of software. Furthermore, each component can be configured with multiple pieces of hardware, or with multiple pieces of software. In addition, some of each component can be configured with hardware, and other parts with software.
[0159] Each function (each process) in the above embodiment can be implemented by a computer having a processor, memory, etc. For example, a program for implementing the method (process) in the above embodiment may be stored in a storage device (storage medium), and each function may be implemented by executing the program stored in the storage device with a processor.
[0160] Figure 10 is a block diagram illustrating the hardware configuration of computer 1000. Computer 1000 is any computer. For example, computer 1000 is a stationary computer such as a personal computer or a server machine. Alternatively, computer 1000 is a portable computer such as a smartphone or a tablet terminal. Computer 1000 may be a dedicated computer designed to implement the prompt update device 100, or it may be a general-purpose computer.
[0161] The computer 1000 includes a processor 1001, a storage device 1002, memory 1003, a bus 1004, an input / output interface 1005, and a network interface 1006.
[0162] The processor 1001 is a variety of processing unit, such as a CPU (Central Processing Unit), GPU (Graphics Processing Unit), FPGA (Field-Programmable Gate Array), or DSP (Digital Signal Processor).
[0163] The storage device 1002 is, for example, a non-transitory computer-readable medium. Non-transitory computer-readable media include various types of tangible storage media. Specific examples of non-transitory computer-readable media include semiconductor memory (e.g., mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM).
[0164] Memory 1003 is a main memory system implemented using RAM (Random Access Memory) or the like. Memory 1003 temporarily stores data when the processor 1001 executes processing.
[0165] Bus 1004 is a data transmission path for the processor 1001, memory 1003, storage device 1002, input / output interface 1005, and network interface 1006 to send and receive data to and from each other. However, the method of connecting the processor 1001 and the others to each other is not limited to bus connection.
[0166] The input / output interface 1005 is an interface for connecting the computer 1000 with input / output devices. For example, input devices such as a keyboard and output devices such as a display device are connected to the input / output interface 1005.
[0167] The network interface 1006 is an interface for connecting the computer 1000 to a network. This network may be a LAN (Local Area Network) or a WAN (Wide Area Network).
[0168] The storage device 1002 stores a program that implements each of the functional components in the above-described embodiments and examples. The processor 1001 reads this program into the memory 1003 and executes it to implement each of the functional components in the above-described embodiments and examples.
[0169] The prompt update device 100 may be implemented on one computer 1000 or on multiple computers 1000. In the latter case, the configuration of each computer 1000 does not need to be the same and can be different.
[0170] Each functional component in the above embodiments and examples may be implemented by a combination of the hardware and software described above, or by hardware (for example, a hardwired electronic circuit).
[0171] Next, an overview of the present disclosure will be described. Figure 11 is a block diagram illustrating the main components of a prompt update device. The prompt update device 10 shown in Figure 11 (corresponding to, for example, a prompt update device 100) includes a specialization loss calculation means 11 (implemented in an embodiment by a task-specific text loss calculation unit 140) that infers a text loss specific to a problem about a work plan based on a second prompt that instructs a language model to acquire a text loss representing a problem about a first prompt that instructs a language model to acquire a text loss representing a problem about a work plan based on a first prompt that instructs a language model to acquire a text loss representing a problem about a work plan; an integration means 12 (implemented in an embodiment by a loss integration unit 160) that integrates a plurality of text losses each specialized for problems about a plurality of work plans; and a meta-update means 13 (implemented in an embodiment by a meta-system prompt update unit 170) that updates the first prompt based on the integrated text loss. With this configuration, the prompt update device 10 can efficiently improve the accuracy of work plans.
[0172] The meta-update means 13 includes a meta-gradient calculation means (implemented by a meta-gradient calculation unit 171 in the embodiment) that infers the parameters of the first prompt based on the integrated text loss, and a meta-variable update means (implemented by a meta-variable update unit 172 in the embodiment) that updates the first prompt based on the meta-gradient, which is the inference result of the meta-gradient calculation means.
[0173] The prompt update device 10 is configured to repeat the processing of the specialized loss calculation means 11, the integration means 12, and the meta update means 13 until a predetermined termination condition is met.
[0174] The prompt update device 10 includes a prompt update means (implemented in this embodiment by a prompt update unit 130) that acquires information representing a work plan for problem information representing a problem with the work plan and updates the first prompt. The prompt update means includes a work plan means (implemented in this embodiment by a work plan unit 132) that acquires information representing a work plan for problem information representing a problem with the work plan using a language model that operates based on the first prompt, a generation means (implemented in this embodiment by a loss function generation unit 133) that generates a second prompt that instructs the language model to acquire text loss representing a problem with the first prompt, and an update means (implemented in this embodiment by a system prompt update unit 134) that updates the first prompt based on the output from the language model for the second prompt generated by the generation means.
[0175] The update means includes a loss calculation means (implemented by a text loss calculation unit 135 in the embodiment) that infers text loss based on a second prompt generated by a note generation means, a gradient calculation means (implemented by a gradient calculation unit 136 in the embodiment) that infers the parameters of the first prompt based on the text loss which is the inference result of the loss calculation means, and a variable update means (implemented by a variable update unit 137 in the embodiment) that updates the first prompt based on the gradient which is the inference result of the gradient calculation means.
[0176] Although the present disclosure has been described above with reference to embodiments, the present disclosure is not limited to the embodiments described above. Various modifications to the structure and details of the present disclosure are possible, as can be understood by those skilled in the art within the scope of the present disclosure. Each embodiment can be combined with other embodiments as appropriate.
[0177] Each drawing is merely illustrative to illustrate one or more embodiments. Each drawing may be associated with one or more other embodiments, rather than being associated with only one specific embodiment. As those skilled in the art will understand, various features or steps described with reference to any one drawing can be combined with features or steps shown in one or more other drawings, for example, to create embodiments not explicitly shown or described. Not all features or steps shown in any one drawing to illustrate an exemplary embodiment are necessarily required, and some features or steps may be omitted. The order of steps described in any of the drawings may be changed as appropriate.
[0178] Some or all of the above embodiments may also be described as follows, but are not limited to the following:
[0179] (Note 1) A prompt update device comprising: a specialization loss calculation means that infers a text loss specific to a problem concerning a work plan based on a second prompt that instructs a language model to acquire a text loss representing a problem concerning a problem concerning a work plan, based on a first prompt that instructs a language model to acquire information representing a work plan for problem information representing a problem concerning a work plan; an integration means that integrates a plurality of text losses each specialized for problems concerning a plurality of work plans; and a meta-update means that updates the first prompt based on the integrated text loss.
[0180] (Note 2) The prompt update device according to Note 1, wherein the meta update means includes a meta gradient calculation means for inferring the parameters of the first prompt based on the integrated text loss, and a meta variable update means for updating the first prompt based on the meta gradient which is the inference result of the meta gradient calculation means.
[0181] (Note 3) The prompt update device according to Note 1 or Note 2, which repeats the processing of the specialized loss calculation means, the integration means, and the meta update means until a predetermined termination condition is met.
[0182] (Note 4) The prompt update device according to any one of Notes 1 to 3, further comprising a prompt update means that acquires information representing a work plan for problem information representing a problem with respect to a work plan, and updates the first prompt, wherein the prompt update means includes: a work plan means that acquires information representing a work plan for problem information representing a problem with respect to a work plan using a language model that operates on the first prompt; a generation means that generates a second prompt that instructs the language model to acquire text loss representing a problem with respect to the first prompt; and an update means that updates the first prompt based on the output from the language model for the second prompt generated by the generation means.
[0183] (Note 5) The prompt update device according to Note 4, wherein the update means includes a loss calculation means for inferring the text loss based on the second prompt generated by the generation means; a gradient calculation means for inferring the parameters of the first prompt based on the text loss which is the inference result of the loss calculation means; and a variable update means for updating the first prompt based on the gradient which is the inference result of the gradient calculation means.
[0184] (Note 6) The prompt update device according to any one of Notes 1 to 5, wherein the second prompt includes an element indicating problem information representing a problem with the work plan, an element indicating information representing the acquired work plan, an element indicating the degree to which the work time and constraints are satisfied, and an element instructing the device to list what problems exist with the information representing the acquired work plan in order to minimize the overall work time while satisfying the constraints.
[0185] (Note 7) The prompt update device according to Note 6, wherein the second prompt includes an element indicating how the problem about the work plan was broken down when acquiring information representing the work plan.
[0186] (Note 8) The integrating means is a prompt update device according to any one of Notes 1 to 7, which integrates a plurality of text losses by eliminating overlapping elements.
[0187] (Note 9) A prompt updating method characterized in that a computer infers a text loss specific to a problem about a work plan based on a second prompt instructing a language model to obtain a text loss representing a problem about a first prompt instructing a language model to obtain information representing a work plan for problem information representing a problem about a work plan, integrates a plurality of text losses each specific to a problem about a plurality of work plans, and updates the first prompt based on the integrated text loss.
[0188] (Note 10) A prompt update program that causes a computer to perform a specialized loss calculation process that infers a text loss specific to a problem about a work plan, based on a second prompt that instructs a language model to obtain a text loss representing a problem about a problem about a work plan, based on a first prompt that instructs a language model to obtain a text loss representing a problem about a problem about a work plan; an integration process that integrates a plurality of text losses each specialized for a problem about a plurality of work plans; and a meta-update process that updates the first prompt based on the integrated text loss.
[0189] Some or all of the elements (e.g., configuration and function) described in Appendices 2 to 8 that are dependent on Appendice 1 may also be dependent on Appendices 9 and 10 in the same way as those described in Appendices 2 to 8. Some or all of the elements described in any appendice may be applied to various hardware, software, recording means, systems, and methods for recording software.
[0190] 10, 100 Prompt update device 11 Specialized loss calculation means 12 Integration means 13 Meta update means 110, 131 Input unit 120 Task selection unit 130 Work planning unit including prompt update 132 Work planning unit 133 Loss function generation unit 134 System prompt update unit 135 Text loss calculation unit 136 Gradient calculation unit 137 Variable update unit 138, 180 Output unit 140 Task-specific text loss calculation unit 150 Task-specific loss database 160 Loss integration unit 170 Meta system prompt update unit 171 Meta gradient calculation unit 172 Meta variable update unit 1000 Computer 1001 Processor 1002 Storage device 1003 Memory 1004 Bus 1005 Input / output interface 1006 Network interface
Claims
1. A prompt update device comprising: a specialization loss calculation means that infers a text loss specific to a problem concerning a work plan based on a second prompt that instructs a language model to obtain a text loss representing a problem concerning a problem concerning a work plan, based on a first prompt that instructs a language model to obtain a text loss representing a problem concerning a problem concerning a work plan; an integration means that integrates a plurality of text losses each specialized for problems concerning a plurality of work plans; and a meta-update means that updates the first prompt based on the integrated text loss.
2. The prompt update device according to claim 1, wherein the meta-update means includes a meta-gradient calculation means for inferring the parameters of the first prompt based on the integrated text loss, and a meta-variable update means for updating the first prompt based on the meta-gradient which is the inference result of the meta-gradient calculation means.
3. The prompt update device according to claim 1 or 2, which repeats the processing of the specialized loss calculation means, the integration means, and the meta update means until a predetermined termination condition is met.
4. The prompt update device according to claim 1 or 2, further comprising a work planning means that acquires information representing a work plan for problem information representing a problem with respect to a work plan, and updates the first prompt, wherein the work planning means that includes the prompt update comprises: a work planning means that acquires information representing a work plan for problem information representing a problem with respect to a work plan using a language model that operates on the first prompt; a generation means that generates a second prompt that instructs the language model to acquire text loss representing a problem with respect to the first prompt; and an update means that updates the first prompt based on the output from the language model for the second prompt generated by the generation means.
5. The prompt update device according to claim 4, wherein the update means includes a loss calculation means for inferring the text loss based on the second prompt generated by the generation means; a gradient calculation means for inferring the parameters of the first prompt based on the text loss which is the inference result of the loss calculation means; and a variable update means for updating the first prompt based on the gradient which is the inference result of the gradient calculation means.
6. The prompt update device according to claim 1 or 2, wherein the second prompt includes an element indicating problem information representing a problem with the work plan, an element indicating information representing the acquired work plan, an element indicating the degree to which the work time and constraints are satisfied, and an element indicating what problems exist with the information representing the acquired work plan in order to minimize the overall work time while satisfying the constraints.
7. The prompt updating device according to claim 6, wherein the second prompt includes an element indicating how the problem about the work plan was broken down when acquiring information representing the work plan.
8. The prompt update device according to claim 1 or 2, wherein the integration means integrates a plurality of text losses by eliminating overlapping elements.
9. A prompt updating method characterized in that a computer infers a text loss specific to a problem about a work plan based on a second prompt instructing a language model to obtain a text loss representing a problem about a first prompt instructing a language model to obtain information representing a work plan for problem information representing a problem about a work plan, integrates a plurality of text losses each specific to a problem about a plurality of work plans, and updates the first prompt based on the integrated text loss.
10. A prompt update program that causes a computer to perform a specialized loss calculation process that infers a text loss specific to a problem about a work plan, based on a second prompt that instructs a language model to obtain a text loss representing a problem about a problem about a work plan, based on a first prompt that instructs a language model to obtain a text loss representing a problem about a problem about a work plan; an integration process that integrates a plurality of text losses each specialized for problems about a plurality of work plans; and a meta-update process that updates the first prompt based on the integrated text loss.