Dialogue generation device, dialogue generation method, and program

The dialogue generation system using two large-scale language models generates both utterance and thought history, addressing the limitations of conventional systems by enabling the detection of misunderstandings and understanding interlocutors' mental states.

WO2026146558A1PCT designated stage Publication Date: 2026-07-09NT T INC

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
NT T INC
Filing Date
2025-01-06
Publication Date
2026-07-09

AI Technical Summary

Technical Problem

Conventional dialogue generation technologies using large-scale language models are limited to generating speech history and lack the ability to understand the thoughts or mental states of interlocutors during a conversation, and cannot detect misunderstandings effectively.

Method used

A dialogue generation system utilizing two large-scale language models to engage in dialogue, where one model generates thoughts and utterances based on attributes and scenarios, allowing for the acquisition of both utterance and thought history, and enabling detection of misunderstandings by comparing first-order and second-order mental states.

Benefits of technology

Enables the generation of dialogues that include thought history, facilitating the detection of misunderstandings and improving the understanding of interlocutors' mental states during conversations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025000020_09072026_PF_FP_ABST
    Figure JP2025000020_09072026_PF_FP_ABST
Patent Text Reader

Abstract

The purpose of the present invention is to identify what thoughts interlocutors have while engaging in a dialogue through a dialogue generation system that generates a dialogue using large language models. To this end, provided is a dialogue generation device that generates a dialogue using a first large language model and a second large language model, and that comprises: a dialogue control unit that causes the first large language model and the second large language model to engage in a dialogue based on thoughts which are formed on the basis of information indicating attributes of two persons; and a history acquisition unit that acquires a dialogue history of the first large language model and the second large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Dialogue generation device, dialogue generation method, and program

[0001] This invention relates to a dialogue generation device, a dialogue generation method, and a program.

[0002] Dialogue datasets are used to train or evaluate the dialogue comprehension capabilities of large-scale language models. However, preparing datasets of human-to-human dialogue presents obstacles not only in terms of cost but also from a privacy perspective, so techniques for generating dialogues using large-scale language models are known.

[0003] For example, there is a known technique for generating dialogues by utilizing the ability of large-scale language models to generate utterances that mimic a person's personality and other characteristics based on person information given as text (see, for example, Non-Patent Documents 1 and 2).

[0004] Xuhui Zhou, et al., "Sotopia: Interactive evaluation for social intelligence in language agents", published as a conference paper at ICLR, 2024. Guangyuan Jiang, et al., "Evaluating and inducing personality in pre-trained language models", in Thirty-seventh Conference on Neural Information Processing Systems, 2023.

[0005] However, conventional technology can only generate speech history, and has the drawback of not being able to understand what the interlocutors were thinking during the conversation.

[0006] Embodiments of the present invention have been made in view of the above problems, and provide a dialogue generation system that generates dialogues using a large-scale language model, which makes it possible to understand what kind of thoughts the dialoguers were having during the dialogue.

[0007] To solve the above problems, a dialogue generation device according to an embodiment of the present invention is a dialogue generation device that generates dialogue using a first large-scale language model and a second large-scale language model, and comprises a dialogue control unit that causes the first large-scale language model and the second large-scale language model to think and then engage in dialogue based on information indicating the attributes of two people, and a history acquisition unit that acquires the dialogue history of the first large-scale language model and the second large-scale language model.

[0008] According to an embodiment of the present invention, in a dialogue generation system that generates dialogues using a large-scale language model, it becomes possible to understand what kind of thoughts the dialoguers were having during the dialogue.

[0009] This figure shows an example configuration of the dialogue generation system according to this embodiment. This figure shows an example of the process for generating speech history. This figure shows an example of a system prompt when generating speech history. This figure shows an example of the process for generating thought and speech history according to Embodiment 1. This figure shows an example of a system prompt according to Embodiment 1. This figure shows an example of the process for generating mental state and speech history according to Embodiment 2. This figure shows an example of a mental state according to Embodiment 2. This figure shows an example of a system prompt according to Embodiment 2. This figure shows an example of a prompt for each mental state according to Embodiment 2. This figure shows an example of the process for generating speech history and mental state history according to Embodiment 3. This figure shows an example of a system prompt according to Embodiment 3. This figure shows an image of an example of dialogue according to Embodiment 3. This figure shows an example of a question template according to Embodiment 4. This figure shows an example of the computer hardware configuration.

[0010] Hereinafter, embodiments of the present invention (this embodiment) will be described with reference to the drawings. The embodiments described below are merely examples, and the embodiments to which the present invention is applied are not limited to the embodiments described below.

[0011] <Overview> (Background) Dialogue datasets are used to train or evaluate the dialogue comprehension capabilities of large-scale language models. However, preparing dialogue datasets from human-to-human conversations presents obstacles in terms of cost, space requirements, and privacy protection. Therefore, techniques for generating dialogues using large-scale language models are known.

[0012] For example, the technology disclosed in Non-Patent Document 1 generates dialogue by utilizing the ability of a large-scale language model to generate utterances that mimic the personality and other characteristics of a person according to person information given as text (see Non-Patent Document 2). Specifically, two large-scale language models are given a dialogue scenario, and the attributes of two different interlocutors are given to each large-scale language model as text. Then, utterances are generated alternately, and the dialogue takes place over multiple turns. This demonstrates that it is possible to generate the dialogue between two people in a given scenario as text.

[0013] For example, by providing a large-scale language model with prompts such as a dialogue scenario (e.g., discussing the company's financial situation), and attributes of the dialogue participants such as name, gender, personality (e.g., extroverted), and purpose (e.g., persuading the other party to reduce costs), it is possible to generate utterances that mimic those individuals within the given setting.

[0014] (Problems) However, conventional technologies, such as those shown in Non-Patent Document 1, can only generate speech history and have the problem of not knowing what the interlocutors were thinking during the conversation. In addition, there are cases where we want to learn and evaluate a function that can detect misunderstandings that occur between interlocutors from a conversation, but conventional technologies do not know where and what kind of misunderstandings are occurring.

[0015] (Summary of this embodiment) Therefore, when the dialogue generation device according to this embodiment has large-scale language models converse with each other, it generates its own thoughts (for example, its own feelings or desires, etc.) before generating utterances. As a result, the dialogue generation device can generate a dialogue history that includes not only an utterance history, which is a history of utterances, but also a thought history, which is a history of thoughts that show what the speaker was thinking during the dialogue.

[0016] Furthermore, the dialogue generation device can also be controlled to generate a specified mental state by prompting it to generate one of the following types of thoughts: emotions, desires, intentions, knowledge, or beliefs, and then providing a few words corresponding to each.

[0017] Furthermore, the dialogue generation device can also conduct a dialogue while showing only the utterances to the dialogue partner, without showing the generated thoughts. In this case, the dialogue generation device prompts and controls a large-scale language model to generate thoughts and utterances according to a specific format in order to extract only the thoughts from the generated text.

[0018] To determine if a misunderstanding has occurred between two dialoguers, the dialogue generation device has one large-scale language model generate a first-order mental state as a thought, and the other large-scale language model generate a thought representing the other person's thought as perceived by that model. Here, the first-order mental state refers to the mental state of a particular person, and the second-order mental state refers to the mental state of another person as perceived by that person. By comparing the first-order and second-order mental states generated as thoughts, it becomes possible for a human to easily determine whether a misunderstanding has occurred. In this case, by having the two dialoguers communicate without revealing their thoughts to each other, the large-scale language model acting as the dialoguer does not know the thoughts of the other party, making it more prone to misunderstandings, and thus suitable for generating training and evaluation data for misunderstanding detection.

[0019] <System Configuration> Figure 1 shows an example of the system configuration of the dialogue generation system according to this embodiment. The dialogue generation system 1 includes a dialogue generation device 100 that generates dialogue using, for example, a first large-scale language model (first LLM 110) and a second large-scale language model (second LLM 120).

[0020] Here, Large Language Models (LLMs) are language models constructed using a large amount of text data and deep learning technology. In this embodiment, the first LLM 110 and the second LLM 120 are general-purpose LLMs capable of multi-turn dialogue, such as GPT-4 (registered trademark), which are used without modification.

[0021] The dialogue generation device 100 is an information processing device equipped with a computer configuration, or a system including multiple computers. The dialogue generation device 100 realizes each of the functional configurations shown in Figure 1, for example, by executing a predetermined program on the computer equipped in the dialogue generation device 100. In the example in Figure 1, the dialogue generation device 100 has each of the functional configurations such as a communication unit 101, a dialogue control unit 102, a history acquisition unit 103, an input / output unit 104, a storage unit 105, and a generation unit 106. At least a part of each of the above functional configurations may be realized by hardware.

[0022] The communication unit 101 connects the dialogue generation device 100 to a communication network and performs communication processing to communicate with external systems, devices, or services. For example, each functional configuration of the dialogue generation device 100 can communicate with the first LLM 110, the second LLM 120, etc., via the communication unit 101.

[0023] The dialogue control unit 102 executes dialogue control processing that causes the first LLM 110 and the second LLM 120 to think and then engage in dialogue, based on the dialogue scenario and information indicating the attributes of the two individuals. Furthermore, the dialogue control unit 102 causes the first LLM 110 and the second LLM 120 to think and then engage in dialogue again, based on the dialogue scenario, information indicating the attributes of the two individuals, and the dialogue history. The specific control contents of the dialogue control unit 102 will be described later with examples of multiple embodiments.

[0024] The history acquisition unit 103 executes a history acquisition process to acquire a dialogue history, which is the history of the dialogue between the first LLM 110 and the second LLM 120. Preferably, the dialogue history acquired by the history acquisition unit 103 includes the thought history and utterance history of the dialogue between the first LLM 110 and the second LLM 120.

[0025] The input / output unit 104 performs input processing to the dialogue generation device 100 and output processing from the dialogue generation device 100. For example, the input / output unit 104 is used to input a dataset containing a dialogue scenario and information indicating the attributes of two people to the dialogue generation device 100. The input / output unit 104 is also used to output the dialogue history generated by the dialogue generation device 100 and the dataset generated by the generation unit 106.

[0026] The memory unit 105 is implemented, for example, by a program executed by the computer provided in the dialogue generation device 100, and a storage device provided by the computer, and stores various data, information, and programs. For example, the memory unit 105 stores data sets input from the input / output unit 104, dialogue history generated by the dialogue generation device 100, data sets generated by the generation unit 106, and templates for various prompts.

[0027] The generation unit 106 performs a generation process to generate a dataset for a task that predicts thoughts from dialogue, based on the utterance history of the dialogue generated by the dialogue generation device 100 and the thoughts associated with each utterance. The generation process performed by the generation unit 106 will be described later in Example 4.

[0028] Note that the system configuration of the dialogue generation system 1 shown in Figure 1 is just one example. For example, each functional configuration of the dialogue generation device 100 may be distributed across multiple devices. Also, at least some of the functional configurations of the dialogue generation device 100 may be implemented by external cloud services or the like. For example, the memory unit 105 may be external cloud storage or the like.

[0029] <Speech History Generation Process> Before describing the embodiments of this model, we will explain an example of the process for generating only speech history as dialogue history.

[0030] The dialogue control unit 102 of the dialogue generation device 100 has the first LLM 110 and the second LLM 120, which are large-scale language models (e.g., GPT-4) capable of multi-turn dialogue, engage in dialogue as person A and person B, respectively. The history acquisition unit 103 also acquires the dialogue history C1:N As (N is an integer of 1 or more), the conversation histories of the first LLM 110 and the second LLM 120 are acquired. Here, the conversation history C 1:N is {u A 1 、u B 1 、u A 2 、u B 2 、···、u A N 、u B N}, and u A i refers to the i-th utterance of the first LLM 110 (person A), and u B i refers to the i-th utterance of the second LLM 120 (person B).

[0031] Fig. 2 is a diagram showing an example of a process for generating a conversation history. This process shows, for example, an example of a process when the conversation generation device 100 described in Fig. 1 acquires only the conversation history as the conversation history.

[0032] In steps S1a and S1b, the conversation control unit 102 generates system prompts 202a and 202b from a data set 201 consisting of three sets of information indicating the scenario of the conversation and the attributes of two persons (for example, person A and person B).

[0033] For example, in step S1a, the conversation control unit 102 creates a system prompt 202a in a format as shown in Fig. 3, for example, using the scenario of the conversation and the information indicating the attributes of two persons. The system prompt 202a is, for example, a prompt for person A that expresses the attributes of persons A and B in language in addition to the scenario of the conversation. The prompt is instruction information for instructing the LLM to perform language processing.

[0034] Similarly, in step S1b, the dialogue control unit 102 uses the dialogue scenario and information indicating the attributes of the two individuals to create a system prompt 202b in the format shown in Figure 3, for example. System prompt 202b is, for example, a prompt for person B that expresses the attributes of person A and person B in language, in addition to the dialogue scenario. In the following description, when referring to any of the system prompts 202a and 202b, "system prompt 202" will be used.

[0035] Dialogue scenarios and character attributes may be sampled from other datasets, for example. Dialogue scenarios are optional and not required (they may be omitted). Examples of character attributes include name, occupation, purpose of the dialogue, and personality, but any of these may be missing, and other attributes may be included.

[0036] Figure 3 shows an example of a system prompt for generating a speech history. For example, when the dialogue control unit 102 creates a system prompt 202a for person A, it inputs the attributes of person A into {name1}, {age1}, {occupation1}, etc. in the system prompt 202 in Figure 3, and the attributes of person B into {name2}, {age2}, {occupation2}, etc. The dialogue control unit 102 also inputs a dialogue scenario into {scenario} in the system prompt 202, inputs the purpose of the dialogue into {goal}, and selects the personality of person A from the options in Your personality 301 to create a system prompt 202a for person A.

[0037] Similarly, when the dialogue control unit 102 creates a system prompt 202b for person B, it inputs the attributes of person B into {name1}, {age1}, {occupation1}, etc. in the system prompt 202 shown in Figure 3, and the attributes of person A into {name2}, {age2}, {occupation2}, etc. The dialogue control unit 102 also inputs a dialogue scenario into {scenario} in the system prompt 202, inputs the purpose of the dialogue into {goal}, and selects person B's personality from the options in Your personality 301 to create the system prompt 202b for person B. Note that the system prompt 202 for generating the utterance history shown in Figure 3 is merely an example; the expression may be changed, or any of the sentences may be deleted or added.

[0038] In steps S2a and S2b, the dialogue control unit 102 inputs the created system prompt 202a to the first LLM 110 and the system prompt 202b to the second LLM 120, instructing the first LLM 110 and the second LLM 120 to engage in dialogue.

[0039] In step S3, the first LLM 110 generates the utterance 203 of person A based on the input system prompt 202a. Note that the previous utterance history 210 i-1 If there is a first LLM 110, the system prompt 202a and the speech history 210 i-1 Based on this, the speech 203 of person A is generated.

[0040] In step S4, the first LLM 110 transmits the generated utterance 203 to the second LLM 120.

[0041] In step S5, the second LLM 120 generates person B's utterance 204 based on the input system prompt 202b and person A's utterance 203 generated by the first LLM 110. (Note: Previous utterance history 210) i-1 If there is a second LLM120, the system prompt 202b, person A's utterance 203, and utterance history 210 i-1 Based on this, the speech 204 of person B is generated.

[0042] In step S6, the history acquisition unit 103 acquires the utterance 203 of person A generated by the first LLM 110 and the utterance 204 of person B generated by the second LLM 120, and stores them in the utterance history 210i.

[0043] The dialogue generation device 100 generates a dialogue history C for N turns by repeatedly executing the process 200 of steps S2a, 2b to S6 in Figure 2 N times (where N is an integer of 1 or more). 1:N You can obtain this.

[0044] For example, the first LLM110 is π A , the second LLM120 is π B , the i-th utterance of person A A i , the i-th utterance of person B B i , system prompt 202a p A SY , p B SY、 Speech history 210 I to C 1:i In this case, during each turn of the dialogue, the first LLM 110 and the second LLM 120 alternately generate utterances as follows, creating the utterance history C 1:i Obtain u A i ~π A (up | p A SY , C 1:i-1 ), u B i ~π B (up | p B SY , C 1:i-1 , u A i ), where C 1:i-1 = {u A 1 , u B 1 , ..., u A i-1 , u B i-1 However, with this method, the dialogue generation device 100 can only acquire utterance history as dialogue history.

[0045] <Examples> Next, the dialogue generation method according to this embodiment will be explained by illustrating several examples.

[0046] [Example 1] Figure 4 shows an example of the process for generating thought and utterance history according to Example 1. This process shows an example of the process when the dialogue generation device 100 described in Figure 1 acquires thought and utterance history as dialogue history. The basic flow of the process is the same as the process for generating utterance history described in Figure 2, so a detailed explanation of the same process is omitted here.

[0047] In steps S11a and S11b, the dialogue control unit 102 generates system prompts 402a and 402b from a dataset 401 consisting of three sets of information: a dialogue scenario and information indicating the attributes of two people (person A and person B).

[0048] For example, in step S11a, the dialogue control unit 102 uses the dialogue scenario and information indicating the attributes of the two individuals to create a system prompt 402a for person A in the format shown in Figure 5, as an example.

[0049] Similarly, in step S11b, the dialogue control unit 102 uses the dialogue scenario and information indicating the attributes of the other person (person B) to create a system prompt 402b for person B in the format shown in Figure 5, for example. In the following description, when referring to any of the system prompts 402a and 402b, "system prompt 402" will be used.

[0050] Figure 5 shows an example of a system prompt according to Embodiment 1. The system prompt 402 according to Embodiment 1 includes a sentence 501 that sets information such as the attributes of one person, the attributes of the other person, the dialogue scenario, the purpose of the dialogue, and the personality of one person, similar to the system prompt 202 when generating the utterance history described in Figure 2. In addition, the system prompt 402 according to Embodiment 1 has an additional sentence 502 that instructs the user to think before speaking.

[0051] For example, the dialogue control unit 102 sets a statement 501 that sets information such as the attributes of one person, the attributes of the other person, the dialogue scenario, the purpose of the dialogue, and the personality of one person, similar to the system prompt 202 used when generating the speech history described in Figure 2. As a result, the dialogue control unit 102 creates a system prompt 402a for person A that instructs the first LLM 110 to think before speaking, and a system prompt 402b for person B that instructs the second LLM 120 to think before speaking.

[0052] Note that the system prompt 402 shown in Figure 5 is merely an example; the wording may be changed, and any of the sentences may be deleted or added.

[0053] In steps S12a and S12b, the dialogue control unit 102 inputs the created system prompt 402a to the first LLM 110 and the system prompt 402b to the second LLM 120, instructing the first LLM 110 and the second LLM 120 to engage in dialogue.

[0054] In step S13, the first LLM 110 generates the thoughts and utterances 403 of person A based on the input system prompt 402a. Note that the history of thoughts and utterances up to the previous step 410 is also included. i-1 If present, the first LLM 110 will have a system prompt 402a and a thought and speech history 410 i-1 Based on this, the thoughts and utterances 403 of person A are generated.

[0055] In step S14, the first LLM 110 transmits the generated thought and utterance 403 to the second LLM 120.

[0056] In step S15, the second LLM 120 generates the thoughts and utterances 404 of person B based on the input system prompt 402b and the thoughts and utterances 403 of person A generated by the first LLM 110. The previous thought and utterance history 410 is also included. i-1 If there is a second LLM120, the system prompt 402b, the thoughts and utterances of person A 403, and the history of thoughts and utterances 410 i-1Based on this, the thoughts and speech 404 of person B are generated.

[0057] In step S16, the history acquisition unit 103 acquires the thoughts and speech 403 of person A generated by the first LLM 110 and the thoughts and speech 404 of person B generated by the second LLM 120, and stores them in the history of thoughts and speech 410i.

[0058] The dialogue generation device 100, for example, repeats the processing 400 of steps S12a, 12b to step S16 in FIG. 4 N times to obtain the history of thoughts and dialogue C for N turns. 1:N can be obtained.

[0059] For example, in the i-th turn of the dialogue, if the thought of person A is m A i and the thought of person B is m B i , then the first LLM 110 and the second LLM 120 generate not only the speech of each person (person A, person B) but also the thoughts of each person as follows. u A i , m A i ~π A (u, m | p A ] SY , C 1:i-1 ), u B i , m B i ~π B (u, m | p B SY , C 1:i-1 , u A i , m A i ), where C 1:i-1 = {u A 1 , m A 1 , u B 1 , m B 1 ..., u A i-1 , m A i-1 ] , u B i-1 , m Bi-1}

[0060] According to Embodiment 1, by using a first LLM 110 and a second LLM 120 capable of multi-turn dialogue, it becomes possible to verbalize the thoughts of each person during the dialogue, thereby acquiring the history of each person's thoughts and utterances as text data.

[0061] [Example 2] In Example 2, mental states, such as emotions, are treated as thoughts. In Example 2, a specified type of mental state (mental state), such as emotions, is verbalized and generated. As a specific example, let the type of mental state be T. The types of mental states T that can be handled here include emotions, desires, intentions, knowledge, beliefs, etc.

[0062] Furthermore, the primary mental state of person A is m A,T1 i The secondary mental state of person A is m A,T2 i Here, the first-order mental state refers to the mental state of a particular person, and the second-order mental state refers to the mental state of another person as perceived by that person.

[0063] Figure 7 shows an example of a mental state according to Embodiment 2. In the example in Figure 7, when the type of mental state T is emotion, desire, or belief, an example of a primary mental state and an example of a secondary mental state are shown. Note that the examples of primary and secondary mental states may be in other languages, such as Japanese.

[0064] Figure 6 shows an example of the process for generating thought and speech history according to Embodiment 2. This process shows an example of the process when the dialogue generation device 100 described in Figure 1 acquires mental state and speech history as dialogue history. The basic flow of the process is the same as the process for generating thought and speech history according to Embodiment 1 described in Figure 4, so a detailed explanation of the process similar to Embodiment 1 is omitted here.

[0065] In steps S21a and S21b, the dialogue control unit 102 generates system prompts 602a and 602b from a dataset 601 consisting of three sets of information indicating the dialogue scenario and the attributes of two people (person A and person B).

[0066] For example, in step S21a, the dialogue control unit 102 uses the dialogue scenario and information indicating the attributes of the two individuals to create a system prompt 602a for person A in the format shown in Figure 8, as an example.

[0067] Similarly, in step S21b, the dialogue control unit 102 uses the dialogue scenario and information indicating the attributes of the two individuals to create a system prompt 602b for person B in the format shown in Figure 8, for example. In the following description, when referring to any of the system prompts 602a and 602b, "system prompt 602" will be used.

[0068] Figure 8 shows an example of a system prompt according to Embodiment 2. The system prompt 602 according to Embodiment 2 includes a sentence 801 that sets information such as the attributes of one person, the attributes of the other person, the dialogue scenario, the purpose of the dialogue, and the personality of one person, similar to the system prompt 202 when generating the utterance history described in Figure 2. In addition, the system prompt 602 according to Embodiment 2 includes a sentence 802 that instructs the user to think about their mental state before speaking.

[0069] For example, the dialogue control unit 102 sets a statement 801 that sets information such as the attributes of one person, the attributes of the other person, the dialogue scenario, the purpose of the dialogue, and the personality of one person, similar to the system prompt 202 used when generating the speech history described in Figure 2. As a result, the dialogue control unit 102 creates system prompts 602a for person A and 602b for person B, which instruct them to think about their mental state before speaking.

[0070] In addition, in the system prompt 602 in Figure 8, {mental state} is, for example, a prompt p for each mental state, as shown in Figure 9.T IS Set it using this method.

[0071] Figure 9 shows examples of prompts for each mental state. In the example in Figure 9, examples of mental state types T include belief, intention, desire, feeling, and knowledge, and the prompts p corresponding to each mental state type T are shown. T IS This is set. In the example in Figure 9, the prompt p for each mental state is set. T IS This includes the prompt p for the first mental state. T1 IS And the prompt p for the second mental state T2 IS It includes.

[0072] Note that the system prompt 602 in the embodiment 2 shown in Figure 8 is merely an example, and the wording may be changed, or any of the sentences may be deleted or added. Also, the prompts p for each mental state shown in Figure 9 T1 IS This is merely an example, and synonyms may be used. Also, in Example 2, the symbol "(" which signifies the start of thought is optional.

[0073] In step S22a of Figure 6, the dialogue control unit 102 sends a system prompt 602a created for person A and a prompt p corresponding to person A's mental state. T IS This is input to the first LLM 110. Also, in step S22b, the dialogue control unit 102 inputs the created system prompt 602b for person B and the prompt p corresponding to person B's mental state. T' IS This is input to the second LLM120. As a result, the dialogue control unit 102 instructs the first LLM110 and the second LLM120 to engage in dialogue.

[0074] In step S23, the first LLM 110 receives the input system prompt 602a and prompt p corresponding to the mental state of person A. T IS Based on this, the mental state and utterance 604 of person A are generated. Note that the history of mental states and utterances up to the previous time 610 i-1If there is a first LLM110, the mental state and speech history 610 from the previous session i-1 Based on this, the mental state of person A and utterance 604 are generated.

[0075] In step S24, the first LLM 110 transmits the generated mental state and utterance 604 to the second LLM 120.

[0076] In step S25, the second LLM120 receives the input system prompt 602b and prompt p corresponding to the mental state of person B. T' IS Based on the mental state and utterance 604 of person A generated by the first LLM 110, the mental state and utterance 605 of person B are generated. Note that the history of mental states and utterances up to the previous generation 610 i-1 If there is a second LLM120, the mental state and speech history 610 from the previous session i-1 Based on this, the mental state of person B and utterance 604 are generated.

[0077] In step S26, the history acquisition unit 103 acquires the mental state and utterance 604 of person A generated by the first LLM 110 and the mental state and utterance 605 of person B generated by the second LLM 120, and stores them in the history of mental states and utterances 610i.

[0078] The dialogue generation device 100 generates a history of mental states and dialogues C for N turns by repeatedly executing, for example, the process 600 of steps S22a, 22b to S26 in Figure 6 N times. 1:N You can obtain this.

[0079] For example, the mental state of person A in the i-th dialogue is m A,T i The mental state of person B is m B,T' i Therefore, the first LLM110 and the second LLM120 generate not only the utterances of each person (person A, person B), but also the mental states of each person, as follows: A i ,m A,T i ~π A (u, m | p A SY , C1:i-1 , p T IS ), u B i ,m B,T' i ~π B (u, m | p B SY , C 1:i-1 , u A i ,m A,T i , p T IS ), where C 1:i-1 = {u A 1 ,m A,T 1 , u B 1 ,m B,T' 1 , ..., u A i-1 ,m A,T i-1 , u B i-1 ,m B,T' i-1}

[0080] Thus, in each turn of the dialogue, the dialogue generation device 100 prompts the first LLM 110 and the second LLM 120 with a prompt p corresponding to the mental state. T IS By providing this, the corresponding mental state can be generated. Note that the prompt p corresponding to the mental state provided to the first LLM110 and the second LLM120 is T IS The prompt p given each turn may be different. T IS You may change it.

[0081] Note that the mental state is an example of the specified type of thought. According to Embodiment 2, the dialogue generation device 100 can cause the first LLM 110 and the second LLM 120 to generate the specified type of thought by devising prompts.

[0082] [Example 3] In Example 3, similar to Example 2, mental states are treated as thoughts. In addition, in Example 2, not only utterances but also the mental states of each person are generated, and the mental states are separated, with only the utterances being given as input to the other party. This prevents each person from seeing the other's mental state, and the generation of mental states and utterances is performed alternately.

[0083] In Example 3, unlike Examples 1 and 2, it is necessary to separate the utterance and mental state from the sentences generated by the first LLM 110 and the second LLM 120. Therefore, the dialogue generation device 100 causes the first LLM 110 and the second LLM 120 to generate the mental state and utterance according to a format such as "(mental state))"utterance". Note that this format may be any other format (for example, "[thought] mental state [utterance] utterance", or "(mental state) "utterance", etc.).

[0084] Furthermore, the dialogue generation device 100 extracts mental states and utterances by using regular expressions. This allows the dialogue generation device 100 to use only the utterances of one of the LLMs, the first LLM 110 and the second LLM 120, as input to the other LLM.

[0085] Figure 10 shows an example of the process for generating the speech history and mental state history according to Embodiment 3. This process shows an example of the process when the dialogue generation device 100 described in Figure 1 acquires the mental state history and speech history as dialogue history. The basic flow of the process is the same as the process for generating the mental state and speech history according to Embodiment 2 described in Figure 6, so a detailed explanation of the process similar to Embodiment 2 is omitted here.

[0086] In steps S31a and S31b, the dialogue control unit 102 generates system prompts 1002a and 1002b from a dataset 1001 consisting of three sets of information indicating the dialogue scenario and the attributes of two people (person A and person B).

[0087] For example, in step S31a, the dialogue control unit 102 uses the dialogue scenario and information indicating the attributes of the two individuals to create a system prompt 1002a for person A in the format shown in Figure 11, as an example.

[0088] Similarly, in step S31b, the dialogue control unit 102 uses the dialogue scenario and information indicating the attributes of the two individuals to create a system prompt 1002b for person B in the format shown in Figure 11, for example. In the following description, when referring to any of the system prompts 1002a and 1002b, "system prompt 1002" will be used.

[0089] Figure 11 shows an example of a system prompt according to Embodiment 3. The system prompt 1002 according to Embodiment 3 has an additional sentence 1101 that instructs the system prompt 602 according to Embodiment 2, as described in Figure 8, to separate thoughts about mental states with ")" and to output the generated mental state and utterance in the format "(mental state))"utterance".

[0090] For example, the dialogue control unit 102 sets information such as the attributes of one person, the attributes of the other person, the dialogue scenario, the purpose of the dialogue, and the personality of one person in the system prompt 1002, similar to the system prompt 202 used when generating the speech history described in Figure 2. As a result, the dialogue control unit 102 creates system prompt 1002a for person A and system prompt 1002b for person B, which instruct the system to think about the mental state before speaking and to output the generated mental state and speech in the specified format.

[0091] Note that the system prompt 1002 in the embodiment 3 shown in Figure 11 is merely an example, and the wording may be changed, or any of the sentences may be deleted or added.

[0092] In step S32a, the dialogue control unit 102 sets a system prompt 1002a for person A that it has created, and a prompt p corresponding to a primary mental state of a certain type (e.g., emotion) T. T1IS This is input to the first LLM 110. Also, in step S32b, the dialogue control unit 102 inputs the created system prompt 1002b for person B and a prompt p corresponding to a certain type T of secondary mental state. T2 IS This is input to the second LLM120. As a result, the dialogue control unit 102 instructs the first LLM110 and the second LLM120 to engage in dialogue.

[0093] In step S33 of Figure 10, the first LLM 110 receives the input system prompt 1002a and prompt p corresponding to a primary mental state of a certain type (e.g., emotion) T. T IS Based on this, the speech 1004 and mental state 1005 of person A are generated. Note that the history of previous speeches 1010 i-1 If there is a first LLM110, the history of previous utterances 1010 i-1 Based on this, the utterance 1004 and mental state 1005 of person A are generated.

[0094] In step S34, the first LLM 110 transmits the generated utterance 1004 to the second LLM 120.

[0095] In step S35, the second LLM 120 receives the input system prompt 1002b and prompt p corresponding to a secondary mental state of the same type (e.g., emotion) T. T2 IS Based on the utterance 1004 of person A generated by the first LLM 110, the utterance 1006 of person B and the mental state 1007 are generated. Note that the history of previous utterances 1010 i-1 If there is a second LLM120, the history of previous utterances 1010 i-1 Based on this, the utterance 1006 of person B and the mental state 1007 are generated.

[0096] In step S36, the history acquisition unit 103 acquires the utterance 1004 of person A generated by the first LLM 110 and the utterance 1006 of person B generated by the second LLM 120, and stores them in the utterance history 1010i.

[0097] In step S37, the history acquisition unit 103 acquires the mental state 1005 of person A generated by the first LLM 110 and the mental state 1007 of person B generated by the second LLM 120, and stores them in the mental state history 1020.

[0098] The dialogue generation device 100 generates a history of mental states 1020 for N turns and a history of utterances C by repeatedly executing, for example, the process 1000 of steps S32a, 22b to S37 in Figure 10 N times. 1:N You can obtain this.

[0099] In Example 3, the dialogue generation device 100 generates the mental state of each person and separates their thoughts, providing only the utterances as input to the other party, thereby preventing them from seeing each other's thoughts, and generating the utterances of each person (Person A, Person B) and their respective mental states. A i ,m A,T1 i ~π A (u, m | p A SY , C 1:i-1 , p T1 IS ), u B i ,m B,T2 i ~π B (u, m | p B SY , C 1:i-1 , u A i , p T2 IS ), where C 1:i-1 = {u A 1 , u B 1 , ..., u A i-1 , u B i-1}

[0100] Experiments have shown that conducting a dialogue in a state where the participant's mental state is invisible to their conversation partner increases the likelihood of misunderstandings during the conversation.

[0101] Figure 12 shows an image of an example of a dialogue according to Embodiment 3. In Figure 12, the first LLM 110 generates the utterance 1203 of person A1201 and the emotion 1204 of person A1201, and the second LLM 120 generates the utterance 1205 of person B1202 and the emotion 1206 of person A1201 as perceived by person B1202. Furthermore, it is assumed that person A1201 and person B1202 are having a dialogue using only the generated utterances 1203 and 1205.

[0102] In the example in Figure 12, Person A1201's emotion 1204 is "frustrated," while Person B1202's perceived emotion 1206 for Person A is "relieved." Since the two do not match, it can be determined that there is a misunderstanding in the dialogue between Person A and Person B. Thus, in this embodiment 3, by comparing the primary mental state generated by the first LLM 110 with the secondary mental state generated by the second LLM, it is possible to determine whether or not a misunderstanding has occurred at each turn of the dialogue.

[0103] Thus, according to Embodiment 3, the dialogue generation device 100 generates thoughts and utterances in a specified format, making it easy to extract only the thought portion from the thoughts and utterances generated by the first LLM 110 and the second LLM 120.

[0104] Furthermore, since the dialogue generation device 100 uses only the utterances from the thoughts and utterances generated by the first LLM 110 and the second LLM 120 to facilitate dialogue, the dialogue takes place without the ability to see the other party's thoughts, making it easier to generate dialogues that are more prone to misunderstanding.

[0105] Furthermore, the dialogue generation device 100 causes one LLM to generate a primary mental state of a certain kind (for example, emotion) as a thought, and the other LLM to generate a secondary mental state of the same kind as a thought, so it is possible to determine whether or not a misunderstanding has occurred in the dialogue turn by turn.

[0106] [Example 4] In Example 3, dialogue C consisting of the history of utterances 1:n If we can obtain the thought 'm' corresponding to each utterance, we can create a task to predict thoughts from the dialogue.

[0107] Figure 13 shows an example of a question template related to Example 4. Note that the question template 1300 shown in Figure 13 is merely an example, and the when clause may be moved to the end, and the wording may be slightly altered.

[0108] The generation unit 106 uses, for example, a template 1300 as shown in Figure 13 to perform a generation process that generates a dataset for predicting thoughts from a dialogue, based on the dialogue utterance history and thoughts for each utterance. For example, the generation unit 106 generates a dataset for predicting thoughts from a dialogue, based on the utterance u A i Question about Q A i Once you have created it, Dialogue C 1:n Question q A i Using this as input, think m A i It is possible to create a task in which the output is the answer to a question. In this case, thinking m A i This is written from the first-person perspective of person A (I think that...). Therefore, the answer will be converted to a third-person perspective (He thinks that... / A thinks that...) using a rule-based method.

[0109] This allows for one task {C} for each utterance. 1:n Since { ,q,m} can be created, a dialogue history C consisting of 2n utterances can be created. 1:n From this, 2n tasks can be created. These tasks can be collected as a dataset and used to train and evaluate machine learning models. This ability to estimate the mental state of others is called theory of mind. For large-scale language models to possess the ability of theory of mind is important for deeply understanding the unobservable state of the human mind, based on observable information such as human communication and instructions from humans to large-scale language models.

[0110] <Hardware Configuration> The dialogue generation device 100 according to this embodiment has, for example, the hardware configuration of a computer 1400 as shown in Figure 14. Alternatively, the dialogue generation device 100 is implemented by multiple computers 1400. Note that the computer is not limited to a physical machine, but may be, for example, a virtual machine on the cloud.

[0111] Figure 14 shows an example of a computer hardware configuration. In the example in Figure 14, the computer 1400 includes a drive device 1401, an auxiliary storage device 1402, a memory device 1403, a CPU 1404, an interface device 1405, a display device 1406, an input device 1407, and an output device 1408, all of which are interconnected by bus B. The computer 1400 may also include a GPU (Graphics Processing Unit) or the like.

[0112] The program that enables processing on the computer 1400 is provided on a recording medium 1409, such as a CD-ROM or memory card. When the recording medium 1409 containing the program is set in the drive device 1401, the program is installed from the recording medium 1409 to the auxiliary storage device 1402 via the drive device 1401. However, the program does not necessarily have to be installed from the recording medium 1409; it may also be downloaded from another computer via a network. The auxiliary storage device 1402 stores the installed program as well as necessary files and data.

[0113] The memory device 1403 reads and stores a program from the auxiliary storage device 1402 when a program startup command is received. The CPU 1404 implements the functions related to the dialogue generation device 100 according to the program stored in the memory device 1403. The interface device 1405 is used as an interface for connecting to a communication network, etc. The display device 1406 displays a GUI (Graphical User Interface) etc. generated by the program. The input device 1407 consists of a keyboard, mouse, buttons, and / or touch panel etc., and is used to input various operation commands. The output device 1408 outputs the calculation results.

[0114] The CPU 1404 may also be other processors, such as a DSP (Digital Signal Processor), a PLD (Programmable Logic Device), or an FPGA (Field Programmable Gate Array).

[0115] <Effects of the Embodiment> According to this embodiment, in a dialogue generation system 1 that generates dialogues using a large-scale language model, it becomes possible to understand what kind of thoughts the dialoguers were having during the dialogue. For example, the dialogue generation device 100 according to this embodiment can automatically generate utterances during the dialogue and data of each person's thoughts in each utterance as text, using a large-scale language model, as long as there is a dataset consisting of three sets: a dialogue scenario and the attributes of the two dialoguers.

[0116] Furthermore, this dataset of utterances and thoughts can be used to learn and evaluate Theory of Mind, the ability to predict thoughts from utterances.

[0117] Furthermore, this speech and thought dataset can be used to evaluate a person's theory of mind ability. For example, individuals with Autism Spectrum Disorder (ASD), a type of developmental disorder, are known to have difficulty with theory of mind. Since early detection and support are crucial for children with ASD, having humans process the dataset created in this embodiment is considered useful for diagnosing whether or not a person has ASD.

[0118] Furthermore, if a function capable of detecting misunderstandings can be implemented using the dataset generated in this embodiment, it may be possible to implement a function that automatically measures how accurately human-to-human dialogue is conducted without misunderstandings, or a function that provides feedback to the dialoguers to resolve misunderstandings.

[0119] <Summary of Embodiments> This specification discloses at least the following dialogue generation devices, dialogue generation methods, and programs. (Section 1) A dialogue generation device that generates dialogue using a first large-scale language model and a second large-scale language model, comprising: a dialogue control unit that causes the first large-scale language model and the second large-scale language model to think and then engage in dialogue based on information indicating the attributes of two people; and a history acquisition unit that acquires the dialogue history of the first large-scale language model and the second large-scale language model. (Section 2) The dialogue generation device according to Section 1, wherein the dialogue history includes the thought history and utterance history of the dialogue between the first large-scale language model and the second large-scale language model. (Section 3) The dialogue generation device according to Section 1 or Section 2, wherein the dialogue control unit causes the first large-scale language model and the second large-scale language model to think and then engage in dialogue based on the attribute information and the dialogue history. (Clause 4) The dialogue generation device according to any one of paragraphs 1 to 3, wherein the thought includes the generation of mental states of the two persons. (Clause 5) The dialogue generation device according to paragraph 4, wherein the mental state includes the mental state of one person as perceived by one person and the mental state of the other person as perceived by one person. (Clause 6) The dialogue generation device according to paragraph 5, further comprising a generation unit that generates a dataset of tasks for predicting thoughts from the dialogue based on the utterance history of the dialogue and the thoughts for each utterance. (Clause 7) A dialogue generation method comprising a computer that generates a dialogue using a first large-scale language model and a second large-scale language model, which performs a dialogue control process that causes the first large-scale language model and the second large-scale language model to think and then engage in dialogue based on information indicating the attributes of the two persons, and a history acquisition process that acquires the dialogue history of the first large-scale language model and the second large-scale language model. (Clause 8) A program that causes a computer to execute the dialogue generation method described in paragraph 7, or a storage medium that stores such a program.

[0120] Although this embodiment has been described above, the present invention is not limited to this specific embodiment, and various modifications and changes are possible within the scope of the gist of the invention as described in the claims.

[0121] 1 Dialogue generation system 100 Dialogue generation device 102 Dialogue control unit 103 History acquisition unit 106 Generation unit 110 First LLM (First Large-Scale Language Model) 120 Second LLM (Second Large-Scale Language Model) 1400 Computer

Claims

1. A dialogue generation device that generates dialogue using a first large-scale language model and a second large-scale language model, comprising: a dialogue control unit that causes the first large-scale language model and the second large-scale language model to think and then engage in dialogue based on information indicating the attributes of two people; and a history acquisition unit that acquires the dialogue history of the first large-scale language model and the second large-scale language model.

2. The dialogue generation apparatus according to claim 1, wherein the dialogue history includes the thought history and utterance history of the dialogue by the first large-scale language model and the second large-scale language model.

3. The dialogue generation apparatus according to claim 1 or 2, wherein the dialogue control unit causes the first large-scale language model and the second large-scale language model to think further and then engage in dialogue based on the attribute information and the dialogue history.

4. The dialogue generation device according to claim 3, wherein the thinking includes the generation of the mental states of the two persons.

5. The dialogue generation device according to claim 4, wherein the mental state includes the mental state of one person as perceived by one person and the mental state of the other person as perceived by one person.

6. The dialogue generation device according to claim 5, further comprising a generation unit that generates a dataset of tasks for predicting thoughts from the dialogue, based on the history of dialogue utterances and thoughts related to each utterance.

7. A dialogue generation method comprising: a computer that generates dialogue using a first large-scale language model and a second large-scale language model, which performs a dialogue control process that causes the first large-scale language model and the second large-scale language model to think and then engage in dialogue based on information indicating the attributes of two people; and a history acquisition process that acquires the dialogue history of the first large-scale language model and the second large-scale language model.

8. A program that causes a computer to execute the dialogue generation method described in claim 7.