Dialog device, and dialog method

The interaction device employs a monitoring model to block malicious prompts in large-scale language models, addressing prompt injection vulnerabilities and enhancing security by using a distinct model to filter inputs and outputs, thus ensuring secure and convenient dialogue operations.

WO2024213981A1PCT designated stage expired Publication Date: 2024-10-17SEMICON ENERGY LAB CO LTD

Patent Information

Application Number
PCT/IB2024/053403
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-13
Filing Date
2024-04-08
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

Large-scale language models are vulnerable to prompt injection attacks, where malicious prompts can cause unintended operations, leading to security concerns and the need for a secure and convenient dialogue system that blocks such injections.

Method used

An interaction device and method that incorporates a monitoring model to determine whether input information is intended for prompt injection, blocking it if necessary, and using a different type of model than the interaction model to enhance security and prevent security holes, while also considering system prompts to filter input and output information.

Benefits of technology

The solution effectively blocks prompt injection attacks, enhancing the security and convenience of the dialogue system by using a distinct monitoring model to filter input and output information based on predetermined criteria, ensuring only intended information is processed and presented.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2024053403_17102024_PF_FP_ABST
    Figure IB2024053403_17102024_PF_FP_ABST
Patent Text Reader

Abstract

Provided is a dialog device having a high degree of security. The dialog device comprises a reception unit, a processing unit, and a presentation unit. The reception unit has a function for receiving input information indicating an instruction from a user in a dialog. The processing unit has a function for performing processing using a monitoring model, and a function for performing processing using a dialog model. The processing unit has a function for determining, using the monitoring model, whether the input information may be supplied to the dialog model. The processing unit has a function for, if the monitoring model supplies the input information to the dialog model, generating output information using the dialog model on the basis of the input information. The output information can indicate a response in the dialog. The presentation unit has a function for presenting the output information, and a function for presenting error information indicating that no output information will be presented. The dialog model is a language model and is a different type of model from the monitoring model.
Need to check novelty before this filing date? Find Prior Art

Description

Dialogue device and dialogue method

[0001] TECHNICAL FIELD One aspect of the present invention relates to a dialogue device and a dialogue method, another aspect of the present invention relates to a dialogue system, and still another aspect of the present invention relates to a program.

[0002] One embodiment of the present invention is not limited to the above technical field, and examples of the technical field of one embodiment of the present invention include semiconductor devices, display devices, light-emitting devices, power storage devices, memory devices, electronic devices, lighting devices, input devices (e.g., touch sensors), input / output devices (e.g., touch panels), driving methods thereof, and manufacturing methods thereof.

[0003] In recent years, the development of language models, which are a type of neural network model, has been actively carried out, and large-scale language models in particular have attracted attention. A large-scale language model is a natural language processing model trained using a large amount of data. A large-scale language model can realize a dialogue model that responds to user instructions, for example. Non-Patent Document 1 discloses GPT (Generative Pre-trained Transformer)-4 as a large-scale language model and ChatGPT as a dialogue model. Patent Document 1 also discloses a dialogue model training method.

[0004] Special Publication No. 2023-508062

[0005] Summary of ChatGPT / GPT-4 Research Perspective Towards the Future of Large Language Models, Yiheng Liu et al. (Submitted on 4 April 2023, [online], Internet <URL: https: / / arxiv.org / abs / 2304.01852>

[0006] A dialogue model can be made to perform a desired operation by providing instructions called prompts to the dialogue model. However, there is a concern about prompt injection, in which a user inputs a malicious prompt into the dialogue model, causing the model to perform an operation not intended by the developer of the dialogue model.

[0007] An object of one embodiment of the present invention is to provide an interaction device, an interaction method, and an interaction system that can block prompt injection. Another object of one embodiment of the present invention is to provide an interaction device, an interaction method, and an interaction system that are highly secure. Another object of one embodiment of the present invention is to provide an interaction device, an interaction method, and an interaction system that are highly convenient. Another object of one embodiment of the present invention is to provide a novel interaction device, an interaction method, and an interaction system.

[0008] Note that the description of these problems does not preclude the existence of other problems. One embodiment of the present invention does not necessarily have to solve all of these problems. Problems other than these can be extracted from the description in the specification, drawings, and claims.

[0009] One aspect of the present invention includes a receiving unit, a processing unit, and a presentation unit, wherein the receiving unit has a function of receiving input information, the processing unit has a function of performing processing using a monitoring model and a function of performing processing using a dialogue model, the processing unit has a function of determining whether or not the input information may be supplied to the dialogue model based on the input information using the monitoring model, the processing unit has a function of generating output information based on the input information using the dialogue model if the monitoring model supplies the input information to the dialogue model, the presentation unit has a function of presenting the output information if the monitoring model supplies the input information to the dialogue model, and the presentation unit has a function of presenting error information indicating that the output information will not be presented if the monitoring model does not supply the input information to the dialogue model, and the dialogue model is a language model, and the dialogue model is a dialogue device that is a different type of model from the monitoring model.

[0010] Alternatively, in the above aspect, the dialogue device may have a memory unit, the memory unit having a function of storing a system prompt, and the processing unit having a function of generating output information using the dialogue model based on input information and the system prompt as a prompt.

[0011] Alternatively, in the above aspect, the processing unit may have a function of determining, using the monitoring model, based on a system prompt, whether or not the input information may be supplied to the dialogue model.

[0012] Alternatively, one aspect of the present invention is an interactive device having a reception unit, a memory unit, a processing unit, and a presentation unit, wherein the reception unit has a function of receiving input information, the memory unit has a function of storing system prompts, the processing unit has a function of performing processing using a monitoring model and a function of performing processing using a dialogue model which is a language model, the processing unit has a function of using the monitoring model to determine whether or not the input information may be supplied to the dialogue model based on the input information and the system prompt, and when the monitoring model supplies the input information to the dialogue model, the processing unit has a function of using the dialogue model to generate output information using the input information and the system prompt as prompts, the presentation unit has a function of presenting the output information when the monitoring model supplies the input information to the dialogue model, and when the monitoring model does not supply the input information to the dialogue model, the presentation unit has a function of presenting error information indicating that the output information will not be presented.

[0013] Alternatively, in the above aspect, the dialogue model may be a different type of model from the monitoring model.

[0014] Alternatively, in the above aspect, the processing unit may determine whether or not the output information may be presented based on the output information using the monitoring model.

[0015] Alternatively, one aspect of the present invention is an interaction method including a first step of accepting first input information, a second step of accepting second input information, a third step of using a monitoring model to determine whether or not the second input information may be supplied to the interaction model based on the first input information and the second input information, a fourth step of using the interaction model to generate output information based on the first input information and the second input information if the monitoring model supplies the second input information to the interaction model, a fifth step of the interaction model presenting output information if the monitoring model supplies the second input information to the interaction model, and a sixth step of presenting error information indicating that the output information will not be presented if the monitoring model does not supply the second input information to the interaction model.

[0016] Alternatively, in the above aspect, the dialogue model may be a different type of model from the monitoring model.

[0017] Alternatively, in the above aspect, in the fourth step, the dialogue model may generate output information using the first input information, the second input information, and a system prompt as a prompt.

[0018] Alternatively, in the above aspect, in the third step, the monitoring model may determine whether or not the second input information may be provided to the dialogue model based on a system prompt.

[0019] Alternatively, in the above aspect, after the fourth step and before the fifth step, a seventh step may be included in which the monitoring model determines whether or not the output information may be presented based on the output information.

[0020] Alternatively, in the above aspect, the supervisory model may be a machine learning model trained using a dataset different from the dataset used to train the dialogue model.

[0021] Alternatively, in the above aspect, the monitoring model may include a first model that is a rule-based model and a second model that is a machine learning model.

[0022] According to one aspect of the present invention, it is possible to provide an interaction device, an interaction method, and an interaction system that can block prompt injection. Also, according to one aspect of the present invention, it is possible to provide an interaction device, an interaction method, and an interaction system that are highly secure. Also, according to one aspect of the present invention, it is possible to provide an interaction device, an interaction method, and an interaction system that are highly convenient. Also, according to one aspect of the present invention, it is possible to provide a novel interaction device, an interaction method, and an interaction system.

[0023] Note that the description of these effects does not preclude the existence of other effects. One embodiment of the present invention does not necessarily have all of these effects. Effects other than these can be extracted from the description in the specification, drawings, and claims.

[0024] FIG. 1A is a block diagram showing an example of the configuration of a dialogue device. FIG. 1B is an image diagram showing an example of a dialogue system. FIG. 2 is a flowchart showing an example of a dialogue method. FIGS. 3A, 3B1, 3B2, 3C1, and 3C2 are schematic diagrams showing an example of a dialogue method. FIG. 4 is a schematic diagram showing an example of a learning method. FIGS. 5A and 5B are schematic diagrams showing an example of a dialogue method. FIGS. 6A and 6B are block diagrams showing an example of the configuration of a dialogue device. FIGS. 7A and 7B are block diagrams showing an example of the configuration of a dialogue device.

[0025] The embodiments will be described in detail with reference to the drawings. However, the present invention is not limited to the following description, and it will be readily understood by those skilled in the art that various changes can be made in form and detail without departing from the spirit and scope of the present invention. Therefore, the present invention should not be interpreted as being limited to the description of the embodiments shown below.

[0026] In this specification, the ordinal numbers such as "first" and "second" are used for convenience and do not limit the number of components or the order of the components (for example, the order of processes or the order of stacking). Furthermore, an ordinal number assigned to a component in one part of this specification may not match an ordinal number assigned to the same component in another part of this specification or in the claims.

[0027] Embodiment In this embodiment, an interaction device and an interaction method according to one embodiment of the present invention will be described with reference to drawings.

[0028] One aspect of the present invention relates to an interactive device having a reception unit, a processing unit, and a presentation unit, and to an interactive method using the interactive device. The reception unit has a function of receiving input information, which is information to be supplied to the processing unit. The input information is information input to the reception unit by a user of the interactive device. The input information may be text, for example, one or more sentences. The input information may indicate instructions in the dialogue.

[0029] In this specification, the interactive device refers to a device that has the function of processing input information using a language model and outputting the processing result as output information. The language model can be a machine learning model, such as a neural network model.

[0030] The processing unit has a function of performing processing using a monitoring model and a function of performing processing using a dialogue model. Specifically, the processing unit has a function of determining, using the monitoring model, whether or not input information may be supplied to the dialogue model. The monitoring model can determine whether or not the input information is intended for, for example, prompt injection. The monitoring model blocks the input information when it determines that the input information is intended for, for example, prompt injection. This allows the dialogue device of one aspect of the present invention to be a dialogue device with higher security than a dialogue device in which the processing unit does not perform processing using, for example, the monitoring model.

[0031] The processing unit also has a function of generating output information using a dialogue model. The dialogue model is a language model, and may be, for example, a large-scale language model. The output information may be text, similar to the input information, and may be, for example, one or more sentences. The output information may indicate a response in the dialogue.

[0032] A dialogue model can be made to perform a desired operation by providing it with instruction sentences called prompts. The dialogue model can generate output information using system prompts and input information entered by the user as prompts. Here, input information blocked by the monitoring model is not supplied to the dialogue model. Therefore, prompt injection into the dialogue model can be blocked.

[0033] In this specification, a system prompt refers to a prompt that is preset by a developer or a service provider. For example, a system prompt of a dialogue model refers to a prompt that is preset by a developer of the dialogue model and a prompt that is preset by a service provider that uses the dialogue model.

[0034] The presentation unit has a function of presenting output information to a user. The presentation unit also has a function of presenting error information to a user when input information is blocked by the monitoring model. The error information can indicate, for example, that output information will not be presented. The presentation unit has, for example, a display device. In this case, the presentation unit can present the output information or error information to a user of the interactive device by displaying it on the display device.

[0035] Here, after generating output information using the dialogue model, the processing unit can use the monitoring model to determine whether the output information may be presented. The monitoring model can, for example, determine whether the content of the output information is inappropriate. The monitoring model can determine whether the output information includes, for example, violent language, discriminatory language, or sexual language. The monitoring model can also determine whether the output information includes, for example, confidential information. Furthermore, the monitoring model can determine whether the output information includes, for example, content not intended by the developer of the dialogue device. For example, if the monitoring model determines that the content of the output information is inappropriate, it blocks the output information.

[0036] If the monitoring model determines that the output information may be presented to the user, the presentation unit presents the output information. On the other hand, if the monitoring model determines that the output information may not be presented to the user, the presentation unit presents error information. As described above, the monitoring model makes judgments not only on the input information but also on the output information, thereby further enhancing the security of the interactive device.

[0037] The monitoring model is preferably a different type of model from the dialogue model. For example, the monitoring model can be a machine learning model other than a language model, specifically a neural network model other than a language model. For example, the monitoring model can be a model specialized in determining whether to block input information and output information, such as a machine learning model. Furthermore, the monitoring model can be a language model with an algorithm different from that of the dialogue model.

[0038] The monitoring model may also be a language model with a different number of parameters than the dialogue model. For example, the monitoring model may be a language model with a smaller number of parameters than the dialogue model. For example, the monitoring model may be a language model with different parameter values ​​than the dialogue model. The parameter values ​​are also called weighting coefficients. The monitoring model may also be a machine learning model, such as a language model, trained using a dataset different from the dataset used to train the dialogue model.

[0039] Furthermore, the monitoring model may be a rule-based model that does not use machine learning, or may be a model that combines a rule-based model and a machine learning model.

[0040] As described above, the dialogue model can be, for example, a large-scale language model. Large-scale language models are used not only by users of the dialogue device of one embodiment of the present invention, but also by many people around the world. For this reason, security holes are easily discovered in large-scale language models. Therefore, by making the monitoring model a different type of model from the dialogue model, it is possible to prevent the security hole from affecting, for example, the operation of the monitoring model. As described above, the dialogue device of one embodiment of the present invention can be a dialogue device with high security. In particular, by using a model independently developed by the developer of the dialogue device as the monitoring model, the security of the dialogue device of one embodiment of the present invention can be improved. Furthermore, by making the monitoring model a different type of model from the dialogue model, even if the type of dialogue model is made public to the user of the dialogue device, the security of the dialogue device can be maintained by not disclosing the type of monitoring model.

[0041] 1A is a block diagram showing an example of the configuration of a dialogue device 10 according to one aspect of the present invention. The dialogue device 10 includes a reception unit 11, a processing unit 20, a storage unit 13, and a presentation unit 15.

[0042] In Fig. 1A, arrows indicate the exchange of data and the like between the components of the dialogue device 10. Note that the exchange of data and the like shown in Fig. 1A is an example, and for example, data and the like may be exchanged between components that are not connected by arrows. Also, even between components that are connected by arrows, data and the like may not be exchanged.

[0043] For example, in FIG. 1A, the components are classified by function and shown as independent blocks in the block diagram, but in reality, it is difficult to completely separate the components by function, and one component may be involved in multiple functions.

[0044] [Reception Unit] The reception unit 11 has a function of receiving input information, which is information to be supplied to the processing unit 20. The input information is information input by the user of the dialogue device 10 to the reception unit 11. The input information can be text, for example, one or more sentences. The input information can indicate instructions in a dialogue. The input information can be, for example, a question. Note that the input information does not have to be text, and can be, for example, audio. Furthermore, a camera may be installed in the dialogue device 10, and the user of the dialogue device 10 may gesture or sign language towards the camera, and information read from the gesture or sign language may be used as the input information. The camera may or may not be included in the reception unit 11.

[0045] [Processing Unit] The processing unit 20 has a function of performing processing using the monitoring model 21 and a function of performing processing using the dialogue model 23. Specifically, the processing unit 20 has a function of using the monitoring model 21 to determine whether or not input information may be supplied to the dialogue model 23. The monitoring model 21 can determine whether or not the input information is intended for prompt injection, for example. If the monitoring model 21 determines that the input information is intended for prompt injection, for example, the monitoring model 21 blocks the input information.

[0046] The processing unit 20 also has a function of generating output information using a dialogue model 23. The dialogue model 23 is a language model, and can be, for example, a large-scale language model. The output information can be text, similar to the input information, and can be, for example, one or more sentences. The output information can indicate an answer in the dialogue. For example, if the input information is a question, the output information can be an answer to the question. Note that, like the input information, the output information does not have to be text, and can be, for example, audio. Furthermore, the output information can be, for example, a gesture movement. Furthermore, the output information can be, for example, a sign language movement.

[0047] The dialogue model 23 can be made to perform a desired operation by providing it with an instruction sentence called a prompt. The dialogue model 23 can generate output information using a system prompt 25, which is a prompt preset by the developer of the dialogue device 10, and input information entered by the user as prompts. Here, input information blocked by the monitoring model 21 is not supplied to the dialogue model 23. Therefore, prompt injection into the dialogue model 23 can be blocked. Note that in FIG. 1A, "aaaaa." is shown as an example of the system prompt 25.

[0048] Furthermore, the processing unit 20 can have a function of generating output information using the dialogue model 23 and then using the monitoring model 21 to determine whether the output information may be presented to the user of the dialogue device 10. The monitoring model 21 can determine, for example, whether the content of the output information is inappropriate. The monitoring model 21 can determine, for example, whether the output information contains violent language, discriminatory language, or sexual language. The monitoring model 21 can also determine, for example, whether the output information contains confidential information. Furthermore, the monitoring model 21 can determine, for example, whether the output information contains content not intended by the developer of the dialogue device 10. Note that the above determination using the monitoring model 21 of the output information does not have to be made. For example, if the monitoring model 21 determines that the content of the output information is inappropriate, it blocks the output information.

[0049] As described above, the dialogue device 10 uses the monitoring model 21 to determine whether or not it is permissible to supply input information input to the reception unit 11 to the dialogue model 23. Furthermore, the dialogue device 10 can use the monitoring model 21 to determine whether or not it is permissible to present output information generated by the dialogue model 23 to the user of the dialogue device 10. As a result, the dialogue device 10 can be made a dialogue device with higher security than, for example, a device that does not perform processing using the monitoring model 21.

[0050] Here, it is preferable that the monitoring model 21 is a different type of model from the dialogue model 23. For example, the monitoring model 21 can be a machine learning model other than a language model. For example, the monitoring model 21 can be a model specialized in determining whether or not to block input information and output information, such as a machine learning model. A typical example of a machine learning model that can be applied to the monitoring model 21 is a neural network model. Furthermore, a decision tree, lasso regression, random forest, or the like may be applied to the monitoring model 21.

[0051] Furthermore, the monitoring model 21 may be a language model having a different number of parameters than the dialogue model 23. For example, the monitoring model 21 may be a language model having a smaller number of parameters than the dialogue model 23. For example, the monitoring model 21 may be a language model having parameter values ​​different from those of the dialogue model 23. Furthermore, the monitoring model 21 may be a machine learning model, such as a language model, that has been trained using a dataset different from the dataset used to train the dialogue model 23.

[0052] Furthermore, the monitoring model 21 may be a rule-based model that does not use machine learning. When the monitoring model 21 is a rule-based model, the monitoring model 21 can block input information if the input information contains, for example, a predetermined character string. Furthermore, the monitoring model 21 can block output information if the output information contains, for example, a predetermined character string. Note that the monitoring model 21 may be a model that combines a rule-based model and a machine learning model.

[0053] As described above, the dialogue model 23 can be, for example, a large-scale language model. Large-scale language models are used not only by the user of the dialogue device 10 but also by many people around the world. For this reason, security holes are easily discovered in large-scale language models. Therefore, by making the monitoring model 21 a different type of model from the dialogue model 23, it is possible to prevent the security hole from affecting, for example, the operation of the monitoring model 21. As described above, the dialogue device 10 can be a dialogue device with high security. In particular, by using a model independently developed by the developer of the dialogue device 10 as the monitoring model 21, the security of the dialogue device 10 can be improved. Furthermore, by making the monitoring model 21 a different type of model from the dialogue model 23, even if the type of the dialogue model 23 is made public to the user of the dialogue device 10, the security of the dialogue device 10 can be maintained by not making the type of the monitoring model 21 public.

[0054] Here, the monitoring model 21 may classify the input information and supply only input information of a predetermined classification to the dialogue model 23. For example, if the dialogue device 10 is a device that presents information about intellectual property to a user, the monitoring model 21 may determine whether the input information is information about intellectual property. In this case, prompt injection to the dialogue model 23 can be blocked with a higher probability than when the monitoring model 21 determines, for example, whether the input information is intended for prompt injection. On the other hand, if the monitoring model 21 determines, for example, whether the input information is intended for prompt injection and blocks the input information only when it is determined that the input information is intended for prompt injection, the dialogue device 10 can be provided with more general-purpose functions.

[0055] The monitoring model 21 may determine whether or not input information may be supplied to the dialogue model 23 based on the input information as well as the system prompt 25. This may more effectively prevent input information intended for prompt injection from being supplied to the dialogue model 23 and prevent input information not intended for prompt injection from being blocked. For example, it may be possible to prevent input information that can be determined to be inappropriate based on the content of the system prompt 25 from being supplied to the dialogue model 23. It may also be possible to prevent input information that can be determined not to be prompt injection based on the content of the system prompt 25 from being blocked.

[0056] Furthermore, for example, if the monitoring model 21 classifies input information and supplies only input information of a predetermined classification to the dialogue model 23, the classification to be supplied to the dialogue model 23 can be determined by the system prompt 25. For example, if the system prompt 25 includes a prompt indicating "generate information related to intellectual property," the monitoring model 21 can block input information that is not related to intellectual property.

[0057] Similar to the determination regarding the input information described above, the determination regarding whether or not output information may be presented to the user of the dialogue device 10 may be made based on the output information as well as the system prompt 25. As described above, by determining whether or not to block input information or output information based not only on the input information or output information but also on the system prompt 25, the dialogue device 10 may be made into a dialogue device with high security and convenience. Note that if the monitoring model 21 has the function of determining whether or not to block one or both of the input information and the output information based on the system prompt 25, the monitoring model 21 may be the same type of model as the dialogue model 23. For example, the monitoring model 21 may be the same type of large-scale language model as the dialogue model 23.

[0058] Furthermore, the monitoring model 21 may determine whether or not input information may be supplied to the dialogue model 23 based on the input information itself as well as on input information supplied to the monitoring model 21 prior to the input information. In this case, the reception unit 11 has a function of receiving second input information after receiving first input information. The processing unit 20 has a function of using the monitoring model 21 to determine whether or not the second input information may be supplied to the dialogue model 23 based on the first input information and the second input information. Furthermore, when the monitoring model 21 supplies the second input information to the dialogue model 23, the processing unit 20 has a function of using the dialogue model 23 to generate output information based on the first input information and the second input information. In this case, the dialogue model 23 has a function of generating output information using the first input information, the second input information, and the system prompt 25 as prompts. Here, the first input information is input information supplied to the monitoring model 21 prior to the second input information. The first input information may be, for example, input information that was supplied to the monitoring model 21 before the second input information and that was not blocked by the monitoring model 21. Note that the monitoring model 21 may determine whether or not to block the second input information based on not only the input information that was not blocked but also the input information that was blocked.

[0059] As a result, it may be possible to more effectively prevent input information intended for prompt injection from being supplied to the dialogue model 23 and to more effectively prevent input information not intended for prompt injection from being blocked. For example, if it is not possible to determine that the second input information is intended for prompt injection based on the second input information alone, but it is possible to determine that the first input information is likely intended for prompt injection based on the first input information, it may be possible to prevent the second input information from being supplied to the dialogue model 23. Also, if it is possible to determine that the second input information is likely intended for prompt injection based on the second input information alone, but it is possible to determine that the first input information is unlikely to be intended for prompt injection based on the first input information, it may be possible to prevent the second input information from being blocked. On the other hand, particularly when the monitoring model 21 is a language model, it may be possible to effectively prevent prompt injection into the monitoring model 21 by determining whether to block the second input information without taking the first input information into consideration.

[0060] Similar to the determination regarding the second input information, the determination of whether or not output information may be presented to the user of the dialogue device 10 may be made based on the output information itself, as well as on output information output prior to the output information itself. As described above, by determining whether or not to block input information or output information based on multiple pieces of input information or multiple pieces of output information, the dialogue device 10 may be made into a dialogue device with high security and convenience. Note that if the monitoring model 21 has a function of blocking input information based on multiple pieces of input information and a function of blocking output information based on multiple pieces of output information, the monitoring model 21 may be the same type of model as the dialogue model 23. For example, the monitoring model 21 may be the same type of large-scale language model as the dialogue model 23.

[0061] The processing unit 20 may include, for example, an arithmetic circuit, a central processing unit (CPU), and a graphics processing unit (GPU).

[0062] The processing unit 20 may have a microprocessor such as a DSP (Digital Signal Processor). The microprocessor may be implemented by a PLD (Programmable Logic Device) such as an FPGA (Field Programmable Gate Array) or an FPAA (Field Programmable Analog Array). The processing unit 20 may also have a quantum processor. The processing unit 20 can perform various data processing and program control by interpreting and executing instructions from various programs using the processor. Programs that can be executed by the processor are stored in at least one of a memory area of ​​the processor and the storage unit 13.

[0063] The processing unit 20 may have a main memory, which includes at least one of a volatile memory such as a RAM (Random Access Memory) and a non-volatile memory such as a ROM (Read Only Memory).

[0064] The RAM may be, for example, a DRAM or an SRAM, and a virtual memory space is allocated to it and used as a working space for the processing unit 20. The operating system, application programs, program modules, program data, lookup tables, and the like stored in the storage unit 13 are loaded into the RAM for execution. The data, programs, and program modules loaded into the RAM are each directly accessed and operated by the processing unit 20.

[0065] The ROM can store a BIOS (Basic Input / Output System), firmware, etc., which do not require rewriting. Examples of ROM include mask ROM, OTPROM (One Time Programmable Read Only Memory), and EPROM (Erasable Programmable Read Only Memory). Examples of EPROMs include UV-EPROMs (Ultra-Violet Erasable Programmable Read Only Memories), which allow stored data to be erased by exposure to ultraviolet light, EEPROMs (Electrically Erasable Programmable Read Only Memories), and flash memories.

[0066] Each processing section 20 can include one or both of a transistor having a metal oxide in a channel formation region (OS transistor) and a transistor having silicon in a channel formation region (Si transistor).

[0067] Note that in this specification and the like, a transistor whose channel formation region includes an oxide semiconductor or a metal oxide is referred to as an oxide semiconductor transistor or an OS transistor. The channel formation region of an OS transistor preferably includes a metal oxide.

[0068] In this specification and the like, a metal oxide refers to an oxide of a metal in a broad sense. Metal oxides are classified into oxide insulators, oxide conductors (including transparent oxide conductors), oxide semiconductors (also referred to as oxide semiconductors or simply as OSs), and the like. For example, when a metal oxide is used for a semiconductor layer of a transistor, the metal oxide may be referred to as an oxide semiconductor.

[0069] The metal oxide included in the channel formation region preferably contains indium (In). When the metal oxide included in the channel formation region contains indium, the carrier mobility (electron mobility) of the OS transistor is increased. Furthermore, the metal oxide included in the channel formation region is preferably an oxide semiconductor containing element M. The element M is preferably at least one of aluminum (Al), gallium (Ga), and tin (Sn). Other elements applicable to element M include boron (B), silicon (Si), titanium (Ti), iron (Fe), nickel (Ni), germanium (Ge), yttrium (Y), zirconium (Zr), molybdenum (Mo), lanthanum (La), cerium (Ce), neodymium (Nd), hafnium (Hf), tantalum (Ta), and tungsten (W). However, a combination of two or more of the above elements may be used as element M. The element M is, for example, an element having a high bond energy with oxygen. For example, it is an element having a higher bond energy with oxygen than indium. The metal oxide contained in the channel formation region is preferably a metal oxide containing zinc (Zn), since zinc-containing metal oxides may be easily crystallized.

[0070] The metal oxide contained in the channel formation region is not limited to a metal oxide containing indium. The semiconductor layer may be, for example, a metal oxide containing at least one of zinc, gallium, and tin without containing indium. The semiconductor layer may be, for example, zinc tin oxide or gallium tin oxide.

[0071] The processing unit 20 preferably includes an OS transistor. Because an OS transistor has an extremely small off-state current, using the OS transistor as a switch for retaining charge (data) flowing into a capacitor functioning as a memory element can ensure a long data retention period. By using this characteristic in at least one of the register and cache memory of the processing unit 20, the processing unit 20 can be operated only when necessary and can be turned off in other cases by saving information from the previous processing in the memory element. In other words, normally-off computing is possible, enabling a reduction in power consumption of the information processing system.

[0072] [Storage Unit] The storage unit 13 has a function of storing programs executed by the monitoring model 21 and programs executed by the dialogue model 23. The storage unit 13 also has a function of storing system prompts 25. Furthermore, the storage unit 13 may have a function of storing input information, for example, input information supplied to the dialogue model 23 by the monitoring model 21. In this case, the dialogue model 23 can generate output information using multiple pieces of input information as prompts.

[0073] The storage unit 13 includes at least one of a volatile memory and a non-volatile memory. Examples of the volatile memory include a dynamic random access memory (DRAM) and a static random access memory (SRAM). Examples of nonvolatile memories include ReRAM (Resistive Random Access Memory, also called resistance change memory), PRAM (Phase change Random Access Memory), FeRAM (Ferroelectric Random Access Memory), MRAM (Magnetoresistive Random Access Memory, also called magnetoresistive memory), flash memory, NOSRAM (registered trademark), and DOSRAM (registered trademark). The storage unit 13 may also have a recording media drive. Examples of recording media drives include a hard disk drive (HDD) and a solid state drive (SSD).

[0074] NOSRAM (registered trademark) is an abbreviation for "Nonvolatile Oxide Semiconductor Random Access Memory (RAM)." NOSRAM refers to a memory in which memory cells are two-transistor (2T) or three-transistor (3T) gain cells and transistors (also called OS transistors) that use metal oxide in their channel formation regions. OS transistors have an extremely small leakage current, i.e., a current that flows between the source and drain in an off state. NOSRAM can be used as a nonvolatile memory by retaining a charge corresponding to data in the memory cell using its extremely small leakage current characteristic. In particular, NOSRAM can read stored data without destroying it (nondestructive readout), making it suitable for arithmetic processing in which only data read operations are repeated a large number of times. NOSRAM can increase its data capacity by stacking layers, and therefore can be used as a large-scale cache memory, main memory, or storage memory to improve the performance of semiconductor devices.

[0075] DOSRAM (registered trademark) is an abbreviation for "Dynamic Oxide Semiconductor RAM" and refers to a RAM having 1T (transistor) 1C (capacitor) type memory cells. DOSRAM is a DRAM formed using OS transistors, and is a memory that temporarily stores information sent from an external device. DOSRAM is a memory that takes advantage of the low off-state current of OS transistors.

[0076] [Presentation Unit] The presentation unit 15 has a function of presenting output information to the user of the dialogue device 10. The presentation unit 15 also has a function of presenting error information to the user of the dialogue device 10 when input information or output information is blocked by the monitoring model 21. The error information can indicate, for example, that output information will not be presented. The error information can be generated by the presentation unit 15. The error information may also be generated by the monitoring model 21. Furthermore, the error information may be stored in the storage unit 13 in advance, and read out by the presentation unit 15 from the storage unit 13 when input information or output information is blocked by the monitoring model 21.

[0077] The presentation unit 15 has, for example, a display device. In this case, the presentation unit 15 can present the output information or error information to the user of the dialogue device 10 by displaying it on the display device. For example, the output information or error information can be presented to the user of the dialogue device 10 by displaying it as text on the display device.

[0078] The display device may have a function to display images. For example, the display device may present output information and error information to the user of the dialogue device 10 by displaying not only text but also images. For example, when the presentation unit 15 presents output information, the display device may display not only text representing the output information but also an image related to the text. Furthermore, when the presentation unit 15 presents error information, the display device may display not only text indicating an error but also an image mark indicating the error. Furthermore, a video may be displayed on the display device included in the presentation unit 15. For example, the display device may present the output information and error information to the user of the dialogue device 10 by displaying gesture movements or sign language movements. Furthermore, the presentation unit 15 may have, for example, a speaker. In this case, the presentation unit 15 can present the output information and error information by voice.

[0079] When the presentation unit 15 has a display device, the display device can be a light-emitting display device, a liquid crystal display device, or the like. Examples of light-emitting elements that can be used in a light-emitting display device include LEDs (Light Emitting Diodes), OLEDs (Organic LEDs), QLEDs (Quantum-dot LEDs), and semiconductor lasers. The display device of the presentation unit 15 can also be a display device using a shutter-type or optical interference-type MEMS (Micro Electro Mechanical Systems) element, or a display device using a display element that applies a microcapsule type, an electrophoresis type, an electrowetting type, or an electronic liquid powder (registered trademark) type.

[0080] FIG. 1B is an image diagram showing an example of a dialogue system for functioning a dialogue device according to one aspect of the present invention.

[0081] The dialogue system shown in FIG. 1B includes a server 130 and a terminal 100. The terminal is also referred to as an electronic device. Communication between the server 130 and the terminal 100 can be performed via a network 120. Examples of the network 120 include computer networks such as the Internet, which is the foundation of the World Wide Web (WWW), an intranet, an extranet, a PAN (Personal Area Network), a LAN (Local Area Network), a CAN (Campus Area Network), a MAN (Metropolitan Area Network), a WAN (Wide Area Network), and a GAN (Global Area Network). When performing wireless communication, communication standards such as the third generation mobile communication system (3G), the fourth generation mobile communication system (4G), and the fifth generation mobile communication system (5G), or specifications standardized by the IEEE such as Wi-Fi (registered trademark) and Bluetooth (registered trademark), can be used as communication protocols or communication technologies.

[0082] For example, the reception unit 11 and the presentation unit 15 can be provided in the terminal 100. Furthermore, the storage unit 13 and the processing unit 20 can be provided in the server 130. Note that one or both of the reception unit 11 and the presentation unit 15 may be provided in the server 130. For example, the reception unit 11, the presentation unit 15, the storage unit 13, and the processing unit 20 may all be provided in the server 130. Furthermore, some of the functions of the storage unit 13 and the processing unit 20 may be provided in the terminal 100. Furthermore, the storage unit 13 may be provided in a server different from the server 130 in which the processing unit 20 is provided.

[0083] 1B, the components of the dialogue device 10 may be provided, for example, in the terminal 100 and the server 130. Alternatively, the components of the dialogue device 10 may be provided in the server 130 but not in the terminal 100.

[0084] The server 130 can perform calculations using data input from the terminal 100 via the network 120. The server 130 can transmit the results of the calculations to the terminal 100 via the network 120. This can reduce the calculation load on the terminal 100.

[0085] In FIG. 1B , the terminals 100 include an information terminal 101, an information terminal 103, and an information terminal 107. The information terminal 101 is an example of a mobile information terminal such as a smartphone. The information terminal 103 is an example of a tablet terminal. The information terminal 103 can also be used as a notebook information terminal by connecting it to a housing 105 having a keyboard. The information terminal 107 is an example of a desktop information terminal.

[0086] By configuring the server 130 in this manner, the user can access the server 130 from the information terminal 101, the information terminal 103, the information terminal 107, etc. The user can then receive a service provided by the administrator of the server 130 through communication via the network 120. An example of such a service is a service that uses the interactive device according to one aspect of the present invention.

[0087] <Example of Dialogue Method> The following describes an example of a dialogue method using the dialogue device 10. Fig. 2 is a flowchart showing an example of a dialogue method according to one aspect of the present invention.

[0088] First, in step S1, the receiving unit 11 receives input information 31. Fig. 3A is a schematic diagram showing an example of the processing in step S1. For example, a user of the interactive device 10 inputs the input information 31 to the receiving unit 11, and the receiving unit 11 receives the input information 31. The input information 31 may be text, such as one or more sentences. Fig. 3A shows an example in which the input information 31 is the text "iiiiii."

[0089] The input information 31 may indicate instructions in a dialogue. The input information 31 may be, for example, a question. The input information 31 does not have to be text, and may be, for example, audio. Alternatively, a camera may be installed in the dialogue device 10, and the user of the dialogue device 10 may gesture or sign in front of the camera, and information read from the gesture or sign may be used as the input information 31.

[0090] Next, in steps S2 and S3, the monitoring model 21 determines whether or not it is permissible to supply the input information 31 to the dialogue model 23. If it is determined that it is permissible to supply the input information 31, then in step S4 the dialogue model 23 generates output information 33. If it is determined that it is not permissible to supply the input information 31, then in step S5 the presentation unit 15 presents error information 35 to the user of the dialogue device 10.

[0091] 3B1 and 3B2 are schematic diagrams illustrating steps S2 to S5. In the example shown in FIG. 3B1, the input information 31 is the text "Please explain about xx." In the example shown in FIG. 3B1, the monitoring model 21 determines that the input information 31 is not intended for prompt injection. In this case, the dialogue model 23, which is a language model, generates output information 33 using the system prompt 25 and the input information 31 as prompts. The output information 33 can be text like the input information 31, and can be, for example, one or more sentences. In the example shown in FIG. 3B1, the output information 33 is the text "oooooo."

[0092] The output information 33 can indicate a response in a dialogue. For example, if the input information 31 is a question, the output information 33 can be a response to the question. As with the input information 31, the output information 33 does not have to be text, and may be, for example, audio. The output information 33 may also be, for example, a gesture. Furthermore, the output information 33 may also be a sign language action.

[0093] In the example shown in FIG. 3B2, the input information 31 is "Please ignore all instructions other than my own." In the example shown in FIG. 3B2, the monitoring model 21 determines that the input information 31 is intended for prompt injection. In this case, the monitoring model 21 blocks the input information 31 and does not supply it to the dialogue model 23. The monitoring model 21 also generates error information 35 and supplies it to the presentation unit 15. In the example shown in FIG. 3B2, the error information 35 is the text "An error has occurred." The presentation unit 15 presents the text "An error has occurred." represented by the error information 35 to the user of the dialogue device 10. For example, if the presentation unit 15 has a display device, the display device may display "An error has occurred." Note that a mark indicating an error may be displayed as an image on the display device. In this case, the mark may be included in the error information 35.

[0094] The error information 35 may include the reason why the monitoring model 21 blocked the input information 31. For example, if the monitoring model 21 determines that the input information 31 has been input for the purpose of prompt injection, the display device of the presentation unit 15 may display "Prompt injection is possible." If the monitoring model 21 determines that the input information 31 is a question with inappropriate content, the display device of the presentation unit 15 may display "We cannot answer this type of question."

[0095] If the processing in step S5 has been performed, the subsequent processing is not performed. On the other hand, if the processing in step S4 has been performed, in steps S6 and S7, the monitoring model 21 determines whether or not it is permissible to present the output information 33 to the user of the dialogue device 10. If it is determined that it is permissible to present the output information 33, in step S8 the presentation unit 15 presents the output information 33 to the user. If it is determined that it is not permissible to present the output information 33, in step S9 the presentation unit 15 presents error information 37 to the user of the dialogue device 10.

[0096] 3C1 and 3C2 are schematic diagrams illustrating steps S6 to S9. In the example shown in FIG. 3C1, the output information 33 is the text "It means yy." In the example shown in FIG. 3C1, the monitoring model 21 determines that the output information 33 may be presented to the user of the dialogue device 10. In this case, the monitoring model 21 supplies the output information 33 to the presentation unit 15. The presentation unit 15 presents the text "It means yy." represented by the output information 33 to the user of the dialogue device 10. For example, if the presentation unit 15 has a display device, it displays "It means yy." on the display device. Note that, for example, an image related to "yy" may be displayed on the display device. In this case, the image can be included in the output information 33.

[0097] In the example shown in FIG. 3C2 , the output information 33 is determined to be an inappropriate response. For example, suppose the output information 33 contains violent, discriminatory, or sexual language. For example, suppose the output information 33 contains confidential information. For example, suppose the output information 33 contains content not intended by the developer of the dialogue device 10. In the above cases, the monitoring model 21 blocks the output information 33 and does not provide it to the presentation unit 15. The monitoring model 21 also generates error information 37 and provides it to the presentation unit 15. In the example shown in FIG. 3C2 , the error information 37 is the text “An error has occurred.” The presentation unit 15 presents the text “An error has occurred.” represented by the error information 37 to the user of the dialogue device 10. For example, if the presentation unit 15 has a display device, the display device displays “An error has occurred.” Note that, similar to the error information 35, a mark indicating an error may be displayed as an image on the display device.

[0098] The error information 37 may include the reason why the monitoring model 21 blocked the output information 33. For example, the display device of the presentation unit 15 may display a message such as "Inappropriate content is included" or "Answer is not possible as violent language is included."

[0099] The above is an example of a dialogue method according to one aspect of the present invention. Note that steps S6 and S7 do not have to be performed. In this case, all of the output information 33 generated by the dialogue model 23 in step S4 can be presented to the user in step S8.

[0100] As described above, in the dialogue method according to one aspect of the present invention, it is determined using the monitoring model 21 whether or not it is permissible to supply the input information 31 to the dialogue model 23. Also, in the dialogue method according to one aspect of the present invention, it is possible to determine using the monitoring model 21 whether or not it is permissible to present the output information 33 to the user of the dialogue device 10. As a result, the dialogue device 10 can be made a dialogue device with higher security than, for example, a case in which the above-mentioned determination is not made.

[0101] As described above, it is preferable that the monitoring model 21 be a different type of model from the dialogue model 23. For example, the dialogue model 23 can be a language model, and the monitoring model 21 can be a machine learning model other than a language model. Furthermore, the monitoring model 21 can be a language model with a different number of parameters from the dialogue model 23, for example, a language model with fewer parameters than the dialogue model 23.

[0102] As a result, the dialogue method according to one embodiment of the present invention can be a dialogue method with high security. Furthermore, the monitoring model 21 may classify the input information 31 and supply only the input information 31 of a predetermined classification to the dialogue model 23. For example, if the dialogue device 10 is a device that presents information about intellectual property to a user, the monitoring model 21 may determine whether the input information 31 is information about intellectual property. In this case, prompt injection to the dialogue model 23 can be blocked with a higher probability than when the monitoring model 21 determines, for example, whether the input information 31 is intended for prompt injection. On the other hand, if the monitoring model 21 determines, for example, whether the input information 31 is intended for prompt injection and blocks the input information 31 only when it is determined that it is intended for prompt injection, the dialogue device 10 can be provided with more versatile functions.

[0103] FIG. 4 is a schematic diagram illustrating an example of a training method for the surveillance model 21 when the surveillance model 21 is a machine learning model. The surveillance model 21 can be trained by supervised learning using training data 41 and correct labels 43. A dataset including the training data 41 and the correct labels 43 used for training the surveillance model 21 is referred to as a dataset 40. FIG. 4 illustrates an example in which the dataset 40 includes training data 41[1] to training data 41[m] (m is an integer equal to or greater than 1. In the example illustrated in FIG. 4, m is an integer equal to or greater than 3) and correct labels 43[1] to 43[m]. While FIG. 4 illustrates an example in which the surveillance model 21 is trained using one dataset 40, the surveillance model 21 may also be trained using two or more datasets 40. The dataset 40 may be a dataset different from the dataset used for training the dialogue model 23.

[0104] The training data 41 may be, for example, the same type of data as the input information 31 and the output information 33. For example, if the input information 31 and the output information 33 are text data, the training data 41 may also be text data. The training data 41 may be data representing information expected as the input information 31 or data representing information expected as the output information 33. The training data 41 may be, for example, data representing instructions or answers in a dialogue. Furthermore, the training data 41 may be, for example, data expected to be input for the purpose of prompt injection. Furthermore, the training data 41 may be, for example, data including content that is not desired to be presented to the user of the dialogue device 10.

[0105] The correct answer label 43 indicates whether the learning data 41 is data that should be blocked. In FIG. 4, if the learning data 41 is data that should be blocked, "NG." is associated with the learning data 41 as the correct answer label 43, and if the learning data 41 is not data that should be blocked, "OK." is associated with the learning data 41 as the correct answer label 43. Specifically, in FIG. 4, the learning data 41[1] is a text "b 1 b 1 b 1 b1 b 1 . " and a correct answer label 43[1] indicating "OK." is linked to the correct answer label 43[2]. 2 b 2 b 2 b 2 b 2 . " and a correct answer label 43[2] indicating "NG." is linked to the learning data 41[m]. m b m b m b m b m 13 shows an example in which the correct label 43[m] indicating "OK." is linked to the correct label 43[m] indicating "OK.".

[0106] By performing the learning process as described above, a machine learning model MLM can be constructed. The machine learning model MLM can be, for example, a neural network model. In this case, the machine learning model MLM can be said to be a neural network model that has acquired weight coefficients through learning.

[0107] As described above, the monitoring model 21 may be a rule-based model. In this case, the monitoring model 21 can block the input information 31 or the output information 33 if the input information 31 or the output information 33 contains, for example, a predetermined character string. For example, if the input information 31 contains the term "ignore," the input information 31 can be blocked as it is intended for prompt injection. Furthermore, if the output information 33 contains, for example, violent terms, discriminatory terms, or sexual terms, the output information 33 can be blocked.

[0108] 5A is a schematic diagram showing an example in which the determination of whether to block the input information 31 in step S2 is made based on the input information 31 as well as the system prompt 25. By making the determination using the method shown in FIG. 5A, it may be possible to more effectively prevent, for example, input information 31 intended for prompt injection from being supplied to the dialogue model 23, and to more effectively prevent input information 31 not intended for prompt injection from being blocked. Also, for example, if the monitoring model 21 classifies the input information 31 and supplies only input information 31 of a predetermined classification to the dialogue model 23, the classification to be supplied to the dialogue model 23 can be determined by the system prompt 25.

[0109] Similar to the determination in step S2 of whether to block the input information 31, the determination in step S6 of whether to block the output information 33 may be made based on the system prompt 25 in addition to the output information 33. As described above, by determining whether to block the input information 31 or the output information 33 based not only on the input information 31 or the output information 33 but also on the system prompt 25, the dialogue device 10 may be made to have high security and convenience. Note that if the monitoring model 21 has a function of determining whether to block one or both of the input information 31 and the output information 33 based on the system prompt 25, the monitoring model 21 may be the same type of model as the dialogue model 23. For example, the monitoring model 21 may be the same type of large-scale language model as the dialogue model 23.

[0110] 5B is a schematic diagram showing an example in which the determination of whether or not to block input information 31 in step S2 is made based on the input information 31 used for the determination, as well as on input information 31 input before the input information 31 used for the determination. Fig. 5B shows an example in which the monitoring model 21 determines whether or not to block input information 31[n] (n is an integer of 2 or more. In the example shown in Fig. 5B, n is an integer of 4 or more) based not only on input information 31[n] but also on input information 31[1] to input information 31[n-1] input before input information 31[n].

[0111] In the example shown in FIG. 5B , for example, input information 31[1] to input information 31[n] may be input to the reception unit 11 in this order. FIG. 5B illustrates an example in which input information 31[1] is the text "fffff.", input information 31[2] is the text "ggggg.", input information 31[n-1] is the text "hhhhh.", and input information 31[n] is the text "iiiiii.". The dialogue model 23 can generate output information 33 based on, for example, input information 31[1] to input information 31[n]. In this case, the dialogue model 23 can generate output information using input information 31[1] to input information 31[n] and the system prompt 25 as prompts. For example, input information 31[1] to input information 31[n-1] may be input information 31 that was not blocked by the monitoring model 21. Here, the monitoring model 21 may determine whether or not to block the input information 31[n] based on not only the input information 31 that was not blocked, but also the input information 31 that was blocked.

[0112] As a result, it may be possible to more effectively prevent, for example, input information 31 intended for prompt injection from being supplied to the dialogue model 23, and to more effectively prevent input information 31 not intended for prompt injection from being blocked. On the other hand, particularly when the monitoring model 21 is a language model, it may be possible to effectively prevent prompt injection into the monitoring model 21 by determining whether to block input information 31[n] without taking into account input information 31[1] to input information 31[n-1].

[0113] Similar to the determination of whether to block the input information 31[n] in step S2, the determination of whether to block the output information 33 in step S6 may be made based on the output information 33 used for the determination, as well as on the output information 33 output before the output information 33 used for the determination. As described above, by determining whether to block the input information 31 or the output information 33 based on multiple pieces of input information 31 or multiple pieces of output information 33, the dialogue device 10 may be a dialogue device with high security and convenience. Note that if the monitoring model 21 has the function of blocking the input information 31 based on multiple pieces of input information 31 and the function of blocking the output information 33 based on multiple pieces of output information 33, the monitoring model 21 can be the same type of model as the dialogue model 23. For example, the monitoring model 21 can be the same type of large-scale language model as the dialogue model 23.

[0114] The determination of whether to block the input information 31 in step S2 may be made by combining the example shown in Fig. 5A and the example shown in Fig. 5B. That is, the determination may be made based on the input information 31[1] to 31[n] and the system prompt 25.

[0115] <Configuration Example 2 of the Interactive Device> FIG. 6A is a block diagram showing an example in which the monitoring model 21 shown in FIG. 1A includes a determination model 27a and a determination model 27b. In the example shown in FIG. 6A, the determination model 27a can be a rule-based model, and the determination model 27b can be a machine learning model. The determination model 27b can be said to be a model that performs processing based on, for example, the machine learning model MLM. Note that the monitoring model 21 may include three or more determination models. The determination model 27a may also be a machine learning model. In this case, the determination model 27a may be a different type of machine learning model from the determination model 27b. The determination model 27a may also be a machine learning model trained using a dataset different from the dataset used to train the determination model 27b.

[0116] 6A , it may be possible to more effectively prevent input information intended for prompt injection from being supplied to the dialogue model 23 and to more effectively prevent input information not intended for prompt injection from being blocked. For example, the determination model 27a may rule-based determine and block input information that is clearly determined to be intended for prompt injection, while the determination model 27b may determine whether to block other input information.

[0117] Furthermore, for example, when the monitoring model 21 classifies input information and supplies only input information of a predetermined classification to the dialogue model 23, the judgment model 27a may rule-based judge and block input information that can be determined to be intended for prompt injection, and the judgment model 27b may classify input information that is not blocked.

[0118] Similar to the determination regarding the input information, the determination model 27 a and the determination model 27 b may be used to determine whether or not output information may be presented to the user of the dialogue device 10. As described above, by using a plurality of determination models to determine whether or not to block input information or output information, the dialogue device 10 may be made into a dialogue device with high security and convenience.

[0119] Fig. 6B is a block diagram showing an example in which the determination model 27b shown in Fig. 6A is a language model. The determination model 27b can generate output information using a system prompt 29, which is a prompt preset by the developer of the dialogue device 10, and input information entered by the user as a prompt. The system prompt 29 can be stored in the storage unit 13. Fig. 6B shows "ccccc." as an example of the system prompt 29.

[0120] The determination model 27b shown in Fig. 6B can be a language model of a different type from the dialogue model 23. For example, it can be a language model smaller than the dialogue model 23. Furthermore, the determination model 27b shown in Fig. 6B can be a language model of the same type as the dialogue model 23. For example, both the dialogue model 23 and the determination model 27b can be large-scale language models.

[0121] 6A and 6B illustrate an example in which the determination of whether to block input information and output information is performed using the determination model 27a and then using the determination model 27b, but this is not a limitation of one aspect of the present invention. For example, a determination may be performed using the determination model 27b and then using the determination model 27a. Furthermore, for example, a determination may be performed using the other of the determination models 27a and 27b for at least a portion of the input information or output information determined to be blocked by one of the determination models 27a and 27b. In this case, even if one of the determination models 27a and 27b determines to block the input information or output information, the input information or output information may not be blocked based on the determination result of the other of the determination models 27a and 27b.

[0122] 7A is a block diagram showing an example in which the monitoring model 21 shown in Fig. 1A includes an input determination model 51 and an output determination model 52. In the example shown in Fig. 7A, the input determination model 51 is a model that determines whether or not input information may be supplied to the dialogue model 23. The output determination model 52 is a model that determines whether or not output information may be presented to the user of the dialogue device 10.

[0123] The input determination model 51 and the output determination model 52 are different types of models. For example, if the input determination model 51 and the output determination model 52 are machine learning models, the data sets used for training can be different between the input determination model 51 and the output determination model 52. For example, in training the input determination model 51, a label indicating whether or not the training data is data intended for prompt injection is used as the correct answer label. Alternatively, in training the input determination model 51, a label indicating whether or not the training data is data of a predetermined category is used as the correct answer label. For example, if the dialogue device 10 is a device that presents information about intellectual property to a user, a label indicating whether or not the training data includes information about intellectual property is used as the correct answer label.

[0124] Furthermore, in training the output determination model 52, a label indicating whether or not inappropriate content is included in the training data is used as the correct label. When the input determination model 51 and the output determination model 52 are machine learning models, one or both of the input determination model 51 and the output determination model 52 may be language models. Furthermore, the input determination model 51 or the output determination model 52 may be the same type of model as the dialogue model 23, and may be, for example, a large-scale language model.

[0125] Furthermore, one or both of the input determination model 51 and the output determination model 52 may be rule-based models. For example, the input determination model 51 may be a machine learning model, and the output determination model 52 may be a rule-based model. In this case, the output determination model 52 can block output information containing terms that are inappropriate to present to the user of the dialogue device 10 by registering those terms in advance. The registered terms can be stored in the storage unit 13.

[0126] 7B is a block diagram showing an example in which the input determination model 51 shown in FIG. 7A includes a determination model 27a and a determination model 27b. For an explanation of the determination model 27a and the determination model 27b, see the explanations in FIG. 6A and FIG. 6B. The input determination model 51 may include three or more determination models. The output determination model 52 may include multiple determination models.

[0127] As shown in Figures 7A and 7B, by using different models to determine whether to block input information and whether to block output information, it is possible to block input information and output information with high accuracy. For example, it is possible to prevent input information intended for prompt injection from being supplied to the dialogue model 23 and to prevent input information not intended for prompt injection from being blocked. Furthermore, when the input determination model 51 classifies input information and supplies only input information of a predetermined classification to the dialogue model 23, it is possible to perform appropriate classification. For example, if the dialogue device 10 is used as a device for presenting information related to intellectual property to a user, it is possible to prevent input information including information related to intellectual property from being blocked and input information not including information related to intellectual property from being supplied to the dialogue model 23. Furthermore, it is possible to prevent output information including inappropriate content from being supplied to the presentation unit 15 and to prevent output information not including inappropriate content from being blocked.

[0128] As shown in Figures 6A to 7B, when the monitoring model 21 includes multiple models, the monitoring model 21 can be referred to as a monitoring unit. Furthermore, as shown in Figure 7B, when the input judgment model 51 includes multiple models, the input judgment model 51 can be referred to as an input judgment unit. Furthermore, when the output judgment model 52 includes multiple models, the output judgment model 52 can be referred to as an output judgment unit. Even when the monitoring model 21 includes only one model as shown in Figure 1A, the monitoring model 21 may be referred to as a monitoring unit. Even when the input judgment model 51 includes only one model as shown in Figure 7A, the input judgment model 51 may be referred to as an input judgment unit. Even when the output judgment model 52 includes only one model, the output judgment model 52 may be referred to as an output judgment unit. Furthermore, the dialogue model 23 may be referred to as a dialogue unit. Furthermore, the judgment model 27a and the judgment model 27b may be referred to as judgment units.

[0129] <Application Example of Dialogue Device> The following describes an application example of the dialogue device 10. For example, the following describes an application example of the dialogue device 10 in which the monitoring model 21 classifies input information and supplies only input information of a predetermined classification to the dialogue model 23.

[0130] [Application Example 1] When the input information includes, for example, claims (also referred to as claims) written in a document relating to intellectual property, the dialogue device 10 can output text explaining the contents of the claims as output information. For example, if the document relating to intellectual property is a patent document, specifically a published patent application or a patent gazette, the claims can be patent claims. Furthermore, if the document relating to intellectual property is, for example, a utility model publication, the claims can be utility model registration claims. Note that the document relating to intellectual property may also be an international publication. The same applies to the following application examples.

[0131] For example, if the input information includes the sentence "Please explain the following claims" and the scope of the claims, the output information can include a sentence explaining the scope of the input claims and be presented to the user of the interactive device 10.

[0132] Furthermore, when the input information includes, for example, the above-mentioned claims, the interactive device 10 can determine the patent classification of the claims and output a search formula using the determined patent classification as output information. The patent classification can be, for example, the International Patent Classification (IPC), the Cooperative Patent Classification (CPC), the File Index (FI), or F-terms. Alternatively, a unique patent classification other than these can be used.

[0133] For example, if the input information includes the sentence "Please predict the patent classification of the following claims. Then, please tell us a search formula using the predicted patent classification and the wording of the claims," ​​along with the scope of the claims, the patent classification and the search formula can be included in the output information and presented to the user of the interactive device 10. Alternatively, the output information can include the sentence "Please select the type of patent classification," and be presented to the user of the interactive device 10, and when the user inputs a patent classification, the patent classification and the search formula can be presented.

[0134] In this application example, the monitoring model 21 can determine whether the input information contains claims and related instructions, and block the input information if it is determined that the claims and related instructions are not included.

[0135] [Application Example 2] When input information includes, for example, claims described in a document related to intellectual property and information identifying the document, the dialogue device 10 can output, as output information, whether the content of the claims is included in the document. The document can be a document related to intellectual property, such as a published patent gazette, a patent gazette, a utility model gazette, an international publication, or a design gazette. The document can also be, for example, a paper. When the document is, for example, a published patent gazette, a patent gazette, a utility model gazette, or an international publication, the dialogue device 10 can output, as output information, whether the content of the claims is included in the specification of the document. When the document is, for example, a design gazette, the dialogue device 10 can output, as output information, whether the content of the claims is included in the description of the design in the document.

[0136] For example, if the input information includes the sentence "Please explain the difference between the following claim and the content of the following document," the claim, and information identifying the document, the system determines whether the content of the claim is included in the document, and includes the content not included in the document in the output information, which is then presented to the user of the interactive device 10. Here, the document can be identified, for example, by an identification number (ID) assigned to each document. The document can also be identified by one or more of the following: the title assigned to the document, the date of publication of the document, the author of the document, the publisher, and the text included in the document. For example, if the document is a published patent publication, the document can be identified by specifying one or more of an application management number (including a unique internal number) for identifying the application, an application family management number for identifying the application family, the application number, the publication number, the registration number, the inventor, the applicant, the drawings, the abstract, the filing date, the priority date, the publication date, the status, the patent classification, the category, and keywords.

[0137] In this specification, etc., an ID may include not only numbers but also letters. Furthermore, in this specification, etc., letters include symbols.

[0138] By providing a plurality of pieces of information for identifying a document, the dialogue device 10 can be made a highly convenient dialogue device. It is preferable that the user be able to identify the document by specifying only a part of the information. For example, it is preferable that the user be able to identify a document by specifying only a part of the title of the document, rather than the entire title, in order to increase the convenience of the dialogue device 10.

[0139] In this application example, the monitoring model 21 can determine whether the input information contains claims, literature, and instructions related thereto, and block the input information if it is determined that the claims, literature, and instructions related thereto are not included.

[0140] [Application Example 3] When input information includes, for example, claims described in a document related to intellectual property and documents related to the examination of the intellectual property, the interactive device 10 can output, as output information, whether or not the claims include content that has not been examined. The document related to the examination of the intellectual property may be, for example, a notice of reasons for refusal. The document related to the examination of the intellectual property may also be, for example, a written opinion or a written petition. The input information may also include documents related to intellectual property proceedings or trials.

[0141] For example, if the input information includes the sentence "Extract features from the following claims and confirm whether the extracted features are discussed in the Office Action," the scope of the claims, and the Office Action, the output information can indicate whether the content not discussed in the Office Action is included in the scope of the claims. This allows the user of the dialogue device 10 to assert, for example, content not discussed in the Office Action in a written opinion. As a result, the user of the dialogue device 10 can smoothly carry out tasks related to the acquisition of intellectual property rights.

[0142] In this application example, the monitoring model 21 determines whether the input information includes claims, documents related to the examination, and instructions related thereto, and can block the input information if it is determined that the claims, documents related to the examination, and instructions related thereto are not included.

[0143] [Application Example 4] When input information includes, for example, a sentence written in a first language, the dialogue device 10 can determine whether the sentence is easy to translate into a second language. For example, when the input information includes a sentence such as "Please classify the following sentence as easy or difficult to translate into a second language" and a sentence written in the first language, information indicating whether the input sentence is easy to translate or difficult to translate can be included in the output information. The output information can then be presented to the user of the dialogue device 10 by displaying, for example, "Easy to translate" or "Difficult to translate. We recommend that you revise the sentence" on the presentation unit 15. Note that the first language and the second language are not particularly limited. For example, the first language can be Japanese, English, German, French, Chinese, Korean, Spanish, Portuguese, Russian, Arabic, or Hindi. The second language can be any of the above languages ​​that was not selected as the first language. For example, one of the first language and the second language may be English, and one of the first language and the second language may be Japanese. Note that one or both of the first language and the second language may be a language other than the above-mentioned examples.

[0144] Here, if translation is difficult, the reason for this may be included in the output information. For example, if translation is difficult because a sentence is long, specifically because the sentence contains a large number of words or characters, this fact may be included in the output information. In this case, the presentation unit 15 may display, for example, "The sentence is long and difficult to translate. We recommend splitting it into multiple sentences." Also, if translation is difficult because it contains difficult words, this fact may be included in the output information. In this case, the presentation unit 15 may display, for example, "The word A is difficult to understand, so we recommend replacing it with another word."

[0145] In this application example, the monitoring model 21 determines whether or not instructions and sentences related to translation are included, and can block the input information if it is determined that they are not included.

[0146] The multiple configuration examples shown in this specification and the like can be implemented in appropriate combination.

[0147] 10: Dialogue device, 11: Reception unit, 13: Storage unit, 15: Presentation unit, 20: Processing unit, 21: Monitoring model, 23: Dialogue model, 25: System prompt, 27a: Determination model, 27b: Determination model, 29: System prompt, 31: Input information, 33: Output information, 35: Error information, 37: Error information, 40: Data set, 41: Learning data, 43: Correct answer label, 51: Input determination model, 52: Output determination model, 100: Terminal, 101: Information terminal, 103: Information terminal, 105: Housing, 107: Information terminal, 120: Network, 130: Server

Claims

The device includes a reception unit, a processing unit, and a presentation unit, The reception unit has a function of receiving input information, The processing unit has a function of performing processing using a monitoring model and a function of performing processing using a dialogue model, the processing unit has a function of determining, based on the input information, whether or not the input information may be supplied to the dialogue model by using the monitoring model; the processing unit has a function of generating output information based on the input information by using the dialogue model when the monitoring model supplies the input information to the dialogue model; the presentation unit has a function of presenting the output information when the monitoring model supplies the input information to the dialogue model; the presentation unit has a function of presenting error information indicating that the output information is not presented when the monitoring model does not supply the input information to the dialogue model; the dialogue model is a language model, The interaction model is a different type of model from the supervisory model.   In claim 1, The dialogue device has a storage unit, The storage unit has a function of storing a system prompt, The processing unit is an interaction device having a function of generating the output information using the interaction model and the input information and the system prompt as a prompt.   In claim 2, The processing unit has a function of determining, using the monitoring model and based on the system prompt, whether or not the input information may be supplied to the dialogue model.   The device includes a reception unit, a storage unit, a processing unit, and a presentation unit, The reception unit has a function of receiving input information, The storage unit has a function of storing a system prompt, the processing unit has a function of performing processing using a monitoring model and a function of performing processing using a dialogue model which is a language model, the processing unit has a function of determining, using the monitoring model, based on the input information and the system prompt, whether or not the input information may be provided to the dialogue model; the processing unit has a function of generating output information using the dialogue model with the input information and the system prompt as a prompt when the monitoring model supplies the input information to the dialogue model; the presentation unit has a function of presenting the output information when the monitoring model supplies the input information to the dialogue model; The presentation unit has a function of presenting error information indicating that the output information is not presented when the monitoring model does not supply the input information to the dialogue model.   In claim 4, The interaction model is a different type of model from the supervisory model.   In any one of claims 1 to 5, The processing unit is a dialogue device having a function of determining, based on the output information, whether or not the output information may be presented, using the monitoring model.   In any one of claims 1 to 5, The dialogue device, wherein the monitoring model is a machine learning model trained using a dataset different from the dataset used to train the dialogue model.   In any one of claims 1 to 5, The interaction device, wherein the supervisory model includes a first model that is a rule-based model and a second model that is a machine learning model.   A first step of accepting first input information; a second step of accepting second input information; a third step of determining, using a supervisory model, whether or not the second input information may be provided to a dialogue model based on the first input information and the second input information; a fourth step of generating output information based on the first input information and the second input information using the interaction model when the supervision model provides the second input information to the interaction model; a fifth step of the interaction model presenting the output information when the supervision model provides the second input information to the interaction model; and a sixth step of presenting error information indicating that the output information is not presented if the monitoring model does not provide the second input information to the interaction model.   In claim 9, The method of the present invention, wherein the interaction model is a different type of model than the monitoring model.   In claim 9, In the fourth step, the dialogue model generates the output information using the first input information, the second input information, and a system prompt as a prompt.   In claim 11, In the third step, the supervisory model determines whether or not the second input information may be provided to the dialogue model based on the system prompt.   In any one of claims 9 to 12, The interaction method includes a seventh step, after the fourth step and before the fifth step, of the monitoring model determining whether or not the output information is to be presented based on the output information.   In any one of claims 9 to 12, The dialogue method, wherein the supervisory model is a machine learning model trained using a dataset different from the dataset used to train the dialogue model.   In any one of claims 9 to 12, The interaction method, wherein the monitoring model includes a first model that is a rule-based model and a second model that is a machine learning model.

Citation Information

Patent Citations

  • Document classification program, server and method based on sentence features and physical features of document information

    JP2012043285A

  • Training a question-answer dialog sytem to avoid adversarial attacks

    US20220121710A1

Cited By

  • Malicious ai prompt detection

    US20260228331A1