Inference device, inference program, inference method, generation method, and generation device

The reasoning device optimizes pre-prompt selection and compression for question types, addressing accuracy and computation issues in large-scale language models, thereby improving answer generation efficiency and accuracy.

JP2026013293APending Publication Date: 2026-01-28OMRON CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024113641
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2026-01-28

Smart Images

  • Figure 2026013293000001_ABST
    Figure 2026013293000001_ABST
Patent Text Reader

Abstract

To provide a technique for improving generation accuracy of an answer in a generation model.SOLUTION: An inference apparatus according to an aspect of the present invention receives a question, selects a preprompt corresponding to a type of the received question from a preprompt set, acquires an answer to the question from a generation model by giving the selected preprompt and the question to the generation model, and outputs information regarding the acquired answer.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to an inference device, an inference program, an inference method, a generation method, and a generation device. [Background technology]

[0002] In recent years, the development of technologies that utilize generative models such as large-scale language models (LLM) has progressed. For example, Non-Patent Document 1 proposes a system in which a question about an image is given to a large-scale language model, and program code is generated by the large-scale language model to execute image processing that infers an answer to the question. With this system, the inference process can be understood from the obtained program code. Therefore, the transparency of the inference process of the large-scale language model can be improved. [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] “ViperGPT: Visual Inference via Python Execution for Reasoning”, [online], [Retrieved June 28, 2024], Internet<URL:https: / / arxiv.org / abs / 2303.08128> [Non-patent document 2] Tom B. Brown, et al. “Language Models are Few-Shot Learners”, [online], [Retrieved June 28, 2024], Internet<URL:https: / / arxiv.org / abs / 2005.14165> [Non-patent document 3] “Claude”, [online], [Retrieved June 28, 2024], Internet<URL:https: / / claude.ai> [Non-patent document 4] Zhengyuan Yang, et al. "The Dawn of LMMs: Preliminary Explorations with GPT-4V(ision)", [online], [Reiwa June 28, 2016], インターネット<URL:https: / / arxiv.org / abs / 2309.17421>

Non-licensed Document 5

Non-licensed Document 6

Non-licensed Document 7

Non-licensed literature 9

[0004] The inventors of the present invention have found that the above-mentioned conventional methods have the following problems. That is, in order to improve the accuracy of generating an answer, a pre-prompt is sometimes given to the generation model along with the question. The pre-prompt is auxiliary information used to generate an answer. For example, in the above-mentioned Non-Patent Document 1, the API Specification is added to the large-scale language model as a pre-prompt. If the pre-prompt is configured to respond to all questions, the amount of data in the pre-prompt increases, and depending on the question, unnecessary parts may be generated in the pre-prompt. These unnecessary parts may act as noise when generating an answer to the question, which may result in a decrease in the accuracy of the generated answer.

[0005] In one aspect, the present invention has been made in view of the above circumstances, and an object of the present invention is to provide a technique for improving the accuracy of generating answers in a generative model. [Means for solving the problem]

[0006] In order to solve the above-mentioned problems, the present invention employs the following configurations. Note that the following configurations of the invention can be combined as appropriate.

[0007] A reasoning device according to one aspect of the present invention includes a control unit configured to receive a question, select a pre-prompt from a pre-prompt set that corresponds to the type of the received question, provide the selected pre-prompt and the question to a generative model to obtain an answer to the question from the generative model, and output information related to the obtained answer.

[0008] In this configuration, a set of pre-prompts is prepared, and a pre-prompt corresponding to the question type is used to generate an answer. Each pre-prompt only needs to be configured for the corresponding type (i.e., it does not need to include information about other types). This allows the range of information that configures each pre-prompt to be narrowed. For example, the pre-prompt may be optimized for each type. This reduces the amount of pre-prompt information that may act as noise when generating an answer. Therefore, this configuration is expected to improve the accuracy of answer generation in the generative model.

[0009] In the reasoning device according to the above aspect, the pre-prompt set may be configured to include one or more compressed pre-prompts for each question type. The amount of computation required for the generative model may depend on the length of the prompt. With this configuration, the pre-prompts used are compressed, thereby reducing the amount of computation required for the generative model when generating an answer.

[0010] In the inference device according to the above aspect, the control unit may be further configured to provide a list of the received questions and their types to a large-scale language model, and obtain a classification result of the question type from the large-scale language model. Selecting the pre-prompt may be configured by selecting a pre-prompt according to the classification result of the question type. With this configuration, by using a large-scale language model, it is not necessary to prepare a dedicated computational model (classifier) ​​for classifying question types. Therefore, a reduction in implementation costs can be expected.

[0011] In the reasoning device according to the above aspect, the large-scale language model may be configured by a large-scale visual language model. The step of accepting the question may include acquiring target images related to the question. The step of providing the question and the list of types to the large-scale language model may include providing the question, the acquired target images, and the list of types to the large-scale visual language model. The method may be configured to provide a word model based on the image. By further considering the image when classifying the question type, this configuration is expected to improve the accuracy of question type classification. Furthermore, as the accuracy of question type classification improves, the accuracy of answer generation can be expected to improve by using an appropriate pre-prompt.

[0012] In the inference device according to the above aspect, accepting the question may include acquiring accompanying information related to the question. The control unit may be further configured to classify the question type according to the acquired accompanying information. Selecting the pre-prompt may be configured by selecting a pre-prompt according to the result of classifying the question type. As long as the question type can be classified, the type of accompanying information need not be particularly limited and may be selected arbitrarily. With this configuration, the information (accompanying information) used to classify the question type can be arbitrarily selected, which is expected to improve the scalability (versatility) of question type classification. In other words, accompanying information appropriate for question type classification can be selected for each implementation situation.

[0013] In the reasoning device according to the above aspect, accepting the question may include acquiring context information for the question. Providing the selected pre-prompt and the question to a generative model may be configured by providing the selected pre-prompt, the acquired context information, and the question to the generative model. With this configuration, by further taking context information into consideration when generating an answer to a question, it is possible to generate an answer that is appropriate for the context. This can be expected to improve the accuracy of answer generation.

[0014] In the inference device according to the above aspect, the generative model may be configured as a large-scale language model. With this configuration, there is no need to prepare a generative model dedicated to generating answers to questions. This can be expected to reduce implementation costs.

[0015] In the inference device according to the above aspect, the question may be configured to indicate an inference task, and the answer may be configured as program code for performing the inference task. With this configuration, when generating program code as an answer to a question, improvement in the accuracy of answer generation can be expected.

[0016] In the inference device according to the above aspect, accepting the question may include acquiring a target image related to the question. The inference task may include inferring features appearing in the target image. This configuration can be expected to improve the accuracy of generating answers when generating program code for executing inference processing on images.

[0017] In the inference device according to the above aspect, the inference task may include inferring a motion sequence of a robotic device. The program code may include control code for causing the robotic device to execute the actions of the inferred motion sequence. This configuration is expected to improve the accuracy of generating answers when generating control code for controlling the robotic device.

[0018] In the inference device according to the above aspect, the question may be configured to infer a motion sequence of a robotic device. The answer may be configured as a description for planning that generates a behavior plan for the motion sequence to be inferred. This configuration can be expected to improve the accuracy of answer generation when generating a description for planning of a robotic device.

[0019] In the inference device according to the above aspect, the question is to provide a measure for dealing with a target error of the device. The answer may be configured to indicate that a measure to deal with the target error is to be inferred. The answer may be configured as a result of inferring a measure to deal with the target error. With this configuration, improvement in the accuracy of generating an answer can be expected when generating a measure to deal with an error in the device.

[0020] The present invention is not limited to the inference phase. One aspect of the present invention may be a method for generating a pre-prompt set that can be used in the inference device according to at least one of the above aspects.

[0021] For example, a generation method according to one aspect of the present invention may be an information processing method in which a computer receives a specification of a question type, receives a specification of a pre-prompt, compresses the specified pre-prompt according to the specified type, generates a pre-prompt set including compressed pre-prompts for each type by specifying the type, specifying the pre-prompt, and compressing the pre-prompt for each type, and saves the generated pre-prompt set. With this configuration, by using a pre-prompt according to the question type to generate an answer, it is possible to expect an improvement in the accuracy of answer generation in the generative model. Furthermore, by compressing the pre-prompts used, the amount of calculation required by the generative model when generating an answer can be reduced.

[0022] In the generation method according to the above aspect, compressing the pre-prompt may be configured by providing the specified type and the specified pre-prompt to a large-scale language model and obtaining the compressed pre-prompt from the large-scale language model. By using the large-scale language model, it is not necessary to prepare a dedicated computation model for compressing pre-prompts. Therefore, a reduction in implementation costs can be expected.

[0023] In the generation method according to the above aspect, when an unknown type of the question is given, the computer may further execute the steps of: accepting a pre-prompt corresponding to the unknown type; compressing the specified pre-prompt according to the unknown type; and updating the pre-prompt set by adding the compressed pre-prompt of the unknown type to the pre-prompt set. This configuration makes it possible to expand the range of question types for which answers can be generated.

[0024] The present invention may not be limited to the inference device (information processing device) described above. As another aspect of the inference device according to each of the above aspects, one aspect of the present invention may be an information processing method (inference method) that realizes all or part of the above configurations, or a program, or a storage medium readable by a machine such as a computer on which such a program is stored. Furthermore, the present invention may not be limited to the generation method (information processing method) described above. As another aspect of the generation method according to each of the above aspects, one aspect of the present invention may be an information processing device (generation device) that realizes all or part of the above configurations, or a program, or a storage medium readable by a machine such as a computer on which such a program is stored. A storage medium readable by a machine such as a computer may be a non-transitory medium that stores information such as a program by electrical, magnetic, optical, mechanical, or chemical action. Non-transitory storage media may include storage media (CDs, DVDs, semiconductor memories, etc.), auxiliary storage devices of computers, external storage devices connected to computers, etc.

[0025] For example, an inference program according to one aspect of the present invention may include a program for causing a computer to receive a question, select a pre-prompt from a pre-prompt set according to the type of the received question, and provide the selected pre-prompt and the question to a generative model. The program may be configured to execute the steps of: obtaining an answer to the question from the generative model; and outputting information related to the obtained answer.

[0026] Furthermore, for example, an inference method according to one aspect of the present invention may be an information processing method in which a computer receives a question, selects a pre-prompt from a pre-prompt set that corresponds to the type of the received question, provides the selected pre-prompt and the question to a generative model, thereby obtaining an answer to the question from the generative model, and outputs information related to the obtained answer.

[0027] Furthermore, for example, a generation device according to one aspect of the present invention may include a control unit configured to receive a specification of a question type, receive a specification of a pre-prompt, compress the specified pre-prompt according to the specified type, generate a pre-prompt set including compressed pre-prompts for each type by specifying the type, specifying the pre-prompt, and compressing the pre-prompt for each type, and save the generated pre-prompt set. [Effects of the Invention]

[0028] According to the present invention, it is possible to improve the accuracy of generating answers in a generative model. [Brief explanation of the drawings]

[0029] [Figure 1] FIG. 1 shows a schematic diagram of an example of a situation in which the present invention is applied. [Figure 2] FIG. 2 shows a schematic diagram of an example of a system configuration. [Figure 3] FIG. 3 is a diagram showing an example of a method for compressing a pre-prompt. [Figure 4] FIG. 4 shows a schematic diagram of an example of a method for classifying question types. [Figure 5] Figure 5 shows a schematic example of the use of a large-scale visual language model for question type classification. [Figure 6]FIG. 6 shows a schematic diagram of another example of a method for classifying question types. [Figure 7] FIG. 7 shows a schematic example of a method for updating the preprompt set when a question of unknown type is given. [Figure 8] FIG. 8 illustrates an example of a generative model. [Figure 9] FIG. 9 shows a schematic example of an input given to a generative model. [Figure 10] FIG. 10 shows a schematic diagram of a first example to which the present invention is applied. [Figure 11] FIG. 11 is a diagram showing an example of a first case to which the present invention is applied. [Figure 12] FIG. 12 is a diagram showing an example of a first-second example to which the present invention is applied. [Figure 13] FIG. 13 is a diagram showing an example of a second case to which the present invention is applied. [Figure 14] FIG. 14 is a diagram showing an example of a third case to which the present invention is applied. [Figure 15] FIG. 15 shows a schematic diagram of an example of the hardware configuration of an inference device. [Figure 16] FIG. 16 is a diagram illustrating an example of a hardware configuration of a generating device. [Figure 17] FIG. 17 shows a schematic diagram of an example of the software configuration of the inference device. [Figure 18] FIG. 18 illustrates an example of the software configuration of the generating device. [Figure 19] FIG. 19 is a flowchart illustrating an example of a processing procedure of the generating device. [Figure 20] FIG. 20 is a flowchart showing an example of a processing procedure of the inference device. [Figure 21] FIG. 21 shows the process in the generation phase of the embodiment. [Figure 22] FIG. 22 shows the process in the inference phase of the embodiment. [Figure 23] Figure 23 shows a portion of the API definition. [Figure 24]FIG. 24 shows an example of a snippet. [Figure 25] FIG. 25 shows the reply command. [Figure 26] FIG. 26 shows the API compression command (first compression command). [Figure 27] FIG. 27 shows a snippet compression command (second compression command). [Figure 28] Figure 28 shows the format of a type definition. [Figure 29] Figure 29 shows a portion of the condensed API definition. [Figure 30] Figure 30 shows the format of the type list. [Figure 31] FIG. 31 shows the evaluation results of the example and the comparative example based on the first index. [Figure 32] FIG. 32 shows the evaluation results of the example and the comparative example based on the second index. [Figure 33] FIG. 33 shows a confusion matrix regarding the accuracy rate of type classification in an example. [Figure 34] FIG. 34 shows the evaluation results of the Examples, Reference Examples, and Comparative Examples based on the third index. DETAILED DESCRIPTION OF THE INVENTION

[0030] An embodiment according to one aspect of the present invention will be described below with reference to the drawings. However, the embodiment described below is merely an example of the present invention in all respects. Various improvements or modifications may be made without departing from the scope of the present invention. In implementing the present invention, a specific configuration according to the embodiment may be appropriately adopted. Note that, although data appearing in this embodiment is described in natural language, more specifically, it is specified using pseudo-language, commands, parameters, machine language, etc. that can be recognized by a computer.

[0031] §1 Application Examples 1 is a schematic diagram illustrating an example of a scenario in which the present invention is applied. The inference device 1 according to this embodiment is one or more computers configured to obtain an answer 35 to a question 30 using a generative model 60.

[0032] In this embodiment, the reasoning device 1 receives a question 30. The reasoning device 1 selects a preprompt 55 from the preprompt set 50 that corresponds to the type of the received question 30. The preprompt set 50 is configured to include one or more preprompts 500 for each question type. Of the multiple preprompts 500 that make up the preprompt set 50, one or more preprompts 500 associated with the type of the received question 30 are extracted as preprompts 55. The reasoning device 1 provides the selected preprompt 55 and the question 30 to the generative model 60, thereby obtaining an answer 35 to the question 30 from the generative model 60. The reasoning device 1 outputs information related to the obtained answer 35.

[0033] In this embodiment, a preprompt set 50 is prepared, and a preprompt 55 corresponding to the type of question 30 is used to generate the answer 35. Each preprompt 500 only needs to be configured for the corresponding type. This narrows the range of information that makes up each preprompt 500. This reduces the amount of noise that may be present in the selected preprompt 55 when generating the answer 35. Therefore, this embodiment is expected to improve the accuracy of generating the answer 35 in the generative model 60.

[0034] [question] A question (Question 30) may include any form of inquiry that requires the generation of an answer (Answer 35). A question may be configured to directly or indirectly indicate the content of the question. Indirectly indicating the content of a question means that the data given as the question does not directly indicate the content of the question, such as when the question is a request to infer features contained in the data that constitute the question.

[0035] As long as a query can be constructed, the data format of the question is not particularly limited and may be selected appropriately depending on the embodiment. In other words, the question may be constructed from any data that can suggest a query. The relationship between the data that constructs the question and the query content may be determined appropriately depending on the embodiment.

[0036] In a typical example, a question may be composed of a text expression, such as "How many slices of carrot are there?" The tokens may be obtained by converting text data using a tokenizer.

[0037] In another example, the question may be composed of data other than a text expression, such as sensing data or a code signal (e.g., an error code). For example, when sensing data is used, the question may be composed of an inquiry regarding a feature appearing in the sensing data. As an example, the inquiry regarding the feature may be a request for inference regarding the feature. The inference may be at least one of discrimination and regression. The inference may include prediction. As a specific example, when the feature of an apparatus error can be reflected in the sensing data, the question may include a request for detection of the occurrence of the error, a request for countermeasures for the detected error, etc. Furthermore, when a code signal is used, the question may be composed of an inquiry regarding information indicated by the code signal. As an example, when the code signal is an error code indicating a specific error, the question may be a request for countermeasures for the error indicated by the code signal.

[0038] The format in which the question 30 is provided to the generative model 60 may be determined appropriately depending on the embodiment. In one example, the question 30 may be provided to the generative model 60 as is. In another example, preprocessing may be applied to the question 30, and the preprocessed question 30 may be provided to the generative model 60. The preprocessing may include any processing such as data format conversion, inference, etc.

[0039] (How to get questions) The question (question 30) may be provided in any manner. In a typical example, the question 30 may be provided by user input. In another example, when the content of the inquiry is predetermined, such as the Tower of Hanoi, the question may be provided as a fixed value (a fixed sentence, etc.). In this case, the question (fixed value) may be provided by a template or as a default value within the program.

[0040] In yet another example, a question may be selected from a plurality of candidate questions. The method of selecting a question is not particularly limited and may be determined appropriately depending on the embodiment. For example, a context in which a question occurs may be identified, and a question may be selected based on the context identification result. Each candidate question may be provided in advance based on the corresponding context. Each candidate question may be stored within the inference device 1, provided by a user input, or provided from an external computer. The context relates to conditions such as the situation in which the question occurs, the domain, etc. The context may be identified based on any information, such as observation by a sensor, input by a user, or information provided in advance. The information used to identify the context may be selected appropriately depending on the embodiment. For example, the context information may include at least one of observation information and domain information indicating the situation of the target. The observation information may be temporary information directly observed from the target. The domain information may be secondary information related to the environment to which the target belongs.

[0041] For example, assuming that the object of observation is a robotic device and a question (question 30) about the robotic device is to be acquired, one or more sensors may be placed outside or inside the robotic device, and the state of the robotic device may be observed by the one or more sensors. At least one of the sensing data obtained by the one or more sensors and the analysis results of the sensing data may be acquired as an example of observation information. The analysis results may be the position, posture, operating status, etc. of the robotic device. Furthermore, environmental information about the environment of the robotic device may be acquired as an example of domain information. The environmental information may include the location of the robotic device, attribute information of objects present around the robotic device, etc. Attribute information may include, for example, the name and appearance of the object. The domain information may be static information such as related characteristics (e.g., color, shape, size, etc.). The domain information may be provided in any manner, such as by user input or predetermined.

[0042] A context may be identified from at least a portion of this information, and a question (question 30) may be selected from a plurality of question candidates depending on the context identification result. A context category may be defined as appropriate depending on the embodiment. The content of each question candidate may be defined as appropriate depending on the corresponding context category. For example, in the above scenario, a context category may be defined for each error, and each question candidate may be configured to indicate that a measure to deal with the corresponding error should be inferred (i.e., to request an answer regarding a measure to deal with the error). Accordingly, when the occurrence of a target error in the robotic device is identified from observation information, a question candidate indicating that a measure to deal with the target error should be inferred may be selected as question 30.

[0043] [answer] The answer (Answer 35) may be configured as a response to the question (Question 30) with information about the inference result. As long as it constitutes a response, the format of the answer is not particularly limited and may be selected appropriately depending on the embodiment. In one example, the answer may be configured to directly or indirectly indicate the inference result for the question. An indirect answer may be configured with any information from which the inference result can be derived.

[0044] For example, if the question 30 is configured to request that an action sequence for the robotic device be inferred, the answer 35 may be configured to indicate the action sequence inferred in accordance with the given input information. Also, for example, if the question 30 is configured to request that a measure for dealing with the target error be inferred, the answer 35 may be configured to indicate the result of inferring the measure for dealing with the target error (the inferred measure). These are examples of configurations that directly indicate the inference result.

[0045] On the other hand, for example, if the question 30 is configured to indicate an inference task, the answer 35 may be configured to indicate program code for performing the inference task (i.e., deriving an inference result). Also, for example, if the question 30 is configured to request inference of an action sequence of a robotic device, the answer 35 may be configured to indicate a description (problem description, domain description, etc.) for generating an action sequence of the robotic device. These are examples of configurations that indirectly indicate an inference result.

[0046] The generative model 60 may be configured to generate the answer 35 in any format. In one example, the generative model 60 may be configured to generate the answer 35 in at least one of the formats described above. The generative model 60 may be configured to generate the answer 35 only in a specific format, or may be configured to be able to control the format of the answer 35 to be generated. For example, the input information provided to the generative model 60 may include, in addition to the question 30, an instruction (answer command) specifying the format of the answer 35. The generative model 60 may be configured to have the ability to generate the answer 35 in a format according to this instruction (for example, in cases where a large-scale language model, which will be described later, is employed). This makes it possible to control the format of the answer 35 to be generated.

[0047] [Pre-prompt] The pre-prompt (pre-prompt 500, pre-prompt 55) may include any auxiliary information that can be used in generating an answer (answer 35) in the generative model (generative model 60). The auxiliary information may include, for example, a sample answer, reference information, etc. The sample answer may include, for example, a code snippet, a Q&A, an FAQ, etc. The reference information may be any information that can be referenced when generating an answer (for example, contact information, a manual, etc.). The configuration of the pre-prompt may be determined appropriately depending on the embodiment.

[0048] As with the question (question 30), the data format of the pre-prompt is not particularly limited and may be selected appropriately depending on the embodiment. The pre-prompt may be configured in a text representation, or in a data format other than a text representation. The format in which the pre-prompt 55 is provided to the generative model 60 may be determined appropriately depending on the embodiment. In one example, the pre-prompt 55 may be provided to the generative model 60 as is. In another example, pre-processing may be applied to the pre-prompt 55, and the pre-processed pre-prompt 55 may be provided to the generative model 60. The pre-processing may include any processing such as data format conversion, inference, etc.

[0049] In one example, the pre-prompt set 50 may be configured to include one or more compressed pre-prompts 500 for each type of question 30. That is, each pre-prompt 500 may be pre-compressed for each type. The selected pre-prompt 55 may be configured from one or more compressed pre-prompts 500 associated with the type of question 30. The amount of computation performed by the generative model 60 may depend on the amount of data in the input (prompt). According to one example of this embodiment, the amount of computation performed by the generative model 60 when generating the answer 35 can be reduced by using compressed pre-prompts 55.

[0050] The number of pre-prompts may be determined arbitrarily for each type. If a pre-prompt is made up of multiple files, the pre-prompts may be counted as one or multiple files. The method for counting pre-prompts may be selected arbitrarily.

[0051] Furthermore, one type of pre-prompt 500 may be configured to be completely different from other types of pre-prompts 500, or may be configured to partially include common information. The common information may include any information commonly used when generating answers 35 to questions 30 of each type. The common information may include instructions commonly given to generative models 60 of each type, such as instructions specifying the format of the answers 35.

[0052] The common information included in each pre-prompt 500 may be at least partially compressed or may not be compressed. For example, the common information may include a first portion commonly used when generating answers 35 to each type of question 30, and a second portion indicating instructions to be given to the generative model 60. In this case, the first portion may be pre-compressed, and the second portion may not be pre-compressed. However, the relationship between each portion and compression is not limited to this example and may be changed as appropriate depending on the embodiment.

[0053] As described above, in one example, the instructions given to the generative model 60 may be treated as part of the components of each pre-prompt 500. However, the handling of the instructions given to the generative model 60 is not limited to this example. In another example, the instructions given to the generative model 60 may be treated as a component separate from the pre-prompt 500. In this case, the instructions given to the generative model 60 may be given appropriately by any method, such as a template, a setting value in a program, or the like.

[0054] Preprompt set 50 may be provided in any manner. Preprompt set 50 may be generated in reasoning apparatus 1 or an external computer other than reasoning apparatus 1. If preprompt set 50 is generated in an external computer, preprompt set 50 may be provided to reasoning apparatus 1 directly or indirectly from the external computer at any time and in any manner. Preprompt set 50 may also be pre-installed in reasoning apparatus 1.

[0055] (generation scene) 2 is a schematic diagram illustrating an example of a system configuration according to this embodiment. The system according to this embodiment includes an inference device 1 and a generation device 2. The example in FIG. 2 assumes a situation in which a preprompt set 40 is generated in the generation device 2. The generation device 2 is one or more computers configured to generate the preprompt set 40.

[0056] In one example, the generating device 2 may accept a designation of a question type 41. The generating device 2 may accept a designation of a pre-prompt 43. The generating device 2 may compress the designated pre-prompt 43 according to the designated type 41. This allows the generating device 2 to generate a compressed pre-prompt 400 corresponding to the designated type 41.

[0057] The generating device 2 may generate a preprompt set 40 including compressed preprompts 400 for each type 41 by specifying a type 41, specifying a preprompt 43, and compressing the preprompt 43 for each type 41. The generating device 2 may store the generated preprompt set 40 in any storage area. The storage destination (any storage area) for the preprompt set 40 may include at least one of memory resources within the generating device 2 and an external storage device located outside the generating device 2. The external storage device may be a network attached storage system (NAS) or a storage device other than the network attached storage system (NAS). Storage) etc.

[0058] (Type specification) The method of specifying the type 41 is not particularly limited and may be determined appropriately depending on the embodiment. In a typical example, the type 41 may be manually assigned by a user's input. In another example, the type 41 may be at least partially automatically specified using a clustering, rule-based, or other method. In one example, multiple types 41 may be specified at once. In another example, each type 41 may be specified each time.

[0059] (Specifying a pre-prompt) The method of specifying the pre-prompt 43 is not particularly limited and may be determined appropriately depending on the embodiment. In a typical example, the pre-prompt 43 may be manually entered by a user. In another example, the pre-prompt 43 may be specified at least partially automatically. For example, the generation device 2 may search information stored on the web and / or in an arbitrary storage area using at least one of the name of the specified type 41 and its related words as a search query. The related words may include, for example, synonyms, peripheral words, associative words, etc. When searching the web, a search engine may be selected from known engines, etc. The arbitrary storage area for storing information may be composed of at least one of memory resources within the generation device 2 and an external storage device located outside the generation device 2. Information usable as the pre-prompt 43 may be stored in the storage area as appropriate. The generation device 2 may incorporate at least a portion of the information extracted by the search as the pre-prompt 43.

[0060] The pre-prompts 43 corresponding to each type 41 may be specified all at once or each time. The pre-prompts 43 may be different for each type 41, or may be at least partially identical (i.e., may contain at least some common information). In an extreme example, the pre-prompts 43 before compression may be the same (common) for all types. Specifying the pre-prompts 43 for each type 41 all at once may be accomplished by specifying a common pre-prompt 43 once.

[0061] (common part) In correspondence with the pre-prompt 500, one type of pre-prompt 400 may be configured to be completely different from the other types of pre-prompt 400, or may be configured to include some common information. The common information may be at least partially compressed. , it may not be compressed. In one example, the common information before compression may be specified to be the same as the remaining information (pre-prompt 43 for each type 41). In another example, information different from the remaining information may be specified as the common information before compression.

[0062] In one example, when a configuration is adopted in which each pre-prompt 400 includes compressed common information, the generating device 2 may generate the compressed common information by compressing information designated as the common information. Furthermore, the generating device 2 may perform a compression process on the pre-prompt 43 for each type 41 to generate portions other than the common information. The generating device 2 may obtain a final pre-prompt 400 for each type 41 by combining the compressed pre-prompt 400 for each type 41 with the compressed common information. In another example, the generating device 2 may store the compressed pre-prompt 400 for each type 41 and the compressed common information as separate information.

[0063] Instructions given to the generative model 60, such as the response instructions, may be handled in the same manner as the common information. In one example, the generation device 2 may further combine the instructions given to the generative model 60 with the pre-prompt 400 for each type 41 to obtain a final pre-prompt 400 for each type 41. In another example, the generation device 2 may store the pre-prompt 400 compressed for each type 41 and the instructions given to the generative model 60 as separate information. The common information and the instructions given to the generative model 60 may be handled in the same manner for the pre-prompt set 50 in the inference phase.

[0064] (Compression method) The data volume of the compressed preprompt 400 is smaller than that of the preprompt 43 before compression (the data volume is reduced). The compressed preprompt 400 can be input to the generative model 60 either directly or after preprocessing. As long as these conditions are met, the compression method for the preprompt 43 is not particularly limited and may be selected appropriately depending on the embodiment. Compression may include any calculation that reduces the data volume. Any known compression method may be used.

[0065] In one example, compressing may include deleting information irrelevant to the corresponding type of question. For example, the relevance between each piece of information included in the pre-prompt 43 and the corresponding type of question may be calculated, and information whose calculated relevance is less than a threshold may be deleted as irrelevant information. Compressing may include thinning out (downsampling, etc.) part of the data constituting the pre-prompt 43. Furthermore, if the pre-prompt 43 is composed of a text expression, compressing may include rewriting it into a shorter expression than the original. In another example, any computational model, such as a trained machine learning model, may be used to compress the pre-prompt 43. In this case, the generation device 2 may provide the pre-prompt 43 to the computational model and obtain the compressed pre-prompt 400 from the computational model.

[0066] FIG. 3 schematically illustrates an example of a method for compressing a preprompt 43 according to this embodiment. As shown in FIG. 3, in one example, compressing the preprompt 43 may involve providing a specified type 41 and a specified preprompt 43 to a large-scale language model 70, and then obtaining a compressed preprompt 400 from the large-scale language model 70. A publicly known model, such as those described in Non-Patent Documents 2 and 3, may be used for the large-scale language model 70. According to this example of the present embodiment, using the large-scale language model 70 eliminates the need for a dedicated computational model for compressing the preprompt 43. This can be expected to reduce implementation costs.

[0067] The compression process of the pre-prompt 43 may be executed within the generating device 2 or may be executed by an external computer other than the generating device 2. In one example, the generating device 2 The generation device 2 may store a large-scale language model 70, provide the type 41 and the pre-prompt 43 to the large-scale language model 70, and execute calculation processing on the large-scale language model 70. As a result, the generation device 2 may generate a compressed pre-prompt 400 for each type 41. In another example, an external computer may store the large-scale language model 70. The generation device 2 may provide the external computer with a command to compress the large-scale language model 70, along with the type 41 and the pre-prompt 43. The external computer may execute calculation processing on the large-scale language model 70 in accordance with the command, thereby generating the compressed pre-prompt 400. The generation device 2 may obtain the generated pre-prompt 400 from the external computer.

[0068] Furthermore, the configuration of the input information (prompt) provided to the large-scale language model 70 is not particularly limited as long as it includes the specified type 41 and pre-prompt 43, and may be determined appropriately depending on the embodiment. The input information provided to the large-scale language model 70 may or may not further include any information other than the type 41 and pre-prompt 43. The any information may include, for example, an instruction (compression command) specifying the compression conditions of the pre-prompt 43. When the input information includes the compression command, the compression conditions in the large-scale language model 70 can be controlled.

[0069] (System Configuration) In one example, as shown in FIG. 2, the inference device 1 and the generation device 2 may be connected to each other via a network. The type of network may be selected as appropriate from, for example, the Internet, a wireless communication network, a mobile communication network, a telephone network, a dedicated network, etc. The inference device 1 and the generation device 2 may exchange data directly, or may exchange data indirectly via an external computer such as a NAS. However, the method of exchanging data between the inference device 1 and the generation device 2 is not limited to this example and may be selected as appropriate depending on the embodiment. In another example, data may be exchanged using a storage medium.

[0070] 2, the inference device 1 and the generation device 2 are each configured as separate computers. However, the configuration of the system according to this embodiment need not be limited to this example and may be determined appropriately depending on the embodiment. In another example, the inference device 1 and the generation device 2 may be configured as a single computer. In yet another example, at least one of the inference device 1 and the generation device 2 may be configured as multiple computers.

[0071] (Pre-prompt set) At least a portion of the generated preprompt set 40 may be provided directly or indirectly from the generation device 2 to the inference device 1 and used as the preprompt set 50. However, the form of the preprompts (preprompts 500, preprompts 55) used in the inference phase need not be limited to this example. In another example, the preprompts used in the inference phase may not be compressed. For example, the preprompts 43 specified for each type 41 may be used as the preprompts 500 in the inference phase.

[0072] [Question Type] The type (type 41) of the question (question 30) may be defined as appropriate depending on the embodiment. The type of question may be determined depending on factors such as the subject of the question, the content of the question, and the format of the required answer. It is desirable to define the question type so that different types can be assigned to generation tasks that may refer to different pre-prompts (pre-prompt 55).

[0073] As an example, questions 30 may be constructed to present a reasoning task and answers 35 may be constructed to accomplish the reasoning task. In the case where the question 30 is configured to indicate program code for executing the question 30, the type of the question 30 may be determined according to the type of inference task. As another example, in the case where the question 30 is configured to request inference of a strategy for dealing with a target error and the answer 35 is configured to indicate the result of inferring a strategy for dealing with the target error, the type of the question 30 may be determined according to the type of error.

[0074] (Classification method) The method for classifying the types of questions 30 is not particularly limited and may be selected appropriately depending on the embodiment. As an example of a simple method, the types of questions 30 may be manually classified, for example, by user specification. In another example, the types of questions 30 may be automatically classified using any calculation method. The types of questions 30 may be classified based on the questions 30 themselves, or based on any information other than the questions 30 (such as associated information, which will be described later). The types of questions 30 may also be classified based on the questions 30 and any information. Furthermore, a calculation model (classification model) such as a rule-based model or a trained machine learning model may be used to classify the types. The rule-based model is configured to derive an inference result from a given input according to rules. The rules may be set appropriately. The machine learning model is configured to have one or more calculation parameters that can be adjusted by machine learning. The one or more calculation parameters are used to calculate the desired inference. In this scenario, the inference is a type classification. The type of machine learning model that constitutes the classification model is not particularly limited and may be selected appropriately depending on the embodiment. Training in machine learning is performed by adjusting (optimizing) the values ​​of the calculation parameters using training samples. Training samples and true values ​​used for machine learning may be collected as appropriate. A machine learning model (classification model) may be trained as appropriate through machine learning to acquire the ability to classify the type of question 30.

[0075] (I) First classification method FIG. 4 schematically illustrates an example method for classifying the type of a question 30 according to this embodiment. As shown in FIG. 4 , in one example, the inference device 1 may further be configured to provide a list 32 of received questions 30 and their types to a large-scale language model 72, and obtain a classification result for the type of the question 30 from the large-scale language model 72. The large-scale language model 72 is an example of a machine learning model. Classifying the type of the question 30 may be performed by selecting a matching type from the provided list 32. Selecting a pre-prompt 55 may be performed by selecting a pre-prompt 55 from a pre-prompt set 50 that corresponds to the classification result for the type of the question 30. According to this example, using the large-scale language model 72 eliminates the need for a dedicated computational model for classifying the type of question 30. This can be expected to reduce implementation costs.

[0076] 4, the list 32 may be omitted. The configuration of the input information (prompt) provided to the large-scale language model 72 is not particularly limited and may be determined appropriately depending on the embodiment. The input information provided to the large-scale language model 72 may or may not further include any information other than the question 30 and the list 32. The any information may include, for example, an instruction requesting type classification (classification command), accompanying information described below, etc. The any information may be provided to the large-scale language model 72 instead of the question 30. In other words, when any information is input to the large-scale language model 72, input of the question 30 may be omitted.

[0077] Also, in one example, the large scale language model 72 used for classification may be the same as the large scale language model 70 used for compression, i.e., the large scale language model 70 may also be used as the large scale language model 72. In another example, the large scale language model 72 used for classification may be different from the large scale language model 70 used for compression, i.e., the large scale language model 70 may also be used as the large scale language model 72. The model language model 72 may be a model separate from the large-scale language model 70. The large-scale language model 72 may employ known models such as those described in Non-Patent Document 2 and Non-Patent Document 3. The type of the large-scale language model 72 is not particularly limited and may be appropriately selected depending on the embodiment.

[0078] FIG. 5 schematically illustrates an example of a scenario in which the large-scale visual and language model 73 is used to classify the type of question 30 in this embodiment. As illustrated in FIG. 5 , in one example, the large-scale language model 72 may be configured by the large-scale visual and language model 73. That is, the large-scale visual and language model 73 may be used as an example of the large-scale language model 72. Receiving the question 30 may include acquiring a target image 33 related to the question 30. Providing the question 30 and the list of types 32 to the large-scale language model 72 may be configured by providing the question 30, the acquired target image 33, and the list of types 32 to the large-scale visual and language model 73. According to this example of the present embodiment, by further considering the image (target image 33) when classifying the type of question 30, it is expected that the accuracy of classifying the type of question 30 can be improved. Furthermore, along with the improvement in the accuracy of classifying the type of question 30, it is expected that the accuracy of generating the answer 35 can be improved by using an appropriate pre-prompt 55.

[0079] It should be noted that the matters regarding the large-scale language model 72, such as the fact that the list 32 can be omitted, also apply to situations where a large-scale visual language model 73 is employed. A publicly known model such as Non-Patent Document 4 may be employed as the large-scale visual language model 73. The type of the large-scale language model 72 is not limited to this example. For example, a model configured to be able to accept input of data other than images along with text expression (language), such as an Audio Question Answering Model (Non-Patent Document 5, etc.), may be employed as the large-scale language model 72. The machine learning model for classifying the type of question 30 may be, for example, one or more other than language, such as a Large Audio Model. A large-scale model configured to be able to accept data from the modalities may be employed.

[0080] (II) Second classification method 6 schematically illustrates another example of a method for classifying the type of question 30 in this embodiment. As illustrated in FIG. 6, in one example, receiving the question 30 may include acquiring accompanying information 305 related to the question 30. The reasoning device 1 may be configured to further classify the type of the question 30 in accordance with the acquired accompanying information 305. Selecting the pre-prompt 55 may be configured by selecting a pre-prompt 55 from the pre-prompt set 50 that corresponds to the result of classifying the type of the question 30.

[0081] As long as the type of question 30 can be classified, the type of accompanying information 305 is not particularly limited and may be selected appropriately depending on the embodiment. The accompanying information 305 may include any information that may be related to the question 30. For example, the accompanying information 305 may include information that may indirectly indicate the type of question 30, such as the target image 33. The accompanying information 305 may include sensing data obtained by one or more sensors. The accompanying information 305 may also include information that may directly indicate the type of question 30, such as meta-information. The meta-information may include any information that supplements the question 30, such as the name of the type.

[0082] According to one example of this embodiment, the information (accompanying information 305) used to classify the type of question 30 can be arbitrarily selected, which is expected to improve the scalability (versatility) of the type classification. That is, the accompanying information 305 appropriate for the type classification of the question 30 can be selected for each implementation situation. For example, by selecting information appropriate for the type classification as the accompanying information 305, it is expected that the accuracy of the type classification will improve. As the accuracy of classifying the type of question 30 improves, the accuracy of generating the answer 35 can be expected to improve by using an appropriate pre-prompt 55.

[0083] The type of sensor used in various situations, such as acquiring the question 30 and the accompanying information 305, may be appropriately selected depending on the embodiment. The sensor may include, for example, a camera, a depth sensor, an infrared sensor, an optical sensor, a radar, a LiDAR (Light Detection and Ranging), a microphone, a position sensor, and other measurement sensors. The position sensor may include, for example, a GPS (Global Positioning System) sensor, a GNSS (Global Navigation Satellite System) sensor, and the like. The sensing data may include, for example, image data, depth data, etc. The data may include data, infrared data, measurement data from optical sensors (such as marker detection results), radar data, LiDAR data, sound data, position data, and other measurement data. The robotic device may include one or more measurement sensors for measuring the state of the robotic device. The measurement sensors may include, for example, an encoder, a motion capture device, a tactile sensor, a force sensor, etc. The sensing data may include, for example, measurement data such as joint angles, hand positions, tactile data at the hand, force data at the hand, and posture measurement data.

[0084] When information that can indirectly indicate the type of question 30 is used as the accompanying information 305, the method for classifying the type of question 30 from the accompanying information 305 is not particularly limited and may be appropriately selected depending on the embodiment. As described above, a computational model (classification model) such as a rule-based model or a trained machine learning model may be used to classify the type. That is, the accompanying information 305 may be input to a classification model such as the large-scale language model 72 (large-scale visual language model 73) and computational processing of the classification model may be performed, thereby obtaining an output corresponding to the result of classifying the type of question 30 from the classification model. In one example, the type of question 30 may be indirectly classified. For example, the classification model may identify the context of the question 30 from the accompanying information 305, and the type of question 30 may be classified based on the context identification result. In another example, the type of question 30 may be classified from the question 30 and the accompanying information 305.

[0085] (III) Other The process of classifying the type of question 30 may be executed within the inference device 1, or may be executed by an external computer other than the inference device 1. In one example, the inference device 1 may classify the type of question 30. When a classification model such as the large-scale language model 72 (large-scale visual language model 73) is used for type classification, the inference device 1 may retain the classification model. The inference device 1 may input at least one of the question 30 and the associated information 305 into the classification model and perform computational processing of the classification model to obtain from the classification model an output corresponding to the result of classifying the type of question 30. In another example, an external computer may classify the type of question 30. When a classification model is used, the external computer may retain the classification model and perform computational processing of the classification model.

[0086] Furthermore, the process of selecting a preprompt 55 from the preprompt set 50 that corresponds to the type of question 30 may be executed within the reasoning device 1, or may be executed by an external computer other than the reasoning device 1. In one example, the reasoning device 1 may store the preprompt set 50 in its own memory resources. The reasoning device 1 may select a preprompt 55 that corresponds to the type of question 30 from the stored preprompt set 50 in accordance with the classification results from either the reasoning device 1 or the external computer. In another example, the external computer may store the preprompt set 50 and select a preprompt 55 that corresponds to the type of question 30. In this case, the reasoning device 1 may issue a selection command for the preprompt 55 to the external computer. In response to this selection command, the external computer may execute a process of selecting a corresponding preprompt 55 from the preprompt set 50. The reasoning device 1's selection of a preprompt 55 may include causing the external computer to select a preprompt 55 by issuing this selection command to the external computer. Note that the external computer that classifies the type of question 30 may be the same external computer that selects a preprompt 55 from the preprompt set 50, or The external computer may obtain the result of classifying the type of question 30 from either reasoning device 1, its own calculation results, or another external computer, and may select pre-prompt 55 according to the obtained classification result.

[0087] (Unknown type) After the preprompt sets (preprompt set 40, preprompt set 50) have been constructed, an unknown type may be given in any situation, such as in the inference situation for generating answer 35. In this case, in one example, a new preprompt corresponding to the unknown type may be prepared. The preprompt set may be updated by adding the prepared preprompt to the preprompt set.

[0088] FIG. 7 schematically illustrates an example of a method for updating the preprompt set 40 when a question of unknown type 411 is given. As shown in FIG. 7, in one example, when an unknown question type 411 is given, the generation device 2 may accept specification of a preprompt 431 corresponding to the unknown type 411. The generation device 2 may compress the specified preprompt 431 according to the unknown type 411. The compression method of the preprompt 431 may be the same as that of the preprompt 43. This allows the generation device 2 to generate a compressed preprompt 401. The generation device 2 may update the preprompt set 40 by adding the compressed preprompt 401 of the unknown type 411 to the preprompt set 40. The preprompt 401 may be provided to the inference device 1 as appropriate. According to this example embodiment, the range of types of questions (questions 30) for which an answer (answer 35) can be generated can be expanded.

[0089] The unknown type 411 may be assigned in any situation. In a typical example, when the inference device 1 generates an answer 35 (inference phase), the type of the given question 30 is unknown, and thus the unknown type 411 may be assigned. The method of classifying the question 30 into the unknown type 411 may be determined appropriately depending on the embodiment. For example, as categories for classifying the type of the question 30, in addition to categories corresponding to the defined types, a category corresponding to an unknown type (e.g., "other") may be defined. The type of the question 30 may be determined to be the unknown type 411 when the question 30 is not classified into the defined type category but is classified into the unknown type category.

[0090] In the inference phase, if the type of question 30 is classified as unknown, inference device 1 may request generation device 2 to generate a pre-prompt corresponding to a new type (type 411). In response to the request from inference device 1, generation device 2 may generate a pre-prompt 401 corresponding to the new type (type 411) by executing the above series of update processes. In one example, the definition of the new type (type 411) may be generated by either inference device 1 or generation device 2. Type 411 may be defined in a manner similar to the specification of type 41. The definition of type 411 may be provided manually or at least partially automatically.

[0091] When the type of question 30 is classified as unknown, it may be determined arbitrarily whether to execute the process of generating an answer 35 for that question 30. In one example, after requesting generation device 2 to generate a pre-prompt 401 (new pre-prompt 500), inference device 1 may suspend execution of the process of generating an answer 35 until it receives the generated pre-prompt 401 from generation device 2. After receiving the pre-prompt 401 corresponding to question 30 from generation device 2, inference device 1 may resume the process of generating an answer 35. Inference device 1 may execute the process of acquiring an answer 35 by using the pre-prompt 401 received from generation device 2 as the pre-prompt 55.

[0092] In another example, the inference device 1 may execute the process of generating the answer 35 without waiting for the generation of the pre-prompt 401 (or without requesting the generation device 2 to generate the pre-prompt 401). In this case, the inference device 1 may generate the prompt (input information) to be provided to the generative model 60 by any method. In one example, the inference device 1 may acquire extension information for the question 30 without using the pre-prompt set 50. The extension information may be acquired manually, for example, by user input, or may be acquired at least partially automatically by a method such as RAG (Retrieval-Augmented Generation). The inference device 1 may construct a prompt using the acquired extension information and the question 30, and provide the obtained prompt to the generative model 60, thereby obtaining the answer 35 for the question 30 from the generative model 60.

[0093] The method of specifying the pre-prompt 431 may be the same as that of the pre-prompt 43. When the inference device 1 acquires the above-mentioned extension information for the unknown type 411, the acquired extension information may be used as at least a part of the pre-prompt 431. For example, a part of the prompt provided to the generative model 60 other than the question 30 may be used as the pre-prompt 431. The extension information may be provided to the generation device 2 as appropriate. Furthermore, if no compression is performed, the pre-prompt 431 may be used as the pre-prompt 500 in the inference phase.

[0094] [Generative model] As long as the answer 35 can be generated from input information including the question 30, the configuration of the generative model 60 is not particularly limited and may be determined appropriately depending on the embodiment. The generative model 60 may be configured as a trained machine learning model that has acquired the ability to generate the answer 35 through machine learning. The type of machine learning model (generative model 60) is not particularly limited and may be selected appropriately depending on the embodiment. The machine learning model may be configured as, for example, a neural network, a support vector machine, a regression model, or other functional formula (computation model), etc.

[0095] When the generative model 60 includes a neural network, the structure of the neural network is not particularly limited and may be determined appropriately depending on the embodiment. The structure of the neural network may be specified, for example, by the number of layers from the input layer to the output layer, the type of each layer, the number of nodes (neurons) included in each layer, the connection relationships between the nodes in each layer, etc. The neural network may include any mechanism such as a recurrent structure, a self-attention mechanism, or an autoregressive model. The neural network may include any layer such as a fully connected layer, a convolutional layer, a pooling layer, a deconvolutional layer, an unpooling layer, a normalization layer, a dropout layer, or an LSTM (Long Short-Term Memory). In addition, the neural network may include a diffusion model. The model may include any type of model, such as a neural network, a Transformer model, etc. The weights of the connections between the nodes included in the network and the thresholds of the nodes are examples of calculation parameters. The machine learning method may be appropriately selected depending on the embodiment of the machine learning model to be adopted (for example, backpropagation).

[0096] FIG. 8 schematically illustrates an example of a generative model 60 (large-scale language model 61) according to this embodiment. As shown in FIG. 8, in one example, the generative model 60 may be configured by the large-scale language model 61. The question 30 and each pre-prompt 500 may be provided in a textual representation. The inference device 1 constructs a prompt using the question 30 and the corresponding pre-prompt 55, and provides the obtained prompt to the large-scale language model 61. In this way, the inference device 1 may obtain the generation result of the answer 35 to the question 30 from the large-scale language model 61. According to this example of the present embodiment, there is no need to prepare a dedicated generative model for generating the answer 35. Therefore, a reduction in implementation costs can be expected.

[0097] In addition, when the large-scale language model 72 (large-scale visual language model 73) is used for the type classification of the question 30, in one example, the large-scale language model 61 is the large-scale language model used for classification. In another example, the large-scale language model 61 may be different from the large-scale language model 72 (large-scale visual language model 73). In other words, the large-scale language model 61 may be a model separate from the large-scale language model 72 (large-scale visual language model 73).

[0098] Similarly, when large-scale language model 70 is used to compress pre-prompt 43, in one example, large-scale language model 61 may be the same as large-scale language model 70 used for compression. That is, large-scale language model 61 may also be used as large-scale language model 70. In another example, large-scale language model 61 may be different from large-scale language model 70. That is, large-scale language model 61 may be a model separate from large-scale language model 70.

[0099] The type of large-scale language model 61 is not particularly limited and may be appropriately selected depending on the embodiment. In one example, the large-scale language model 61 may be configured by a model that can accept only text expressions. In another example, the large-scale language model 61 may be configured by a model that can accept input of data other than text expressions along with text expressions, such as a large-scale visual language model or an audio question answering model. In yet another example, the generative model 60 may include one or more modalities other than language, such as a large audio model. A large-scale model configured to be able to accept the above data may be employed.

[0100] (Input information) When the type of question 30 is predetermined, the configuration of the input information (prompt) to be provided to the generative model 60 is not particularly limited and may be determined appropriately depending on the embodiment, as long as it includes at least part of the information of the question 30 and the pre-prompt 55. The input information may be configured to further include optional information, or may not include optional information. For example, when a large-scale language model 61 is adopted as the generative model 60, the input information may include instructions to be provided to the large-scale language model 61, such as the above-mentioned answer command, as optional information.

[0101] 9 schematically illustrates an example of input information provided to the generative model 60 according to this embodiment. As illustrated in FIG. 9 , in one example, receiving the question 30 may include acquiring context information 31 for the question 30. Providing the selected pre-prompt 55 and the question 30 to the generative model 60 may include providing the selected pre-prompt 55, the acquired context information 31, and the question 30 to the generative model 60.

[0102] According to one example of the present embodiment, by further taking into consideration the context information 31 when generating an answer 35 to a question 30, it is possible to generate an answer 35 according to the context. This is expected to improve the accuracy of generating the answer 35. In one example, even when a large-scale language model 61 is adopted as the generative model 60, the context information 31 may be provided to the generative model 60 (large-scale language model 61) as input information.

[0103] As described above, the context relates to conditions such as the situation in which the question occurs, the domain, etc. The context information 31 may be acquired from, for example, sensor observation, user input, pre-given information, etc. The context information 31 may at least partially overlap with the accompanying information 305, or may not overlap. The context information 31 may constitute at least a part of the question 30. In one example, when the question 30 is given as a fixed value, the context information 31 may be acquired variably. This allows the generated answer 35 to be adjusted depending on the context, even if the question 30 is the same.

[0104] The question 30 and / or the context information 31 may be, for example, a textual representation, a sensor The input information may be composed of any information, such as query data, etc. When a large-scale language model 61 is employed as the generative model 60, if the large-scale language model 61 can accept the input information, including the question 30 and the context information 31, then the input information may be provided to the large-scale language model 61 as is. If the large-scale language model 61 cannot accept the input information, then the input information may be provided to the large-scale language model 61 after being converted into an acceptable format, such as a text representation.

[0105] (arithmetic processing) The computational processing of the generative model 60 (large-scale language model 61) may be performed within the inference device 1, or may be performed on an external computer other than the inference device 1. In one example, the inference device 1 may perform the computational processing of the generative model 60. In this case, the inference device 1 may store the generative model 60. The inference device 1 may obtain a pre-prompt 55 corresponding to the type of question 30 from either its own memory resources or an external computer. The inference device 1 may provide a prompt including the question 30 and the pre-prompt 55 to the generative model 60 and perform computational processing of the generative model 60. As a result of this computational processing, the inference device 1 may obtain a generated result of an answer 35 to the question 30 from the generative model 60.

[0106] In another example, an external computer may execute the computational processing of the generative model 60. In this case, the external computer may store the generative model 60. The reasoning device 1 may issue a request to generate an answer 35 along with the question 30 to the external computer. The external computer may obtain a pre-prompt 55 corresponding to the question 30 from either the reasoning device 1, its own device, or another external computer. In response to a request from the reasoning device 1, the external computer may execute computational processing of the generative model 60 by providing a prompt including the question 30 and the pre-prompt 55 to the generative model 60. As a result of this computational processing, the external computer may obtain the generation result of the answer 35 to the question 30 from the generative model 60. The external computer may return the generated answer 35 (the generation result of the answer 35) to the reasoning device 1. Obtaining the answer 35 from the generative model 60 may include receiving the answer 35 from such an external computer.

[0107] [Generation task] The generation task of the answer 35 may be set appropriately depending on the embodiment. That is, this embodiment is applicable to any task of generating information using a generative model (generative model 60). The system according to this embodiment may be applied to various situations in which any generation task is performed. For example, the application of this embodiment may include at least one of the following first, second, and third cases. Specific application situations will be exemplified below for each case.

[0108] (1) First Case 10 is a diagram illustrating an example of a first example scenario to which this embodiment is applied. The first example scenario is an example scenario in which this embodiment is applied to a system that generates program code Z1 for an inference task T1.

[0109] In the inference phase, a question 30 may be configured to indicate an inference task T1. The inference device 1 may obtain an answer 35 to the question 30 from the generative model 60 by providing the question 30 indicating the inference task T1 and a pre-prompt 55 to the generative model 60. The obtained answer 35 may be configured by program code Z1 for performing the inference task T1. The programming language used in the program code Z1 is not particularly limited and may be selected appropriately depending on the embodiment. The inference device 1 may output information related to the obtained answer 35 (program code Z1).

[0110] The output destination and the content of the information to be output may be selected as appropriate depending on the embodiment. In one example, outputting information about the answer 35 is performed by executing the generated program code Z1. This may include execution on an execution environment E1. The execution environment E1 may be appropriately configured to execute information processing in accordance with instructions included in the program code Z1. The execution environment E1 may include, for example, a compiler. The execution environment E1 may be constructed on the inference device 1, or may be constructed on an external computer other than the inference device 1. That is, the inference device 1 may execute information processing in accordance with the program code Z1 on an execution environment E1 constructed within its own device, or may provide the program code Z1 to the external computer and cause the external computer to execute information processing. This allows the result of performing the inference task T1 that solves the question 30 (inference result) to be obtained as an output of information regarding the answer 35.

[0111] In the generation phase, each type 41 may be defined arbitrarily, and a pre-prompt 43 may be specified appropriately for each type 41. In one example, the definition of each type 41 may be generated according to the type of inference task T1. A pre-prompt 43 may be specified for each type 41 set according to the type of inference task T1. The generation device 2 may compress the pre-prompt 43 for each type 41, thereby generating a pre-prompt set 40 including a compressed pre-prompt 400 for each type 41 that can be used to generate program code.

[0112] The pre-prompt (pre-prompt 500, pre-prompt 55, pre-prompt 43, pre-prompt 400) may include any information that can be used to generate program code (program code Z1). The pre-prompt may include, for example, a class definition, a method definition, a function, etc. As an example, the pre-prompt may include an API (Application Programming Interface) definition, a code sample example S1, etc. The sample example S1 may be, for example, It may contain the above snippets.

[0113] As a specific example, assume that a large-scale language model 70 is used to compress the pre-prompt 43 and a large-scale language model 61 is used to generate the answer 35. In the generation phase, the generation device 2 may obtain a compressed API definition from the large-scale language model 70 by providing a first compression command to the large-scale language model 70 that instructs the compression of the baseline pre-prompt and the API definition. The first compression command may be configured to specify conditions for compressing the API definition. The baseline pre-prompt may be configured to include an API definition, a sample example including one or more snippets, and an answer command instructing the generation of program code.

[0114] The generation device 2 may acquire compressed example samples from the large-scale language model 70 by providing the large-scale language model 70 with a baseline pre-prompt, a question type 41 (definition), and a second compression command instructing compression of the example samples. The second compression command may be configured to specify conditions for compressing the example samples. The baseline pre-prompt used to generate the compressed example samples may be the same as the pre-prompt used to generate the compressed API definition. Furthermore, when generating the compressed example samples, the same pre-prompt may be used for each type 41. The baseline pre-prompt may be an example of a pre-prompt 43. The generation device 2 can acquire compressed example samples for each type 41 by performing a compression process for the example samples for each type 41.

[0115] The generating device 2 can generate the pre-prompt set 40 by combining compressed API definitions, response commands that instruct the generation of program code, and compressed sample examples for each type 41. The sample examples for each type 41 may be an example of a pre-prompt 400 for each type 41. The compressed API definitions and response commands may be an example of common information between each pre-prompt 400.

[0116] In the inference phase, reasoning apparatus 1 may use at least a portion of generated pre-prompt set 40 as pre-prompt set 50. Reasoning apparatus 1 receives question 30 indicating inference task T1, and selects from pre-prompt set 50 a question that corresponds to the type of question 30. A corresponding condensed example sample S1 may be selected. The selected example sample S1 may be an example of a pre-prompt 55 selected according to type. The reasoning device 1 may obtain an answer 35 from the large-scale language model 61 that is configured to indicate program code Z1 for solving the inference task T1 by providing the question 30 indicating the inference task T1, the condensed API definition, the answer instruction instructing the generation of program code, and the selected example sample S1 to the large-scale language model 61.

[0117] According to the first example, in the inference phase, a pre-prompt 55 (such as sample S1) appropriate for the type of question 30 is used to generate an answer 35 (program code Z1). The pre-prompt 400 obtained in the generation phase may be used as the pre-prompt 55. This can be expected to improve the accuracy of generating the answer 35 when generating program code Z1 as the answer 35 to the question 30. Furthermore, because the pre-prompt 55 is compressed, the amount of calculation required by the generative model 60 when generating the answer 35 can be reduced.

[0118] The inference task T1 may be set as appropriate depending on the embodiment. The inference task T1 may include any task that infers features contained in data. The inference may include at least one of identification and regression. The inference may include prediction. The type of program code Z1 to be generated may be selected as appropriate depending on the inference task T1. The program code Z1 may include control code for controlling the operation of a machine such as a robotic device, in addition to code for causing a computer to execute information processing. The system according to the first case may be applied to various situations in which code is generated. For example, the application of the first case may include at least one of the following cases 1-1 and 1-2.

[0119] (1-1) Scene 1-1 11 is a schematic diagram showing an example of a scene of Case 1-1 to which this embodiment is applied. Case 1-1 is an example of a scene in which this embodiment (Case 1) is applied to a system that generates program code for inferring features that appear in an image.

[0120] In Example 1-1, receiving a question 30 may include acquiring a target image 33 related to the question 30. Inference task T1 may include inferring features appearing in the target image 33. The features to be inferred need not be particularly limited and may be selected appropriately depending on the embodiment. Inferring features appearing in an image may include, for example, identifying the type of object appearing in the image, counting the number of objects, identifying or regressing the state of the object, etc. The state of the object may include at least one of static items and dynamic items. Static items may include, for example, attributes of the object (color, shape, size, etc.). Dynamic items may include, for example, variable items such as the state of the object (position, posture, other operating status, etc.).

[0121] According to the 1-1 example, when generating program code (program code Z1) for executing inference processing on an image (target image 33), it is possible to expect an improvement in the accuracy of generating the answer 35.

[0122] The acquired target image 33 may be provided to the execution environment E1 as appropriate. In the execution environment E1, information processing according to the program code Z1 may be executed on the provided target image 33. This allows an inference result for the question 30 (inference task T1) regarding the target image 33 to be obtained.

[0123] (1-2) Scene 1-2 FIG. 12 is a diagram showing an example of a scene of the first-second example to which this embodiment is applied. The second case is an example of a situation in which this embodiment (first case) is applied to a system that generates control codes for controlling a robot device.

[0124] In the first and second examples, the inference task T1 may include inferring an action sequence of the robot device R1. The inference device 1 may obtain an answer 35 to the question 30 from the generative model 60 by providing the generative model 60 with a question 30 and a pre-prompt 55 requesting inference of an action sequence of the robot device R1. In one example, the inference device 1 may further provide the generative model 60 with an answer command that specifies the generation of a control code, along with the question 30 and the pre-prompt 55. The obtained answer 35 may be constituted by program code Z1, and the program code Z1 may include control code Z11 for causing the robot device R1 to execute the actions of the inferred action sequence.

[0125] The purpose of inferring an action sequence may be determined appropriately depending on the embodiment. In one example, the action sequence inference may be performed to obtain an appropriate action sequence corresponding to a given situation. The question 30 may be configured to request inference of an action sequence corresponding to a given situation. At least one of the question 30 and the context information 31 may include information indicating a situation in an environment in which the robotic device R1 is deployed. The information indicating the situation of the robotic device R1 may be composed of, for example, a text expression, sensing data, etc. In response to this, the generated control code Z11 may be composed of one or more instructions for instructing the robotic device R1 to perform an action sequence corresponding to the given situation.

[0126] The pre-prompts (pre-prompt 500, pre-prompt 55, pre-prompt 43, pre-prompt 400) may include any information that can be used to generate the control code (control code Z11). The pre-prompts may include, for example, API definitions, code sample examples, parameter definitions, etc. The parameter definitions may include, for example, information that specifies ranges such as the drive range of the joint angle, the drive speed range, the range of the working area, and the input amount range of the manipulated object (e.g., reagents in a chemical experiment).

[0127] According to Example 1-2, it is possible to expect an improvement in the accuracy of generating the answer 35 when generating the control code (control code Z11) for controlling the robot device (robot device R1).

[0128] The generated control code Z11 may be provided to the execution environment of the robot device R1 as appropriate. The execution environment of the robot device R1 is an example of the execution environment E1. The execution environment of the robot device R1 may be a real environment or a simulation environment. Outputting information about the answer 35 (executing the program code Z1 on the execution environment E1) may include controlling the operation of the robot device R1 in accordance with the generated control code Z11. As an example of the process of outputting information about the answer 35, the inference device 1 may directly control the operation of the robot device R1 in accordance with the obtained control code Z11, or may indirectly control it via another information processing device (an external computer, a dedicated controller, etc.).

[0129] The type of the robot device R1 is not particularly limited and may be selected appropriately depending on the embodiment. The robot device R1 may be, for example, an industrial robot in a production line, an autonomous robot configured to be able to operate autonomously, a mobile body configured to be able to move, etc. The industrial robot may be, for example, a vertical articulated robot, a horizontal articulated robot (SCARA robot), a parallel link robot, an orthogonal robot, etc. The autonomous robot may be, for example, a humanoid robot, a guide robot, an agricultural robot, a care robot, a security robot, a transport robot, etc. The content of the autonomous processing may be selected appropriately depending on the embodiment. The mobile body may be, for example, a cleaning robot, the above-mentioned autonomous robot configured to be able to move (a mobile robot), etc. The robot device R1 may include a robot (including a robot), a vehicle configured to be capable of autonomous driving, an air vehicle (drone, etc.) capable of autonomous flight, etc. The robot device R1 may exist in real space or virtual space.

[0130] When the configuration for providing the context information 31 is employed, at least one of the content of actions included in the inferred action sequence and the priority of the actions may be controlled by the context information 31. For example, consider a situation in which a white liquid is spilled. At least one of the question 30 and the context information 31 may be configured to indicate the situation in which a white liquid is spilled. If the environment in which this situation occurs is a home, the white liquid is inferred to be a food product such as milk. In this case, the context information 31 may be further configured to indicate that the environment is a home. The selected pre-prompt 55 may include any information used to generate the action sequence for the wiping task. In response to the context information 31 indicating that the situation in which a white liquid is spilled is a home, the action sequence in the generated control code Z11 may be composed of one or more actions related to wiping the white liquid. On the other hand, if the environment in which this situation occurs is a factory, the white liquid is inferred to be a chemical. In this case, the context information 31 may be further configured to indicate that the environment is a factory. The selected pre-prompt 55 may include any information used to generate the action sequence for the neutralization task. In response to the context information 31 indicating that a white liquid spill situation is occurring in the factory, the action sequence in the generated control code Z11 may consist of one or more actions related to neutralizing the white liquid.

[0131] Furthermore, for example, in a scene in which a white liquid has been spilled in a household, the prioritized action may differ depending on the circumstances surrounding the white liquid. For example, if a person is present around the white liquid, the priority may be to move the person away from the white liquid, whereas if no person is present, the priority may be to wipe the white liquid. Thus, the context information 31 may be configured to include information indicating whether or not a person is present around the white liquid. In response to the context information 31 indicating that a person is present around the white liquid, the action sequence in the generated control code Z11 may be configured to include a first action to move the person away and a second action to wipe the white liquid, with the second action being positioned after the first action. On the other hand, in response to the context information 31 indicating that no person is present around the white liquid, the action sequence in the generated control code Z11 may be configured to include only the action of wiping the white liquid, without including the action of moving the person away.

[0132] (2) Second Case 13 is a schematic diagram illustrating an example of a second example scenario to which this embodiment is applied. The second example scenario is an example of a scenario in which this embodiment is applied to a system that generates a description Z2 for planning a robot device R2. The type of robot device R2 may be selected appropriately depending on the embodiment, similar to the robot device R1.

[0133] In the inference phase, the question 30 may be configured to indicate that an action sequence of the robot device R2 is to be inferred. The question 30 in the second case may be configured similarly to the question 30 in the first and second cases. The inference device 1 may obtain an answer 35 to the question 30 from the generative model 60 by providing the question 30, configured to request that an action sequence of the robot device R2 be inferred, and a pre-prompt 55 to the generative model 60. In one example, the inference device 1 may further provide, together with the question 30 and the pre-prompt 55, an answer instruction specifying the generation of a description for planning to the generative model 60. The obtained answer 35 may be configured as a description for planning Z2 that generates an action plan for the action sequence to be inferred.

[0134] As long as the description Z2 can be used for planning, the structure of the description Z2 is not particularly limited and may be determined appropriately depending on the embodiment. In one example, the description Z2 may include at least one of a problem description and a domain description.

[0135] The problem description may be configured to express a task to be performed by the robotic device. In one example, the problem description may be configured to include descriptions of an initial state and a goal state of each of one or more objects present in the environment, so that the planner (planner P2) generates an action plan that reaches a goal state from the initial state of the task. The initial state is a state before the task is performed. The initial state may also be referred to as a starting state. The goal state is a state after the task is performed and a purpose is achieved. The description of the initial state describes the initial state of each of one or more objects present in the environment. The description of the goal state describes the goal state of each of the one or more objects to be reached by completing the task. The descriptions of the initial state and the goal state may be configured to be interpretable by humans.

[0136] Note that the configuration of the problem description is not limited to this example and may be modified as appropriate depending on the embodiment. The problem description may further include any information other than the description of the initial state and the description of the goal state. In one example, the problem description may further include a description of objects present in the environment. The object description may be configured as a list of objects present in the environment. The object description may be configured as a list of all objects that can be observed in the target environment, or may be configured as a list of some of the objects that can be observed in the target environment. Including the object description in the problem description makes it easier to identify objects present in the environment.

[0137] On the other hand, the domain description may be configured to define events common to all problems, including the skills of the robotic device (robot device R2). In one example, the domain description may include a description defining the skills of the robotic device, a description defining the state of a target object present in the environment, a description defining the type of the target object, and a description for checking compatibility with the planner. The state of the target object may include a state that the target object can take when the robotic device executes a defined skill (action). Note that the configuration of the domain description is not limited to this example and may be modified as appropriate depending on the embodiment.

[0138] As long as they can be used to generate an action plan, the formats of the problem description and the domain description are not particularly limited and may be selected appropriately depending on the embodiment. In one example, the problem description and the domain description may be configured to follow a predetermined format. The predetermined format may be, for example, PDDL (Planning Domain Definition Language), PDDLStream (non-specific The problem description and the domain description may be provided in a language for a planner (planning description language) such as that described in Patent Literature 6. This allows the planner to easily generate an action plan from the problem description and the domain description. In another example, the problem description and the domain description do not need to conform to a predetermined format. In this case, at least one of the generated problem description and the domain description may be used to generate an action plan without conforming to a predetermined format by a planner (such as a large-scale language model) that can accept input in any format.

[0139] The inference device 1 may output information relating to the acquired answer 35 (description Z2 for planning). The output destination and the content of the information to be output may each be selected appropriately depending on the embodiment.

[0140] In one example, outputting information about the answer 35 may include providing the generated description Z2 to a planner P2 to generate control code for causing the robot device R2 to perform the actions of the inferred action sequence.

[0141] The planner P2 may be configured as appropriate to generate an action plan from a description for planning (description Z2) and generate a control code from the generated action plan. The type of planner P2 is not particularly limited and may be selected appropriately depending on the embodiment. A known planner may be used as the planner P2. In one example, the planner P2 is a symbolic planner. The symbolic planner may be configured to generate a behavior plan from the description for planning. For the symbolic planner, a known symbolic planner such as Fast Downward in Non-Patent Document 7 may be used. The motion planner may be configured to generate a control code from the action plan. The motion planner may be a known motion planner such as RRT-connect in Non-Patent Document 8. In another example, the planner P2 may be configured with a large-scale model, such as a large-scale language model.

[0142] The computational processing of the planner P2 may be executed within the inference device 1, or may be executed by an external computer other than the inference device 1. In one example, the inference device 1 may retain the planner P2. The inference device 1 may provide the obtained description Z2 to the planner P2 to execute the computational processing of the planner P2. As a result, the inference device 1 may obtain the control code generation result from the planner P2. In another example, an external computer may retain the planner P2. The inference device 1 may provide the obtained description Z2 and an instruction to generate the control code to the external computer. The external computer may generate the control code from the description Z2 by executing the computational processing of the planner P2 in accordance with the instruction provided. The inference device 1 may obtain the generated control code (the control code generation result) from the external computer. According to one example of the present embodiment, a control code for controlling the operation of the robot device R2 can be obtained as an output of information related to the answer 35.

[0143] In one example, outputting information about the answer 35 may further include controlling the behavior of the robot device R2 in accordance with the generated control code. The inference device 1 may directly control the behavior of the robot device R2 in accordance with the obtained control code, or may indirectly control the behavior via another information processing device (an external computer, a dedicated controller, etc.). The execution environment of the robot device R2 may be a real environment or a simulation environment. As in the first example, the execution environment of the robot device R2 may be constructed on the inference device 1 or on an external computer other than the inference device 1. According to one example of this embodiment, the output of information about the answer 35 can cause the robot device R2 to be driven in a real environment or a simulation environment. Note that, as in the above-mentioned Example 1-2, when a configuration is adopted in which context information 31 is provided, at least one of the content of actions and the priority of actions included in the inferred behavior sequence may be controlled by the context information 31. At least one of the content of actions and the priority of actions may be controlled by the planner P2.

[0144] In the generation phase, each type 41 may be arbitrarily defined, and a pre-prompt 43 may be appropriately specified for each type 41. In one example, the definition of each type 41 may be generated according to task conditions such as the type of robot device R2 and the type of task. A pre-prompt 43 may be specified for each type 41 set according to the task conditions. The generation device 2 may compress the pre-prompt 43 for each type 41, thereby generating a pre-prompt set 40 including a compressed pre-prompt 400 for each type 41 that can be used to generate a description for planning.

[0145] The pre-prompt (Pre-prompt 500, Pre-prompt 55, Pre-prompt 43, Pre-prompt 400) may include any information that can be used to generate the description (Description Z2) for planning. The pre-prompt may include, for example, a sample example description S2, parameter definitions, etc.

[0146] According to the second example, in the inference phase, a pre-prompt 55 (such as sample S2) corresponding to the type of question 30 is used to generate an answer 35 (description Z2 for planning). The pre-prompt 55 includes the pre-prompt 400 obtained in the generation phase. may be used. This is expected to improve the accuracy of generating the answer 35 when generating the description Z2 for planning the robot device R2. Furthermore, since the pre-prompt 55 is compressed, the amount of calculation required by the generative model 60 when generating the answer 35 can be reduced.

[0147] (3) Third Case 14 is a diagram illustrating an example of a third case where this embodiment is applied. The third case is an example of a case where this embodiment is applied to a system that generates a measure to deal with an error in device R3.

[0148] In the inference phase, the question 30 may be configured to indicate inference of a strategy for dealing with the target error of device R3. The reasoning device 1 may obtain an answer 35 to the question 30 from the generative model 60 by providing the question 30 and a pre-prompt 55, which are configured to request inference of a strategy for dealing with the target error of device R3, to the generative model 60. In one example, the reasoning device 1 may further provide, together with the question 30 and the pre-prompt 55, an answer instruction specifying the generation of a strategy to the generative model 60. The obtained answer 35 may be constituted by the result of inferring a strategy for dealing with the target error (an inferred strategy).

[0149] The device R3 may include any machine in which an error may occur. The type of device R3 is not particularly limited and may be selected appropriately depending on the embodiment. In one example, the device R3 may include a robotic device similar to the robotic devices (R1, R2). The device R3 may also include any machine other than a robotic device (e.g., a device used in a factory). Errors may be defined appropriately depending on the device R3. An error may include, for example, a malfunction of the device R3. Measures to be taken to deal with the error may be determined appropriately for each error. Measures may include, for example, restarting the device, manual operation, contacting (inquiring about) a support desk, etc. In one example, measures may include at least one of automatically executable measures, manual measures, and inquiries due to inability to deal with the error. The support desk may be, for example, a manufacturing company, a management company, etc.

[0150] The question 30 may be appropriately configured to identify the target error. In one example, the question 30 may include information indicating the target error and information asking about a remedy for the target error. The information indicating the target error may be configured, for example, as a text expression, sensing data, a code signal, or the like. The sensing data may be, for example, sound data including an abnormal sound, or image data showing the illumination of a lamp indicating an error (such as a red lamp or a yellow lamp). The code signal may include, for example, an error code output from the device R3. When a configuration using at least one of the accompanying information 305 and the context information 31 is adopted, the information indicating the target error may be included in at least one of the accompanying information 305 and the context information 31. In addition, in a typical example, the information asking about a remedy may be configured as a standard text expression such as "teach me how to deal with the error."

[0151] The inference device 1 may output information about the obtained answer 35 (measures for dealing with the target error). The output destination and the content of the information to be output may each be selected appropriately depending on the embodiment.

[0152] In one example, the inference device 1 may output the occurrence of the target error and the generated measures to a predetermined computer as an example of information related to the answer 35. The predetermined computer may be at least one of the inference device 1 and an information processing device other than the inference device 1. The predetermined computer may be selected arbitrarily. As a typical example, the predetermined computer may be a terminal held by the administrator of the device R3. The terminal held by the administrator of the device R3 may be the inference device 1 or an information processing device other than the inference device 1. This makes it possible to notify the administrator of the occurrence of the target error and the measures to be taken against the target error. This In this case, the target error may be dealt with by manual operation by an administrator, etc. The manual operation may include at least one of direct operation of the device R3 and remote operation.

[0153] In another example, if the countermeasure for the target error is configured by an automatically executable action, outputting information about the answer 35 may include controlling the operation of the device R3 in accordance with the generated countermeasure. The inference device 1 may directly control the operation of the device R3 in accordance with the generated countermeasure, or may indirectly control it via another information processing device (an external computer, a dedicated controller, etc.). This makes it possible to automate the response to the target error.

[0154] In yet another example, if the remedy for the target error includes contacting a support representative, outputting information regarding the answer 35 may include sending a query about the target error to the support representative, thereby automating the query about the target error.

[0155] In the generation phase, each type 41 may be defined arbitrarily, and a pre-prompt 43 may be specified appropriately for each type 41. In one example, the definition of each type 41 may be generated according to the type of error. A pre-prompt 43 may be specified for each type 41 set according to the type of error. The error type may be given arbitrarily. For example, the error type may be defined for each error code. The generation device 2 may compress the pre-prompt 43 for each type 41 to generate a pre-prompt set 40 including a compressed pre-prompt 400 for each type 41 that can be used to generate a solution for dealing with the error.

[0156] The pre-prompts (pre-prompt 500, pre-prompt 55, pre-prompt 43, pre-prompt 400) may include any information that can be used to generate a solution to the error. The pre-prompts may include, for example, sample examples (Q&A, FAQ, etc.), reference information S3, etc. The reference information S3 may include, for example, contact information, a manual, etc. The contact information may include, for example, contact information for a support desk. A separate support desk may be set up for each error, or a common support desk may be set up for at least some of the errors.

[0157] According to the third example, in the inference phase, a pre-prompt 55 (such as reference information S3) appropriate for the type of question 30 is used to generate an answer 35 (a measure to address the target error). The pre-prompt 400 obtained in the generation phase may be used as the pre-prompt 55. This is expected to improve the accuracy of generating the answer 35 when generating a measure to address the target error of device R3. Furthermore, because the pre-prompt 55 is compressed, the amount of calculation required by the generative model 60 when generating the answer 35 can be reduced.

[0158] §2 Configuration example [Hardware configuration] (Inference device) 15 schematically illustrates an example of the hardware configuration of the inference device 1 according to this embodiment. The inference device 1 according to this embodiment is a computer in which a control unit 11, a storage unit 12, a communication interface 13, an input device 14, an output device 15, and a drive 16 are electrically connected.

[0159] The control unit 11 includes a CPU (Central Processing Unit) which is a hardware processor, The memory unit 12 includes RAM (Random Access Memory), ROM (Read Only Memory), etc., and is configured to execute information processing based on programs and various data. The control unit 11 (CPU) is an example of a processor resource. The memory unit 12 may be configured, for example, as a hard disk drive, a solid state drive, etc. The memory unit 12, RAM, and ROM are In this embodiment, the storage unit 12 stores various information such as an inference program 81, a pre-prompt set 50, model data 600, and model data 720.

[0160] The inference program 81 is a program for causing the inference device 1 to execute information processing (see FIG. 20 described below) related to the generation of an answer 35 to a question 30. The inference program 81 includes a series of instructions for the information processing. The model data 600 is configured to indicate information related to the generative model 60 (large-scale language model 61). The model data 720 is configured to indicate information related to the large-scale language model 72.

[0161] As long as the model data 600 can hold information for executing the computational processing of the generative model 60, the configuration of the model data 600 is not particularly limited and may be determined appropriately depending on the embodiment. For example, the model data 600 may be configured to include information indicating the values ​​of computational parameters of the generative model 60 adjusted by machine learning. The model data 600 may also be configured to further include information indicating the configuration of the generative model 60 (e.g., the structure of a neural network, etc.). The same applies to the model data 720. At least one of the preprompt set 50, the model data 600, and the model data 720 may be incorporated into the inference program 81.

[0162] Note that when the preprompt 55 is selected by an external computer, the preprompt set 50 may be omitted from the storage unit 12. When the calculation processing of the generative model 60 is performed by an external computer, the model data 600 may be omitted from the storage unit 12. When the type of question 30 is classified by an external computer, or when the large-scale language model 72 is not used to classify the type of question 30, the model data 720 may be omitted from the storage unit 12. When the generative model 60 (large-scale language model 61) is the same as the large-scale language model 72, the model data 600 may be the same data as the model data 720.

[0163] The communication interface 13 is configured to perform wired or wireless communication via a network. The communication interface 13 may be configured, for example, by a wired LAN (Local Area Network) module, a wireless LAN module, etc. The inference device 1 may perform data communication with another computer (e.g., the generation device 2, etc.) via the communication interface 13.

[0164] The input device 14 is a device for inputting, for example, a mouse, a keyboard, etc. The output device 15 is a device for outputting, for example, a display, a speaker, etc. An operator can operate the inference device 1 by using the input device 14 and the output device 15. The input device 14 and the output device 15 may be connected via an external interface. The external interface may be appropriately configured to connect to an external device by wire or wirelessly, for example, via a USB (Universal Serial Bus) port, a dedicated port, etc. The input device 14 and the output device 15 may be integrated, for example, by a touch panel display, etc.

[0165] The drive 16 is a device for reading various information such as programs stored in the storage medium 91. At least one of the inference program 81, pre-prompt set 50, model data 600, and model data 720 may be stored in the storage medium 91 instead of or together with the storage unit 12. The storage medium 91 is configured to store various information (stored programs, etc.) by electrical, magnetic, optical, mechanical, or chemical action so that a machine such as a computer can read the information. The storage unit 12 and the storage medium 91 are examples of non-transitory storage media. The inference device 1 stores at least the inference program 81, pre-prompt set 50, model data 600, and model data 720. Either of the above may be acquired from the storage medium 91. The storage medium 91 may be a disk-type storage medium such as a CD or a DVD, or may be a non-disk-type storage medium such as a semiconductor memory (for example, a flash memory). The type of the drive 16 may be selected appropriately depending on the type of the storage medium 91. The drive 16 may be connected via an external interface.

[0166] Note that, with regard to the specific hardware configuration of the inference device 1, components can be omitted, replaced, or added as appropriate depending on the embodiment. For example, the control unit 11 may include multiple hardware processors. The hardware processor may be configured with a microprocessor, a field-programmable gate array (FPGA), a digital signal processor (DSP), a graphics processing unit (GPU), an application-specific integrated circuit (ASIC), or the like. At least one of the communication interface 13, the input device 14, the output device 15, and the drive 16 may be omitted. The inference device 1 may be connected to a sensor via the communication interface 13 or an external interface. The inference device 1 may acquire at least a portion of information, such as the question 30, the associated information 305, and the context information 31, from the sensor. At least one of the inference program 81, the preprompt set 50, the model data 600, and the model data 720 may be stored in an external storage device, such as a NAS. The external storage device is also an example of a non-transitory storage medium. The inference device 1 may be configured with multiple computers. In this case, the hardware configurations of the computers may or may not be the same. Furthermore, the inference device 1 may be an information processing device designed specifically for the service provided, as well as a general-purpose server device, a general-purpose PC (Personal Computer), a tablet PC, a terminal device (such as a smartphone), etc.

[0167] (Generation device) 16 is a schematic diagram showing an example of the hardware configuration of the generation device 2 according to this embodiment. The generation device 2 according to this embodiment is a computer in which a control unit 21, a storage unit 22, a communication interface 23, an input device 24, an output device 25, and a drive 26 are electrically connected.

[0168] The control unit 21 to the drive 26 and the storage medium 92 of the generation device 2 may be configured similarly to the control unit 11 to the drive 16 and the storage medium 91 of the above-described inference device 1, respectively. The control unit 21 (CPU) is an example of a processor resource of the generation device 2. The storage unit 22 (and RAM, ROM) is an example of a memory resource of the generation device 2. In this embodiment, the storage unit 22 stores various information such as the generation program 82, the pre-prompt set 40, and the model data 700.

[0169] The generation program 82 is a program for causing the generation device 2 to execute information processing (see FIG. 19 , described below) related to the generation of the preprompt set 40. The generation program 82 includes a series of instructions for this information processing. In one example, the preprompt set 40 may be generated as a result of executing information processing in accordance with the instructions included in the generation program 82. The model data 700 is configured to indicate information related to the large-scale language model 70. The configuration of the model data 700 may be similar to that of the model data 600, etc. The model data 700 may be incorporated into the generation program 82. Note that if the compression of the preprompt 43 is processed by an external computer, or if the large-scale language model 70 is not used to compress the preprompt 43, the model data 700 may be omitted from the storage unit 22. If the large-scale language model 70 is identical to the generation model 60 (large-scale language model 61), the model data 700 may be the same data as the model data 600.

[0170] At least one of the generation program 82, the pre-prompt set 40, and the model data 700 may be stored in a storage medium 92 instead of or together with the storage unit 22. The generation device 2 stores the generation program 82, the pre-prompt set 40, and the model data 700. At least one of the generation program 82, the pre-prompt set 40 and the model data 700 may be acquired from the storage medium 92. At least one of the generation program 82, the pre-prompt set 40 and the model data 700 may be stored in an external storage device.

[0171] The generation device 2 may communicate data with other computers (e.g., the inference device 1) via the communication interface 23. An operator can operate the generation device 2 by using the input device 24 and the output device 25.

[0172] Note that, with regard to the specific hardware configuration of the generation device 2, components can be omitted, replaced, or added as appropriate depending on the embodiment. For example, the control unit 21 may include multiple hardware processors. The hardware processor may be configured with a microprocessor, FPGA, DSP, GPU, ASIC, etc. At least one of the communication interface 23, the input device 24, the output device 25, and the drive 26 may be omitted. The generation device 2 may be configured with multiple computers. In this case, the hardware configurations of the computers may or may not be the same. The generation device 2 may be an information processing device designed specifically for the service to be provided, as well as a general-purpose server device, a general-purpose PC, a tablet PC, a terminal device, etc.

[0173] [Software configuration] (Inference device) 17 schematically shows an example of the software configuration of the inference device 1 according to this embodiment. The control unit 11 of the inference device 1 executes instructions contained in the inference program 81 stored in the storage unit 12 using the CPU. As a result, the inference device 1 operates as a computer having an acquisition unit 111, a selection unit 112, an inference unit 113, and an output processing unit 114 as software modules. That is, in this embodiment, each software module of the inference device 1 is realized by the control unit 11 (CPU).

[0174] The acquisition unit 111 is configured to receive a question 30. The selection unit 112 is configured to select a pre-prompt 55 from the pre-prompt set 50 that corresponds to the type of the received question 30. The inference unit 113 is configured to provide the selected pre-prompt 55 and the question 30 to the generative model 60, thereby acquiring an answer 35 to the question 30 from the generative model 60. The output processing unit 114 is configured to output information related to the acquired answer 35.

[0175] (Generation device) 18 schematically shows an example of the software configuration of the generation device 2 according to this embodiment. The control unit 21 of the generation device 2 executes instructions included in the generation program 82 stored in the storage unit 22 using the CPU. As a result, the generation device 2 operates as a computer equipped with a designation unit 211, a compression unit 212, and a storage processing unit 213 as software modules. That is, in this embodiment, similar to the inference device 1, each software module of the generation device 2 is also realized by the control unit 21 (CPU).

[0176] The designation unit 211 is configured to accept designation of a question type 41. The designation unit 211 is configured to accept designation of a pre-prompt 43. The compression unit 212 is configured to compress the designated pre-prompt 43 in accordance with the designated type 41. By having the designation unit 211 designate the type 41 and pre-prompt 43 and having the compression unit 212 compress the pre-prompt 43 for each type 41, it is possible to generate a pre-prompt set 40 including a compressed pre-prompt 400 for each type 41. The save processing unit 213 is configured to save the generated pre-prompt set 40.

[0177] (others) In this embodiment, an example is described in which each software module of the inference device 1 and the generation device 2 is implemented by a general-purpose CPU. However, some or all of the above software modules may be implemented by one or more dedicated processors or chipsets. Each of the above modules may be implemented as a hardware module. With regard to the software configuration of the inference device 1 and the generation device 2, modules may be omitted, replaced, or added as appropriate depending on the embodiment.

[0178] §3 Example of operation [Generation device] 19 is a flowchart showing an example of the processing procedure of the generating device 2 according to this embodiment. The processing procedure of the generating device 2 described below is an example of a generating method executed by a computer. However, the processing procedure of the generating device 2 described below is merely an example, and each step may be changed as much as possible. Furthermore, steps in the processing procedure described below may be omitted, replaced, or added as appropriate depending on the embodiment.

[0179] (Steps S101 to S103) In step S101, control unit 21 operates as designation unit 211 and accepts the designation of question type 41. In step S102, control unit 21 operates as designation unit 211 and accepts the designation of pre-prompt 43.

[0180] In one example, the type 41 and the pre-prompt 43 may be designated to correspond to any one of the above-mentioned first case (case 1-1, case 1-2), second case, and third case. Upon receiving the designation of the type 41 and the pre-prompt 43, the control unit 21 proceeds to the next step S103.

[0181] In step S103, control unit 21 operates as compression unit 212 and compresses specified pre-prompt 43 according to specified type 41. As a result, compressed pre-prompt 400 corresponding to specified type 41 is generated.

[0182] In one example, the control unit 21 may provide the large-scale language model 70 with the specified type 41 and pre-prompt 43, thereby obtaining the generated compressed pre-prompt 400 from the large-scale language model 70. The control unit 21 (compression unit 212) may include the large-scale language model 70 by storing model data 700. In this case, the control unit 21 may obtain the generated compressed pre-prompt 400 by performing calculation processing on the large-scale language model 70. The large-scale language model 70 may be deployed in an external computer. In this case, the control unit 21 may obtain the generated compressed pre-prompt 400 from the external computer. After generating the compressed pre-prompt 400, the control unit 21 proceeds to the next step S104.

[0183] (Step S104) In step S104, the control unit 21 determines whether compressed pre-prompts 400 have been generated for all types 41.

[0184] The control unit 21 may determine whether any types 41 for which pre-prompts 400 have not been generated remain in any way. In one example, all types 41 may be predefined before generating the pre-prompt set 40. The control unit 21 may determine whether any types 41 for which pre-prompts 400 have not been generated remain depending on whether compressed pre-prompts 400 have been generated for all predefined types 41. In other words, the control unit 21 may determine whether any types 41 for which pre-prompts 400 have not been generated remain depending on whether compressed pre-prompts 400 have been generated for at least some of all predefined types 41. The control unit 21 may determine that there are remaining types 41 for which no pre-prompts 400 have been generated, in response to the fact that no prompts 400 have been generated. The control unit 21 may determine that there are no remaining types 41 for which no pre-prompts 400 have been generated, in response to the fact that compressed pre-prompts 400 have been generated for all of the predefined types 41.

[0185] The fact that there are still types 41 for which pre-prompts 400 have not been generated corresponds to the fact that generation of pre-prompts 400 for all types 41 has not been completed. If there are still types 41 for which pre-prompts 400 have not been generated, control unit 21 returns to step S101 and executes steps S101 to S103 for the remaining types 41. Note that, in one example, multiple types 41 may be specified collectively in step S101. Similarly, pre-prompts 43 may be specified collectively in step S102. If multiple types 41 are specified collectively in step S101, step S101 may be omitted when resuming processing from step S101. Similarly, if pre-prompts 43 are specified collectively, step S102 may be omitted when resuming processing from step S101.

[0186] On the other hand, the fact that there are no remaining types 41 for which pre-prompts 400 have not been generated corresponds to the completion of generation of pre-prompts 400 for all types 41. By performing the process of step S103 for all types 41 (i.e., performing the processes of steps S101 to S103 for each type 41), the control unit 21 can generate a compressed pre-prompt 400 for each type 41. By associating the generated pre-prompts 400 with each type 41, the control unit 21 can generate a pre-prompt set 40 including a compressed pre-prompt 400 for each type 41. When generation of the pre-prompt set 40 is complete, it is determined that there are no remaining types 41 for which pre-prompts 400 have not been generated. If there are no remaining types 41 for which pre-prompts 400 have not been generated, the control unit 21 proceeds to the next step, step S105.

[0187] (Step S105) In step S105, the control unit 21 operates as the storage processing unit 213 and stores the generated pre-prompt set 40 in a predetermined storage area.

[0188] The predetermined storage area may be determined appropriately depending on the embodiment. The predetermined storage area may be, for example, RAM in the control unit 21, the storage unit 22, an external storage device, a storage medium, or a combination thereof. The storage medium may be, for example, a CD, a DVD, a semiconductor memory, or the like. The external storage device may be, for example, a data server such as a NAS. The external storage device may be, for example, an externally attached storage device.

[0189] In one example, the type 41 and the pre-prompt 43 are specified to correspond to one of the first case (case 1-1, case 1-2), the second case, and the third case, thereby generating a pre-prompt set 40 that can be used in the corresponding case. After saving the pre-prompt set 40, the control unit 21 ends the processing procedure of the generation device 2 according to this operation example.

[0190] At least a portion of the generated preprompt set 40 may be provided from the generation device 2 to the inference device 1 at any time and in any manner. In one example, at least a portion of the preprompt set 40 may be provided to the inference device 1 via a network, a storage medium, etc. In another example, at least a portion of the preprompt set 40 may be pre-installed in the inference device 1. As a result, at least a portion of the preprompt set 40 may be used as the preprompt set 50.

[0191] Furthermore, the control unit 21 may update or create a new pre-prompt set 40 by periodically or irregularly repeating the processing of steps S101 to S105 described above. During this repetition, at least a portion of the types 41 and pre-prompts 43 may be changed, modified, added, deleted, etc. as appropriate. The control unit 21 may then provide at least a portion of the updated or newly generated pre-prompt set 40 to the inference device 1 as appropriate. This may update the pre-prompt set 50 (pre-prompt set 40) held in the inference device 1.

[0192] The preprompt set 40 may also be updated when an unknown type 411 is given. When an unknown type 411 is given, in step S101, the control unit 21 may operate as the designation unit 211 and generate a definition of the unknown type 411. If the definition of the unknown type 411 is generated by a computer other than the generation device 2 (such as the inference device 1), the processing of step S101 may be omitted. In step S102, the control unit 21 may operate as the designation unit 211 and accept the designation of a preprompt 431 corresponding to the unknown type 411. In step S103, the control unit 21 may operate as the compression unit 212 and compress the designated preprompt 431 according to the unknown type 411. This makes it possible to generate a compressed preprompt 401 corresponding to the unknown type 411. In step S104, the control unit 21 may determine whether compressed preprompts 401 have been generated for all unknown types 411. If any unknown types 411 for which pre-prompts 401 have not been generated remain, the control unit 21 may return to step S101 and perform steps S101 to S103 for the remaining unknown types 411. If compressed pre-prompts 401 have been generated for all unknown types 411, the control unit 21 may proceed to step S105. In step S105, the control unit 21 may operate as the saving processing unit 213 and update the pre-prompt set 40 by adding the compressed pre-prompt 401 for the unknown type 411 to the pre-prompt set 40. The generated pre-prompt 401, like the pre-prompt set 40, may be provided from the generation device 2 to the inference device 1 at any time and by any method.

[0193] [Inference device] 20 is a flowchart showing an example of the processing procedure of the inference device 1 according to this embodiment. The following processing procedure of the inference device 1 is an example of an inference method executed by a computer. However, the following processing procedure of the inference device 1 is merely an example, and each step may be changed as much as possible. Furthermore, steps in the following processing procedure may be omitted, replaced, or added as appropriate depending on the embodiment.

[0194] (Step S201) In step S201, the control unit 11 operates as the acquisition unit 111 and receives the question 30.

[0195] In one example, the control unit 11 may further acquire accompanying information 305 related to the question 30. In one example, the control unit 11 may further acquire context information 31 of the question 30. In one example, the control unit 11 may further acquire a target image 33 related to the question 30. Also, in one example, the question 30 may be provided in correspondence with any one of the above-mentioned first case (case 1-1, case 1-2), second case, and third case. Upon receiving the question 30, the control unit 11 proceeds to the next step S202.

[0196] (Step S202) In step S202, the control unit 11 operates as the selection unit 112 and classifies the type of the question 30.

[0197] In one example, a large-scale language model 72 may be used to classify the types of the questions 30. The control unit 11 may provide the received questions 30 and the list 32 of types to the large-scale language model 72, and thereby obtain the result of classifying the types of the questions 30 from the large-scale language model 72. In one example, the control unit 11 (selection unit 112) may include the large-scale language model 72 by holding model data 720. In this case, the control unit 11 may obtain the result of classifying the types of the questions 30 by performing calculation processing on the large-scale language model 72. In another example, the large-scale language model 72 may be deployed in an external computer. In this case, the result of classifying the types of the questions 30 may be obtained in the external computer.

[0198] In addition, in one example, when acquiring the target image 33, the large-scale language model 72 may be configured by a large-scale visual language model 73. The control unit 11 may provide the question 30, the acquired target image 33, and the type list 32 to the large-scale visual language model 73, and thereby acquire the result of classifying the type of the question 30 from the large-scale visual language model 73. The calculation processing of the large-scale visual language model 73 may be executed by either the inference device 1 or an external computer.

[0199] In addition, in one example, when acquiring the accompanying information 305, the control unit 11 may classify the type of the question 30 according to the acquired accompanying information 305. After classifying the type of the question 30, the control unit 11 proceeds to the next step S203.

[0200] (Step S203) In step S203, the control unit 11 operates as the selection unit 112 and selects a pre-prompt 55 from the pre-prompt set 50 that corresponds to the type of the received question 30. In this embodiment, the control unit 11 selects a pre-prompt 55 from the pre-prompt set 50 in accordance with the classification result of step S202.

[0201] In one example, the preprompt set 50 may include at least a portion of the preprompt set 40 generated by the generation device 2. Each preprompt 500 included in the preprompt set 50 may be compressed for each type of question 30. The preprompt 500 may be the preprompt 400 (preprompt 401) generated by the generation device 2. The process of selecting the preprompt 55 may be performed by either the inference device 1 or an external computer. After selecting the preprompt 55, the control unit 11 proceeds to the next step S204.

[0202] (Step S204) In step S204, the control unit 11 operates as the inference unit 113 and provides the selected pre-prompt 55 and question 30 to the generative model 60, thereby obtaining the answer 35 to the question 30 from the generative model 60.

[0203] In one example, when acquiring context information 31, the control unit 11 may obtain an answer 35 to the question 30 from the generative model 60 by providing the selected pre-prompt 55, the acquired context information 31, and the question 30 to the generative model 60.

[0204] In one example, the generation model 60 may be configured with a large-scale language model 61. The control unit 11 may obtain an answer 35 to the question 30 from the large-scale language model 61 by providing the pre-prompt 55 and the question 30 to the large-scale language model 61. When obtaining the context information 31, the control unit 11 may obtain the answer 35 by further providing the context information 31 to the large-scale language model 61.

[0205] The computation of the generative model 60 (large-scale language model 61) is performed by the inference device 1 and an external computer. The control unit 11 may execute the generative model 60 (large-scale language model 61) on either the external computer or the external computer. In one example, the control unit 11 (inference unit 113) may store model data 600, thereby providing the generative model 60 (large-scale language model 61). In this case, the control unit 11 may acquire the answer 35 to the question 30 by performing calculations on the generative model 60 (large-scale language model 61). In another example, the generative model 60 (large-scale language model 61) may be deployed on an external computer. In this case, the answer 35 to the question 30 may be generated by calculations on the external computer. The control unit 11 may acquire the generated answer 35 from the external computer.

[0206] In one example, the question 30 corresponds to any one of the first case (case 1-1, case 1-2), the second case, and the third case, so that the answer 35 corresponding to any one of the cases can be acquired. When the answer 35 is acquired, the control unit 11 proceeds to the next step S205.

[0207] (Step S205) In step S205, the control unit 11 operates as the output processing unit 114 and outputs information about the acquired answer 35.

[0208] The output destination and the content of the information to be output may be selected appropriately depending on the embodiment. In one example, the control unit 11 may output the acquired answer 35 as is. In another example, the control unit 11 may execute any information processing in accordance with the acquired answer 35. The control unit 11 may output the result of the information processing as information related to the answer 35. The output of the result of the information processing may include, for example, outputting a specific message in accordance with the answer 35, or controlling the operation of the controlled device in accordance with the answer 35. The output destination may be, for example, RAM, the memory unit 12, the output device 15, another computer, the controlled device, etc.

[0209] The notification of the generated measure in the third example is an example of directly outputting the obtained answer 35. Executing the generated program code Z1 in the execution environment E1 in the first example, and sending an inquiry about the target error to a support desk in the third example are examples of arbitrary information processing in response to the answer 35. Furthermore, the robot device R1 in the first-two examples, the robot device R2 in the second example, and the device R3 in the third example are examples of devices to be controlled.

[0210] When the output of information is completed, the control unit 11 ends the processing procedure of the inference device 1 according to this operation example. The control unit 11 may execute a series of processes from step S201 to step S205 at any timing, such as a user operation. The control unit 11 may execute the series of processes from step S201 to step S205 in real time, or may execute them after the fact.

[0211] In one example, the category of the question 30 may include a category corresponding to an unknown type. If the question 30 is classified as an unknown type in the process of step S202, the control unit 11 may request the generation device 2 to generate a pre-prompt corresponding to a new type (type 411). In response to this request, the generation device 2 may perform processing to update the pre-prompt set 40 related to the unknown type 411. In one example, after requesting the generation device 2 to generate a pre-prompt 401 (new pre-prompt 500), the control unit 11 may stop executing the processing in step S202 until receiving the generated pre-prompt 401 from the generation device 2. After receiving the pre-prompt 401 corresponding to the question 30 from the generation device 2, the control unit 11 may resume executing the processing from step S203. In another example, the control unit 11 may continue executing the processing without waiting for the generation of the pre-prompt 401 or without requesting the generation of the pre-prompt 401. In this case, the control unit 11 may omit the process of step S203 and acquire the extended information for the question 30. In step S204, The control unit 11 may construct a prompt using the acquired extended information and the question 30, and provide the obtained prompt to the generative model 60, thereby obtaining an answer 35 to the question 30 from the generative model 60.

[0212] [Features] In this embodiment, in step S204, a pre-prompt 55 appropriate for the type of question 30 is used to generate the answer 35. The pre-prompt 55 may be a pre-prompt 400 obtained by the generation device 2. The pre-prompt 55 (pre-prompt 500) only needs to be configured for the corresponding type. This narrows the range of information that makes up the pre-prompt 55 (pre-prompt 500). This reduces the amount of noise in the selected pre-prompt 55 that may act as noise when generating the answer 35. Therefore, this embodiment is expected to improve the accuracy of generating the answer 35 in the generation model 60. Furthermore, in one example of this embodiment, the pre-prompt 55 is compressed, which reduces the amount of calculation required by the generation model 60 when generating the answer 35 in step S204.

[0213] §4 Variations Although the embodiments of the present invention have been described in detail above, the above description is merely an example of the present invention in every respect. The processes and means described in this disclosure can be freely combined and implemented as long as no technical contradiction occurs. Furthermore, various improvements or modifications may be made to the above embodiments as appropriate.

[0214] In the processing procedure of the generation device 2 according to the above embodiment, steps may be omitted, replaced, or added. For example, the timing of executing the processes of step S101 and step S102 is not limited to the example of FIG. 19. In another example, the process of step S102 may be executed before step S101. At least a part of the process of step S102 may be executed at least partially in parallel with the process of step S101.

[0215] Furthermore, steps may be omitted, replaced, or added to the processing procedure of the inference device 1 according to the above embodiment. For example, if the type of question 30 is provided or given by an external computer, the processing of step S202 may be omitted.

[0216] §5 Working Examples The following experiments were carried out to verify the effectiveness of the above-described embodiment, but the present invention is not limited to the following examples.

[0217] (Dataset) First, as a preliminary step, we prepared three datasets: the first dataset (GQA), the second dataset (VQAv2), and the third dataset (NLVR2). The correct answer is associated with the image, which allows for VQA (Visual Question Answering). It is designed to be usable for

[0218] The first dataset (GQA) is proposed in Non-Patent Document 9. The first dataset is 1st type (obj), 2nd type (cat), 3rd type (attr), 4th type (rel) and The five types of questions of the fifth type (global) were included. The first type (obj) questions were The first type of question was a question asking about the existence of an object. The second type of question (cat) was a question asking about the existence of an object. The third type (attr) of questions was about identifying objects within a category. The third type (attr) of questions was about the state (attributes, location, etc.) of an object (e.g., "What is the color of bar?", "On which of image is the foo?", etc.). The fourth type (rel) of questions was about the positive and negative states of objects. These were questions derived from fixed phrases, asking about the subject or object (e.g., "What is the foo next to the baz wearing?", "Is the qux holding a quux?", etc.). The fifth type (global) questions were questions asking about the overall state of the scene, such as the weather, facilities, etc. (e.g., "Is it foo?"). The second dataset (VQAv2) was proposed in Non-Patent Document 10. The second dataset (VQAv2) uses visual feedback to generate answers. The datasets included open-ended questions about images that required content understanding. The third dataset (NLVR2) was proposed in

[11] . The third dataset (NLVR2) was designed to test the model's ability to understand the correspondence between complex natural language sentences and given image pairs. For each dataset, 2000 pairs of images, questions, and correct answers were randomly selected.

[0219] (Task settings) The task of generating answers to questions was the one described in Example 1-1 above. In other words, the generation task was set to generate program code from questions to answer questions about images using each dataset. Python was used as the language for the generated program code.

[0220] (Example) 21 and 22 show the processing steps in the generation phase and inference phase of Examples 1-1 and 1-2 (FIG. 21 shows the generation phase, and FIG. 22 shows the inference phase). As shown in FIG. 21, in each Example, the system configuration for the generation phase was the same as that of the above-described embodiment, in which a pre-prompt set is generated in advance by compressing pre-prompts by type. A large-scale language model (LLM) was used for compression. Furthermore, as shown in FIG. 22, in each Example, the system configuration for the inference phase was the same as that of the above-described embodiment, in which a large-scale language model is used for both question type classification and answer generation. The same large-scale language model was used for pre-prompt compression, question type classification, and answer (program code) generation.

[0221] Specifically, as shown in Figure 21, in the generation phase, a baseline pre-prompt (original) was constructed using Python API definitions, snippets, and response instructions. A compressed API definition (compressed API definition) was obtained by providing the large-scale language model with an API compression instruction (first compression instruction) that instructs the compression of the API definition along with the baseline pre-prompt. Compressed snippets (compressed snippets) for the defined types were also obtained by providing the large-scale language model with a snippet compression instruction (second compression instruction) that instructs the compression of the snippet along with the baseline pre-prompt and type definition. Compression of the pre-prompt was performed for each type, thereby obtaining compressed snippets for each type. A pre-prompt set was constructed using the compressed API definitions, response instructions, and compressed snippets for each type.

[0222] Figure 23 shows part of the adopted API definition. Figure 24 shows an example of a snippet. Figure 25 shows a response command. Figure 26 shows an API compression command (first compression command). Figure 27 shows a snippet compression command (second compression command). Figure 28 shows the format of the type definition. Figure 29 shows part of the compression API definition. The API definition consisted of an ImagePatch class and an auxiliary function set. The ImagePatch class stored image regions and included nine methods: 1) crop, 2) overlaps_with, 3) find, 4) exists, 5) best_text_match, 6) verify_property, 7) simple_query, 8) llm_query, and 9) compute_depth. The auxiliary function set included four functions: 1) distance, 2) best_image_match, 3) bool_to_yesno, and 4) coerce_to_numeric. Snippets were prepared for each method and function. The answer instructions were configured to instruct the generation of program code in Python. The pre-prompt set obtained in the generation phase was used in the inference phase.

[0223] Meanwhile, as shown in FIG. 22, the inference phase system is configured to obtain a question type classification result from the large-scale language model by providing a list of questions and types to the large-scale language model. The inference phase system is configured to extract a compressed snippet corresponding to the type classification result from the pre-prompt set, and obtain the extracted compressed snippet, compressed API definition, and answer command as a pre-prompt. The inference phase system is configured to obtain a generation result of program code for solving a question about the target image from the large-scale language model by providing the obtained pre-prompt and question to the large-scale language model. The inference phase system is then configured to obtain a result of solving the question about the target image (inference result) by executing the generated program code in a Python execution environment.

[0224] FIG. 30 shows the format of the type list. The large-scale language model was allowed to select a question type from the provided list. GPT (gpt-3.5-turbo, released as version 1106) provided by OpenAI was used as the large-scale language model in Example 1-1. Claude (claude-3-haiku, released as version 20240307) from Non-Patent Document 3 was used as the large-scale language model in Example 1-2. As described above, the systems of Examples 1-1 and 1-2 were constructed.

[0225] (Comparative Example) The systems of Comparative Examples 1-1 and 1-2 adopted ViperGPT, which is proposed in Non-Patent Document 1. Specifically, by adopting ViperGPT, the systems of Comparative Examples 1-1 and 1-2 were configured to acquire program code by providing a prompt consisting of a baseline pre-prompt and a question to a large-scale language model. Comparative Examples 1-1 and 1-2 differ from the Examples in that they do not classify question types and do not compress pre-prompts.

[0226] The systems of Comparative Examples 2-1 and 2-2 adopted LLMLingua, as proposed in Non-Patent Document 12. Specifically, by adopting LLMLingua, the systems of Comparative Examples 2-1 and 2-2 were configured to compress prompts consisting of baseline pre-prompts and questions using a trained model, and to obtain program code by providing the compressed prompts to a large-scale language model. Comparative Examples 2-1 and 2-2 differ from the Examples in that they do not classify question types, do not use a large-scale language model to compress pre-prompts, and compress pre-prompts without distinguishing between types.

[0227] The systems of Comparative Examples 3-1 and 3-2 were configured by omitting the components related to type classification from the systems of Examples 1-1 and 1-2. Specifically, in Comparative Examples 3-1 and 3-2, in the generation phase, a baseline pre-prompt was provided to a large-scale language model along with each compression command without providing a type definition, thereby acquiring a compressed API definition and a compressed snippet from the large-scale language model. That is, the systems of Comparative Examples 3-1 and 3-2 were configured to simply compress snippets without distinguishing between types. A compressed pre-prompt was constructed using the compressed API definition, compressed snippet, and answer command. In the inference phase, the systems of Comparative Examples 3-1 and 3-2 were configured to acquire program code by providing the obtained compressed pre-prompt and question to a large-scale language model without classifying the question type. Comparative Examples 3-1 and 3-2 differ from the Examples in that they compress pre-prompts without classifying or distinguishing between question types.

[0228] The large-scale language model used in Comparative Examples 1-1, 2-1, and 3-1 was the same large-scale language model (gpt-3.5-turbo) as in Example 1-1. The large-scale language model used in Example 1-2, Comparative Example 2-2, and Comparative Example 3-2 was the same large-scale language model (claude-3-haiku) as in Example 1-2. The baseline pre-prompt in each comparative example was configured to be the same as in the examples. As in the examples, the systems in each comparative example were configured to obtain results (inference results) for solving questions about target images by executing the obtained program code in an execution environment.

[0229] (Evaluation method) As a first indicator, for each dataset, for each of the 2,000 extracted samples, program code for answering questions about images was generated from the questions using the systems of each example and each comparative example. The obtained program code was executed in an execution environment to obtain the results of answering the questions about the images (inference results). The accuracy rate was calculated as the degree of agreement between the obtained inference results and the corresponding correct answers, regardless of case. In addition, for each example and each comparative example, the token length and number of characters of the prompt provided to the large-scale language model when the program code was acquired were calculated. In each example, the prompt provided to the large-scale language model for question type classification was also included in the calculation of the token length and number of characters of the prompt. In calculating the token length and number of characters for each example and each comparative example, the question portion (approximately 10 tokens) of the pre-prompt provided to the large-scale language model was excluded. In each example, since the snippet differed for each type, the token length and number of characters were calculated for each type, and the average token length and number of characters obtained for each type were calculated. Furthermore, for the prompts of Example 1-1, Comparative Example 2-1, and Comparative Example 3-1, the reduction rate from the prompt of Comparative Example 1-1 was calculated.For the prompts of Example 1-2, Comparative Example 2-2, and Comparative Example 3-2, the reduction rate from the prompt of Comparative Example 1-2 was calculated.Furthermore, the token length of the output (program code) of the large-scale language model in each Example and Comparative Example was calculated.

[0230] As a second indicator, the token length and the number of characters of each component (API definition, snippet, response command, type) in the prompt were calculated between Example 1-1 and Comparative Example 1-1. In addition, the reduction rate from each component of Comparative Example 1-1 was calculated for each component of Example 1-1.

[0231] As a third index, the impact of question type classification in Example 1-1 was evaluated. Specifically, for Example 1-1, the classification accuracy for each type of question included in the first dataset was evaluated, and the relationship between the classification result (Predicted label) and the true value (True label) was calculated using a confusion matrix. The correct answer rate and the token length of the prompt (excluding the question) were calculated as follows. Furthermore, in Example 1-1, the part that classifies the question type in the large-scale language model was modified so that the type is manually classified according to the truth value associated with the question (i.e., the correct type of compressed snippet is always selected), thereby creating a first reference example. In Example 1-1, the part that classifies the question type in the large-scale language model was modified so that the question type is randomly selected (i.e., the compressed snippet to be used is randomly selected), thereby creating a second reference example. For the first and second reference examples, the correct answer rate and the token length of the prompt (excluding the question) were calculated using the same method as for the first index. Then, the correct answer rate and the token length of the prompt were compared among Example 1-1, Reference Example 1, Reference Example 2, and Comparative Example 3-1.

[0232] (Evaluation results) Fig. 31 shows the evaluation results of each Example and each Comparative Example based on the first index. Fig. 32 shows the evaluation results of Example 1-1 and Comparative Example 1-1 based on the second index. Fig. 33 shows the confusion matrix related to the accuracy rate of type classification in Example 1-1. Fig. 34 shows the evaluation results of each Example, each Reference Example, and Comparative Example 3-1 based on the third index.

[0233] As shown in Fig. 31, the accuracy rate of the working example was higher than that of the comparative examples for all data sets. In particular, the accuracy rate of the 3-1 comparative example and the 3-2 comparative example, which compress without distinguishing types, was higher than that of the comparative examples. Comparing this example with Examples 1-1 and 1-2, the correct answer rate was significantly improved. This result shows that providing a pre-prompt for each type can improve the accuracy of answer generation. In other words, the effectiveness of the above embodiment, which selects a pre-prompt according to the type of question, was verified.

[0234] Furthermore, as shown in FIG. 32, in Example 1-1, the amount of prompt data increased compared to Comparative Example 1-1 due to the use of a large-scale language model to classify question types. However, by compressing the pre-prompts (API definitions, snippets) used when generating answers, we were able to successfully reduce the number of prompts by more than 70%. This result shows that compressing the pre-prompts reduces the amount of prompt data provided to the generative model, thereby reducing the amount of calculation required by the generative model. It was estimated that the longer the pre-prompts, the more effective the example of the above embodiment in which the pre-prompts are compressed by type becomes.

[0235] Furthermore, as shown in FIG. 33, when a large-scale language model is used to classify question types, it was found that the classification accuracy varies depending on the question type. However, as shown in FIG. 34, when comparing the first reference example, in which a pre-prompt corresponding to the correct answer type is manually provided, with Example 1-1, the variation in the accuracy rate was less than 1% (0.9%). It was found that even if the large-scale language model misclassifies the type, the accuracy of answer generation can be ensured. Note that, as shown in FIG. 34, in the first and second reference examples, the token length of the prompt was reduced by the amount that the large-scale language model was not used for type classification. For example, it was found that by not using a large-scale language model to classify question types, such as by having the user select the type, it is possible to improve the accuracy rate while reducing computational costs.

[0236] This specification includes the following disclosure. [Appendix 1] Accepting questions (30), selecting a pre-prompt (55) from a set of pre-prompts (50) according to the type of question (30) received; providing the selected pre-prompt (55) and the question (30) to a generative model (60) to obtain an answer (35) to the question (30) from the generative model (60); and outputting information about the obtained answers (35); A control unit (11) configured to execute Reasoning device (1). [Appendix 2] The pre-prompt set (50) is configured to include one or more condensed pre-prompts (500) for each type of question (30). 1. An inference device (1) according to claim 1. [Appendix 3] the control unit (11) is further configured to provide the received question (30) and a list (32) of types to a large-scale language model (72), and obtain a result of classifying the type of the question (30) from the large-scale language model (72); selecting the pre-prompt (55) comprises selecting a pre-prompt (55) according to a result of classifying the type of the question (30); An inference device (1) according to appendix 1 or appendix 2. [Appendix 4] The large-scale language model (72) is composed of a large-scale visual language model (73), Accepting the question (30) includes acquiring a target image (33) related to the question (30); providing the question (30) and the list of types (32) to the large-scale language model (72) comprises providing the question (30), the acquired target image (33), and the list of types (32) to the large-scale visual language model (73); 1. The inference device (1) according to claim 3. [Appendix 5] receiving the question (30) includes obtaining accompanying information (305) related to the question (30); the control unit (11) is further configured to classify the type of the question (30) according to the acquired accompanying information (305); selecting the pre-prompt (55) comprises selecting a pre-prompt (55) according to a result of classifying the type of the question (30); An inference device (1) according to any one of appendices 1 to 4. [Appendix 6] receiving the question (30) includes obtaining context information (31) for the question (30); providing the selected pre-prompt (55) and the question (30) to a generative model (60) comprises providing the selected pre-prompt (55), the acquired context information (31), and the question (30) to the generative model (60); An inference device (1) according to any one of appendices 1 to 5. [Appendix 7] The generative model (60) is composed of a large-scale language model (61). An inference device (1) according to any one of appendices 1 to 6. [Appendix 8] the question (30) is configured to present an inference task (T1); The answer (35) is composed of a program code (Z1) for performing the inference task (T1). An inference device (1) according to any one of appendices 1 to 7. [Appendix 9] Accepting the question (30) includes acquiring a target image (33) related to the question (30); The inference task (T1) includes inferring features appearing in the target image (33); 1. The inference device (1) according to claim 8. [Appendix 10] the inference task (T1) includes inferring an action sequence of a robotic device (R1); the program code (Z1) includes a control code (Z11) for causing the robot device (R1) to execute the action of the inferred action sequence; 1. The inference device (1) according to claim 8. [Appendix 11] the question (30) is configured to indicate an action sequence to be inferred for the robotic device (R2); The answer (35) is composed of a description (Z2) for planning that generates an action plan for the sequence of actions to be inferred. An inference device (1) according to any one of appendices 1 to 7. [Appendix 12] the question (30) is configured to indicate a strategy for dealing with a target error of the device (R3); The answer (35) is composed of a result of inferring a measure to deal with the target error. An inference device (1) according to any one of appendices 1 to 7. [Appendix 13] On the computer (1), Accepting questions (30), selecting a pre-prompt (55) from a set of pre-prompts (50) according to the type of question (30) received; providing the selected pre-prompt (55) and the question (30) to a generative model (60) to obtain an answer (35) to the question (30) from the generative model (60); and outputting information about the obtained answers (35); In order to execute Inference program (81). [Appendix 14] The pre-prompt set (50) is configured to include one or more condensed pre-prompts (500) for each type of question (30). The inference program (81) described in Appendix 13. [Appendix 15] The computer (1) Accepting questions (30), selecting a pre-prompt (55) from a set of pre-prompts (50) according to the type of question (30) received; providing the selected pre-prompt (55) and the question (30) to a generative model (60) to obtain an answer (35) to the question (30) from the generative model (60); and outputting information about the obtained answers (35); To execute Reasoning method. [Appendix 16] The pre-prompt set (50) is configured to include one or more condensed pre-prompts (500) for each type of question (30). The inference method described in Appendix 15. [Appendix 17] Computer (2) Accepting the specification of the question type (41), Accepting the specification of a pre-prompt (43); compressing the specified pre-prompt (43) according to the specified type (41); generating a preprompt set (40) including compressed preprompts (400) for each type (41) by specifying the type (41), specifying the preprompt (43), and compressing the preprompt (43) for each type (41); storing the generated pre-prompt set (40); To execute Generation method. [Appendix 18] compressing the pre-prompt (43) comprises providing the specified type (41) and the specified pre-prompt (43) to a large-scale language model (70) to obtain a compressed pre-prompt (400) from the large-scale language model (70). 18. The method of generating the same as in Appendix 17. [Appendix 19] The computer (2), When an unknown type (411) of the question is given, a pre-prompt (431) corresponding to the unknown type (411) is accepted; compressing the specified pre-prompt (431) according to the unknown type (411); and updating the preprompt set (40) by adding the compressed preprompt (401) of the unknown type (411) to the preprompt set (40); Further execute 19. The method of claim 17 or 18. [Appendix 20] Accepting the specification of the question type (41), Accepting the specification of a pre-prompt (43); compressing the specified pre-prompt (43) according to the specified type (41); generating a preprompt set (40) including compressed preprompts (400) for each type (41) by specifying the type (41), specifying the preprompt (43), and compressing the preprompt (43) for each type (41); storing the generated pre-prompt set (40); A control unit (21) configured to execute Generator (2). [Explanation of symbols]

[0237] 1... Reasoning device, 11...control unit, 12...storage unit, 13...communication interface, 14...input device, 15...output device, 16...drive, 81...inference program, 91...storage medium, 111...acquisition unit, 112...selection unit, 113...inference unit, 114...output processing unit, 30...Question, 35...Answer, 50…Preprompt Set, 55…Preprompt 60...generative model, 2...Generation device, 21...control unit, 22...storage unit, 23...communication interface, 24...input device, 25...output device, 26...drive, 82...generation program, 92...storage medium, 211...designation unit, 212...compression unit, 213...storage processing unit, 41...Type, 43...Preprompt, 400...Compressed pre-prompt, 40...Pre-prompt set

Claims

1. Accepting questions, selecting a pre-prompt from a set of pre-prompts that corresponds to the type of question received; providing the selected pre-prompt and the question to a generative model to obtain an answer to the question from the generative model; and outputting information about the obtained answers; a control unit configured to perform Reasoning device.

2. the preprompt set is configured to include one or more condensed preprompts for each question type; The inference device according to claim 1 .

3. the control unit is further configured to provide the list of received questions and types to a large-scale language model, and obtain a result of classifying the question type from the large-scale language model; selecting the pre-prompt comprises selecting a pre-prompt according to a result of classifying the type of the question; The inference device according to claim 1 .

4. the large-scale language model is composed of a large-scale visual language model; accepting the question includes acquiring a target image related to the question; providing the question and the list of types to the large-scale language model comprises providing the question, the acquired target images, and the list of types to the large-scale visual language model. The inference device according to claim 3 .

5. accepting the question includes obtaining accompanying information related to the question; the control unit is further configured to classify the question type according to the acquired accompanying information; selecting the pre-prompt comprises selecting a pre-prompt according to a result of classifying the type of the question; The inference device according to claim 1 .

6. accepting the question includes obtaining context information for the question; providing the selected pre-prompt and the question to a generative model comprises providing the selected pre-prompt, the obtained context information, and the question to the generative model. The inference device according to claim 1 .

7. The generative model is composed of a large-scale language model. The inference device according to claim 1 .

8. the question is configured to present an inference task; the answer is comprised of program code for performing the inference task; The inference device according to claim 1 .

9. accepting the question includes acquiring a target image related to the question; the inference task includes inferring features appearing in the target image; The inference device according to claim 8.

10. the inference task includes inferring a motion sequence of a robotic device; the program code includes control code for causing the robot device to execute the action of the inferred action sequence; The inference device according to claim 8.

11. the question is configured to indicate an action sequence to be inferred for the robotic device; the answer comprises a planning description that generates an action plan for the sequence of actions to be inferred; The inference device according to claim 1 .

12. the question is configured to suggest a strategy for addressing a target error of the device; The answer is comprised of a result of inferring a strategy for dealing with the target error. The inference device according to claim 1 .

13. On the computer, Accepting questions, selecting a pre-prompt from a set of pre-prompts that corresponds to the type of question received; providing the selected pre-prompt and the question to a generative model to obtain an answer to the question from the generative model; and outputting information about the obtained answers; In order to execute Inference program.

14. the preprompt set is configured to include one or more condensed preprompts for each question type; The inference program according to claim 13.

15. The computer Accepting questions, selecting a pre-prompt from a set of pre-prompts that corresponds to the type of question received; providing the selected pre-prompt and the question to a generative model to obtain an answer to the question from the generative model; and outputting information about the obtained answers; To execute Reasoning method.

16. the preprompt set is configured to include one or more condensed preprompts for each question type; 16. The inference method of claim 15.

17. The computer Accepting specification of question types; Accepting pre-prompt specifications, compressing the specified pre-prompt according to the specified type; The type specification, the pre-prompt specification, and the pre-prompt compression are generating a preprompt set including the compressed preprompts for each of the types; and saving the generated pre-prompt set; To execute Generation method.

18. compressing the pre-prompt comprises providing the specified type and the specified pre-prompt to a large-scale language model, and obtaining a compressed pre-prompt from the large-scale language model.

18. The method of claim 17.

19. The computer When an unknown type of the question is given, accepting a designation of a pre-prompt corresponding to the unknown type; compressing the specified pre-prompt according to the unknown type; and updating the preprompt set by adding the compressed preprompt of the unknown type to the preprompt set; Further execute 18. The method of claim 17.

20. Accepting specification of question types; Accepting pre-prompt specifications, compressing the specified pre-prompt according to the specified type; generating a preprompt set including compressed preprompts for each type by specifying the type, specifying the preprompt, and compressing the preprompts for each type; and saving the generated pre-prompt set; a control unit configured to perform generator.