Response generation method and response generation program
The response generation method addresses the inconsistency in generative AI by using keyword-based responses or natural language generation to ensure accurate and natural interactions, enhancing user engagement with AI systems.
Patent Information
- Application Number
- PCT/JP2025/020651
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-25
- Filing Date
- 2025-06-06
- Publication Date
- 2026-01-02
AI Technical Summary
Conventional generative AI systems struggle to consistently provide accurate and appropriate responses to user queries, especially 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-registered sentences associated with those keywords, or uses the language model to create natural responses when no keywords are detected, ensuring accurate and human-like interactions.
Enables the generation of appropriate and accurate responses when specific information is needed, while maintaining natural conversation flow, thereby improving user interaction with AI systems.
Smart Images

Figure JP2025020651_02012026_PF_FP_ABST
Abstract
Description
Response generation method and response generation program
[0001] The present invention relates to a response generation method and a response generation program.
[0002] In recent years, generative AI (Artificial Intelligence) technology for generating sentences such as ChatGPT has rapidly become popular. While such generative AI responds to questions in text, systems for verbal conversation with AI are being developed to meet the need for verbal 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.
[0004] JP 2009-37458 A
[0005] However, in the prior art, when a generation AI is used to have a conversation with a human (user), the response content to a question from the user may be inaccurate. For example, depending on the content of the conversation, even if a specific response is desired, it is difficult to always respond with the same content when generating a response using the generation AI.
[0006] In one aspect, the present invention aims to generate an appropriate response sentence for a user.
[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 correspondence 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.
[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.
[0009] FIG. 1 is an explanatory diagram showing an example of a response generation method according to an embodiment. FIG. 2 is an explanatory diagram showing an example of the system configuration of a conversation system 200. FIG. 3 is a block diagram showing an example of the hardware configuration of a response generation device 201. FIG. 4 is a block diagram showing an example of the hardware configuration of a user terminal 202. FIG. 5 is an explanatory diagram showing an example of the contents stored in a specific response keyword table 220. FIG. 6 is a block diagram showing an example of the functional configuration of the response generation device 201. FIG. 7 is an explanatory diagram showing an example of the operation of the conversation system 200. FIG. 8 is a flowchart showing an example of a response processing procedure of the response generation device 201. FIG. 9 is an explanatory diagram showing example conversations when the response generation method is applied and when it is not applied.
[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] 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 performing deep learning on a large amount of text data. Language models such as LLM learn a large amount of various knowledge, and therefore tend to generate natural sentences like those produced by humans.
[0013] Generally, generative AI (language models) do not always respond with the same content to the same question. However, depending on the content of the conversation, there are times when you want to respond with a fixed 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 expressions that do not invite misunderstandings about a company's philosophy or business model.
[0014] However, with conventional technology, when using generation AI to have a conversation with a human (user), it is not possible to generate a response sentence with a fixed content depending 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 using the language model 110 when having a conversation with the user 102. The language model 110 is, for example, an LLM. The conversation with the user 102 may be conducted by text communication or by voice communication.
[0017] (1) In response to receiving first data 111 indicating the content of a statement made by a user 102, the information processing device 101 refers to the memory unit 120 and determines whether the content of the statement indicated by the first data 111 includes a first keyword 121.
[0018] Here, the utterance content indicated by the first data 111 represents words uttered by the user 102, such as a query or question from the user 102. Furthermore, the utterance content 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 (prompt) 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 the 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 ((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 the "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] (System Configuration Example of Conversation System 200) Next, a system configuration example of a conversation system 200 including the information processing device 101 shown in Fig. 1 will be described. Here, an example will be described 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 description, the AI that converses with the user in the conversation system 200 may be referred to as a "personality AI." Furthermore, in the conversation system 200, the conversation between the user and the personality AI will be described as being 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 the reading and writing of data from and 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 or an optical disk.
[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 (e.g., 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 also have, for example, an input device, a display, etc. Furthermore, the response generation device 201 does not necessarily have to 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 and ROM store 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 (e.g., the response generating device 201) via the network 210. The communication I / F 403 serves as an 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 captures an image (still image or video) and outputs the image data. The camera 404 is installed in a position where it can capture an image of the face of a user who uses the user terminal 202, for example.
[0046] The display 405 is a display device that displays a cursor, an icon, a tool box, and data such as documents, images, function information, etc. The display 405 may be, for example, a liquid crystal display or an organic electroluminescence (EL) 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 a numeric keypad, or may also be a keyboard or a 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] 5, the contents stored in the specific response keyword table 220 of the response generation device 201 will be described. The specific response keyword table 220 is realized by a storage device such as the memory 302 or the disk 304.
[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, the specific response keyword information 500-1 indicates the specific response keyword "favorite food" and a 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] 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, 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] The sentences related to a specific keyword are sentences that explain or comment on the specific keyword. The sentences related to a specific keyword are, for example, colloquial sentences. The sentences related to a specific keyword may also be response sentences that answer questions about the specific keyword.
[0058] The specific response keyword shown in Figure 5 is an example of a specific keyword. The response sentence shown in Figure 5 is an example of a sentence related to a specific keyword. Furthermore, the first keyword 121 shown in Figure 1 corresponds to, for example, a specific keyword. The first sentence 122 shown in Figure 1 corresponds to, for example, a sentence related to a 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 from a user (e.g., an administrator of the chat system 200) using an input device (not shown) of the acquiring unit 601's own device.
[0060] The specific keywords and sentences related to the specific keywords represented by the acquired setting file are stored in the storage unit 610. For example, the acquisition unit 601 associates the specific keywords and sentences related to the specific keywords represented by the acquired setting file with each other, and registers them in the specific response keyword table 220 shown in FIG.
[0061] For example, an administrator of the conversation system 200 can create or update a setting file and input it into the response generating device 201 to update the contents stored in the specific response keyword table 220. 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., instead of a query or question.
[0063] Specifically, for example, the reception 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. The reception unit 602 may also receive voice data obtained by converting voice received by a microphone (not shown) of the own device 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. Furthermore, 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 performs speech recognition on the first speech data and converts it into first text data. Any existing technology may be used for the speech recognition. Furthermore, the speech recognition process may be performed using a computer other than the response generation device 201 (for example, an external speech 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 the first text data contains a synonym of the specific response keyword. 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 contains "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, for example, in 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, assume that the user's utterance content (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 content.
[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. To explain 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 and so as not to change in meaning from the identified 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] The generation unit 604 then 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 are 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 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 refer to the storage unit 610 to determine whether or not a specific keyword is included in the utterance content indicated by the first voice data. 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 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] The determination unit 603 also performs speech recognition on the second speech data and converts it into second text data. The determination unit 603 then converts the sentence indicated by the second text data into a second vector representing the meaning of the sentence. The determination unit 603 then 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 determination unit 603 determines 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 determination unit 603 determines 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 respond based on a response sentence corresponding to the specific response keyword, thereby improving the accuracy of the answer to the user.
[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 this is not limiting. 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 (reception unit 602 to response 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 Chat System 200) Next, an example of operation of 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 having a conversation by voice 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 having a conversation 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] Here, the text data $1 includes the specific response keyword "favorite food" in 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) of 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, the 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 received (step S803).
[0111] Here, the response generation device 201 waits for reception of voice data (step S803: No). If the response generation device 201 receives voice data (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 determines whether the converted text data includes a specific response keyword by referring to the specific response keyword table 220 (step S805). If the specific response keyword is included (step S805: Yes), the response generation device 201 identifies a response sentence corresponding to the specific response keyword included in the converted text data by referring to the specific response keyword table 220 (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 the 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] The response generation device 201 then 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 appropriate response sentences for the user, thereby improving the accuracy of responses provided 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, the response generation device 201 may use the 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 the 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 a user. In this case, if the voice data represents a question from a user and contains a specific response keyword, the response generation device 201 proceeds to step S806. On the other hand, if the voice data does not represent a question from a user, the response generation device 201 proceeds to step S808 even if the specific response keyword is included.
[0121] (Examples of conversations when this response generation method is applied and when it is not applied) Here, examples of conversations when this response generation method is applied and when it is not applied will be described.
[0122] 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 AI 910, 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, the personality AI 910 uses the LLM 930 to generate a response sentence to the speech content (speech bubble 902) of the user 901. In general, the generation AI (LLM 930) does not necessarily give the exact same response even if it is asked the same thing.
[0124] For this reason, in response to the speech content (speech bubble 902) of user 901, for example, a response sentence 931 such as "This is a product with XX functions" may be generated, or a response sentence 932 such as "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 speech 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 generation 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 stores the specific keyword and a sentence related to the specific keyword in association with each other. 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, when 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, when 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] This allows the response generation device 201 to generate appropriate responses to the user when conversing with the user using personality AI. For example, if the user's utterance contains specific keywords that represent objects or matters about which the response generation device 201 wants to accurately convey information, the response generation device 201 can generate responses based on sentences related to the specific keywords that have been registered in advance. Furthermore, if the user's utterance does not contain specific keywords, the response generation device 201 can use the language model M to generate natural responses like those of 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 that require reliable information to be conveyed.
[0131] Furthermore, the response generation device 201 can determine whether the first voice data represents a question from the user. When the first voice data represents a question from the user, the response generation device 201 can refer to the storage unit 610 and determine whether the speech content indicated by the first voice data includes a specific keyword.
[0132] As a result, when the user's utterance is not a question (or an interrogation), even if it contains specific keywords, the response generation device 201 can generate a more natural response sentence by using the language model M to generate the response sentence 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 pre-registered sentences 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 is used to converse with a user, it is possible to realize natural, human-like responses, while preventing the transmission of incorrect or insufficient information about things or matters for which reliable 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 a company's philosophy and business model, 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] Furthermore, 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] 101 Information processing device 102, 701, 901 User 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 sentence 200 Conversation system 201 Response generation device 202 User terminal 210 Network 220 Specific response keyword table 300, 400 Bus 301, 401 CPU 302, 402 Memory 303 Disk drive 304 Disk 305, 403 Communication I / F 306 Portable recording medium I / F 307 Portable recording medium 404 Camera 405 Display 406 Input device 407 Speaker 408 Microphone 600 Control unit 601 Acquisition unit 602 Reception unit 603 Judgment unit 604 Generation unit 605 Response unit 702 AI avatar 750, 930 LLM 910, 920 Personality AI
Claims
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, characterized in that, in response to receiving first data indicating the content of a statement made by the user, the method refers to a memory unit that stores a first keyword and a first sentence related to the first keyword in association with each other, and determines whether the content of the statement indicated by the first data includes the first keyword; if the first keyword is included, generates a response sentence to the content of the statement 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 statement indicated by the first data using the language model.
2. The response generation method according to claim 1, characterized in that the computer executes a process of: making a response to the user based on the generated response sentence.
3. The response generation method described in claim 1, characterized in that the computer executes a process to determine whether or not the first data represents a question from the user, and the process of determining, when the first data represents a question from the user, refers to the memory unit to determine whether or not the content of the statement indicated by the first data includes the first keyword.
4. The response generation method described in claim 1, characterized in that, in response to receiving the first data, the computer executes a process to determine whether the content of the statement indicated by the first data is the same as or similar to a question already asked, based on second data indicating the content of the statement by the user that was received in the conversation before the first data, and the process to determine whether the first keyword is included comprises, if the content of the statement indicated by the first data is the same as or similar to the question already asked, referring to the memory unit to determine whether the first keyword is included in the content of the statement indicated by the first data.
5. The response generation method described in claim 1, characterized in that the determining process comprises: if the first data is voice data indicating the content of the user's speech, performing voice recognition on the voice data to convert it into text data; and determining whether the converted text data contains the first keyword.
6. The response generation method according to claim 2, characterized in that the response process comprises: if the first data is voice data indicating the content of the user's utterance, converting the generated response sentence into voice to generate voice data representing a response to the user; and outputting the generated voice data.
7. The response generation method according to any one of claims 1 to 6, wherein the language model is an LLM (Large Language Models).
8. A response generation program that uses a language model for generating sentences to generate a response sentence to a user when having a conversation with the user, the response generation program causing a computer to execute the following processes: upon receiving first data indicating the content of a statement made by the user, refer to a memory unit that stores a first keyword and a first sentence related to the first keyword in association with each other, and determine whether the content of the statement indicated by the first data includes the first keyword; if the first keyword is included, generate a response sentence to the content of the statement indicated by the first data based on the first sentence; if the first keyword is not included, generate a response sentence to the content of the statement indicated by the first data using the language model.
Citation Information
Patent Citations
Humidity control apparatus using a single fan for conducting dehumidification and regeneration
KR102786469B1
KR20220003050U