Dialogue system and dialogue method
The dialogue system addresses the need for enhanced social interaction by using a language model to generate context-aware responses, improving cognitive and swallowing functions for elderly users through personalized dialogues.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2026-03-10
AI Technical Summary
There is an increasing need for support for elderly people living alone and caregivers due to reduced social interaction leading to cognitive and swallowing function decline, with existing dialogue systems failing to effectively utilize language models for engaging dialogues.
A dialogue system comprising a system utterance output, user utterance input, prompt generation, and answer sentence acquisition, where prompts are generated including user and system utterances, with options for user type diagnosis and information incorporation, using a language model to generate responses.
Enables engaging dialogues that enhance social interaction, improving cognitive and swallowing functions for elderly users through personalized and context-aware responses.
Smart Images

Figure 2026041055000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a dialogue system and a dialogue method. [Background technology]
[0002] As the elderly population increases, there is an increasing need for support for elderly people living alone and for caregivers in facilities.
[0003] In particular, it is known that fewer opportunities for elderly people to interact with others can lead to a decline in their cognitive and swallowing functions, so it is important to ensure that elderly people have opportunities to interact with others.
[0004] For example, Patent Document 1 describes a dialogue system that selects and outputs a response sentence suitable for a user based on attribute information of the user. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Publication No. 2023-175269 Summary of the Invention [Problem to be solved by the invention]
[0006] At least one object of the present invention is to provide a dialogue system that enables dialogue using a language model. [Means for solving the problem]
[0007] According to the present invention, the above object is achieved by: [1] A dialogue system comprising at least one computer device, the dialogue system comprising: a system utterance output means for outputting a system utterance to a user; a user utterance input means for accepting input of a user utterance from the user; a prompt generation means for generating a prompt to be input to a language model; and an answer sentence acquisition means for acquiring an answer sentence generated by inputting the generated prompt to the language model, wherein the prompt generation means generates a prompt including at least the input user utterance and the system utterance output immediately before the user utterance, and the system utterance output means outputs the acquired answer sentence or a sentence created based on the answer sentence as the next system utterance; [2] The dialogue system according to [1] above, wherein the prompt generation means generates a prompt that requests the generation of a response to a dialogue history that includes at least an input user utterance and a system utterance output immediately before the input user utterance; [3] The dialogue system according to [1] or [2] above, further comprising: a storage means for storing, as a dialogue history, a user utterance and a system utterance output in response to the user utterance in association with the user utterance; and when at least a part of an input user utterance matches a stored user utterance, a system utterance output means for outputting, as a next system utterance, the system utterance stored in association with the user utterance or a sentence created based on the system utterance; [4] The dialogue system according to any one of [1] to [3] above, wherein the prompt generation means generates a prompt by replacing at least a part of a user utterance with predetermined information and / or by adding predetermined information to at least a part of a user utterance based on user information about the user; [5] The dialogue system according to any one of [1] to [4] above, further comprising: a type diagnosis means for diagnosing a user's type based on user information about the user; and a prompt generation means for generating a prompt for requesting the user to generate an answer sentence including a predetermined word based on the diagnosed user's type. [6] The dialogue system according to [4] or [5] above, wherein the user information is the user's name, date of birth, age, gender, blood type, zodiac sign, possessions, place of residence, place of origin, preferences, habits, experiences, SNS (social networking service), family, friends, and / or information about acquaintances; [7] The dialogue system according to any one of [1] to [6] above, wherein the prompt generation means generates a prompt requesting the user to generate an answer sentence including the user's name; [8] The dialogue system according to any one of [1] to [7] above, wherein the system utterance output means outputs a predetermined system utterance when a predetermined condition is satisfied regarding the state of acquisition of an answer sentence by the answer sentence acquisition means; [9] A dialogue method executed in a dialogue system including at least one computer device, the dialogue method comprising: a system utterance output step of outputting a system utterance to a user; a user utterance input step of receiving input of a user utterance from the user; a prompt generation step of generating a prompt to be input into a language model; and an answer sentence acquisition step of acquiring an answer sentence generated by inputting the generated prompt into the language model, wherein the prompt generation step generates a prompt including at least the input user utterance and the system utterance output immediately before the user utterance, and the system utterance output step outputs the acquired answer sentence or a sentence created based on the answer sentence as the next system utterance; This can be achieved by: [Effects of the Invention]
[0008] According to the present invention, it is possible to provide a dialogue system that enables dialogue using a language model. [Brief explanation of the drawings]
[0009] [Figure 1] 1 is a block diagram showing a configuration of a dialogue system according to an embodiment of the present invention; [Figure 2] 2 is a block diagram showing a hardware configuration of an assistant terminal according to an embodiment of the present invention; FIG. [Figure 3] FIG. 2 is a block diagram showing a hardware configuration of a server device according to an embodiment of the present invention. [Figure 4] 10 is a flowchart of a user registration process according to an embodiment of the present invention. [Figure 5] 1 is a flowchart of an interaction process according to an embodiment of the present invention. [Figure 6] 10 is a flowchart of a response sentence generation process according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0010] The following describes embodiments of the present invention, but the present invention is not limited to the following embodiments as long as they do not violate the spirit of the present invention. The order of each process constituting the flowcharts described below is random as long as no contradictions or inconsistencies occur in the process content. Furthermore, it is possible to omit some of the processes constituting the flowcharts or add new processes to each process constituting the flowcharts as long as they do not violate the spirit of the present invention. Furthermore, the device that executes each process constituting the flowcharts can be changed to another device as long as it does not violate the spirit of the present invention. In this case, the process content can be changed so as not to cause contradictions or inconsistencies in the process content.
[0011] [Dialogue system configuration] Fig. 1 is a block diagram showing the configuration of a dialogue system according to an embodiment of the present invention. The dialogue system shown in Fig. 1 includes a dialogue device 1, an assistant terminal 2, and a server device 3. The dialogue device 1, the assistant terminal 2, and the server device 3 are communicably connected to one another via a communication network 5. The dialogue device 1, the assistant terminal 2, and the server device 3 are also communicably connected to a language model server 4 via the communication network 5. The dialogue device 1, the assistant terminal 2, the server device 3, and the language model server 4 do not need to be constantly connected, but may be connected as needed.
[0012] In the dialogue system, any one of the dialogue device 1, the assistant terminal 2, the server device 3, and the language model server 4 can function as an information processing device. When any one of the dialogue device 1, the assistant terminal 2, the server device 3, and the language model server 4 functions as an information processing device, transmission and reception of information is performed between the dialogue device 1, the assistant terminal 2, the server device 3, and the language model server 4 as necessary.
[0013] The dialogue device 1 is a device for dialogue with a user. The dialogue device 1 may be any device that can be spoken to by a user and that can make utterances to the user. The dialogue device 1 may include, for example, an audio input unit such as a microphone, an audio output unit such as a speaker, a control unit, a storage unit, a communication interface, etc. The dialogue device 1 may also include any other configuration.
[0014] The shape of the dialogue device 1 is not particularly limited and can be designed as appropriate. The shape of the dialogue device 1 may be, for example, an animal such as a person or a dog, a plant such as grass or a flower, or an object such as a snowman or a scarecrow. Alternatively, the shape of the dialogue device 1 may be a geometric shape such as a sphere or a cylinder. In other words, the dialogue device 1 may have an appearance like a robot or a smart speaker. From the viewpoint of making it easier for users to feel attached to the dialogue device 1, the dialogue device 1 may have an appearance like a robot.
[0015] The interactive device 1 may also be a desktop or notebook personal computer, a tablet terminal, a smartphone, a conventional mobile phone, or the like.
[0016] The user who will have a dialogue with the dialogue device 1 is not particularly limited and can be designed as appropriate. The user may be, for example, an elderly person, a child, or a non-elderly adult.
[0017] The assistant terminal 2 is a terminal operated by an assistant who assists the user. "Assistants" include, for example, the user's family, care managers, caregivers, and staff at the facility where the user is staying. By inputting information about the user (hereinafter also referred to as user information) into the assistant terminal 2, user registration, which will be described later, can be performed.
[0018] 2 is a block diagram showing the hardware configuration of an assistant terminal according to an embodiment of the present invention. The assistant terminal 2 includes a control unit 21, a RAM 22, a storage unit 23, an input unit 24, a display unit 25, and a communication interface 26, all of which are connected via a bus.
[0019] The control unit 21 is composed of a CPU and a ROM. The control unit 21 executes programs stored in the storage unit 23 and controls the assistant terminal 2. The RAM 22 is a work area for the control unit 21. The storage unit 23 is a memory area for saving programs and data. In other words, the storage unit 23 functions as a recording medium that stores programs. The control unit 21 performs arithmetic processing based on the programs and data read from the RAM 22 and the data input via the input unit 24.
[0020] The display unit 25 has a display screen. The control unit 21 outputs a video signal for displaying an image on the display screen according to the result of the arithmetic processing. Here, the display screen of the display unit 25 may be a touch panel equipped with a touch sensor. In this case, the touch panel functions as the input unit 24.
[0021] The communication interface 26 can be connected to the communication network 5 wirelessly or via a wire, and can transmit and receive data to and from other computer devices via the communication network 5. Data received via the communication interface 26 is loaded into the RAM 22, and the control unit 21 performs arithmetic processing.
[0022] If the user does not have an assistant, the dialogue system may include a user terminal operated by the user instead of the assistant terminal 2. For the hardware configuration of the user terminal, the above description of the hardware configuration of the assistant terminal 2 can be adopted to the extent necessary.
[0023] The server device 3 may be managed by an administrator of the interactive system.
[0024] 3 is a block diagram showing the hardware configuration of a server device according to an embodiment of the present invention. The server device 3 includes at least a control unit 31, a RAM 32, a storage unit 33, and a communication interface 34, which are connected to each other via an internal bus.
[0025] The control unit 31 is composed of a CPU and a ROM, and executes programs stored in the storage unit 33 to control the server device 3. The control unit 31 also has an internal timer that measures time. The RAM 32 is a work area for the control unit 31. The storage unit 33 is a memory area for saving programs and data. In other words, the storage unit 33 functions as a recording medium that stores programs. The control unit 31 reads out the programs and data from the RAM 32, and performs program execution processing based on information received from the dialogue device 1, the assistant terminal 2, and the language model server 4, etc.
[0026] The program may also be stored in a recording medium such as a CD-ROM. In this case, the program stored in the recording medium may be installed in the dialogue device 1, the assistant terminal 2, and / or the server device 3 to execute predetermined functions.
[0027] Alternatively, the program may be distributed from a computer device outside the system. In this case, the program distributed from the computer device outside the system may be installed in the dialogue device 1, the assistant terminal 2, and / or the server device 3 to execute a predetermined function.
[0028] The language model server 4 is a server that uses a language model to perform natural language processing tasks such as sentence generation, question and answer, and sentence summarization. By inputting an instruction sentence called a prompt into the language model, a response sentence is output from the language model. The language model server 4 may be managed by a person different from the administrator of the dialogue system. Furthermore, the server device 3 and the language model server 4 may be configured to cooperate with each other using an API (Application Programming Interface).
[0029] The type of language model is not particularly limited as long as it can process natural language. The language model may be a large-scale language model or a small-scale language model. As the language model, for example, a Transformer-based model such as a Generative Pre-trained Transformer (GPT) or a Bidirectional Encoder Representations from Transformers (BERT) can be adopted.
[0030] The language model server 4 may include a computer device that stores a language model for executing natural language processing. The hardware configuration of the language model server 4 may be the same as that of the server device 3, to the extent necessary.
[0031] Note that the artificial intelligence equipped with a language model may be a specialized artificial intelligence specialized in processing a specific type of task, or may be a general-purpose artificial intelligence capable of processing multiple types of tasks. General-purpose artificial intelligence includes AGI (Artificial General Intelligence) and ASI (Artificial Superintelligence). In other words, the language model is a concept that includes artificial intelligence and / or a server that has the function of outputting answers to questions and / or instructions.
[0032] Also, here we will explain the mode in which an answer sentence is output from a language model in the language model server 4, but the language model may be stored in the server device 3, the assistant terminal 2, or the dialogue device 1, and the server device 3, the assistant terminal 2, or the dialogue device 1 may be configured to output an answer sentence from the language model.
[0033] The dialogue system may also include a plurality of dialogue devices 1. In this case, it is preferable that each dialogue device 1 is assigned identification information (e.g., a dialogue device ID) for identifying the respective dialogue devices 1. It is also preferable that each user who uses the dialogue device 1 is assigned identification information (e.g., a user ID) for identifying the user. Here, it is assumed that a dialogue device ID is assigned to each dialogue device 1 and a user ID is assigned to each user. The server device 3 can store the user ID and the dialogue device ID in association with each other. The server device 3 can store information acquired in each dialogue device 1, information about the user of each dialogue device 1, etc., in association with the user ID and the dialogue device ID.
[0034] The dialogue system may also include multiple assistant terminals 2. Each assistant may be assigned identification information (such as an assistant ID) to identify the assistant. Here, it is assumed that each assistant is assigned an assistant ID. The server device 3 can store a user ID and the assistant ID of the assistant assisting the user corresponding to the user ID in association with each other. The number of assistant IDs stored in association with one user ID may be one or may be two or more. The assistant may be able to register, edit, view, etc., information about the user corresponding to the user ID stored in association with his or her own assistant ID.
[0035] Furthermore, the server device 3 may function in a distributed manner across multiple computer devices. For example, instead of the server device 3, a distributed ledger technology such as a blockchain may be used.
[0036] Furthermore, the number and types of computer devices included in the dialogue system are not particularly limited and can be designed as appropriate. The dialogue system only needs to include at least one computer device. For example, the dialogue system may be composed of a dialogue device 1, or may be composed of a dialogue device 1 and a server device 3.
[0037] [User registration process] First, the assistant performs user registration in the dialogue system. User registration may mean storing information about the user in the server device 3 provided in the dialogue system. For example, the assistant may input an assistant ID and a user ID on a login screen for logging in to the dialogue system, which may allow the assistant terminal 2 to display a user management screen for managing the user corresponding to the user ID. Furthermore, the assistant may be able to cause the assistant terminal 2 to display a user registration screen for user registration via the user management screen. FIG. 4 is a flowchart of user registration processing according to an embodiment of the present invention.
[0038] The assistant terminal 2 accepts input of user information (step S101). The assistant terminal 2 transmits the input user information to the server device 3 (step S102). The server device 3 receives the transmitted user information (step S103). The server device 3 diagnoses the user's type based on the received user information (step S104). The server device 3 stores the user information including the diagnosed user type (step S105), and the user registration process ends.
[0039] The user information input in step S101 may include the user's name, date of birth, age, sex, blood type, zodiac sign, belongings, place of residence, hometown, preferences, habits, experiences, SNS (social networking service), information about family, friends, acquaintances, etc. Information about the user's name includes the user's real name, the user's nickname, etc. Information about the user's belongings includes the name of the interactive device 1 used by the user, the model of the car owned by the user, etc. Information about the user's preferences includes the user's favorite foods, the user's hobbies, etc. Information about the user's habits includes the user's favorite supermarkets, the user's daily routine, etc. Information about the user's experiences includes the user's travel destinations, the user's past occupations, etc.
[0040] The method for inputting the user information in step S101 is not particularly limited and can be designed as appropriate. For example, the assistant may input the user information by typing predetermined user information into a predetermined field on the user registration screen. Alternatively, the assistant may input the user information stored in the SNS server in association with the user's SNS account by referencing the user's SNS account information.
[0041] With the user information entered on the user registration screen, the user may press a registration button or the like displayed on the user registration screen, thereby transmitting the user information in step S102.
[0042] The method for diagnosing the user type in step S104 is not particularly limited and can be designed as appropriate. Here, "type" refers to a pattern obtained by classifying people according to some criteria and extracting their common characteristics. For example, users may be classified into an insightful "visionary type," a pacifist "peace type," a logical "logical type," etc.
[0043] The server device 3 can diagnose the user's type, that is, identify the user's type, based on the user information received in step S103. For example, the server device 3 can diagnose the user's type based on the user's date of birth, the user's blood type, or the user's zodiac sign.
[0044] In step S105, the server device 3 can store the type diagnosed in step S104 and the user information received in step S103 in association with the user ID in the storage unit 33. The type diagnosed in step S104 is information about the user, and therefore can be said to be user information.
[0045] In addition, the assistant may be able to display a reminder registration screen on the assistant terminal 2 via the user management screen to register information to be reminded to the user. The assistant can register a reminder by inputting the time to be reminded, the content of the reminder, etc. on the reminder registration screen. The content of the reminder may be text corresponding to the voice that is actually output, or may be information that can identify the text that corresponds to the voice that is output. Hereinafter, "text corresponding to the voice that is output" will also be referred to as "text to be output." An example of text that is actually output is "Good morning. Have you woken up?". An example of information that can identify the text to be output is "morning reminder."
[0046] When information capable of identifying the text to be output is input as the content of the reminder, text corresponding to the information, which is predetermined in the dialogue system, may be output, or text corresponding to the information generated by a language model may be output. Note that "outputting a voice corresponding to text" is also referred to as "outputting text." When outputting text generated by a language model, for example, when the time for the reminder arrives, the server device 3 generates a prompt requesting the user to generate an answer sentence for the reminder and transmits the prompt to the language model server 4, thereby acquiring the answer sentence generated by the language model. The dialogue device 1 can output the acquired answer sentence or a sentence created based on the answer sentence as a reminder. The manner in which a sentence is created based on the answer sentence may be as described below, to the extent necessary. The prompt requesting the user to generate an answer sentence for the reminder may include information capable of identifying the text to be output. For example, the server device 3 may generate a prompt such as, "Please generate a sentence suitable for a morning reminder in a friendly, conversational tone."
[0047] Furthermore, when registering a reminder, the assistant may be able to set the text of the reminder to include a predetermined word (keyword). For example, the assistant may be able to set the text of a reminder for health management to include the word "jogging," and the text of a reminder for a hobby to include the word "recipes." The predetermined word can be entered and registered by the assistant. The registered word may be included in the text of the reminder with a predetermined probability. The server device 3 can generate a prompt that requests the user to generate an answer to the predetermined reminder by including the registered predetermined word with a predetermined probability. By setting the text of the reminder to include the predetermined word, a reminder that is appropriate for the user can be provided.
[0048] By registering a reminder, the interactive device 1 can perform a predetermined output at a predetermined time. For example, the reminder function enables the interactive device 1 to output "Good morning. Have you woken up?" to the user at 7:00 a.m.
[0049] [Interactive processing] Next, a manner in which a dialogue between a user and the dialogue device 1 is performed by the dialogue system will be described. Here, the voice output from the dialogue device 1 to the user is referred to as a system utterance. The system utterance may be a call to the user or a response to an utterance made by the user to the dialogue device 1. The voice input from the user to the dialogue device 1 is referred to as a user utterance. A dialogue is performed by alternately outputting the system utterance and inputting the user utterance. Note that the "original text output by voice as the system utterance" is also referred to as the "text corresponding to the system utterance" or the "system utterance." In other words, the content of the system utterance itself is also referred to as the system utterance. In addition, the "text obtained by converting the voice input as the user utterance" is also referred to as the "text corresponding to the user utterance" or the "user utterance." In other words, the content of the user utterance itself is also referred to as the user utterance. FIG. 5 is a diagram illustrating a flowchart of a dialogue process according to an embodiment of the present invention.
[0050] First, the server device 3 identifies text corresponding to the system utterance to be output to the user (step S201). The server device 3 stores the text corresponding to the identified system utterance (step S202) and transmits it to the dialogue device 1 (step S203). The dialogue device 1 receives the text corresponding to the transmitted system utterance (step S204) and outputs it by voice (step S205).
[0051] The system utterance specified in step S201 may be specified based on the contents of the reminder registration described above. That is, the system utterance in step S201 may be output as a reminder.
[0052] In step S202, the server device 3 may store the time (date and time) when the system utterance was identified in step S201 or the time (date and time) when the system utterance was stored in step S202, in association with the system utterance. Alternatively, after the dialogue device 1 outputs the system utterance in step S205, the time (date and time) when the system utterance was output may be transmitted to the server device 3, and the server device 3 may store the time (date and time) when the system utterance was output in association with the system utterance. The time (date and time) when the system utterance was identified, the time (date and time) when the system utterance was stored, or the time (date and time) when the system utterance was output may also be referred to as the "time when the system utterance was made." In other words, the server device 3 may store the time when the system utterance was made in association with the system utterance. Furthermore, the server device 3 may store the dialogue device ID of the dialogue device 1 that outputs the system utterance in association with the system utterance.
[0053] In step S203, the server device 3 transmits the system utterance identified in step S201 and stored in step S202 to the interactive device 1 used by the user.
[0054] In order to respond to the system utterance, the user who has heard the system utterance output in step S205 speaks to the dialogue apparatus 1. It is preferable that the system utterance output by the remind function has content that is easy for the user to respond to.
[0055] The dialogue device 1 accepts input of a user utterance from the user (step S206). The dialogue device 1 transmits text corresponding to the input user utterance to the server device 3 (step S207). The server device 3 receives the text corresponding to the transmitted user utterance (step S208) and stores it (step S209). The server device 3 searches the dialogue history stored in the cache memory to see if text corresponding to a user utterance that matches the text corresponding to the received user utterance is stored (step S210). The server device 3 determines whether to use the dialogue history stored in the cache memory (step S211).
[0056] In step S206, the dialogue apparatus 1 receives input of voice spoken by the user to the dialogue apparatus 1 via a microphone or the like. The dialogue apparatus 1 may convert the user's voice input into text.
[0057] In step S207, the user utterance converted into text may be transmitted to the server device 3.
[0058] In step S209, the server device 3 may store, in association with the user utterance, the time (date and time) at which the input of the user utterance was accepted in step S206, the time (date and time) at which the user utterance was received in step S208, or the time (date and time) at which the user utterance was stored in step S209. Hereinafter, the time (date and time) at which the input of the user utterance was accepted, the time (date and time) at which the user utterance was received, or the time (date and time) at which the user utterance was stored will also be referred to as the "time at which the user utterance was made." Furthermore, the server device 3 may store, in association with the user utterance, the dialogue device ID of the dialogue device 1 that accepted the input of the user utterance. Furthermore, the server device 3 may store the user utterance in association with the system utterance stored in step S202.
[0059] The server device 3 can store system utterances output in a dialogue and user utterances input in the dialogue as a dialogue history. In the dialogue history, it is preferable that the system utterances and user utterances constituting one dialogue are stored in association with each other. For example, it is preferable that a system utterance and a user utterance input in response to the system utterance are stored in association with each other. Also, for example, it is preferable that a user utterance and a system utterance output in response to the user utterance are stored in association with each other. Also, it is preferable that the system utterances and user utterances constituting one dialogue are stored in the dialogue history so that their chronological order can be identified. For example, in the dialogue history, the system utterances and user utterances may be stored together with the time (date and time) at which the utterances were made, or may be stored together with the order in which they were made. Also, it is preferable that the dialogue history be stored so that the chronological order of each dialogue can be identified. The dialogue history may include multiple dialogues.
[0060] The range of what constitutes one dialogue, that is, the start and end conditions of a dialogue, are not particularly limited and can be designed as appropriate. For example, the end condition of a dialogue may be that a user utterance is not input within a predetermined time after a system utterance is output, or that a predetermined system utterance that satisfies the end condition (e.g., "See you later") is output. Furthermore, for example, the start condition of a dialogue may be that a system utterance is output after the dialogue end condition is satisfied, or that a user utterance is input after the dialogue end condition is satisfied.
[0061] The server device 3 can store the dialogue history in a main memory and / or a cache memory. The server device 3 may hold dialogue history for a predetermined number of days and / or a predetermined capacity in the cache memory. For example, the server device 3 may delete from the cache memory dialogue history that has been stored for a predetermined number of days and / or dialogue history whose storage capacity exceeds a predetermined capacity.
[0062] In step S210, the server device 3 searches for a user utterance that matches the received user utterance in the dialogue history stored in the cache memory. Here, it is sufficient to search whether at least a part of the received user utterance matches at least a part of the user utterance in the dialogue history stored in the cache memory. In other words, it is sufficient to search whether the received user utterance and the user utterance in the cache memory partially match.
[0063] In step S211, the conditions for determining whether or not to use the dialogue history stored in the cache memory are not particularly limited and can be designed as appropriate.
[0064] For example, if the search in step S210 finds that the received user utterance partially matches the user utterance in the cache memory, it may be determined that the dialogue history stored in the cache memory is to be used.
[0065] Alternatively, for example, if the search in step S210 finds that the received user utterance partially matches the user utterance in the cache memory and the time at which the matching user utterance was made satisfies a predetermined time condition, it may be determined that the dialogue history stored in the cache memory is to be used. The predetermined time condition is not particularly limited and can be designed as appropriate. For example, from the perspective of preventing the user from getting bored with the same response, the predetermined time condition may be that the dialogue history is from a predetermined time before the time of determination. Specifically, for example, if the dialogue history is from two days or more before the time of determination, it may be determined that the dialogue history is to be used.
[0066] Alternatively, for example, in the search of step S210, if the received user utterance and the user utterance in the cache memory partially match, and if the system utterance made immediately before the partially matching user utterance in the cache memory partially matches the system utterance made immediately before the received user utterance, it may be determined that the dialogue history stored in the cache memory is to be used. If the user utterance and the system utterance immediately before the user utterance both match, it is considered that the dialogue flow is the same.
[0067] In step S211, if it is determined that the dialogue history stored in the cache memory is to be used (YES in step S211), the server device 3 uses the dialogue history to identify text corresponding to the system utterance (step S212).
[0068] In step S212, "using the dialogue history stored in the cache memory" may mean using, for the next system utterance, a system utterance previously output in response to a matching user utterance in the dialogue history. A system utterance previously output in response to a user utterance is stored in the dialogue history in association with the user utterance.
[0069] In step S212, the server device 3 may, for example, specify the text of a system utterance previously output in response to the matching user utterance as the next system utterance, as is, or may specify a sentence (text) created based on a system utterance previously output in response to the matching user utterance as the next system utterance. The "sentence created based on a system utterance previously output" refers to a sentence that has been modified from a system utterance previously output, and may be a sentence with predetermined information added, a sentence with predetermined information deleted, or a sentence with modified expression. The server device 3 can create a sentence (text) based on a system utterance previously output.
[0070] On the other hand, if it is determined in step S211 that the dialogue history stored in the cache memory is not to be used (NO in step S211), the server device 3 and the language model server 4 execute a response sentence generation process (step S213). The language model server 4 transmits the response sentence generated in the response sentence generation process to the server device 3 (step S214). The server device 3 receives the transmitted response sentence (step S215). The server device 3 identifies the text corresponding to the system utterance based on the received response sentence (step S212).
[0071] The response sentence generation process in step S213 will be described later.
[0072] In step S212, the server device 3 may specify the response sentence received in step S215 as the next system utterance as is, or may specify a sentence (text) created based on the received response sentence as the next system utterance. The "sentence created based on the response sentence" refers to a sentence that has been modified from the response sentence, and may be a sentence with predetermined information added, a sentence with predetermined information deleted, or a sentence with modified expression. The server device 3 can create a sentence (text) based on the response sentence.
[0073] The server device 3 stores the text corresponding to the system utterance identified in step S212 (step S216) and transmits it to the dialogue device 1 (step S217). The dialogue device 1 receives the text corresponding to the transmitted system utterance (step S218) and outputs it by voice (step S219).
[0074] If the user responds to the system utterance output in step S219, step S206 is executed again, and the dialogue apparatus 1 accepts input of a user utterance. Steps S206 to S219 are repeated until the dialogue ends. The conditions for ending the dialogue may be the same as those described above, to the extent necessary. If the conditions for ending the dialogue are met, the dialogue process ends.
[0075] For the processes in steps S216 to S219, the descriptions for the processes in steps S202 to S205 can be adopted to the extent necessary. In step S216, the system utterance is stored in the server device 3 as a dialogue history.
[0076] [Answer generation process] Next, the answer sentence generation process in the above-mentioned step S213 will be described. Fig. 6 is a flowchart of the answer sentence generation process according to an embodiment of the present invention.
[0077] The server device 3 generates a prompt to be input into the language model (step S301) and transmits it to the language model server 4 (step S302). The language model server 4 receives the transmitted prompt (step S303). The language model server 4 inputs the received prompt into the language model (step S304) and generates an answer sentence (step S305). Steps S301 to S305 complete the answer sentence generation process.
[0078] In step S301, the server device 3 generates a prompt including at least text corresponding to an input user utterance and text corresponding to a system utterance output immediately before the user utterance. Note that the "input user utterance" refers to a user utterance input immediately before the prompt is generated. The server device 3 may generate a prompt requesting the generation of a response to a dialogue history including at least the input user utterance and the system utterance output immediately before the user utterance.
[0079] The input user utterance refers to the user utterance input in step S206, and the system utterance output immediately before the user utterance may refer to the system utterance output in step S205. For example, if the system utterance in step S205 is "Good morning. Are you up?" and the user utterance in step S206 is "Yes. I've already had breakfast," the server device 3 may generate a prompt saying, "Please generate a response in a friendly, conversational tone to follow 'Good morning. Are you up?' and 'Yes. I've already had breakfast.'"
[0080] Furthermore, if a user utterance is input again in step S206 after a system utterance is output in step S219, the input user utterance refers to the user utterance input again in step S206, and the system utterance output immediately before the user utterance may refer to the system utterance output in step S219. For example, if the system utterance in step S219 is "Wow! What did you eat?" and the user utterance in response in step S206 is "Bread today," the server device 3 may generate a prompt saying, "Please generate a response following 'Wow! What did you eat?' and 'Bread today,' in a friendly, conversational tone."
[0081] The server device 3 may generate a prompt that includes at least the input user utterance and the system utterance output immediately before the user utterance, or may generate a prompt that includes a dialogue history that precedes the input user utterance and the system utterance output immediately before the user utterance. For example, in the above example, the server device 3 may generate a prompt such as, "Please generate a response in a friendly conversational tone following 'Good morning. Are you up?' 'Yes, I've already had breakfast.' 'Wow! What did you have for dinner?' 'Bread today.'"
[0082] Furthermore, the user utterance and the system utterance included in the prompt may not be the entire text corresponding to each utterance, but may be a portion of the text corresponding to each utterance. For example, in the above example, the server device 3 may generate a prompt such as, "Please generate a response following 'What did you eat?' 'Bread.' in a friendly, conversational tone."
[0083] By generating a prompt that includes not only the input user utterance but also the system utterance output immediately before the user utterance, it is possible to obtain an appropriate response sentence according to the flow of the dialogue.
[0084] Furthermore, by controlling the generation of a prompt that includes at least a part of the dialogue history, including the input user utterance and the system utterance output immediately before the user utterance, rather than a prompt that includes the entire dialogue history, it is possible to reduce the processing load on the server device 3 and / or the language model server 4, and shorten the time required to generate a prompt and / or a response sentence.
[0085] The number of dialogue histories to be included in the prompt is not particularly limited and can be designed as appropriate. The server device 3 may generate a prompt that includes several or several rounds of system utterances and user utterances immediately before the input user utterance. The dialogue histories to be included in the prompt may also be limited by an indicator other than the number. For example, the server device 3 may generate a prompt that includes a dialogue history of a predetermined number of characters, including at least the input user utterance and the system utterance output immediately before the user utterance. By limiting the dialogue histories to be included in the prompt based on a predetermined criterion, the server device 3 can obtain an appropriate response sentence that matches the flow of the conversation while reducing the processing load.
[0086] In addition, in step S301, the server device 3 may generate a prompt by replacing at least a portion of the text corresponding to the user utterance with predetermined information based on registered user information and / or by adding predetermined information to at least a portion of the text corresponding to the user utterance.
[0087] That is, the server device 3 may introduce so-called variables into the prompt. For example, if the name of a frequently visited supermarket is included in the user's utterance, the server device 3 may generate a prompt by replacing the name with a variable such as {frequently visited supermarket}. The server device 3 may also generate a prompt by adding information about the specific content of the variable to the user's utterance, such as "frequently visited supermarket: XXX."
[0088] Alternatively, the server device 3 may generate a prompt by adding predetermined information to at least a part of the user's utterance without introducing a variable into the prompt. For example, if a word included in the user's utterance is included in the user information, information about the meaning of the word to the user may be added. Specifically, for example, the server device 3 may generate a prompt by adding information such as "XXX is the name of a supermarket I often go to."
[0089] When the server device 3 stores the user utterance and / or the system utterance, it may store the text corresponding to the user utterance and / or the system utterance as is, or it may store the text corresponding to the user utterance and / or the system utterance with at least a portion of the text replaced with a variable.
[0090] In step S301, the server device 3 may generate a prompt to prompt the user to generate an answer sentence including the user's name. For example, the server device 3 may generate a prompt that causes the user to generate an answer sentence including the user's name with a predetermined probability.
[0091] Furthermore, in step S301, the server device 3 may generate a prompt that requests the user to generate an answer sentence that includes a predetermined word, based on the registered user type. For example, the server device 3 may generate a prompt that causes the user type to include a different word in the answer sentence with a predetermined probability. The type of word is not particularly limited and can be designed as appropriate. The type of word may be a compliment or an exclamation mark.
[0092] Specifically, for example, if a user has been diagnosed and registered as either an insightful "vision type," a pacifist "peace type," or a logical "logical type," as described above, a prompt may be generated that causes a "vision type" user to include in their answer one of the words "amazing," "amazing," "number one," and "best," a "peace type" user to include one of the words "thank you," "happy," "kind," and "reassuring," and a "logical type" user to include one of the words "as expected," "interesting," "wonderful," and "sincere," with a predetermined probability.
[0093] By generating answer sentences containing different words for each type of user, it is possible to obtain answer sentences that suit the type of user.
[0094] In step S301, the server device 3 may generate a prompt requesting the user to generate a reply sentence of a predetermined number of characters or less. By limiting the number of characters in the reply sentence, the processing load can be reduced and a good-paced dialogue can be carried out.
[0095] In step S305, the language model server 4 generates a response sentence in response to the prompt input in step S304.
[0096] The answer sentence generated in step S305 is sent to the server device 3 in step S214 of the dialogue processing. When the server device 3 receives the answer sentence, the dialogue system can acquire the answer sentence.
[0097] If a language model is stored in the server device 3, the server device 3 may input the prompt generated in step S301 into the language model to obtain the answer sentence output from the language model.
[0098] Although not shown, if a predetermined condition is satisfied regarding the acquisition status of the answer sentence, the server device 3 may identify a predetermined system utterance in step S212. The dialogue device 1 can output the identified predetermined system utterance.
[0099] The predetermined condition for the acquisition status of the answer sentence is not particularly limited and can be designed as appropriate. The predetermined condition for the acquisition status of the answer sentence may be, for example, that no answer sentence is received from the language model server 4 even after a predetermined time has elapsed since the prompt was sent in step S302, or that the answer sentence received in step S215 indicates an error.
[0100] The content of the predetermined system utterance is not particularly limited and can be designed as appropriate. For example, the predetermined system utterance may be, "Yes, I understand."
[0101] By outputting a predetermined system utterance when the response sentence acquisition status is not good, it becomes possible to continue the dialogue even when the language model server 4 is not functioning well.
[0102] In the above, we have described a mode in which a dialogue starts from a system utterance, but if the dialogue starts from a user utterance, the server device 3 may generate a prompt by treating the system utterance immediately before the input user utterance as blank.
[0103] The dialogue system of the present invention can also be used to dialogue with unregistered users. Even in response to an utterance from an unregistered user, the server device 3 can generate a prompt that includes at least the input user utterance and the system utterance output immediately before the user utterance.
[0104] The number of users who interact with one interaction device 1 may be one or more. When there are two or more users who interact with one interaction device 1, the interaction system may identify the user who made the input user utterance. For example, the interaction system may identify the user based on an image of the user's face, or may identify the user based on information about the user's voice. The image of the user's face may be acquired by a camera provided in the interaction device 1.
[0105] When multiple users who are engaged in a dialogue with one dialogue device 1 are registered users, information for identifying the users may be registered as user information. The information for identifying the users may be an image of the users' faces or information about the users' voices. In this case, the server device 3 can identify the user ID of the user who made the user utterance.
[0106] Although the above describes an embodiment in which the dialogue system is used in a real space, the dialogue system of the present invention may also be used for dialogue in a virtual space. That is, the dialogue system may be used when a user dialogues with a character or object existing in a virtual space. In this case, the user may dialogue with the character or object existing in the virtual space through the user's own avatar existing in the virtual space, or may dialogue with the character or object existing in the virtual space from within the real space via a screen displaying the virtual space. The character or object existing in the virtual space may be automatically controlled by a computer device. The dialogue system may be used to generate utterances from the character or object existing in the virtual space as system utterances.
[0107] In this way, a dialogue system is provided which comprises at least one computer device, and which comprises a system utterance output means for outputting system utterances to a user, a user utterance input means for accepting input of user utterances from the user, a prompt generation means for generating a prompt to be input into a language model, and an answer sentence acquisition means for acquiring an answer sentence generated by inputting the generated prompt into the language model, wherein the prompt generation means generates a prompt including at least the input user utterance and the system utterance output immediately before the user utterance, and the system utterance output means outputs the acquired answer sentence or a sentence created based on the answer sentence as the next system utterance, thereby providing a dialogue system which enables dialogue using a language model.
[0108] Furthermore, by generating a prompt that includes at least the input user utterance and the system utterance output immediately before the user utterance, a natural response sentence that corresponds to the flow of the dialogue can be obtained, and the processing load on the dialogue system can be reduced.
[0109] Furthermore, in this way, the prompt generation means generates a prompt that requests the generation of a response to a dialogue history that includes at least the input user utterance and the system utterance output immediately before the user utterance, and thus a response to the dialogue history can be obtained using the language model.
[0110] Furthermore, in this way, the dialogue system is provided with a storage means for storing user utterances in association with system utterances output in response to the user utterances as a dialogue history, and when at least a part of the input user utterance matches the stored user utterance, the system utterance output means outputs the system utterance stored in association with the user utterance, or a sentence created based on the system utterance, as the next system utterance, thereby enabling output using the dialogue history.
[0111] In this way, the prompt generation means generates a prompt by replacing at least a part of the user's utterance with specified information and / or adding specified information to at least a part of the user's utterance based on user information about the user, thereby obtaining an answer sentence that corresponds to the user information.
[0112] In this way, the dialogue system is provided with a type diagnosis means for diagnosing a user's type based on user information about the user, and the prompt generation means generates a prompt that requests the user to generate an answer sentence containing a specified word based on the diagnosed user type, thereby making it possible to obtain an answer sentence that corresponds to the user's type.
[0113] In addition, since the user information includes the user's name, date of birth, age, gender, blood type, zodiac sign, possessions, place of residence, birthplace, preferences, habits, experiences, SNS (social networking service), family, friends, and / or acquaintances, it is possible to obtain answers based on the user's name, etc.
[0114] Furthermore, by having the prompt generating means generate a prompt requesting the generation of an answer sentence including the user's name, an answer sentence including the user's name can be obtained.
[0115] Furthermore, in this way, when predetermined conditions are met regarding the acquisition status of the answer sentence by the answer sentence acquisition means, the system utterance output means outputs a predetermined system utterance, thereby making it possible to perform a predetermined output when predetermined conditions are met regarding the acquisition status of the answer sentence. [Explanation of symbols]
[0116] 1. Interactive device 2 Assistant terminal 3. Server equipment 4 Language Model Server 5. Communication Network 21 Control section 22 RAM 23 Storage Department 24 Input section 25 Display section 26 Communication Interface 31 Control Unit 32 RAM 33 Storage Department 34 Communication Interface
Claims
1. 1. A dialogue system comprising at least one computer device, a system utterance output means for outputting a system utterance to a user; a user utterance input means for receiving an input of a user utterance from a user; prompt generation means for generating prompts for input to the language model; an answer sentence acquisition means for acquiring an answer sentence generated by inputting the generated prompt into a language model; Equipped with a prompt generating means for generating a prompt including at least an input user utterance and a system utterance output immediately before the input user utterance; the system utterance output means outputs the acquired answer sentence or a sentence created based on the answer sentence as the next system utterance; Dialogue system.
2. the prompt generating means generates a prompt requesting the generation of a response to a dialogue history including at least an input user utterance and a system utterance output immediately before the input user utterance; The dialogue system according to claim 1 .
3. a storage means for storing, as a dialogue history, user utterances and system utterances output in response to the user utterances in association with each other; Equipped with When at least a part of the input user utterance matches a stored user utterance, the system utterance output means outputs, as a next system utterance, the system utterance stored in association with the user utterance or a sentence created based on the system utterance.
3. A dialogue system according to claim 1 or 2.
4. the prompt generation means generates a prompt by replacing at least a part of the user utterance with predetermined information and / or by adding the predetermined information to at least a part of the user utterance based on user information about the user; The dialogue system according to claim 1 .
5. a type diagnosis means for diagnosing a type of a user based on user information relating to the user; Equipped with a prompt generating means for generating a prompt for generating an answer sentence including a predetermined word based on the diagnosed type of the user; The dialogue system according to claim 1 .
6. The user information is information about the user's name, date of birth, age, sex, blood type, zodiac sign, possessions, place of residence, place of origin, preferences, habits, experiences, SNS (social networking service), family, friends, and / or acquaintances.
6. A dialogue system according to claim 4 or 5.
7. a prompt generating means for generating a prompt for generating an answer sentence including the user's name; 3. A dialogue system according to claim 1 or 2.
8. when a predetermined condition is satisfied with respect to the state of acquisition of the answer sentence by the answer sentence acquisition means, the system utterance output means outputs a predetermined system utterance.
3. A dialogue system according to claim 1 or 2.
9. 1. A dialogue method executed in a dialogue system comprising at least one computer device, comprising: a system utterance output step of outputting a system utterance to the user; a user utterance input step of accepting input of a user utterance from a user; a prompt generation step of generating a prompt for input to a language model; an answer sentence acquisition step of acquiring an answer sentence generated by inputting the generated prompt into a language model; and the prompt generating step generates a prompt including at least an input user utterance and a system utterance output immediately before the user utterance; a system utterance output step of outputting the acquired answer sentence or a sentence created based on the answer sentence as a next system utterance; How to interact.
Citation Information
Patent Citations
Man-machine dialogue method, dialogue central control server, dialogue engine and storage medium
CN117633181A
Dialogue system and dialogue method
JP2023175269A
Dialogue system and dialogue method
JP2023175637A
Utterance data generation device, interaction device, and method for creating generative model
JP2023183930A
Chat system and chat program
JP2024003862A