Response generation method and response generation program
The response generation method addresses the inconsistency in generative AI responses by using keyword-based predefined sentences or natural language models to ensure accurate and contextually appropriate interactions, enhancing user engagement with AI systems.
Patent Information
- Application Number
- JP2024102436
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2026-01-14
AI Technical Summary
Conventional generative AI systems struggle to consistently generate accurate and appropriate responses to user queries, particularly when specific information about a product or service is required, leading to potential misunderstandings or inaccuracies in conversations.
A response generation method that utilizes a language model to identify specific keywords in user input and generates responses based on pre-defined sentences associated with those keywords, or uses the language model to create natural, human-like responses when no keyword is found, ensuring accurate and contextually appropriate interactions.
Enables the generation of appropriate and contextually relevant responses, ensuring accurate information conveyance and maintaining a natural conversation flow, thereby improving user interaction with AI systems.
Smart Images

Figure 2026004169000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a response generation method and a response generation program. [Background technology]
[0002] In recent years, generative AI (Artificial Intelligence) technology for generating text, such as ChatGPT, has been rapidly gaining popularity. While such generative AI responds to questions in text, systems that enable voice conversation with AI are being developed to meet the need for voice conversation with AI.
[0003] An example of prior art is a response system that understands the linguistic information of an input sentence, determines a candidate response sentence according to the linguistic information, and generates a response sentence based on the candidate response sentence. The response system calculates the similarity between the candidate response sentence and a prohibited sentence by referring to a prohibited sentence database, and restricts the output of the candidate response sentence according to the result of comparing the similarity with a judgment value. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2009-37458 Summary of the Invention [Problem to be solved by the invention]
[0005] However, with conventional technology, when using a generation AI to converse with a human (user), the responses to questions from the user may be inaccurate. For example, even if you want to respond with a fixed response depending on the content of the conversation, it is difficult to always respond with the same content when using a generation AI to generate responses.
[0006] In one aspect, the present invention aims to generate an appropriate response sentence for a user. [Means for solving the problem]
[0007] In one embodiment, a response generation method is provided that uses a language model for generating sentences to generate a response sentence to a user when having a conversation with the user, and in response to receiving first data indicating the content of the user's utterance, the method refers to a memory unit that stores a first keyword in association with a first sentence related to the first keyword, and determines whether the first keyword is included in the content of the utterance indicated by the first data, and if the first keyword is included, generates a response sentence to the content of the utterance indicated by the first data based on the first sentence, and if the first keyword is not included, generates a response sentence to the content of the utterance indicated by the first data using the language model. [Effects of the Invention]
[0008] Advantageous Effects of Invention According to one aspect of the present invention, an effect is achieved in that an appropriate response sentence for a user can be generated. [Brief explanation of the drawings]
[0009] [Figure 1] FIG. 1 is an explanatory diagram illustrating an example of a response generating method according to an embodiment. [Figure 2] FIG. 2 is an explanatory diagram showing an example of the system configuration of the chat system 200. As shown in FIG. [Figure 3] FIG. 3 is a block diagram showing an example of the hardware configuration of the response generating device 201. As shown in FIG. [Figure 4] FIG. 4 is a block diagram showing an example of the hardware configuration of the user terminal 202. As shown in FIG. [Figure 5] FIG. 5 is an explanatory diagram showing an example of the contents stored in the specific response keyword table 220. As shown in FIG. [Figure 6] FIG. 6 is a block diagram showing an example of the functional configuration of the response generating device 201. As shown in FIG. [Figure 7] FIG. 7 is an explanatory diagram showing an example of the operation of the chat system 200. [Figure 8]FIG. 8 is a flowchart showing an example of a response processing procedure of the response generating device 201. [Figure 9] FIG. 9 is an explanatory diagram showing an example of a conversation when this response generation method is applied and when it is not applied. DETAILED DESCRIPTION OF THE INVENTION
[0010] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of a response generation method and a response generation program according to the present invention will be described in detail with reference to the accompanying drawings.
[0011] (Embodiment) Fig. 1 is an explanatory diagram showing an example of a response generation method according to an embodiment. In Fig. 1, an information processing device 101 is a computer that uses a language model to generate a response sentence to a user when having a conversation with the user. The language model is a machine learning model in the field of natural language processing, and corresponds to a generation AI (document generation AI) for generating sentences.
[0012] An example of a language model is LLM (Large Language Models). LLM is a language model constructed by deep learning using a large amount of text data. Because language models such as LLM learn a large amount of various knowledge, they tend to generate natural, human-like sentences.
[0013] Generally, generative AI (language models) do not necessarily respond in the same way to the same question. However, depending on the content of the conversation, there are times when you want to respond with a set content. For example, when answering a question about a product or service, you may want to convey accurate and complete information about the product or service. Also, there are times when you want to respond with clear and accurate wording that will not lead to misunderstandings about a company's philosophy or business model.
[0014] However, with conventional technology, when using generative AI to converse with a human (user), it is not possible to generate a response sentence with a fixed content based on the content of the conversation, and it may not be possible to respond appropriately to questions from the user.
[0015] Therefore, in this embodiment, we will explain a response generation method that, when using a language model to have a conversation with a user, if the user's utterance contains specific keywords, generates a response sentence based on a sentence corresponding to the specific keywords that have been registered in advance, thereby making it possible to generate an appropriate response sentence for the user.
[0016] Here, an example of processing by the information processing device 101 will be described. Here, an example will be described in which a response sentence is generated when having a conversation with the user 102 using the language model 110. The language model 110 is, for example, an LLM. The conversation with the user 102 may be carried out by text communication or by voice communication.
[0017] (1) In response to receiving first data 111 indicating the content of a comment made by a user 102, the information processing device 101 refers to the memory unit 120 and determines whether the content of the comment indicated by the first data 111 includes a first keyword 121.
[0018] Here, the content of the utterance indicated by the first data 111 represents words uttered by the user 102, and may represent, for example, a query or question from the user 102. Furthermore, the content of the utterance indicated by the first data 111 may represent a sentence (declarative sentence) expressing the thoughts, feelings, etc. of the user 102, instead of a query or question.
[0019] The storage unit 120 stores a first keyword 121 and a first sentence 122 in association with each other. The first keyword 121 is a phrase consisting of one or more words and can be set arbitrarily. For example, the first keyword 121 represents an object or matter about which accurate information is desired to be conveyed. The first sentence 122 is a sentence related to the first keyword 121.
[0020] For example, the first sentence 122 may be a sentence that explains the object or matter represented by the first keyword 121. The first sentence 122 may be registered in the form of a response sentence to a question about the first keyword 121. For example, if the first keyword 121 is the product name of a certain product, the first sentence 122 may be a sentence that explains the functions and features of the product.
[0021] 1, the first data 111 represents a question (prompting) from the user 102, such as "What do you think about XX?" In this case, the information processing device 101 determines whether the content of the statement indicated by the first data 111 includes a first keyword 121.
[0022] (2) When the first keyword 121 is included, the information processing device 101 generates a response sentence 131 to the utterance content indicated by the first data 111 based on a first sentence 122 corresponding to the first keyword 121. When the first keyword is not included, the information processing device 101 generates a response sentence 132 to the utterance content indicated by the first data 111 using the language model 110.
[0023] In the example of FIG. 1, (i) if the first keyword 121 is "XX", the utterance indicated by the first data 111 includes the first keyword 121. In this case, the information processing device 101 generates a response sentence 131 to the utterance indicated by the first data 111 based on the first sentence 122. For example, the information processing device 101 may generate the first sentence 122 as the response sentence 131.
[0024] Furthermore, (ii) if the first keyword 121 is "xx", the utterance content indicated by the first data 111 does not include the first keyword 121. In this case, the information processing device 101 uses the language model 110 to generate a response sentence 132 to the utterance content indicated by the first data 111. For example, the information processing device 101 may use the language model 110 to generate the response sentence 132 based on the content of a conversation with the user 102, which includes the utterance content indicated by the first data 111.
[0025] In this way, the information processing device 101 can use the language model 110 to generate an appropriate response sentence for the user 102 when having a conversation with the user 102. For example, when the content of the utterance of the user 102 includes a first keyword 121 that represents an object or matter about which accurate information is desired to be conveyed ((i) in FIG. 1 ), the information processing device 101 can generate a response sentence 131 based on a first sentence 122 related to the first keyword 121 that has been registered in advance. In this case, a response to the user 102 is made based on the response sentence 131, and accurate information about "XX" represented by the first keyword 121 can be conveyed to the user 102.
[0026] Furthermore, when the first keyword 121 is not included in the content of the utterance of the user 102, the information processing device 101 can generate a natural, human-like response sentence 132 using the language model 110. In this case, a response to the user 102 is made based on the response sentence 132, thereby realizing a natural, human-like conversation.
[0027] (Example of system configuration of conversation system 200) Next, we will explain an example of the system configuration of a conversation system 200 that includes the information processing device 101 shown in Fig. 1. Here, we will explain an example in which the information processing device 101 shown in Fig. 1 is applied to a response generation device 201 in the conversation system 200.
[0028] The conversation system 200 is a computer system that enables communication with AI. The conversation system 200 can be applied to, for example, a web conferencing system that enables real-time communication with remote parties or AI via audio and video.
[0029] In the following explanation, the AI that converses with the user in the conversation system 200 may be referred to as the "personality AI." Also, in the conversation system 200, the conversation between the user and the personality AI will be explained as an example, taking as an example a case where the conversation between the user and the personality AI is conducted by voice. However, the conversation between the user and the personality AI may also be conducted in text format, or may be conducted using both voice and text.
[0030] Fig. 2 is an explanatory diagram showing an example of the system configuration of a conversation system 200. In Fig. 2, conversation system 200 includes a response generation device 201 and a user terminal 202. In conversation system 200, response generation device 201 and user terminal 202 are connected via a wired or wireless network 210. Network 210 is, for example, the Internet, a LAN (Local Area Network), or a WAN (Wide Area Network).
[0031] Here, the response generation device 201 is a computer that has a specific response keyword table 220 and generates a response sentence for a user. The response generation device 201 is, for example, a server. The specific response keyword table 220 stores specific response keywords and response sentences in association with each other. The contents stored in the specific response keyword table 220 will be described later with reference to FIG. 5.
[0032] The user terminal 202 is a computer used by a user of the conversation system 200. The user is, for example, a person who has a conversation with a personality AI. The user terminal 202 is, for example, a PC (Personal Computer), a tablet PC, a smartphone, or the like.
[0033] Here, the response generation device 201 and the user terminal 202 are provided separately, but this is not limiting. For example, the response generation device 201 may be realized by the user terminal 202. Furthermore, the conversation system 200 may include multiple user terminals 202. Furthermore, the conversation system 200 may include an administrator terminal used by an administrator of the conversation system 200.
[0034] (Example of hardware configuration of response generation device 201) Next, an example of the hardware configuration of the response generation device 201 will be described.
[0035] Fig. 3 is a block diagram showing an example of the hardware configuration of the response generation device 201. In Fig. 3, the response generation device 201 has a CPU (Central Processing Unit) 301, a memory 302, a disk drive 303, a disk 304, a communication I / F (Interface) 305, a portable recording medium I / F 306, and a portable recording medium 307. Furthermore, each component is connected to each other by a bus 300.
[0036] Here, the CPU 301 is responsible for overall control of the response generation device 201. The CPU 301 may have multiple cores. The memory 302 includes, for example, a read-only memory (ROM) and a random access memory (RAM). A program stored in the memory 302 is loaded into the CPU 301, causing the CPU 301 to execute coded processing.
[0037] The disk drive 303 controls reading / writing of data from / to the disk 304 under the control of the CPU 301. The disk 304 stores data written under the control of the disk drive 303. The disk 304 is, for example, a magnetic disk, an optical disk, or the like.
[0038] The communication I / F 305 is connected to the network 210 (see FIG. 2) via a communication line, and is connected to an external computer (for example, the user terminal 202 shown in FIG. 2) via the network 210. The communication I / F 305 serves as an interface between the network 210 and the inside of the device, and controls the input and output of data from the external computer. The communication I / F 305 is, for example, a modem or a LAN adapter.
[0039] The portable recording medium I / F 306 controls reading and writing of data from and to the portable recording medium 307 under the control of the CPU 301. The portable recording medium 307 stores data written under the control of the portable recording medium I / F 306. The portable recording medium 307 is, for example, a CD (Compact Disc)-ROM, a DVD (Digital Versatile Disk), or a USB (Universal Serial Bus) memory.
[0040] In addition to the above-described components, the response generation device 201 may have, for example, an input device, a display, etc. Furthermore, the response generation device 201 may not have, for example, the portable recording medium I / F 306 and the portable recording medium 307 among the above-described components.
[0041] (Example of hardware configuration of user terminal 202) Next, an example of the hardware configuration of the user terminal 202 will be described.
[0042] Fig. 4 is a block diagram showing an example of the hardware configuration of the user terminal 202. In Fig. 4, the user terminal 202 has a CPU 401, a memory 402, a communication I / F 403, a camera 404, a display 405, an input device 406, a speaker 407, and a microphone 408. Furthermore, each component is connected to each other via a bus 400.
[0043] Here, the CPU 401 is responsible for overall control of the user terminal 202. The CPU 401 may have multiple cores. The memory 402 is a storage unit having, for example, a ROM, a RAM, and a flash ROM. Specifically, for example, the flash ROM or ROM stores various programs, and the RAM is used as a work area for the CPU 401. The programs stored in the memory 402 are loaded into the CPU 401, causing the CPU 401 to execute the coded processes.
[0044] The communication I / F 403 is connected to the network 210 (see FIG. 2) via a communication line, and is connected to an external computer (for example, the response generating device 201) via the network 210. The communication I / F 403 manages the interface between the network 210 and the inside of the device itself, and controls input and output of data from external devices.
[0045] The camera 404 is a photographing device that photographs an image (still image or video) and outputs the image data. The camera 404 is installed in a position where it can photograph the face of the user who uses the user terminal 202, for example.
[0046] The display 405 is a display device that displays a cursor, an icon, a toolbox, and data such as documents, images, function information, etc. The display 405 may be, for example, a liquid crystal display or an organic EL (Electroluminescence) display.
[0047] The input device 406 has keys for inputting letters, numbers, various instructions, etc., and is used to input data. The input device 406 may be a touch panel input pad or numeric keypad, or may also be a keyboard or mouse. The speaker 407 converts electrical signals into sound and outputs the sound. The microphone 408 is an audio input device that receives sound and converts it into an electrical signal.
[0048] In addition to the above-mentioned components, the user terminal 202 may also have, for example, an HDD (Hard Disk Drive), an SSD (Solid State Drive), a short-range wireless communication I / F, a portable recording medium I / F, a portable recording medium, etc.
[0049] (Storage contents of specific response keyword table 220) Next, the contents stored in the specific response keyword table 220 of the response generation device 201 will be described with reference to Fig. 5. The specific response keyword table 220 is realized by a storage device such as the memory 302 or the disk 304, for example.
[0050] Fig. 5 is an explanatory diagram showing an example of the contents stored in the specific response keyword table 220. In Fig. 5, the specific response keyword table 220 has fields for specific response keywords and response sentences, and stores specific response keyword information (for example, specific response keyword information 500-1 to 500-3) as records by setting information in each field.
[0051] Here, the specific response keyword is a keyword that represents an object or matter about which accurate information is to be conveyed to the other party to avoid misunderstandings or errors. The response sentence is a sentence that can serve as a response to a question or inquiry about the specific response keyword. The response sentence is, for example, a sentence that conveys accurate information about the object or matter represented by the specific response keyword.
[0052] For example, specific response keyword information 500-1 indicates the specific response keyword "favorite food" and the response sentence "My favorite food is curry" corresponding to the specific response keyword "favorite food." The response sentence "My favorite food is curry" is a sentence that explains the specific response keyword "favorite food," and indicates that the favorite food of the personality AI is curry.
[0053] (Example of functional configuration of response generation device 201) Next, an example of the functional configuration of the response generation device 201 will be described.
[0054] Fig. 6 is a block diagram showing an example of the functional configuration of the response generation device 201. In Fig. 6, the response generation device 201 includes an acquisition unit 601, a reception unit 602, a determination unit 603, a generation unit 604, a response unit 605, and a storage unit 610. The acquisition unit 601 to the response unit 605 are functions that constitute the control unit 600, and specifically, the functions are realized by causing the CPU 301 to execute a program stored in a storage device such as the memory 302, the disk 304, or the portable recording medium 307 shown in Fig. 3, or by the communication I / F 305. The processing results of each functional unit are stored in a storage device such as the memory 302 or the disk 304.
[0055] The storage unit 610 is realized by a storage device such as the memory 302 or the disk 304. Specifically, for example, the storage unit 610 stores the specific response keyword table 220 shown in FIG. 5. In FIG. 6, the TB 220 corresponds to the specific response keyword table 220. The storage unit 610 may be included in another computer accessible by the response generation device 201. In this case, the response generation device 201 can refer to the storage unit 610 by accessing the other computer.
[0056] The acquisition unit 601 acquires a setting file that associates specific keywords with sentences related to the specific keywords. Here, the specific keywords are phrases consisting of one or more words. The specific keywords are, for example, keywords that represent things or matters about which accurate information should be conveyed to the other party to avoid misunderstandings or errors.
[0057] A sentence related to a specific keyword is a sentence that explains or explains the specific keyword. A sentence related to a specific keyword is, for example, a colloquial sentence. Furthermore, a sentence related to a specific keyword may be a response sentence that expresses an answer to a question or inquiry about the specific keyword.
[0058] The specific response keyword shown in FIG. 5 is an example of a specific keyword. The response sentence shown in FIG. 5 is an example of a sentence related to a specific keyword. Furthermore, the first keyword 121 shown in FIG. 1 corresponds to, for example, the specific keyword. The first sentence 122 shown in FIG. 1 corresponds to, for example, a sentence related to the specific keyword. The configuration file is created, for example, by an administrator of the conversation system 200.
[0059] Specifically, for example, the acquiring unit 601 may acquire the setting file by receiving it from an administrator terminal (not shown). Alternatively, the acquiring unit 601 may acquire the setting file by operation input by a user (for example, an administrator of the chat system 200) using an input device (not shown) of the acquiring unit 601's own device.
[0060] The specific keyword represented by the acquired setting file and the sentence related to the specific keyword are stored in the storage unit 610. For example, the acquisition unit 601 associates the specific keyword represented by the acquired setting file with the sentence related to the specific keyword, and registers them in the specific response keyword table 220 shown in FIG.
[0061] For example, an administrator of the conversation system 200 can update the contents stored in the specific response keyword table 220 by creating or updating a setting file and inputting the file into the response generation device 201. The setting file may also include a keyword to be deleted. For example, when the setting file includes a keyword to be deleted, the acquiring unit 601 may delete, from the specific response keyword table 220, specific response keyword information whose specific response keyword is the keyword to be deleted.
[0062] The receiving unit 602 receives voice data indicating the content of a user's utterance. The content of a user's utterance represents words spoken by the user, such as a query or question from the user to the personality AI. The content of a user's utterance may also represent a sentence (declarative sentence) expressing the user's thoughts, feelings, etc., rather than a query or question.
[0063] Specifically, for example, the receiving unit 602 receives voice data indicating the contents of a user's speech from the user terminal 202 shown in Fig. 2. This voice data is, for example, voice received by the microphone 408 shown in Fig. 4 converted into an electrical signal. Alternatively, the receiving unit 602 may receive voice data obtained by converting voice received by a microphone (not shown) of the device itself into an electrical signal.
[0064] Note that voice data indicating the content of a user's speech is received, for example, each time the user utters a word in a conversation with the personality AI. Also, if there are multiple users conversing with the personality AI, voice data indicating the content of each user's speech is received. When voice data is received, for example, log information corresponding to the received voice data is recorded as a conversation log.
[0065] In the following description, the voice data indicating the contents of the user's speech received by the receiving unit 602 may be referred to as "first voice data."
[0066] In response to receiving the first voice data, the determination unit 603 determines whether or not a specific keyword is included in the speech content indicated by the first voice data by referring to the storage unit 610. Here, the storage unit 610 stores the specific keyword and a sentence related to the specific keyword in association with each other.
[0067] Specifically, for example, the determination unit 603 recognizes the first voice data and converts it into first text data. Any existing technology may be used for the voice recognition. Furthermore, the voice recognition process may be performed using a computer other than the response generation device 201 (for example, an external voice recognition server).
[0068] Then, the determination unit 603 determines whether or not a specific response keyword is included in the converted first text data by referring to the specific response keyword table 220. More specifically, for example, the determination unit 603 performs a morphological analysis on the converted first text data to divide it into words, and determines whether or not a specific response keyword is included in the divided words.
[0069] Note that the determination unit 603 may determine that the specific response keyword is included even when a synonym of the specific response keyword is included in the first text data. For example, assume that the specific response keyword is "favorite food" and a synonym of the specific response keyword "favorite food" is "favorite food." In this case, the determination unit 603 may determine that the specific response keyword "favorite food" is included even when the first text data includes "favorite food." Synonyms of the specific response keyword may be registered in, for example, the specific response keyword table 220, or may be identified from a synonym dictionary (not shown).
[0070] If the specific keyword is not included, the generation unit 604 uses the language model M to generate a response sentence to the user's utterance content indicated by the first voice data. Here, the language model M is a machine learning model for generating sentences. The language model M is, for example, a large-scale language model (LLM). Alternatively, the language model M may be a small language model (SLM).
[0071] The language model M is stored in, for example, the storage unit 610. The language model M may also be stored in another computer accessible by the response generation device 201. In this case, the response generation device 201 can use the language model M by accessing the other computer.
[0072] Specifically, for example, the generation unit 604 may use the language model M to generate a response sentence to the user's utterance content indicated by the first voice data based on the content of the conversation between the user and the personality AI. The content of the conversation between the user and the personality AI includes the user's utterance content indicated by the first voice data. Furthermore, the content of the conversation between the user and the personality AI may include the user's utterance content and the personality AI's utterance content prior to the first voice data.
[0073] The content of the conversation between the user and the personality AI is identified, for example, from a conversation log. The conversation log includes log information indicating the content of the user's utterances and a log indicating the content of the personality AI's utterances. The log indicating the content of the user's utterances corresponds, for example, to the voice data received by the receiving unit 602. The log indicating the content of the personality AI's utterances corresponds to the voice data output by the response unit 605.
[0074] To explain in more detail, for example, the generation unit 604 generates a prompt (command sentence) that instructs the generation of a response sentence to the utterance content indicated by the first voice data so as to match the content of the conversation between the user and the personality AI. Then, the generation unit 604 may generate a response sentence to the utterance content of the user by providing the generated prompt to the language model M.
[0075] Furthermore, when a specific keyword is included, the generation unit 604 generates a response sentence to the user's utterance content indicated by the first voice data, based on a sentence related to the specific keyword stored in the storage unit 610. Specifically, for example, the generation unit 604 may generate the sentence related to the specific keyword itself as a response sentence to the user's utterance content.
[0076] More specifically, for example, the generation unit 604 identifies a response sentence corresponding to a specific response keyword included in the user's utterance content (first text data) by referring to the specific response keyword table 220. Then, the generation unit 604 sets the identified response sentence as a response sentence to the user's utterance content.
[0077] For example, suppose the user's utterance (first text data) includes the specific response keyword "Uvance." In this case, the generation unit 604 may generate a response sentence corresponding to the specific response keyword "Uvance," such as "Uvance is a business model that takes on the challenge of helping customers grow their businesses and resolving social issues," as a response sentence to the user's utterance.
[0078] Furthermore, the generation unit 604 may generate a response sentence to the user's utterance content indicated by the first voice data from the identified response sentence based on the content of the conversation between the user and the personality AI, using the language model M. Explaining in more detail, for example, the generation unit 604 creates a prompt that instructs the generation of a response sentence to the utterance content indicated by the first voice data from the identified response sentence so as to match the content of the conversation between the user and the personality AI, without changing the meaning of the response sentence.
[0079] The generation unit 604 may then generate a response sentence to the user's utterance content indicated by the first voice data by providing the created prompt to the language model M. This allows the generation unit 604 to generate a response sentence customized in accordance with the flow of the conversation between the user and the personality AI based on the identified response sentence.
[0080] The response unit 605 responds to the user based on the generated response sentence. Specifically, for example, the generation unit 604 converts the generated response sentence into voice data representing a response to the user. At this time, the response unit 605 converts the voice into a voice with a tone of voice set according to the personality AI, for example. Any existing technology may be used for the voice conversion.
[0081] Then, the generation unit 604 responds to the user by outputting the generated voice data. For example, assume that voice data indicating the content of the user's utterance is received from the user terminal 202. In this case, the generation unit 604 transmits the generated voice data to the user terminal 202. As a result, in the user terminal 202, voice is output from the speaker 407 (see FIG. 4) in accordance with the received voice data, and a response is made by the personality AI.
[0082] If there are multiple users who will be conversing with the personality AI, the generation unit 604, for example, transmits the generated voice data to each user's user terminal 202. When the voice data is output, for example, log information corresponding to the output voice data is recorded as a conversation log.
[0083] Even if a specific response keyword is included in the content of a user's utterance, depending on the content of the utterance, returning a response sentence corresponding to the specific response keyword as is may make the user feel uncomfortable. For example, if the content of a user's utterance expresses the user's thoughts or feelings, returning a response sentence corresponding to the specific response keyword as is may result in an unnatural conversation.
[0084] As an example, suppose the user's utterance is "I'm looking forward to having my favorite food for dinner tonight." In this case, the specific response keyword "favorite food" stored in the specific response keyword table 220 is included in the user's utterance. However, if the response sentence "My favorite food is curry" corresponding to the specific response keyword "favorite food" is returned as is, the user may find it unnatural.
[0085] Therefore, the determination unit 603 may determine, in response to receiving the first voice data, whether or not the first voice data represents a question (or an inquiry) from the user. For example, the determination unit 603 may determine that the first voice data represents a question from the user when a sentence indicated by first text data converted by speech recognition of the first voice data is expressed in the form of an interrogative sentence. On the other hand, the determination unit 603 may determine that the first voice data does not represent a question from the user when a sentence indicated by the first text data is expressed in the form of a declarative sentence.
[0086] When the first voice data represents a question from a user, the determination unit 603 may determine whether or not a specific keyword is included in the utterance content indicated by the first voice data by referring to the storage unit 610. In this way, when the first voice data represents a question from a user and includes a specific keyword, the response generation device 201 can generate a response sentence to the utterance content of the user based on a sentence related to the specific keyword.
[0087] Furthermore, upon receiving the first voice data, the determination unit 603 may determine, based on the second voice data indicating the content of the user's utterance, whether the content of the utterance indicated by the first voice data is the same as or similar to a question that has already been asked. Here, the second voice data is voice data that was received before the first voice data in the conversation with the user.
[0088] The second voice data may represent, for example, a statement made by a user immediately before the statement represented by the first voice data. Alternatively, the second voice data may represent statements made by all users before the statement represented by the first voice data. The second voice data may be identified, for example, from a conversation log.
[0089] Specifically, for example, the determination unit 603 performs speech recognition on the first voice data and converts it into first text data. Next, the determination unit 603 converts a sentence indicated by the first text data into a first vector representing the meaning of the sentence. However, if the first voice data does not represent a question from the user, conversion into the first vector does not need to be performed.
[0090] Furthermore, the determination unit 603 performs speech recognition on the second speech data and converts it into second text data. Next, the determination unit 603 converts the sentence indicated by the second text data into a second vector representing the meaning of the sentence. Then, the determination unit 603 calculates the similarity between the first vector and the second vector.
[0091] If the calculated similarity is equal to or greater than the threshold, the judgment unit 603 judges that the question is the same as or similar to a previously asked question. On the other hand, if the calculated similarity is less than the threshold, the judgment unit 603 judges that the question is not the same as or similar to a previously asked question. Note that any existing technology may be used to calculate the similarity between sentences.
[0092] When the utterance content indicated by the first voice data is the same as or similar to a previously asked question, the determination unit 603 may determine whether or not a specific keyword is included in the utterance content indicated by the first voice data by referring to the storage unit 610. On the other hand, when the utterance content indicated by the first voice data is not the same as or similar to a previously asked question, the determination unit 603 may not determine whether or not a specific keyword is included in the utterance content indicated by the first voice data.
[0093] As a result, the response generation device 201 can respond to the user based on a response sentence corresponding to the specific response keyword when the user repeats a question with similar content, rather than targeting the entire content of the user's utterance. For example, when a satisfactory answer cannot be obtained by using only the language model M, the response generation device 201 can improve the accuracy of the answer to the user by responding based on a response sentence corresponding to the specific response keyword.
[0094] Here, the case where the receiving unit 602 receives voice data indicating the content of a user's utterance has been described as an example, but the present invention is not limited to this. For example, in the conversation system 200, if a conversation between a user and a personality AI is conducted in text format, the receiving unit 602 receives text data indicating the content of the user's utterance. In this case, the determination unit 603 determines whether a specific keyword is included in the content of the utterance indicated by the received text data. Furthermore, the response unit 605 responds to the user by outputting the generated response sentence (text data).
[0095] The functional units (receiving unit 602 to responding unit 605) of the response generation device 201 may be realized by multiple computers (e.g., the response generation device 201 and the user terminal 202) in the conversation system 200. In this case, communication between the functional units of different computers is performed, for example, by transmission and reception between the functional units via the network 210. For example, the response unit 605 of the response generation device 201 may be realized by the user terminal 202. In this case, the generation unit 604 of the response generation device 201 transmits the generated response sentence to the user terminal 202. Then, the response unit 605 of the user terminal 202 responds to the user based on the response sentence generated by the generation unit 604.
[0096] (Example of operation of conversation system 200) Next, an example of the operation of the chat system 200 will be described with reference to FIG.
[0097] FIG. 7 is an explanatory diagram showing an example of the operation of the conversation system 200. Here, it is assumed that a user 701 and an AI avatar 702 are conversing verbally in the conversation system 200. The AI avatar 702 represents a character displayed as a personality AI on a conversation screen (not shown). The conversation screen is an operation screen for conversing with the personality AI, and is displayed, for example, on the display 405 of the user terminal 202 of the user 701. Note that in FIG. 7, the content of the conversation between the user 701 and the AI avatar 702 is represented by speech bubbles.
[0098] When the user 701 speaks, voice data #1 indicating the content of the user's 701 utterance is transmitted from the user terminal 202 to the response generation device 201. The voice data #1 indicates the content of the user's 701 utterance (speech bubble 703), "What's your favorite food?"
[0099] In response to receiving the voice data #1, the response generation device 201 performs voice recognition on the voice data #1 and converts it into text data $1. The response generation device 201 refers to the specific response keyword table 220 and determines whether the converted text data $1 includes a specific response keyword.
[0100] In this case, the text data $1 includes the specific response keyword "favorite food" of the specific response keyword information 500-1 (see FIG. 5). Therefore, the response generation device 201 determines that the text data $1 includes the specific response keyword. In this case, the response generation device 201 refers to the specific response keyword table 220 and identifies the response sentence 710 that corresponds to the specific response keyword "favorite food" included in the text data $1.
[0101] Here, the response sentence "My favorite food is curry" in the specific response keyword information 500-1 (see FIG. 5) is identified as the response sentence 710 corresponding to the specific response keyword "favorite food." In this case, the response generation device 201 sets the identified response sentence 710 as the response sentence to the utterance content (speech bubble 703) of the user 701.
[0102] Next, the response generation device 201 converts the response sentence 710 into voice to generate voice data #2 representing a response to the user 701. The response generation device 201 then transmits the generated voice data #2 to the user terminal 202 of the user 701. As a result, in the user terminal 202, voice corresponding to the voice data #2 is output from the speaker 407 as a response (speech bubble 704) from the AI avatar 702.
[0103] Next, when the user 701 speaks in response to the response of the AI avatar 702, voice data #3 indicating the content of the user's 701 utterance is transmitted from the user terminal 202 to the response generation device 201. The voice data #3 indicates the content of the user's 701 utterance (speech bubble 705), "I like curry too."
[0104] In response to receiving the voice data #3, the response generation device 201 performs voice recognition on the voice data #3 and converts it into text data $2. The response generation device 201 refers to the specific response keyword table 220 and determines whether the converted text data $2 includes a specific response keyword.
[0105] Here, it is assumed that the text data $2 does not include any of the specific response keywords in the specific response keyword table 220. In this case, the response generation device 201 uses the LLM 750 to generate a response sentence 720 in response to the utterance content (speech bubble 705) of the user 701 indicated by the voice data #3 (text data $2). The LLM 750 is an example of the language model M. Next, the response generation device 201 converts the response sentence 720 into voice data #4 representing a response to the user 701.
[0106] Then, response generation device 201 transmits the generated voice data #4 to user terminal 202 of user 701. Voice data #4 indicates the speech content of AI avatar 702, "Maybe we'd get along well." As a result, voice corresponding to voice data #4 is output from speaker 407 of user terminal 202 as a response (speech bubble 706) from AI avatar 702.
[0107] In this way, when the content of the utterance (speech bubble 703) of the user 701 includes a matter (favorite food) about which the response generation device 201 wants to convey accurate information, the response generation device 201 can convey accurate information by responding to the user 701 using a pre-registered response sentence 710. Furthermore, when the content of the utterance (speech bubble 705) of the user 701 does not include an object or matter about which the response generation device 201 wants to convey accurate information, the response generation device 201 can carry out a natural conversation by responding to the user 701 using the LLM 750 (language model M).
[0108] (Response processing procedure of response generation device 201) Next, a response processing procedure of the response generation device 201 will be described with reference to Fig. 8. The response processing of the response generation device 201 is executed, for example, when starting a conversation between a user and a personality AI in the conversation system 200.
[0109] Fig. 8 is a flowchart showing an example of a response processing procedure of the response generation device 201. In the flowchart of Fig. 8, first, the response generation device 201 reads specific response keyword information from a setting file (step S801). The specific response keyword information represents specific response keywords and response sentences related to the specific response keywords in association with each other.
[0110] Then, the response generation device 201 registers the read specific response keyword information in the specific response keyword table 220 (step S802). Next, the response generation device 201 determines whether or not voice data indicating the content of the user's utterance has been accepted (step S803).
[0111] Here, the response generation device 201 waits to receive voice data (step S803: No). If voice data is received (step S803: Yes), the response generation device 201 performs voice recognition on the received voice data and converts it into text data (step S804).
[0112] Then, the response generation device 201 refers to the specific response keyword table 220 to determine whether the converted text data includes a specific response keyword (step S805). If the specific response keyword is included (step S805: Yes), the response generation device 201 refers to the specific response keyword table 220 to identify a response sentence corresponding to the specific response keyword included in the converted text data (step S806).
[0113] Then, the response generation device 201 generates the identified response sentence as a response sentence to the user (step S807), and proceeds to step S809. The response sentence to the user is a response sentence to the content of the user's utterance indicated by the voice data accepted in step S803.
[0114] If the specific response keyword is not included in step S805 (step S805: No), the response generation device 201 generates a response sentence for the user using an LLM (language model M) (step S808). Next, the response generation device 201 converts the generated response sentence into voice data representing a response to the user (step S809).
[0115] Then, the response generation device 201 responds to the user by outputting the generated voice data (step S810). Next, the response generation device 201 determines whether the conversation between the user and the personality AI has ended (step S811).
[0116] If the conversation between the user and the personality AI has not ended (step S811: No), the response generation device 201 returns to step S803. On the other hand, if the conversation between the user and the personality AI has ended (step S811: Yes), the response generation device 201 ends the series of processes according to this flowchart.
[0117] This allows the response generation device 201 to generate an appropriate response sentence for the user, thereby improving the accuracy of responses by the personality AI.
[0118] In step S803, if the response generation device 201 does not receive voice data indicating the content of the user's utterance for a certain period of time, it may use an LLM (language model M) to generate a response sentence for the user and proceed to step S809. This allows the response generation device 201 to have the personality AI speak to the user if silence continues for a certain period of time.
[0119] Furthermore, in step S807, the response generation device 201 may use an LLM (language model M) to generate a response sentence for the user from the response sentence identified in step S806. This allows the response generation device 201 to generate a response sentence customized in accordance with the flow of the conversation between the user and personality AI based on the identified response sentence.
[0120] Furthermore, in step S805 or before step S805, the response generation device 201 may further determine whether the received voice data (converted text data) represents a question from the user. In this case, if the received voice data represents a question from the user and contains a specific response keyword, the response generation device 201 proceeds to step S806. On the other hand, if the received voice data does not represent a question from the user, the response generation device 201 proceeds to step S808 even if the received voice data contains a specific response keyword.
[0121] (Examples of conversations with and without this response generation method applied) Here, examples of conversations when this response generation method is applied and when it is not applied will be explained.
[0122] FIG. 9 is an explanatory diagram showing an example of a conversation when the present response generation method is applied and when it is not applied. In FIG. 9, personality AI 910 represents a conventional AI when the present method is not applied. Personality AI 920 (response generation device 201) represents an AI when the present method is applied. Here, in a conversation between user 901 and personality AIs 910 and 920, it is assumed that user 901 utters, "What is ABC?" (speech bubble 902). "ABC" represents a certain product.
[0123] When this method is not applied, personality AI 910 uses LLM 930 to generate a response sentence to the speech content (speech bubble 902) of user 901. In general, the generation AI (LLM 930) does not necessarily give the exact same response even if asked the same thing.
[0124] For this reason, in response to the speech content (speech bubble 902) of user 901, for example, response sentence 931, "This is a product with XX functions," or response sentence 932, "It is the alphabet," may be generated. In this case, even if "ABC" is a product for which accurate and complete information is to be conveyed, personality AI 910 does not know what response to make, and the response to user 901 will be inaccurate.
[0125] In contrast, when this method is applied, the personality AI 920 (response generation device 201) refers to the specific response keyword table 220 and determines that the specific response keyword "ABC" is included in the utterance content (speech bubble 902) of the user 901. Then, the personality AI 920 (response generation device 201) responds to the user 901 using a response sentence 933 corresponding to the specific response keyword "ABC."
[0126] Therefore, personality AI 920 (response generating device 201) can convey accurate and complete information about the product "ABC" to user 901.
[0127] As described above, the response generation device 201 according to the embodiment can use the language model M to generate a response to a user when having a conversation with the user. In response to receiving first voice data, the response generation device 201 can refer to the storage unit 610 and determine whether a specific keyword is included in the user's utterance indicated by the first voice data. The storage unit 610 associates and stores the specific keyword with a sentence related to the specific keyword. Specifically, for example, the response generation device 201 performs speech recognition on the first voice data to convert it into first text data and determines whether the converted first text data includes the specific keyword. Then, if the specific keyword is included, the response generation device 201 can generate a response to the utterance indicated by the first voice data based on the sentence related to the specific keyword. Furthermore, if the specific keyword is not included, the response generation device 201 can use the language model M to generate a response to the utterance indicated by the first voice data. The language model M is, for example, an LLM.
[0128] As a result, the response generation device 201 can generate an appropriate response to a user when having a conversation with the user using personality AI. For example, if the content of the user's utterance contains a specific keyword that represents an object or matter about which accurate information is to be conveyed, the response generation device 201 can generate a response based on a sentence related to the specific keyword that has been registered in advance. Furthermore, if the content of the user's utterance does not contain a specific keyword, the response generation device 201 can use the language model M to generate a natural response like a human.
[0129] Furthermore, the response generation device 201 can respond to the user based on the generated response sentence. Specifically, for example, the response generation device 201 converts the generated response sentence into voice to generate voice data representing a response to the user, and outputs the generated voice data.
[0130] This allows the response generation device 201 to realize natural conversation like a human, while providing accurate and complete responses regarding things or matters for which reliable information should be conveyed.
[0131] Furthermore, the response generation device 201 can determine whether the first voice data represents a question from a user. When the first voice data represents a question from a user, the response generation device 201 can refer to the storage unit 610 and determine whether a specific keyword is included in the speech content indicated by the first voice data.
[0132] As a result, when the user's utterance is not a question (or a challenge), even if it contains a specific keyword, the response generation device 201 can generate a more natural response sentence by generating the response sentence using the language model M rather than using a pre-registered sentence as the response sentence.
[0133] Furthermore, according to the response generation device 201, in response to receiving first voice data, it is possible to determine whether the utterance content indicated by the first voice data is the same as or similar to a previously asked question, based on second voice data indicating the user's utterance content that was received before the first voice data. Then, according to the response generation device 201, when the utterance content indicated by the first voice data is the same as or similar to a previously asked question, it is possible to refer to the storage unit 610 and determine whether the utterance content indicated by the first voice data includes a specific keyword.
[0134] As a result, the response generation device 201 can respond to the user based on a pre-registered sentence when the user repeats a question with similar content, rather than targeting the entire content of the user's utterance. For example, when a satisfactory answer cannot be obtained by using only the language model M, the response generation device 201 can respond based on a response sentence corresponding to a specific response keyword, thereby improving the accuracy of the answer to the user.
[0135] For these reasons, according to the response generation device 201 of the embodiment, when a personality AI has a conversation with a user, it is possible to realize natural responses like a human, while preventing the transmission of incorrect or insufficient information about things or matters for which accurate information should be conveyed.
[0136] For example, the response generation device 201 can accurately convey the functions and features of a product, making it easier for customers (users) to understand the merits of the product. The response generation device 201 can also accurately convey the philosophy and business model of a company, making it easier for customers (users) to understand what kind of organization it is. The response generation device 201 can also easily maintain the consistency of the personality AI by providing the same answers to questions about things that do not change frequently, such as the personality AI's preferences and hobbies.
[0137] The response generation method described in this embodiment can be realized by executing a prepared program on a computer such as a personal computer or a workstation. The response generation program is recorded on a computer-readable recording medium such as a hard disk, flexible disk, CD-ROM, DVD, or USB memory, and is executed by being read from the recording medium by the computer. The response generation program may also be distributed via a network such as the Internet.
[0138] In addition, the information processing device 101 (response generating device 201) described in this embodiment can also be realized by an application-specific IC such as a standard cell or a structured ASIC (Application Specific Integrated Circuit) or a PLD (Programmable Logic Device) such as an FPGA.
[0139] The following additional notes are provided regarding the above-described embodiment.
[0140] (Supplementary Note 1) A response generation method for generating a response sentence to a user when having a conversation with the user, using a language model for generating sentences, In response to receiving first data indicating the content of the user's comment, referring to a storage unit that stores a first keyword and a first sentence related to the first keyword in association with each other, and determining whether the first keyword is included in the content of the comment indicated by the first data; If the first keyword is included, a response sentence is generated based on the first sentence in response to the statement content indicated by the first data; If the first keyword is not included, generate a response sentence to the utterance content indicated by the first data using the language model. A response generation method characterized in that the processing is executed by a computer.
[0141] (Appendix 2) A response is made to the user based on the generated response sentence. 2. The response generation method according to claim 1, wherein the processing is executed by the computer.
[0142] (Supplementary Note 3) The computer executes a process of determining whether the first data represents a question from the user; The determining process includes: 3. A response generation method as described in Appendix 1 or 2, characterized in that, when the first data represents a question from the user, the memory unit is referenced to determine whether the statement indicated by the first data contains the first keyword.
[0143] (Supplementary Note 4) In response to receiving the first data, the computer executes a process of determining, based on second data indicating the content of the user's statement received in the conversation before the first data, whether the content of the statement indicated by the first data is the same as or similar to a question already asked; The process of determining whether the first keyword is included includes: A response generation method described in any one of Appendices 1 to 3, characterized in that when the content of the statement indicated by the first data is a question identical to or similar to the already asked question, the memory unit is referenced to determine whether the content of the statement indicated by the first data includes the first keyword.
[0144] (Appendix 5) The process of determining If the first data is voice data indicating the contents of the user's speech, the voice data is subjected to voice recognition and converted into text data; determining whether the converted text data includes the first keyword; 5. A response generation method according to any one of Supplementary Notes 1 to 4.
[0145] (Appendix 6) The response process is If the first data is voice data indicating the content of the user's utterance, converting the generated response sentence into voice data indicating a response to the user; outputting the generated voice data; 3. A response generation method according to claim 2,
[0146] (Supplementary Note 7) The response generation method according to any one of Supplementary Notes 1 to 6, wherein the language model is an LLM (Large Language Model).
[0147] (Appendix 8) A response generation program that generates a response sentence to a user when having a conversation with the user, using a language model for generating sentences, In response to receiving first data indicating the content of the user's comment, referring to a storage unit that stores a first keyword and a first sentence related to the first keyword in association with each other, and determining whether the first keyword is included in the content of the comment indicated by the first data; If the first keyword is included, a response sentence is generated based on the first sentence in response to the statement content indicated by the first data; If the first keyword is not included, generate a response sentence to the utterance content indicated by the first data using the language model. A response generation program that causes a computer to execute a process. [Explanation of symbols]
[0148] 101 Information processing equipment 102,701,901 users 110,M Language Model 111 First Data 120,610 storage unit 121 First Keyword 122 First sentence 131,132,710,720,931,932,933 Response 200 Conversation System 201 Response Generation Device 202 User terminal 210 Network 220 Specific Response Keyword Table 300,400 buses 301,401 CPU 302,402 memory 303 Disk Drive 304 Disk 305,403 Communication I / F 306 Portable Recording Media I / F 307 Portable Recording Media 404 Camera 405 Display 406 Input Device 407 Speaker 408 Microphone 600 control section 601 Acquisition Department 602 Reception 603 Judgment Department 604 Generation part 605 Response Section 702 AI Avatars 750,930 LLM 910,920 Personality AI
Claims
1. 1. A response generation method for generating a response sentence to a user when having a conversation with the user, using a language model for generating sentences, comprising: In response to receiving first data indicating the content of the user's comment, referring to a storage unit that stores a first keyword and a first sentence related to the first keyword in association with each other, and determining whether the first keyword is included in the content of the comment indicated by the first data; If the first keyword is included, a response sentence is generated based on the first sentence in response to the statement indicated by the first data; If the first keyword is not included, a response sentence is generated in response to the utterance content indicated by the first data using the language model. A response generation method characterized in that the processing is executed by a computer.
2. making a response to the user based on the generated response sentence; 2. The response generation method according to claim 1, wherein the processing is performed by the computer.
3. determining whether the first data represents a question from the user; The processing is executed by the computer, The determining process includes: The response generation method described in claim 1, characterized in that when the first data represents a question from the user, the memory unit is referenced to determine whether the statement indicated by the first data includes the first keyword.
4. 4. The response generation method according to claim 1, wherein the language model is an LLM (Large Language Models).
5. 1. A response generation program for generating a response sentence to a user when having a conversation with the user, using a language model for generating sentences, comprising: In response to receiving first data indicating the content of the user's comment, referring to a storage unit that stores a first keyword and a first sentence related to the first keyword in association with each other, and determining whether the first keyword is included in the content of the comment indicated by the first data; If the first keyword is included, a response sentence is generated based on the first sentence in response to the statement indicated by the first data; If the first keyword is not included, a response sentence is generated in response to the utterance content indicated by the first data using the language model. A response generation program that causes a computer to execute a process.
Citation Information
Patent Citations
Response system and response content control method
JP2009037458A