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

The reasoning device enhances answer generation accuracy in large-scale language models by using type-specific pre-prompts and optional large-scale language model classification, addressing noise and computation issues in conventional methods.

WO2026018653A1PCT designated stage Publication Date: 2026-01-22OMRON CORP +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2025/023189
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-16
Filing Date
2025-06-27
Publication Date
2026-01-22

AI Technical Summary

Technical Problem

Conventional methods using large-scale language models for answer generation suffer from decreased accuracy due to unnecessary information in pre-prompts acting as noise, which increases data volume and computation requirements.

Method used

A reasoning device that selects pre-prompts specific to the question type, using a set of optimized pre-prompts to reduce noise and computation, and optionally employs a large-scale language model for question type classification and context consideration.

Benefits of technology

Improves answer generation accuracy by reducing noise and computation, while minimizing implementation costs and enhancing scalability and versatility in question type classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025023189_22012026_PF_FP_ABST
    Figure JP2025023189_22012026_PF_FP_ABST
Patent Text Reader

Abstract

An inference device (1) according to one aspect of the present invention receives a question (30), selects a pre-prompt (55) corresponding to the type of the received question (30) from a pre-prompt set (50), acquires an answer (35) to the question (30) from a generative model (60) by providing the selected pre-prompt (55) and the question (30) to the generative model (60), and outputs information relating to the acquired answer (35). The answer (35) generation accuracy of the generation model (60) is thus improved.
Need to check novelty before this filing date? Find Prior Art

Description

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

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

[0002] In recent years, there has been progress in the development of technologies that utilize generative models such as large-scale language models (LLMs). 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 using 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. This makes it possible to increase the transparency of the inference process of the large-scale language model.

[0003] “ViperGPT: Visual Inference via Python Execution for Reasoning”, [online], [June 28, 2005], Internet <URL: https: / / arxiv.org / abs / 2303.08128> Tom B. Brown, et al. “Language Models are Few-Shot Learners”, [online], [June 28, 2005], Internet <URL: https: / / arxiv.org / abs / 2005.14165> “claude”, [online], [June 28, 2005], Internet <URL: https: / / claude.ai> 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>Swarup Ranjan Behera, et al. "AQUALLM: Audio Question Answering Data Generation Using Large Language Models", [online], [Reiwa June 28, 2016], インターネット<URL:https: / / arxiv.org / abs / 2312.17343v1>"pddlstream", [online], [Reiwa June 28, 2018], インターネット<URL:https: / / github.com / caelan / pddlstream>"The Fast Downward Planning System", [online], [Searched on June 28, Reiwa 6], Internet <URL: https: / / planning.wiki / ref / planners / fd> James J. Kuffner, et al.“RRT-Connect: An Efficient Approach to Single-Query Path Planning”, [online], [Retrieved June 28, 2024], Internet <URL: https: / / www.cs.cmu.edu / afs / cs / academic / class / 15494-s12 / readings / kuffner_icra2000.pdf> Drew A. Hudson, et al. “GQA: A New Dataset for Real-World Visual Reasoning and Compositional Question Answering”, [online], [Retrieved June 28, 2024], Internet <URL: https: / / arxiv.org / abs / 1902.09506> Yash Goyal, et al. “Making the V in VQA Matter: Elevating the Role of Image Understanding in Visual Question Answering”, [online], [Retrieved June 28, 2024] Internet: <URL: https: / / arxiv.org / abs / 1612.00837> Alane Suhr, et al. “A Corpus for Reasoning About Natural Language Grounded in Photographs”, [online], [Retrieved June 28, 2024], Internet: <URL: https: / / arxiv.org / abs / 1811.00491> Huiqiang Jiang, et al. “LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models”, [online], [Retrieved June 28, 2024], Internet: <URL: https: / / arxiv.org / abs / 2310.05736>.

[0004] The present inventors have found that the above-mentioned conventional methods have the following problems. Specifically, to improve the accuracy of answer generation, a pre-prompt is sometimes provided 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, an API Specification is provided to a large-scale language model as a pre-prompt. If this pre-prompt is configured to be able 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. This unnecessary part acts as noise when generating an answer to the question, which may result in a decrease in the accuracy of answer generation.

[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.

[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 pre-prompts corresponding to the question type are 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 constituting each pre-prompt to be narrowed. For example, pre-prompts may be optimized for each type. This reduces the amount of pre-prompt noise that may be present 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 inference device according to the above aspect, the large-scale language model may be configured with a large-scale visual language model. Receiving the question may include acquiring target images related to the question. Providing the list of the question and the types to the large-scale language model may be configured by providing the question, the acquired list of target images, and the types to the large-scale visual language model. With this configuration, by further considering images when classifying question types, it is possible to expect an improvement in the accuracy of question type classification. Furthermore, along with the improvement in the accuracy of question type classification, it is possible to expect an improvement in the accuracy of answer generation 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 reasoning device according to the above aspect, the question may be configured to infer a measure to deal with a target error of the device. The answer may be configured as a result of inferring a measure to deal with the target error. With this configuration, improved accuracy in generating an answer can be expected when generating a measure to deal with a device error.

[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] Note that the present invention does not need to be limited to the inference device (information processing device). 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 does not need to be limited to the generation method (information processing method). 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 be a program that causes a computer 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 about 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.

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

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

[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 Example Figure 1 shows a schematic diagram of 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 inference device 1 receives a question 30. The inference 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 inference device 1 provides the selected preprompt 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 inference device 1 outputs information related to the acquired answer 35.

[0033] In this embodiment, a preprompt set 50 is prepared, and preprompts 55 corresponding to the type of question 30 are 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 type 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 the 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. The text expression may be composed of text data or tokens that indicate the content of the question, such as, for example, "How many slices of carrot are there?" The tokens may be obtained by converting the 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 a query regarding a feature appearing in the sensing data. As an example, the query 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 sensing data can reflect the feature of an error, the question may include a request for detection of the occurrence of the error, a query regarding a remedy for the detected error, etc. Furthermore, when a code signal is used, the question may be composed of a query 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 query regarding a remedy 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] (Method of Obtaining Question) The question (question 30) may be provided by any method. 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 question candidates. 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 question candidate may be provided in advance based on the corresponding context. Each question candidate 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 a situation in which the object of observation is a robotic device and a question (question 30) about the robotic device is obtained, one or more sensors may be disposed outside or inside the robotic device, and the status of the robotic device may be observed by the one or more sensors. At least one of sensing data obtained by the one or more sensors and an analysis result of the sensing data may be obtained as an example of observation information. The analysis result may be the position, posture, operating status, etc. of the robotic device. Furthermore, environmental information about the environment of the robotic device may be obtained 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. The attribute information may be static information such as the name of the object, characteristics related to its appearance (e.g., color, shape, size, etc.). The domain information may be provided by any method, such as user input or predetermined information.

[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. Context categories 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 inference of a measure to address the corresponding error (i.e., to request an answer regarding a measure to address the error). Accordingly, when the occurrence of a target error in the robotic device is identified from the observation information, a question candidate indicating inference of a measure to address the target error 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 related to the inference result. As long as the answer 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 from 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. Furthermore, 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 the 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 a case 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 to generate 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 the generative model 60 for each type, such as instructions specifying the format of the answer 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 in 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 as appropriate using 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) Figure 2 shows a schematic diagram of 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 shown in Figure 2 assumes a scene 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 generation 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 generation 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 generation device 2 and an external storage device located outside the generation device 2. The external storage device may include a NAS (Network Attached Storage) or the like.

[0058] (Specifying Type) 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 specification of the type 41 may be performed at least partially automatically 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 provided by a user. In another example, the specification of the pre-prompt 43 may be performed at least partially automatically. For example, the generation device 2 may search information stored in at least one of the web and 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 import 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 Portion) In correspondence with the pre-prompt 500 described above, 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 partially include common information. The common information may be at least partially compressed, or 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 combine the compressed pre-prompt 400 for each type 41 with the compressed common information to obtain a final pre-prompt 400 for each type 41. 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 compressed pre-prompt 400 for each type 41 and the instructions given to the generative model 60 as separate information. The common information and 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 below 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. The large-scale language model 70 may be a publicly known model, such as those described in Non-Patent Documents 2 and 3. 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 preprompt 43 may be performed within the generation device 2, or may be performed by an external computer other than the generation device 2. In one example, the generation device 2 may store a large-scale language model 70, provide the type 41 and the preprompt 43 to the large-scale language model 70, and perform calculations on the large-scale language model 70. As a result, the generation device 2 may generate a compressed preprompt 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 compression command using the large-scale language model 70, along with the type 41 and the preprompt 43. The external computer may generate the compressed preprompt 400 by performing calculations on the large-scale language model 70 in accordance with the command. The generation device 2 may obtain the generated preprompt 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. By including the compression command in the input information, 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 as appropriate 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] (Preprompt 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 preprompt (preprompt 500, preprompt 55) used in the inference phase need not be limited to this example. In another example, the preprompt used in the inference phase may not be compressed. For example, the preprompt 43 specified for each type 41 may be used as the preprompt 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 question type may be determined based 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 one example, if the question 30 is configured to indicate an inference task and the answer 35 is configured to indicate program code for performing the inference task, the type of the question 30 may be determined according to the type of inference task. As another example, if the question 30 is configured to request inference of a strategy for addressing a target error and the answer 35 is configured to indicate the result of inferring a strategy for addressing 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 may be classified based on any information other than the questions 30 (such as associated information, which will be described later). The types of questions 30 may 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 constituting 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 calculation parameters using training samples. The training samples and true values ​​used in machine learning may be collected as appropriate. A machine learning model (classification model) may be trained as appropriate by machine learning to acquire the ability to classify the type of question 30.

[0075] (I) First Classification Method FIG. 4 schematically illustrates an example of a method for classifying the type of question 30 in this embodiment. As shown in FIG. 4 , in one example, the inference device 1 may be configured to further execute the steps of providing a list 32 of received questions 30 and their types to a large-scale language model 72, and then obtaining a classification result of the type of 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 question 30 may be configured by selecting a matching type from the provided list 32. Selecting a 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 question 30. According to this example of the present embodiment, 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] Note that in the example of FIG. 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] In addition, 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. That is, 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. That is, the large-scale language model 72 may be a model separate from the large-scale language model 70. A known model such as those described in Non-Patent Document 2 or Non-Patent Document 3 may be adopted as the large-scale language model 72. 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 a 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 the question 30, it is possible to expect an improvement in the accuracy of classifying the type of the question 30. Furthermore, along with the improvement in the accuracy of classifying the type of the question 30, it is possible to expect an improvement in the accuracy of generating an answer 35 by using an appropriate pre-prompt 55.

[0079] Note that the matters regarding the large-scale language model 72, such as the fact that the above list 32 can be omitted, also apply to situations in which the large-scale visual language model 73 is employed. A publicly known model, such as that described in 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 expressions (language), such as an Audio Question Answering Model (Non-Patent Document 5, etc.), may be employed as the large-scale language model 72. For example, a large-scale model configured to be able to accept data of one or more modalities other than language, such as a Large Audio Model, may be employed as the machine learning model for classifying the type of question 30.

[0080] (II) Second Classification Method Figure 6 schematically shows another example of a method for classifying the type of question 30 in this embodiment. As shown in Figure 6, in one example, receiving the question 30 may include acquiring accompanying information 305 related to the question 30. The inference device 1 may be configured to further classify the type of the question 30 in accordance with the acquired accompanying information 305. Selecting a 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 the question 30 can be classified, the type of the 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 the 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 the 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, the accuracy of the type classification can be expected to 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 types of sensors used in various situations, such as acquiring the question 30 and the accompanying information 305, may be selected appropriately depending on the embodiment. The sensors may include, for example, a camera, a depth sensor, an infrared sensor, an optical sensor, 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 or a GNSS (Global Navigation Satellite System) sensor. The sensing data may include, for example, image data, depth data, infrared data, measurement data from an optical sensor (e.g., marker detection results), radar data, LiDAR data, sound data, position data, and other measurement data. The sensors may also include one or more measurement sensors for measuring the state of the robot device. The measurement sensors may include, for example, an encoder, a motion capture device, a tactile sensor, a force sensor, and the like. 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 associated information 305, the method for classifying the type of question 30 from the associated 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 associated 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 associated 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 associated information 305.

[0085] (III) Others 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 calculation 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 calculation 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 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 store the preprompt set 50 in its own memory resources. The inference 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 inference 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 inference 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 to select a corresponding preprompt 55 from the preprompt set 50. The selection of a preprompt 55 by the inference device 1 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 as or different from the external computer that selects a preprompt 55 from the preprompt set 50. The external computer may obtain the results of classifying the type of question 30 from either the inference device 1, its own calculation results, or another external computer, and may select a pre-prompt 55 depending on the obtained classification results.

[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 the preprompt 43. This allows for the generation of 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 needed. 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 classification method for the unknown type 411 may be determined appropriately depending on the embodiment. For example, as categories for classifying the types 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 or not 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] [Generation Model] As long as the answer 35 can be generated from input information including the question 30, the configuration of the generation model 60 is not particularly limited and may be determined appropriately depending on the embodiment. The generation 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 (generation 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, and the connection relationships between the nodes in each layer. 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 a long short-term memory (LSTM). The neural network may also include any type of model such as a diffusion model or a transformer model. The connection weights between each node included in the neural network and the threshold value of each node are examples of calculation parameters. The machine learning method may be selected appropriately depending on the embodiment of the employed machine learning model (e.g., 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. This is expected to reduce implementation costs.

[0097] Note that when the large-scale language model 72 (large-scale visual language model 73) is used to classify the type of the question 30, in one example, the large-scale language model 61 may be the same as the large-scale language model 72 (large-scale visual language model 73) used for classification. That is, the large-scale language model 61 may also be used as the large-scale language model 72 (large-scale visual language model 73). 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). That is, 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 the large-scale language model 70 is used to compress the pre-prompt 43, in one example, the large-scale language model 61 may be the same as the large-scale language model 70 used for compression. That is, the large-scale language model 61 may also be used as the large-scale language model 70. In another example, the large-scale language model 61 may be different from the large-scale language model 70. That is, the large-scale language model 61 may be a model separate from the large-scale language model 70.

[0099] The type of the 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 as well as 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 be a large-scale model that can accept data of one or more modalities other than language, such as a large audio model.

[0100] (Input Information) When the type of the question 30 is predetermined, the configuration of the input information (prompt) to be provided to the generative model 60 is not particularly limited as long as it includes at least part of the information of the question 30 and the pre-prompt 55, and may be determined appropriately depending on the embodiment. The input information may be configured to further include optional information, or may not include optional information. For example, when the 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 a 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 be configured by 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 used 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] At least one of the question 30 and the context information 31 may be composed of any information, such as a text expression, sensing data, etc. When the large-scale language model 61 is used as the generative model 60, if the large-scale language model 61 can accept the input information, the input information including the question 30 and the context information 31 may be provided to the large-scale language model 61 as is. If the large-scale language model 61 cannot accept the input information, the input information may be provided to the large-scale language model 61 after being converted into an acceptable format, such as a text expression.

[0105] (Calculation Processing) The calculation 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 calculation 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 the generative model 60 with a prompt including the question 30 and the pre-prompt 55, and perform the calculation processing of the generative model 60. As a result of this calculation processing, the inference device 1 may obtain the generation 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] 10 is a diagram illustrating an example of a first example of a situation to which this embodiment is applied. The first example is an example of a situation in which this embodiment is applied to a system that generates a program code Z1 for an inference task T1.

[0109] In the inference phase, the 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 output information may be selected as appropriate depending on the embodiment. In one example, outputting information related to the answer 35 may include executing the generated program code Z1 on the execution environment E1. The execution environment E1 may be configured as appropriate 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 the execution environment E1 constructed within the inference device 1, or may provide the program code Z1 to the external computer and cause the external computer to execute information processing. As a result, the result of executing the inference task T1 that solves the question 30 (the inference result) can be obtained as the output of information related to the answer 35.

[0111] In the generation phase, each type 41 may be defined arbitrarily, and the 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. The 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-prompts (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-prompts may include, for example, class definitions, method definitions, functions, etc. As an example, the pre-prompts may include an API (Application Programming Interface) definition, a code example S1, etc. The example S1 may include one or more 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 generator 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 to instruct the compression of the baseline pre-prompt and 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 sample examples 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 sample examples. The second compression command may be configured to specify conditions for compressing the sample examples. The baseline pre-prompt used to generate the compressed sample examples may be the same as the pre-prompt used to generate the compressed API definition. Furthermore, when generating the compressed sample examples, 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 sample examples for each type 41 by performing a sample example compression process for each type 41.

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

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

[0117] According to the first example, in the inference phase, a pre-prompt 55 (such as sample example S1) appropriate for the type of question 30 is used to generate the answer 35 (program code Z1). The pre-prompt 55 may be a pre-prompt 400 obtained in the generation phase. This can be expected to improve the accuracy of generating the answer 35 when generating the 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) Scenario 1-1 Fig. 11 shows an example of a scenario of Case 1-1 to which this embodiment is applied. Case 1-1 is an example of a scenario 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 Case 1-1, receiving the question 30 may include acquiring a target image 33 related to the question 30. The inference task T1 may include inferring features appearing in the target image 33. The features to be inferred are not particularly limited and may be selected appropriately depending on the embodiment. Inferring features appearing in the 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 first-1 case, 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 needed. 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) Scenario 1-2 Figure 12 shows a schematic diagram of an example of a scenario of Case 1-2 to which this embodiment is applied. Case 1-2 is an example of a scenario in which this embodiment (Case 1) 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 instruction that specifies the generation of 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 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 the first-2 example, 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 used in a production line, an autonomous robot configured to operate autonomously, or a mobile body configured to move. The industrial robot may be, for example, a vertical articulated robot, a horizontal articulated robot (SCARA robot), a parallel link robot, or an orthogonal robot. The autonomous robot may be, for example, a humanoid robot, a guide robot, an agricultural robot, a care robot, a security robot, or a transport robot. The content of the autonomous processing may be selected appropriately depending on the embodiment. The mobile body may include, for example, a cleaning robot, the above-mentioned autonomous robot configured to move (including a mobile robot), a vehicle configured to be self-driving, or an air vehicle capable of self-flying (such as a drone). 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 this 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 this 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 at home, the prioritized action may differ depending on the circumstances surrounding the white liquid. In one 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 of moving the person away and a second action of wiping 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 Example Fig. 13 shows a schematic diagram of an example of a second case example to which this embodiment is applied. The second case example is an example of a case in which this embodiment is applied to a system that generates a description Z2 for planning a robot device R2. The type of the 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 the problem description and the domain description 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 provided by a language for a planner (planning description language), such as PDDL (Planning Domain Definition Language) or PDDLStream (Non-Patent Document 6). This makes it easier for the planner to generate an action plan from the problem description and the domain description. In another example, the problem description and the domain description may not follow 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 by a planner (such as a large-scale language model) that can accept input in any format, without following the predetermined format.

[0139] The inference device 1 may output information relating to the obtained 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 regarding 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 control code from the generated action plan. The type of planner P2 is not particularly limited and may be selected as appropriate depending on the embodiment. A known planner may be used for the planner P2. In one example, the planner P2 may include a symbolic planner and a motion planner. The symbolic planner may be configured to generate an action plan from a description for planning. For example, a known symbolic planner such as Fast Downward in Non-Patent Document 7 may be used for the symbolic planner. The motion planner may be configured to generate control code from the action plan. For example, a known motion planner such as RRT-connect in Non-Patent Document 8 may be used for the motion planner. In another example, the planner P2 may be configured using 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 and 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 execute the computational processing of the planner P2 in accordance with the provided instruction, thereby generating the control code from the description Z2. 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 operation of the robot device R2 in accordance with the generated control code. The inference device 1 may directly control the operation of the robot device R2 in accordance with the obtained control code, or may indirectly control the operation 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 Example 1-2 above, when a configuration that provides context information 31 is adopted, at least one of the content of actions and the priority of actions included in the inferred action 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 defined arbitrarily, and the 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 task conditions such as the type of robot device R2 and the type of task. The 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, for each type 41, a compressed pre-prompt 400 that can be used to generate a description for planning.

[0145] 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 description (Description Z2) for planning. The pre-prompts 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 example S2) appropriate for the type of question 30 is used to generate the answer 35 (description Z2 for planning). 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 the description Z2 for planning the robot device R2. Furthermore, because the pre-prompt 55 is compressed, the amount of calculation required by the generation model 60 when generating the answer 35 can be reduced.

[0147] 14 is a diagram illustrating an example of a third case where the present embodiment is applied. The third case is an example of a case where the present 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 the 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 an automatically executable measure, a manual measure, and an inquiry due to an inability to handle 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 (e.g., a red lamp, a yellow lamp, etc.). 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 specified computer as an example of information regarding the answer 35. The specified computer may be at least one of the inference device 1 and another information processing device other than the inference device 1. The specified computer may be selected arbitrarily. As a typical example, the specified computer may be a terminal held by an administrator of device R3. The terminal held by the administrator of device R3 may be the inference device 1 or another 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. In this case, the target error may be addressed by manual operation by an administrator, etc. The manual operation may include at least one of direct operation of 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 device R3 in accordance with the generated countermeasure. The inference device 1 may directly control the operation of 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 the 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. The 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. By compressing the pre-prompt 43 for each type 41, the generation device 2 may 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) Fig. 15 shows a schematic 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 memory 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 hardware processor such as a central processing unit (CPU), a random access memory (RAM), and a read-only memory (ROM), 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 storage unit 12 may be configured, for example, with a hard disk drive or a solid-state drive. The storage unit 12, RAM, and ROM are examples of memory resources. In this embodiment, the storage unit 12 stores various information such as the inference program 81, the preprompt set 50, the model data 600, and the 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 configuration of 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 pre-prompt 55 is selected by an external computer, the pre-prompt set 50 may be omitted from the storage unit 12. When the calculation processing of the generation 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 generation 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 into one device, for example, 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, the preprompt set 50, the model data 600, and the 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 (such as stored programs) electrically, magnetically, optically, mechanically, or chemically so that a computer or other machine can read the information. The storage unit 12 and the storage medium 91 are examples of non-transitory storage media. The inference device 1 may acquire at least one of the inference program 81, the preprompt set 50, the model data 600, and the model data 720 from the storage medium 91. The storage medium 91 may be a disk-type storage medium such as a CD or DVD, or a non-disk-type storage medium such as a semiconductor memory (e.g., 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 may 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] 16 is a schematic diagram illustrating an example of a 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 preprompt 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 preprompt 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 may acquire at least one of the generation program 82, the preprompt set 40, and the model data 700 from the storage medium 92. At least one of the generation program 82, the preprompt set 40, and the model data 700 may be stored in an external storage device.

[0171] The generation device 2 may perform data communication with another computer (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) Fig. 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 included 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 obtaining 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 obtained answer 35.

[0175] (Generation Device) Figure 18 shows a schematic diagram of 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 a 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 saving processing unit 213 is configured to save the generated pre-prompt set 40.

[0177] (Other) 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 Operational Example [Generation Device] Figure 19 is a flowchart showing an example of the processing procedure of the generation device 2 according to this embodiment. The processing procedure of the generation device 2 described below is an example of a generation method executed by a computer. However, the processing procedure of the generation device 2 described below is merely an example, and each step may be modified 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, the control unit 21 operates as the designation unit 211 and accepts the designation of the question type 41. In step S102, the control unit 21 operates as the designation unit 211 and accepts the designation of the 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, the control unit 21 operates as the compression unit 212 and compresses the specified pre-prompt 43 in accordance with the specified type 41. As a result, a compressed pre-prompt 400 corresponding to the 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 using any method. 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 pre-defined types 41. In other words, the control unit 21 may determine that any types 41 for which pre-prompts 400 have not been generated remain depending on whether compressed pre-prompts 400 have not been generated for at least some of all pre-defined types 41. The control unit 21 may determine that 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 pre-defined 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 the 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, the 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. Once 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 of these. 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 for 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 timing and by any method. 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 preprompt set 40 by periodically or irregularly repeating the processing of steps S101 to S105. During this repetition, at least a portion of the types 41 and preprompts 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 preprompt set 40 to the inference device 1 as appropriate. This may update the preprompt set 50 (preprompt set 40) held in the inference device 1.

[0192] The preprompt set 40 may also be updated when an unknown type 411 is provided. When an unknown type 411 is provided, 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 a 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 allows a compressed preprompt 401 corresponding to the unknown type 411 to be generated. 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 preprompts 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 preprompts 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 preprompt set 40 by adding the compressed preprompt 401 for the unknown type 411 to the preprompt set 40. The generated preprompts 401, like the preprompt set 40, may be provided from the generation device 2 to the inference device 1 at any timing and by any method.

[0193] [Inference Device] Figure 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 modified 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. In another example, the question 30 may be provided in correspondence with any one of the first case (case 1-1, case 1-2), the second case, and the 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, thereby obtaining a 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 a 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, a 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 with 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 a preprompt 55 may be performed by either the inference device 1 or an external computer. After selecting a 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 generative model 60 may be configured with a large-scale language model 61. The control unit 11 may provide the pre-prompt 55 and the question 30 to the large-scale language model 61, thereby obtaining an answer 35 to the question 30 from the large-scale language model 61. When obtaining the context information 31, the control unit 11 may further provide the context information 31 to the large-scale language model 61, thereby obtaining the answer 35.

[0205] The computational processing of the generative model 60 (large-scale language model 61) may be executed by either the inference device 1 or an external computer. In one example, the control unit 11 (inference unit 113) may include the generative model 60 (large-scale language model 61) by holding model data 600. In this case, the control unit 11 may acquire the answer 35 to the question 30 by executing computational processing of the generative model 60 (large-scale language model 61). In another example, the generative model 60 (large-scale language model 61) may be deployed in an external computer. In this case, the answer 35 to the question 30 may be generated by computational processing of 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 related to the acquired answer 35.

[0208] The output destination and the content of the information to be output may be selected as appropriate 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, controlling the operation of the controlled device in accordance with the answer 35, etc. The output destination may be, for example, RAM, the storage 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 the 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 the 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 execute a process of updating 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 suspend execution of the process 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 execution of the process from step S203. In another example, the control unit 11 may continue execution of the process 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 extended information for the question 30. In step S204, the control unit 11 may construct a prompt using the acquired extended information and 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 constitutes 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 Modifications 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 generating 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 may not be 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, in the processing procedure of the inference device 1 according to the above embodiment, steps may be omitted, replaced, or added. 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 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] (Datasets) First, we prepared three datasets: Dataset 1 (GQA), Dataset 2 (VQAv2), and Dataset 3 (NLVR2). Each dataset is designed to be usable for Visual Question Answering (VQA) by associating questions and their answers with images.

[0218] The first dataset (GQA) was proposed in Non-Patent Document 9. The first dataset included five types of questions: Type 1 (obj), Type 2 (cat), Type 3 (attr), Type 4 (rel), and Type 5 (global). Type 1 (obj) questions asked about the existence of an object. Type 2 (cat) questions asked about the identification of an object within a category. Type 3 (attr) questions asked about the state (attributes, location, etc.) of an object (e.g., "What is the color of the bar?", "On which of the image is the foo?", etc.). Type 4 (rel) questions were questions derived from affirmative sentences and asked 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

[10] . The second dataset (VQAv2) included free-form questions about images that required understanding of the visual content to generate an answer. 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 Setting) The task of generating answers to questions was the one described in Example 1-1 above. That is, 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] (Examples) Figures 21 and 22 show the processing steps in the generation phase and inference phase of Examples 1-1 and 1-2 (Figure 21 shows the generation phase, and Figure 22 shows the inference phase). As shown in Figure 21, in each Example, the system configuration for the generation phase was the same as that of the above-mentioned 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 Figure 22, in each Example, the system configuration for the inference phase was the same as that of the above-mentioned 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 FIG. 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. Furthermore, a snippet compression instruction (second compression instruction) that instructs the compression of the snippet along with the baseline pre-prompt and type definition was provided to the large-scale language model to obtain compressed snippets for the defined types. 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] FIG. 23 shows a portion of the adopted API definition. FIG. 24 shows an example of a snippet. FIG. 25 shows a response command. FIG. 26 shows an API compression command (first compression command). FIG. 27 shows a snippet compression command (second compression command). FIG. 28 shows the format of a type definition. FIG. 29 shows a portion of the compression API definition. The API definition consisted of an ImagePatch class and an auxiliary function set. The ImagePatch class stored an image region 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 provide a list of questions and types to the large-scale language model, thereby obtaining a question type classification result from 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 provide the obtained pre-prompt and question to the large-scale language model, thereby obtaining a generation result of program code for solving a question regarding the target image from the large-scale language model. The inference phase system is then configured to execute the generated program code in a Python execution environment, thereby obtaining a result of solving the question regarding the target image (inference result).

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

[0225] (Comparative Examples) The systems of Comparative Examples 1-1 and 1-2 employed ViperGPT, which is proposed in Non-Patent Document 1. Specifically, by employing 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 employed LLMLingua, as proposed in Non-Patent Document 12. Specifically, by employing 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 working 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 a compressed API definition, a compressed snippet, and an 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 the pre-prompt is compressed 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 Comparative Examples 1-2, 2-2, and 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 example. As with the example, 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 solving questions about images was generated from the questions using the systems of each Example and Comparative Example. The obtained program code was executed in an execution environment to obtain results (inference results) for solving questions about images. 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 Comparative Example, the token length and number of characters of the prompt provided to the large-scale language model when acquiring the program code were calculated. In each Example, the prompt provided to the large-scale language model in the 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 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, answer 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 indicator, 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 as a confusion matrix. Furthermore, in Example 1-1, the part that classifies question types in the large-scale language model was modified to manually classify the type according to the true value associated with the question (i.e., the correct type of compressed snippet is always selected), thereby constructing Reference Example 1. In Example 1-1, the part that classifies question types in the large-scale language model was modified to randomly select question types (i.e., the compressed snippet to be used is randomly selected), thereby constructing Reference Example 2. For Reference Examples 1 and 2, the accuracy rate and the token length of the prompt (excluding the question) were calculated using the same method as for the first indicator. Then, the accuracy 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) Figure 31 shows the evaluation results of each Example and each Comparative Example based on the first index. Figure 32 shows the evaluation results of Example 1-1 and Comparative Example 1-1 based on the second index. Figure 33 shows a confusion matrix related to the accuracy rate of type classification in Example 1-1. Figure 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 Figure 31, the accuracy rate of the Examples was higher than that of the Comparative Examples for both data sets. In particular, when comparing Comparative Examples 3-1 and 3-2, which compress data without distinguishing between types, with Examples 1-1 and 1-2, the accuracy rate was significantly improved. This result demonstrates that providing a pre-prompt for each type can improve the accuracy of answer generation. In other words, the effectiveness of the above-described embodiment, which selects a pre-prompt according to the question type, 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 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: [Supplementary Note 1] An inference device (1) comprising a control unit (11) configured to perform the following: receiving a question (30); selecting a preprompt (55) from a preprompt set (50) that corresponds to the type of the received question (30); providing the selected preprompt (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 related to the obtained answer (35). [Supplementary Note 2] The inference device (1) according to Supplementary Note 1, wherein the preprompt set (50) is configured to include one or more condensed preprompts (500) for each type of question (30). [Supplementary Note 3] The inference device (1) according to Supplementary Note 1 or Supplementary Note 2, wherein the control unit (11) is further configured to obtain a result of classifying the type of the question (30) from the large-scale language model (72) by providing the received question (30) and type list (32) to the large-scale language model (72), and selecting the pre-prompt (55) comprises selecting a pre-prompt (55) according to the result of classifying the type of the question (30). [Supplementary Note 4] The inference device (1) according to Supplementary Note 3, wherein the large-scale language model (72) is configured by a large-scale visual language model (73), and receiving the question (30) includes obtaining a target image (33) related to the question (30), and providing the question (30) and the type list (32) to the large-scale language model (72) comprises providing the question (30), the obtained target image (33), and the type list (32) to the large-scale visual language model (73).[Supplementary Note 5] The inference device (1) according to any one of Supplementary Notes 1 to 4, wherein accepting the question (30) includes acquiring 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), and selecting the pre-prompt (55) comprises selecting a pre-prompt (55) according to a result of classifying the type of the question (30). [Supplementary Note 6] The inference device (1) according to any one of Supplementary Notes 1 to 5, wherein accepting the question (30) includes acquiring context information (31) of the question (30), and 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). [Supplementary Note 7] The inference device (1) according to any one of Supplements 1 to 6, wherein the generative model (60) is composed of a large-scale language model (61). [Supplementary Note 8] The inference device (1) according to any one of Supplements 1 to 7, wherein the question (30) is configured to indicate an inference task (T1), and the answer (35) is composed of program code (Z1) for performing the inference task (T1). [Supplementary Note 9] The inference device (1) according to Supplementary Note 8, wherein accepting the question (30) includes obtaining a target image (33) related to the question (30), and the inference task (T1) includes inferring features appearing in the target image (33). [Supplementary Note 10] The inference device (1) according to Supplementary Note 8, wherein the inference task (T1) includes inferring an action sequence of a robot device (R1), and the program code (Z1) includes control code (Z11) for causing the robot device (R1) to execute actions of the inferred action sequence.[Supplementary Note 11] The reasoning device (1) according to any one of Supplements 1 to 7, wherein the question (30) is configured to indicate inference of an action sequence for a robot device (R2), and the answer (35) is composed of a description (Z2) for planning that generates a behavior plan for the inferred action sequence. [Supplementary Note 12] The reasoning device (1) according to any one of Supplements 1 to 7, wherein the question (30) is configured to indicate inference of a measure to deal with a target error of a device (R3), and the answer (35) is composed of a result of inferring a measure to deal with the target error. [Supplementary Note 13] An inference program (81) causing a computer (1) to execute the following steps: receive a question (30); select a preprompt (55) from a preprompt set (50) that corresponds to the type of the received question (30); obtain an answer (35) to the question (30) from a generative model (60) by providing the selected preprompt (55) and the question (30) to the generative model (60); and output information related to the obtained answer (35). [Supplementary Note 14] The inference program (81) according to Supplementary Note 13, wherein the preprompt set (50) is configured to include one or more compressed preprompts (500) for each type of question (30). [Supplementary Note 15] An inference method in which a computer (1) executes the following steps: receiving a question (30); selecting a pre-prompt (55) from a pre-prompt set (50) that corresponds to the type of the received question (30); 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 answer (35). [Supplementary Note 16] The inference method according to Supplementary Note 15, in which the pre-prompt set (50) is configured to include one or more compressed pre-prompts (500) for each type of question (30).[Supplementary Note 17] A generation method in which a computer (2) executes the following steps: accepts designation of a question type (41), accepts designation of a preprompt (43), compresses the designated preprompt (43) in accordance with the designated type (41), generates a preprompt set (40) including compressed preprompts (400) for each type (41) by designating the type (41), designating the preprompt (43), and compressing the preprompt (43) for each type (41), and saves the generated preprompt set (40). [Supplementary Note 18] The generation method according to Supplementary Note 17, in which compressing the preprompt (43) comprises providing the designated type (41) and the designated preprompt (43) to a large-scale language model (70) and obtaining the compressed preprompt (400) from the large-scale language model (70). [Supplementary Note 19] The generation method described in Supplementary Note 17 or Supplementary Note 18, wherein the computer (2) further performs the following steps: when an unknown type (411) of the question is given, accepting specification of a pre-prompt (431) corresponding to the unknown type (411); compressing the specified pre-prompt (431) according to the unknown type (411); and updating the pre-prompt set (40) by adding the compressed pre-prompt (401) of the unknown type (411) to the pre-prompt set (40). [Supplementary Note 20] A generating device (2) comprising a control unit (21) configured to perform the following: accepting a designation of a question type (41); accepting a designation of a pre-prompt (43); compressing the designated pre-prompt (43) according to the designated type (41); generating a pre-prompt set (40) including a compressed pre-prompt (400) for each type (41) by designating the type (41), designating the pre-prompt (43), and compressing the pre-prompt (43) for each type (41); and saving the generated pre-prompt set (40).

[0237] REFERENCE SYSTEM 1...inference 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...save processing unit, 41...type, 43...preprompt, 400...compressed preprompt, 40...preprompt set

Claims

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.   the preprompt set is configured to include one or more condensed preprompts for each question type; The inference device according to claim 1 .   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 .   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 .   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 .   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 .   The generative model is composed of a large-scale language model. The inference device according to claim 1 .   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 .   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.   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.   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 .   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 .   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.   the preprompt set is configured to include one or more condensed preprompts for each question type; The inference program according to claim 13.   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.   the preprompt set is configured to include one or more condensed preprompts for each question type; 16. The inference method of claim 15.   The computer 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; To execute Generation method.   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.   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.   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.

Citation Information

Patent Citations

  • Text generation device and text generation method

    JP7325152B1