System
The chatbot system addresses the inefficiencies of conventional systems by using natural language processing and intent analysis to deliver quick and accurate responses, enhancing work efficiency.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2026-03-06
AI Technical Summary
Conventional FAQ systems and search engines struggle to provide quick and accurate answers to specific user questions, especially those phrased in natural language, leading to inefficiencies in work environments.
A chatbot system that utilizes natural language processing to analyze user questions, search databases for relevant answers, generate responses in a user-friendly format, and log interactions for system improvement, incorporating preprocessing and intent analysis to enhance accuracy.
The system provides prompt and appropriate answers, improving work efficiency by accurately analyzing user queries and facilitating smooth business operations.
Smart Images

Figure 2026038213000001_ABST
Abstract
Description
[Technical Field]
[0001] The technology of the present disclosure relates to a system. [Background technology]
[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]
[0004] In modern companies, employees often have questions about technical terms and procedures in their daily work. Responding to such questions quickly and accurately is important for improving work efficiency. However, conventional FAQ systems and search engines have difficulty instantly providing appropriate answers to specific user questions. Finding an appropriate answer is particularly time-consuming and laborious for ambiguous questions entered in natural language. Therefore, an objective of the present invention is to provide a chatbot system that efficiently and accurately analyzes user questions and provides appropriate answers. [Means for solving the problem]
[0005] The present invention provides a system including means for receiving a question from a user, means for performing natural language processing based on the received question to analyze the intent of the question, means for searching a database for an answer corresponding to the analyzed intent, means for generating the searched answer in text format, means for transmitting the generated answer to the user, and means for saving the user's question and the generated answer as a log. This allows users to obtain prompt and appropriate answers to their questions, thereby improving work efficiency. The system of the present invention also preprocesses questions using natural language processing means and extracts keywords and phrases to accurately analyze the intent of the question. As a result, it is possible to provide high-quality answers to user questions. Furthermore, the system of the present invention generates answer text using predetermined templates, thereby presenting answers in a format that is easy for users to understand. This helps users understand the question and supports smooth business operations.
[0006] "User" refers to a human being or end user who operates the system.
[0007] A "question" refers to the content of a text message in natural language that a user enters into a chatbot.
[0008] The "receiving means" refers to a communication interface or a program for receiving a question sent from a terminal and inputting it into the server.
[0009] "Natural Language Processing (NLP)" refers to the technology that enables computers to understand, analyze, and generate human language.
[0010] "Intent analysis" refers to the process of understanding a user's intent and question from input natural language text.
[0011] "Database" refers to an information storage system for systematically storing and managing answers to questions and related information.
[0012] "Searching means" refers to the function of searching for information in a database based on the intent of the analyzed question and finding an appropriate answer.
[0013] "Means for generating in text format" refers to a process for structuring the retrieved information into a string of characters in a form that is easy for the user to understand.
[0014] "Transmitting means" refers to a communication interface or program for transmitting the generated textual response to the user's terminal.
[0015] "Means for storing logs" refers to a system for recording user questions and responses and storing them in a form that can be accessed later.
[0016] "Preprocessing" refers to the initial stages of processing the question text to make it easier to analyze, such as cleaning it, tokenizing it, and removing stop words.
[0017] "Keywords" refer to important words or phrases extracted from the question text.
[0018] "Template" refers to a formula or structure used to structure responses in a predetermined format. [Brief explanation of the drawings]
[0019] [Figure 1] 1 is a conceptual diagram showing an example of the configuration of a data processing system according to a first embodiment. [Figure 2] 1 is a conceptual diagram showing an example of main functions of a data processing device and a smart device according to a first embodiment. [Figure 3] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a second embodiment. [Figure 4] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and smart glasses according to a second embodiment. [Figure 5]FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a third embodiment. [Figure 6] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and a headset-type terminal according to a third embodiment. [Figure 7] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a fourth embodiment. [Figure 8] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and a robot according to a fourth embodiment. [Figure 9] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 10] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 11] FIG. 3 is a sequence diagram showing a processing flow of the data processing system according to the first embodiment. [Figure 12] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 1. [Figure 13] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system according to the second embodiment when an emotion engine is combined. [Figure 14] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 2 when an emotion engine is combined. DETAILED DESCRIPTION OF THE INVENTION
[0020] An example of an embodiment of a system according to the technology of the present disclosure will be described below with reference to the accompanying drawings.
[0021] First, the terms used in the following description will be explained.
[0022] In the following embodiments, a coded processor (hereinafter simply referred to as a "processor") may be a single arithmetic device or a combination of multiple arithmetic devices. Furthermore, a processor may be a single type of arithmetic device or a combination of multiple types of arithmetic devices. Examples of arithmetic devices include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), and an APU (Accelerated Processing Unit).
[0023] In the following embodiments, a coded RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a working memory by a processor.
[0024] In the following embodiments, the coded storage is one or more non-volatile storage devices that store various programs, various parameters, etc. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), and magnetic tapes.
[0025] In the following embodiments, a communication I / F (Interface) with a symbol is an interface including a communication processor, an antenna, etc. The communication I / F controls communication between multiple computers. Examples of communication standards applied to the communication I / F include wireless communication standards including 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc.
[0026] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." In other words, "A and / or B" means that it may be only A, only B, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" is also applied when three or more things are expressed connected by "and / or."
[0027] [First embodiment]
[0028] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0029] 1, a data processing system 10 includes a data processing device 12 and a smart device 14. An example of the data processing device 12 is a server.
[0030] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0031] The smart device 14 includes a computer 36, a reception device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The reception device 38, the output device 40, and the camera 42 are also connected to the bus 52.
[0032] The reception device 38 includes a touch panel 38A, a microphone 38B, and the like, and receives user input. The touch panel 38A detects contact with an indicator (for example, a pen or a finger) to receive user input by the touch of the indicator. The microphone 38B detects the user's voice to receive user input by voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data indicating the user input.
[0033] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting the data in a form of expression that the user 20 can perceive (for example, audio and / or text). The display 40A displays visible information such as text and images in accordance with instructions from the processor 46. The speaker 40B outputs audio in accordance with instructions from the processor 46. The camera 42 is a compact digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.
[0034] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54.
[0035] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0036] 2, in the data processing device 12, a specific process is performed by the processor 28. A specific processing program 56 is stored in the storage 32. The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific process is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0037] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0038] In the smart device 14, the processor 46 performs the reception output process. The storage 50 stores a reception output program 60. The reception output program 60 is used in conjunction with the specific processing program 56 by the data processing system 10. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0039] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0040] The present invention relates to a chatbot system for quickly and appropriately responding to questions from users. This system uses NLP technology to analyze questions entered in natural language and provide appropriate answers. An embodiment of the system of the present invention will be described in detail below.
[0041] System configuration
[0042] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the input from the user to the server. The server processes the input question, generates an appropriate answer, and sends it to the terminal. The terminal displays the received answer to the user.
[0043] Processing from question reception to answer generation
[0044] 1. Questions accepted:
[0045] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[0046] 2. Sending a text:
[0047] The terminal sends the entered question to the server as text data.
[0048] 3. Question preprocessing:
[0049] The server preprocesses the received text data, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[0050] 4. Question intent analysis:
[0051] The server uses an NLP engine to analyze the intent of the pre-processed text, extracting key keywords and phrases within the text, such as "project" and "how to apply."
[0052] 5. Finding answers:
[0053] The server searches the database for the most relevant FAQ entries based on the extracted keywords, calculating a relevance score to identify the most relevant answers.
[0054] 6. Generate answers:
[0055] The server uses templates to generate user-friendly answers based on the FAQ entries found, such as "The instructions for submitting a new project are on the project management page on our intranet. Here are the steps..."
[0056] 7. Submit your response:
[0057] The server sends the generated response to the terminal.
[0058] 8. Show Answer:
[0059] The terminal displays the received answer on the chatbot interface and provides it to the user.
[0060] 9. Log storage:
[0061] The server logs user questions and generated answers, allowing for later analysis and system improvement.
[0062] Specific examples
[0063] For example, suppose a user inputs a question to the chatbot such as "Please tell me the procedure for applying for vacation." The processing in this case will be explained in detail below.
[0064] 1. The user types "Please tell me how to apply for vacation" into the terminal.
[0065] 2. The terminal sends this question text to the server.
[0066] 3. The server preprocesses the received text and extracts the keywords "leave application" and "procedure."
[0067] 4. The server searches the database for FAQs related to "vacation request procedures."
[0068] 5. The server generates the appropriate response based on the template, such as "The procedure for applying for leave is as follows. Please access the leave application page on the intranet and fill in the required information."
[0069] 6. The server sends this response to the terminal.
[0070] 7. The terminal displays the received response to the user.
[0071] 8. The server stores a log of the user's questions and the generated answers.
[0072] The above is a specific embodiment for implementing the system of the present invention, which allows users to obtain quick and accurate answers to their questions and improves work efficiency.
[0073] The processing flow will be explained below.
[0074] Step 1:
[0075] A user accesses the chatbot interface and enters a question, for example, "How do I apply for a new project?"
[0076] Step 2:
[0077] The terminal receives the entered question text and confirms that the send button has been pressed.
[0078] Step 3:
[0079] The device sends the question text to the server. The text data is sent via a protocol such as an HTTP request or WebSocket.
[0080] Step 4:
[0081] The server acquires the text data received from the terminal.
[0082] Step 5:
[0083] The server preprocesses the text data, such as removing extra spaces and special characters, tokenizing it, and removing stop words.
[0084] Step 6:
[0085] The server inputs the preprocessed text data into a natural language processing (NLP) engine to analyze the intent of the question, for example, extracting keywords such as "project" and "application method."
[0086] Step 7:
[0087] The server searches the database for relevant FAQ entries based on the extracted keywords, and a search algorithm calculates a relevance score.
[0088] Step 8:
[0089] The server identifies the most relevant FAQ entry and retrieves its contents.
[0090] Step 9:
[0091] Based on the FAQ entries it retrieves, the server uses templates to generate easy-to-understand answers, such as "New project submissions are detailed on the project management page on our intranet. Here are the steps..."
[0092] Step 10:
[0093] The server transmits the generated answer text to the terminal.
[0094] Step 11:
[0095] The terminal displays the received response text on the chatbot interface.
[0096] Step 12:
[0097] The user checks the displayed answers and takes the next action if necessary.
[0098] Step 13:
[0099] The server logs the user's questions and the generated answers, which are then stored in a database for later analysis and system improvement.
[0100] Example 1
[0101] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0102] Conventional chatbot systems have problems such as delayed responses to user questions and inaccurate analysis of intent, resulting in inappropriate answers. Furthermore, there is a lack of consistency in text preprocessing, intent analysis, and answer generation, leading to a poor user experience. Furthermore, logs are not stored properly, making subsequent analysis and system improvements difficult.
[0103] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0104] In this invention, the server includes a means for preprocessing received questions, removing unnecessary characters, and tokenizing the questions, a means for performing natural language processing based on the preprocessed questions to analyze the intent of the questions, and a means for searching data storage for answers corresponding to the analyzed intent. This enables a prompt and appropriate response to user questions and accurate answer generation. Furthermore, storing questions and answers in log storage facilitates subsequent analysis and system improvement.
[0105] "User" refers to an individual or organization that uses the system.
[0106] A "terminal" is an electronic device that a user uses to input a question and send it to a server.
[0107] A "server" is a computer system whose role is to process information received from a user, generate an appropriate response, and send it to the terminal.
[0108] "Preprocessing" refers to the process of removing unnecessary characters and spaces from the question text and tokenizing it.
[0109] "Tokenization" is the process of dividing text into meaningful units such as words and phrases.
[0110] "Natural language processing" is a technology that allows computers to understand and analyze human language.
[0111] "Intent analysis" is the process of extracting key keywords and phrases to understand the intent of a user's text.
[0112] "Data storage" refers to a storage medium in which data for searching answers is stored in advance.
[0113] A "template" is a fixed format used when generating an answer.
[0114] "Text format" refers to string information that is formatted for easy reading.
[0115] "Log storage" is a recording medium for storing user questions and generated answers.
[0116] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. This system is composed of a server, a terminal, and a user who uses these. Specifically, its main function is to analyze user questions using natural language processing technology and provide appropriate answers. An embodiment of the system of the present invention is described in detail below.
[0117] System configuration
[0118] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the user's input to the server. The server processes the input question, generates an appropriate answer, and sends it to the terminal, which then displays the received answer to the user. At the same time, the server saves the question and the generated answer in log storage.
[0119] Hardware and software used
[0120] The system of the present invention uses the following hardware and software:
[0121] Hardware: General computers and servers, and devices that users access (e.g., PCs, smartphones, tablets)
[0122] Software: Natural language processing libraries (e.g., SpaCy, NLTK), database management systems (e.g., MySQL (registered trademark)), template engines (e.g., Jinja2), log management systems, communication libraries (e.g., Python requests library)
[0123] Processing flow and specific examples
[0124] How the system works will be explained using a concrete example.
[0125] For example, if a user wants to ask a chatbot, "How do I request vacation?", the user first accesses the chatbot interface using a device, types the question using the keyboard, and clicks the send button. The process then goes as follows:
[0126] The device sends the entered question to the server, converting the text data into an appropriate format (e.g., JSON) and sending it as an HTTP request.
[0127] The server preprocesses the received text data, including grammar correction, removal of unnecessary characters and spaces, tokenization, and stop-word removal. A natural language processing library (e.g., SpaCy) is used to parse the text and extract key keywords and phrases ("vacation request", "procedure").
[0128] Next, the server searches for FAQ entries from a database (e.g., MySQL) based on the extracted keywords, calculates a relevance score, and identifies the most relevant entry. For example, it retrieves information corresponding to "vacation request procedure" from the database.
[0129] The server then uses a template engine (e.g., Jinja2) to format the retrieved entries into a user-friendly format based on a template, generating a response text, such as "The procedure for requesting vacation is as follows. Please visit the vacation request page on our intranet and fill out the required information."
[0130] The server then sends the generated answer to the terminal, which displays the received answer on the chatbot interface and provides it to the user. Finally, the server stores the question and the generated answer in log storage for later analysis and system improvement.
[0131] Prompt Sentence Examples
[0132] An example of a prompt sentence to be input to a generative AI model (e.g., GPT-3®) is as follows:
[0133] Prompt statement:
[0134] Please explain in detail the process flow when a user asks about the "vacation request procedure."
[0135] Expected Output:
[0136] When a user asks "How do I apply for vacation?", the system first receives the user's input and performs preprocessing. Then, it uses an NLP engine to analyze the intent, searches for relevant FAQs in the database, and generates an answer that is easy for the user to understand. Finally, the answer is displayed to the user, and the question and answer are saved as a log.
[0137] Using this prompt, the generative AI model generates a processing flow for the chatbot system to respond to the question.
[0138] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0139] Step 1:
[0140] The user inputs a question using the chatbot interface. Specifically, the user uses the keyboard to enter a question text such as "How do I apply for a new project?" and clicks the submit button.
[0141] Input: The question text entered by the user
[0142] Output: The question text is retrieved to the terminal.
[0143] Step 2:
[0144] The device sends the acquired question text to the server. Specifically, the question text is converted into an appropriate format (e.g., JSON) and sent as an HTTP request. This is often done using the Python requests library.
[0145] Input: The question text entered by the user
[0146] Output: The question text is formatted and sent to the server as an HTTP request.
[0147] Step 3:
[0148] The server preprocesses the text data received from the device, including correcting grammar, removing unnecessary characters and spaces, tokenizing (breaking the text into individual words), and removing stop words, using a natural language processing library (e.g., SpaCy or NLTK).
[0149] Input: The question text received by the server
[0150] Output: Preprocessed text data
[0151] Step 4:
[0152] The server uses the preprocessed text data to perform natural language processing to analyze the intent of the question. Specifically, it identifies key keywords and phrases in the text and understands the intent. This process uses an NLP engine (e.g., Google® NLP API).
[0153] Input: Preprocessed text data
[0154] Output: Parsed intent and primary keywords
[0155] Step 5:
[0156] Based on the parsed intent, the server searches for the appropriate answer from its data storage, specifically by searching a FAQ database (e.g., MySQL) using key keywords and calculating a relevance score to identify the best entry.
[0157] Input: Parsed intent and primary keywords
[0158] Output: Searched answer data
[0159] Step 6:
[0160] The server generates the searched response data in text format based on a template. Specifically, it uses a template engine (e.g., Jinja2) to format it into a human-readable format. For example, it could produce a format like, "The procedure for applying for a new project is described on the project management page on the intranet. The procedure is as follows..."
[0161] Input: Searched answer data
[0162] Output: Formatted answer text
[0163] Step 7:
[0164] The server sends the generated response text to the terminal. Specifically, it sends the generated text as an HTTP response.
[0165] Input: Formatted answer text
[0166] Output: The answer text is sent to the terminal as an HTTP response.
[0167] Step 8:
[0168] The device displays the received response text on the chatbot interface and provides it to the user. Specifically, it uses JavaScript® to update the UI and display the new text in the chat window.
[0169] Input: Received response text
[0170] Output: Reply text displayed in the chat window
[0171] Step 9:
[0172] The server logs user questions and generated answers, and executes SQL queries to store question-answer pairs in a database for later analysis and system improvement.
[0173] Input: Question and answer pairs
[0174] Output: Log data saved in data storage
[0175] (Application example 1)
[0176] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0177] On traditional online shopping sites, users had to contact customer support by phone or email to inquire about product information or the status of their orders. This method was time-consuming and resulted in a poor user experience. It also placed a heavy burden on customer support staff, resulting in delayed responses. This created a growing need for a system that could respond to user questions quickly and appropriately.
[0178] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0179] In this invention, the server includes means for receiving questions from users, means for performing natural language processing based on the received questions to analyze the intent of the questions, means for searching a database for answers corresponding to the analyzed intent, means for generating the searched answers in text format, means for sending the generated answers to the users, means for displaying the generated answers on the user terminal, and means for saving the questions from the users and the generated answers as logs, thereby enabling users to quickly check information on products they are interested in and the status of their orders.
[0180] A "user" is an individual or entity that utilizes the system to enter questions and receive answers.
[0181] A "terminal" is a device that sends a question entered by a user to a server and displays the answer received from the server to the user. Examples include a smartphone and a tablet.
[0182] A "server" is a computer system that executes a series of processes, including receiving a question from a user, performing natural language processing, analyzing the intent of the question, generating an appropriate answer, and sending it to the user terminal.
[0183] "Natural language processing" is a technology that allows computers to understand and analyze human language, and is used to analyze the intent of questions entered by users.
[0184] "Question intent" refers to the true purpose and information sought behind the question entered by the user.
[0185] A "database" is a data storage system that systematically stores answers and information corresponding to questions and manages them in a searchable format.
[0186] "Text format" is a format in which the answer provided to the user is expressed as character data.
[0187] A "log" is data that records user questions and generated answers in chronological order and is saved in a format that can be referenced and analyzed later.
[0188] Systems built on these definitions are designed to enable users to obtain information quickly and appropriately.
[0189] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. This system is particularly applicable as a customer support application for online shopping sites. Specific embodiments are described below.
[0190] System Overview
[0191] This system is primarily composed of a user, a terminal, and a server. The user inputs a question and sends it to the server via the terminal. The server processes the input question, generates an appropriate answer, and sends it to the terminal. The terminal then displays the received answer to the user.
[0192] Hardware and software used
[0193] Hardware: Smartphone (iPhone (registered trademark), ANDROID (registered trademark))
[0194] Software: AWS (registered trademark) (Amazon Web Services), TENSORFLOW (registered trademark) (NLP model), Python (backend), React Native (frontend)
[0195] Data processing and calculation flow
[0196] 1. Accepting questions
[0197] Users type their questions into a chat box within the smartphone app.
[0198] Example: "Can you tell me about discounts on new products?"
[0199] 2. Sending a text
[0200] The device sends the questions entered by the user to AWS servers.
[0201] 3. Question Preprocessing
[0202] The server preprocesses the received text with a Python script.
[0203] Grammar correction, removal of unnecessary characters and spaces, tokenization, and removal of stop words.
[0204] 4. Question Intention Analysis
[0205] The server uses TensorFlow to preprocess the text and parse it with an NLP model.
[0206] Extraction of key keywords and phrases.
[0207] Examples: "New products" and "Discount information"
[0208] 5. Finding Answers
[0209] The server searches the database based on the extracted keywords to identify related FAQs and product information.
[0210] 6. Answer Generation
[0211] The server uses templates to generate answers in a user-friendly format.
[0212] For example: "We don't currently have any new product discounts, but we'll let you know when our next sale is."
[0213] 7. Submit your response
[0214] The server sends the generated answer from the AWS server to the smartphone app.
[0215] 8. View Answers
[0216] The terminal displays the received response in a chat box and provides it to the user.
[0217] Example: If a user asks, "How do I cancel an order?" the app might respond with, "To cancel, visit your account page, select 'Order History,' select the order you want to cancel, and click the 'Cancel' button."
[0218] 9. Log storage
[0219] The server stores the questions and generated answers as a log.
[0220] This allows for later analysis and system improvement.
[0221] Prompt Sentence Examples
[0222] Here is an example of a prompt sentence to be input to the generative AI model when a user asks, "How do I cancel an order?":
[0223] Generate the best response to the user "How do I cancel my order?"
[0224] The above is an embodiment of the system of the present invention. This system allows users to receive prompt and accurate answers to their questions, making it possible to improve the efficiency of customer support operations at online shopping sites.
[0225] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0226] Step 1:
[0227] Accepting questions
[0228] Users type their questions into a chat box within the smartphone app, and the text is stored on the device.
[0229] Input: The question text entered by the user (e.g., "What are the discounts on new products?")
[0230] Output: Question text data
[0231] Step 2:
[0232] Sending a text
[0233] The device sends the stored text data to the server using the HTTPS protocol to ensure secure communication.
[0234] Input: Question text data (e.g., "Please tell me about discounts on new products.")
[0235] Output: Text data sent to the server
[0236] Step 3:
[0237] Question Preprocessing
[0238] The server preprocesses the received text data using Python scripts to correct grammar, remove unnecessary characters and spaces, tokenize, and remove stop words, producing text that is easy to parse.
[0239] Input: Received question text data
[0240] Output: Preprocessed text data (e.g., "New product discount information")
[0241] Step 4:
[0242] Question intent analysis
[0243] The server then analyzes the preprocessed text data with TensorFlow's NLP model, which extracts key keywords and phrases and interprets the intent of the question.
[0244] Input: Preprocessed text data (e.g., "New product discount information")
[0245] Output: Key keywords and intent information (e.g., "new product" or "discount information")
[0246] Step 5:
[0247] Find answers
[0248] The server searches the database based on the extracted keywords, identifies related FAQs and product information, and calculates a relevance score to obtain the most appropriate answer.
[0249] Input: Key keywords and intent information (e.g., "new product" or "discount information")
[0250] Output: The best answer found (e.g., "There are currently no discounts on new products, but we'll let you know when the next sale is.")
[0251] Step 6:
[0252] Generate answers
[0253] The server generates an answer text based on the searched answer data using a predetermined template.
[0254] Input: Searched best answer data
[0255] Output: Generated answer text (e.g., "We currently don't have any new product discounts, but we'll let you know when the next sale comes around.")
[0256] Step 7:
[0257] Submit your answer
[0258] The server sends the generated response text to the terminal, again using the HTTPS protocol.
[0259] Input: Generated answer text (e.g., "We don't currently have any new product discounts, but we'll let you know when our next sale is.")
[0260] Output: Answer text sent to the terminal
[0261] Step 8:
[0262] Show Answers
[0263] The terminal displays the received reply text in a chat box and provides it to the user, allowing the user to check the reply to their inquiry.
[0264] Input: Answer text sent to the device (e.g., "We currently have no new product discounts, but we'll let you know when the next sale comes around.")
[0265] Output: The answer text displayed to the user
[0266] Step 9:
[0267] Saving logs
[0268] The server logs the user's questions and the generated answers, and the log data is stored in a database for later analysis and system improvement.
[0269] Input: User question text and generated answer text
[0270] Output: Saved log data
[0271] Furthermore, an emotion engine that estimates the user's emotion may be combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59 and perform identification processing using the user's emotion.
[0272] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. In particular, the purpose is to improve the user experience by incorporating an emotion engine that recognizes the user's emotions and generates responses according to those emotions. Specific embodiments of the system of the present invention are described in detail below.
[0273] System configuration
[0274] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the user's input to the server. The server processes the input question and the user's emotions, generates an appropriate answer, and sends it to the terminal. The terminal displays the received answer to the user.
[0275] Processing from question reception to answer generation
[0276] 1. Questions accepted:
[0277] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[0278] 2. Sending a text:
[0279] The terminal sends the entered question text to the server as text data.
[0280] 3. Question preprocessing:
[0281] The server preprocesses the received text data, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[0282] 4. Question intent analysis:
[0283] The server uses an NLP engine to analyze the intent of the pre-processed text. This analysis extracts key keywords and phrases within the text. For example, keywords like "project" and "how to apply" are extracted.
[0284] 5. Emotion analysis:
[0285] The server analyzes the user's emotions using an emotion engine, which analyzes not only the question text but also the user's chat history to recognize the user's emotions.
[0286] 6. Finding answers:
[0287] The server searches the database for the most relevant FAQ entries based on the extracted keywords, calculating a relevance score to identify the most relevant answers.
[0288] 7. Generate answers:
[0289] The server uses templates to generate answers based on the searched FAQ entries in a format that is easy for the user to understand. It also adjusts the tone and content of the answer based on the analysis results of the emotion engine. For example, if the user is feeling anxious, it generates an answer in a reassuring tone.
[0290] 8. Submit your response:
[0291] The server transmits the generated answer text to the terminal.
[0292] 9. Show Answer:
[0293] The terminal displays the received answer on the chatbot interface and provides it to the user.
[0294] 10. Log storage:
[0295] The server stores the user's questions, generated answers, and user emotion data as logs, which can be later analyzed and used to improve the system.
[0296] Specific examples
[0297] For example, suppose a user inputs a question to the chatbot such as, "The project is delayed and I'm worried." The processing in this case will be specifically described below.
[0298] 1. The user types into the terminal, "I'm worried about the project being delayed."
[0299] 2. The terminal sends this question text to the server.
[0300] 3. The server preprocesses the received text and extracts the keywords "project," "delay," and "worry."
[0301] 4. The server uses an NLP engine to analyze the intent of the question and searches the database based on these keywords.
[0302] 5. The server uses the emotion engine to analyze the user's emotions and recognizes that the user has the emotion "worry."
[0303] 6. The server searches the relevant FAQ entries and selects the most appropriate answer.
[0304] 7. The server generates a response based on a template in a reassuring tone, such as "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as quickly as possible. You can follow the latest progress on our intranet."
[0305] 8. The server sends this response to the terminal.
[0306] 9. The terminal displays the received response to the user.
[0307] 10. The server stores the user's questions, generated answers, and user emotion data as logs.
[0308] The above is a specific embodiment for implementing the system of the present invention. By introducing an emotion engine, users can receive answers that take their emotions into consideration, which increases their satisfaction.
[0309] The processing flow will be explained below.
[0310] Step 1:
[0311] The user uses the chatbot interface to input a question into the device, for example, "I'm worried about the delay in my project."
[0312] Step 2:
[0313] The terminal receives the entered question text and confirms that the send button has been pressed.
[0314] Step 3:
[0315] The device sends the question text to the server. The text data is sent via a protocol such as an HTTP request or WebSocket.
[0316] Step 4:
[0317] The server acquires the text data received from the terminal.
[0318] Step 5:
[0319] The server performs preprocessing on the text data, which includes removing extra spaces and special characters, tokenizing, removing stop words, etc. This processing makes the text easier to parse.
[0320] Step 6:
[0321] The server then inputs the preprocessed text data into a natural language processing (NLP) engine to analyze the intent of the question. This analysis involves extracting key keywords and phrases within the text. For example, keywords like "project," "delay," and "worry" are extracted.
[0322] Step 7:
[0323] The server searches the database for relevant FAQ entries based on the keywords extracted by the NLP engine, and a search algorithm calculates a relevance score to identify the most relevant answers.
[0324] Step 8:
[0325] The server uses an emotion engine to analyze the pre-processed text data and recognize the user's emotion, for example, the emotion "worry."
[0326] Step 9:
[0327] The server adjusts the tone and content of the response based on the analysis results of the emotion engine: if the user is anxious, it generates a response with a reassuring tone.
[0328] Step 10:
[0329] The server uses templates based on the most relevant FAQ entry to generate an answer in an easy-to-understand format, such as "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as quickly as possible. You can follow the latest progress on our intranet."
[0330] Step 11:
[0331] The server transmits the generated answer text to the terminal.
[0332] Step 12:
[0333] The terminal displays the received response text on the chatbot interface.
[0334] Step 13:
[0335] The user checks the displayed answers and, if necessary, enters further questions or decides on an action.
[0336] Step 14:
[0337] The server stores the user's questions, generated answers, and user emotion data as logs, which are then stored in a database for later analysis and system improvement.
[0338] Example 2
[0339] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0340] Conventional chatbot systems generate standardized responses without considering the user's emotions, resulting in low user satisfaction. Furthermore, no systems exist that accurately analyze the user's emotions during the response generation process and adjust the tone and content accordingly. This results in a lack of improvement in the user experience and an inability to provide effective support.
[0341] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for receiving a question from a user, means for performing natural language processing based on the received question to analyze the intention of the question, means for analyzing the analyzed intention and the user's emotions, means for searching a database for an optimal answer based on the analyzed intention and emotions, means for generating the searched answer using a template in a format that is easy for the user to understand, means for sending the generated answer to the user, and means for saving the question from the user, the generated answer, and the user's emotional data as a log. This enables an appropriate response that takes the user's emotions into consideration, improving the user experience.
[0342] A "user" is someone who accesses the system and enters a question.
[0343] "Terminal" refers to the device used by a user to access the system, including PCs, smartphones, tablets, etc.
[0344] "Server" refers to a central computer system for receiving and analyzing user questions, and generating and transmitting answers.
[0345] The "means for receiving questions" refers to a function for causing the server to receive questions input by the user via the terminal.
[0346] "Natural language processing means" refers to technology for preprocessing received questions and analyzing the intent of the questions.
[0347] "Sentiment analysis means" refers to technology for analyzing a user's input text and chat history to identify the user's emotions.
[0348] "Answer retrieval means" refers to a function for retrieving the best answer from a database based on the analyzed intention and emotion.
[0349] A "template" refers to a predefined format used to generate an answer.
[0350] "Answer generation means" refers to a function for generating the searched answer using a template in a format that is easy for the user to understand.
[0351] "Answer sending means" refers to a function for sending the generated answer to the user's terminal.
[0352] The "log storage means" refers to a function for storing user questions, generated answers, and analyzed emotion data as records.
[0353] "Database" refers to a data structure that stores question and answer pairs used for answer search.
[0354] The present invention relates to a chatbot system that provides quick and appropriate answers to user questions, and aims to improve the user experience by recognizing the user's emotions and generating responses that match those emotions. The system of the present invention is composed of a user, a terminal, and a server.
[0355] System configuration
[0356] The system for implementing the invention comprises the following main components:
[0357] 1. User - Accesses the system and enters a question.
[0358] 2. Terminal - A device that receives input from a user and sends it to a server. Examples include PCs, smartphones, and tablets.
[0359] 3. Server - A central computer system that processes the entered questions, analyzes intent and sentiment, and generates appropriate answers to send to the device.
[0360] The process from receiving a question to generating an answer
[0361] Accepting questions
[0362] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[0363] Sending a text
[0364] The device sends the text data of the entered question to the server using an HTTP POST request over the Internet.
[0365] Question Preprocessing
[0366] The server performs various pre-processing steps on the received text data. The software used includes text processing libraries (e.g., NLTK, spaCy). The pre-processing steps include the following:
[0367] Grammar check and correction
[0368] Remove unnecessary characters and spaces
[0369] Tokenization
[0370] Stop word removal
[0371] Question intent analysis
[0372] The server analyzes the preprocessed text using an NLP engine (e.g., Google BERT, OpenAI® GPT). The specific processing includes:
[0373] Keyword extraction
[0374] Text Classification
[0375] Emotion analysis
[0376] The server analyzes the user's emotions using an emotion engine (e.g., Affectiva, IBM Watson®), which analyzes the question text and past chat history to identify the user's emotions.
[0377] Find answers
[0378] The server searches for answers from a database based on the parsed intent and sentiment, and identifies the most suitable FAQ entry through a relevance calculation. Databases used include relational databases (e.g., MySQL, PostgreSQL).
[0379] Generate answers
[0380] The server generates answers using templates based on the searched FAQ entries, using generative AI models (e.g., OpenAI GPT) to adjust tone and content depending on the emotion. For example, if the user is anxious, the answer will be generated in a reassuring tone.
[0381] Submit your answer
[0382] The server then sends the generated response to the device, using an HTTP POST request.
[0383] Show Answers
[0384] The terminal displays the received answer on the chatbot interface, through which the user can confirm the answer.
[0385] Saving logs
[0386] The server stores user questions, generated answers, and sentiment data as logs, which are used for later analysis and system improvement. The data is managed in a log management system (e.g., ELK Stack).
[0387] Specific examples
[0388] For example, if a user asks, "I'm worried because the project is delayed," the server preprocesses the text "I'm worried because the project is delayed" and extracts the keywords "project," "delay," and "worry." The emotion engine recognizes that the user has the emotion "worry." The server then searches the database for relevant FAQ entries and generates a response in a tone similar to, "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as soon as possible. You can follow the latest progress on our intranet."
[0389] Examples of prompts:
[0390] Generate an appropriate, emotionally relevant response when a user asks, "I'm worried about the project being delayed."
[0391] The above is an embodiment of the system of the present invention, which makes it possible to provide a response that takes into account the user's emotions and improve the user experience.
[0392] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0393] Step 1: The user opens the chatbot interface. The user enters a question as text into the terminal. The input is in the form of, for example, "How do I apply for a new project?" Input data: The question text entered by the user. Output data: The question text received by the terminal.
[0394] Step 2: The device sends the received question text to the server. Specifically, it sends the text data to the server using an HTTP POST request. Input data: The question text entered by the user on the device. Output data: The text data received by the server.
[0395] Step 3: The server preprocesses the received question text. Specific operations include grammar checking and correction, removing unnecessary characters and spaces, tokenization, and removing stop words. Input data: Raw text data received by the server. Output data: Preprocessed text data in a format that can be analyzed.
[0396] Step 4: The server analyzes the intent of the preprocessed text data. It uses an NLP engine to extract keywords and key phrases. Specifically, natural language processing models such as Google BERT and OpenAI GPT are used. Input data: Preprocessed text data. Output data: Data showing the extracted keywords and intent.
[0397] Step 5: The server analyzes the user's emotions. An emotion engine (e.g., Affectiva or IBM Watson) is used to analyze the question text and past chat history to recognize the user's emotions. Input data: preprocessed text data and chat history. Output data: data indicating the user's emotions.
[0398] Step 6: The server searches the database for the best answer based on the parsed intent and sentiment. It performs a relevance calculation to identify the most relevant FAQ entry. Databases used include MySQL and PostgreSQL. Input data: keywords, phrases, and user sentiment data. Output data: the best FAQ entry.
[0399] Step 7: The server generates an answer based on the FAQ entry. It uses templates to create an easy-to-understand answer and adjusts the emotional tone as needed. It uses a generative AI model (e.g., OpenAI GPT). Input data: FAQ entry, template, and user emotional data. Output data: Generated answer text.
[0400] Step 8: The server sends the generated answer text to the terminal. Again, data is sent using an HTTP POST request. Input data: The generated answer text. Output data: The answer text received by the terminal.
[0401] Step 9: The terminal displays the received answer on the chatbot interface. To display it on the interface, the text data is converted into a visually easy-to-read format. Input data: The received answer text. Output data: The answer displayed on the chatbot interface.
[0402] Step 10: The server saves the user's question, generated answer, and user sentiment data as a log. This can be used for future analysis and system improvement. Examples of systems used include log management systems such as ELK Stack. Input data: question text, generated answer text, sentiment data. Output data: data saved as a log.
[0403] (Application example 2)
[0404] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0405] Conventional chatbot systems can provide quick answers to user questions, but they are unable to generate responses that take the user's emotions into account, resulting in a poor user experience. In particular, in virtual stores and other situations where responses that take the user's emotions into consideration are required, existing systems are unable to sufficiently improve user satisfaction. The present invention aims to improve the user experience by providing quick, appropriate responses to user questions that reflect the user's emotions.
[0406] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0407] In this invention, the server includes means for receiving a user's question, means for performing natural language processing based on the received question and analyzing the intent of the question, means for analyzing the user's emotion, means for searching a database for an answer corresponding to the analyzed intent, means for generating the searched answer in text format, means for adjusting the tone and content of the answer based on the emotion analysis result, means for sending the generated answer to the user, and means for saving the user's question and the generated answer as a log, thereby making it possible to provide a quick and appropriate response that takes into consideration the user's emotion.
[0408] The "means for receiving a question from a user" refers to a device or software that has the function of transmitting a question entered by a user to the system via a terminal and receiving the question data.
[0409] "Means for performing natural language processing and analyzing the intent of a question" refers to a device or software that has the function of analyzing the received question text, understanding its content and meaning, and identifying the intent of the question.
[0410] "Means for searching a database for an answer corresponding to the analyzed intent" refers to a device or software that has the function of finding an appropriate answer from a database based on the analysis results.
[0411] The "means for generating the searched answer in text format" refers to a device or software that has the function of converting the searched answer information into a text format that is easy for the user to understand.
[0412] The "means for sending the generated answer to the user" is a device or software having a function for returning the generated answer text to the user.
[0413] "Means for saving user questions and generated answers as a log" refers to a device or software that has the function of recording and saving the questions entered by users and the answers generated in response to them.
[0414] The "emotion analysis means" is a device or software that has the function of analyzing the user's question text and related data and determining the user's emotional state.
[0415] "Means for adjusting the tone and content of responses based on the results of emotion analysis" refers to a device or software that has the function of changing the content of responses and the way they are expressed depending on the user's emotions obtained through emotion analysis.
[0416] The present invention relates to a chatbot system for quickly and appropriately responding to user questions, and aims to improve the user experience by recognizing the user's emotions and generating responses according to those emotions. Specific embodiments of the present invention are described in detail below.
[0417] System Configuration
[0418] This chatbot system is mainly composed of a terminal that receives questions from users, a server that processes the questions, and a terminal that provides answers to users. Each component is described in detail below.
[0419] Hardware and Software Use
[0420] Hardware
[0421] General-purpose PC (CPU, memory)
[0422] software
[0423] Python 3.x: Programming Language
[0424] NLTK Library: A library for natural language processing and sentiment analysis
[0425] Transformers Library: Generative AI Models for Question Answering
[0426] Specific functions and processes
[0427] 1. Receive a user question
[0428] The user uses a terminal to input and send a question to the chatbot interface, which is sent in text format.
[0429] 2. Question preprocessing and intent analysis
[0430] The server preprocesses the received question text, which includes grammar correction, removal of unnecessary characters and spaces, tokenization, and removal of stop words. The server then uses a natural language processing (NLP) engine to analyze the intent of the question.
[0431] 3. Emotion Analysis
[0432] After the NLP engine analysis, the server uses a sentiment analysis engine to analyze the user's emotions, determining their emotional state based on the question text and the user's past chat history.
[0433] 4. Searching for answers in a database
[0434] Based on the analyzed intent and extracted keywords, the server searches a relevant database to identify the appropriate answer.
[0435] 5. Generating Emotion-Based Answers
[0436] The server takes into account the results of the emotion analysis and uses templates to generate answers in a format that is easy for the user to understand. For example, if the user has negative emotions, the server generates answers in a tone that reassures the user.
[0437] 6. Submitting answers and saving logs
[0438] The generated answers are sent from the server to the terminal and presented to the user through the chatbot interface. The user's questions and the generated answers are also saved as logs for later analysis and system improvement.
[0439] Specific examples
[0440] As a concrete example, consider the case where a user enters the question, "I'm frustrated because the product I purchased is late in arriving." In this case, the server extracts the keywords "purchase," "product," "arrival," "delay," and "frustration," and uses a sentiment analysis engine to recognize that the user's emotions are negative. It then searches the database for an appropriate response and generates a response that takes the user's emotions into consideration, such as, "We apologize for the inconvenience. We are currently checking the delivery status."
[0441] Prompt example
[0442] User: "I'm frustrated with the delay in receiving my purchase."
[0443] Example inputs to a generative AI model:
[0444] "I'm frustrated that the item I purchased is late in arriving."
[0445] As described above, the present invention aims to realize a chatbot system that takes into consideration the user's feelings and provides quick and appropriate answers.
[0446] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0447] Step 1:
[0448] A user uses a terminal to input a question into the chatbot interface and submits it. The input text is sent by the terminal to the server.
[0449] Input: User question text
[0450] Output: Question data sent to the server
[0451] Step 2:
[0452] The server preprocesses the received question text, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[0453] Input: Question text
[0454] Output: Preprocessed text
[0455] Step 3:
[0456] The server uses a natural language processing (NLP) engine to analyze the intent of the question based on the preprocessed text, extracting key keywords and phrases and identifying the meaning of the question.
[0457] Input: Preprocessed text
[0458] Output: Extracted keywords and phrases
[0459] Step 4:
[0460] The server uses a sentiment analysis engine to analyze the user's sentiment from the question text and related data, and the user's emotional state (positive, negative, neutral) is determined.
[0461] Input: Question text and related data (e.g. chat history)
[0462] Output: Emotion analysis results
[0463] Step 5:
[0464] The server searches the database based on the extracted keywords to find relevant answers, retrieving relevant FAQ entries and information.
[0465] Input: Extracted keywords
[0466] Output: Searched answer data
[0467] Step 6:
[0468] The server generates a response text using a template based on the searched response data. At the same time, the tone and content of the response are adjusted based on the results of sentiment analysis. For example, if the user expresses negative emotions, the reply will have a reassuring tone.
[0469] Input: Searched response data and sentiment analysis results
[0470] Output: Adjusted answer text
[0471] Step 7:
[0472] The server sends the generated answer text to the terminal, which then displays the received answer on the chatbot interface and provides it to the user.
[0473] Input: Adjusted answer text
[0474] Output: The answer that is displayed to the user
[0475] Step 8:
[0476] The server stores user questions, generated answers, and sentiment analysis results as logs, allowing for later analysis and system improvement.
[0477] Input: User question, generated answer, sentiment analysis results
[0478] Output: Saved log data
[0479] As described above, through the specific operations at each step, an appropriate answer that takes into consideration the user's feelings is provided to the user's question.
[0480] The specific processing unit 290 transmits the result of the specific processing to the smart device 14. In the smart device 14, the control unit 46A causes the output device 40 to output the result of the specific processing. The microphone 38B acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0481] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (registered trademark) (Internet search engine).<URL: https: / / openai.com / blog / chatgpt> ), Gemini (registered trademark) (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0482] In the above embodiment, an example in which the specific process is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific process may be performed by the smart device 14.
[0483] [Second embodiment]
[0484] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0485] 3, the data processing system 210 includes the data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.
[0486] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0487] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, and the camera 42 are also connected to the bus 52.
[0488] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0489] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0490] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0491] Fig. 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Fig. 4, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0492] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0493] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0494] In the smart glasses 214, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0495] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the smart glasses 214 will be referred to as the "terminal."
[0496] The present invention relates to a chatbot system for quickly and appropriately responding to questions from users. This system uses NLP technology to analyze questions entered in natural language and provide appropriate answers. An embodiment of the system of the present invention will be described in detail below.
[0497] System configuration
[0498] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the input from the user to the server. The server processes the input question, generates an appropriate answer, and sends it to the terminal. The terminal displays the received answer to the user.
[0499] Processing from question reception to answer generation
[0500] 1. Questions accepted:
[0501] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[0502] 2. Sending a text:
[0503] The terminal sends the entered question to the server as text data.
[0504] 3. Question preprocessing:
[0505] The server preprocesses the received text data, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[0506] 4. Question intent analysis:
[0507] The server uses an NLP engine to analyze the intent of the pre-processed text, extracting key keywords and phrases within the text, such as "project" and "how to apply."
[0508] 5. Finding answers:
[0509] The server searches the database for the most relevant FAQ entries based on the extracted keywords, calculating a relevance score to identify the most relevant answers.
[0510] 6. Generate answers:
[0511] The server uses templates to generate user-friendly answers based on the FAQ entries found, such as "The instructions for submitting a new project are on the project management page on our intranet. Here are the steps..."
[0512] 7. Submit your response:
[0513] The server sends the generated response to the terminal.
[0514] 8. Show Answer:
[0515] The terminal displays the received answer on the chatbot interface and provides it to the user.
[0516] 9. Log storage:
[0517] The server logs user questions and generated answers, allowing for later analysis and system improvement.
[0518] Specific examples
[0519] For example, suppose a user inputs a question to the chatbot such as "Please tell me the procedure for applying for vacation." The processing in this case will be explained in detail below.
[0520] 1. The user types "Please tell me how to apply for vacation" into the terminal.
[0521] 2. The terminal sends this question text to the server.
[0522] 3. The server preprocesses the received text and extracts the keywords "leave application" and "procedure."
[0523] 4. The server searches the database for FAQs related to "vacation request procedures."
[0524] 5. The server generates the appropriate response based on the template, such as "The procedure for applying for leave is as follows. Please access the leave application page on the intranet and fill in the required information."
[0525] 6. The server sends this response to the terminal.
[0526] 7. The terminal displays the received response to the user.
[0527] 8. The server stores a log of the user's questions and the generated answers.
[0528] The above is a specific embodiment for implementing the system of the present invention, which allows users to obtain quick and accurate answers to their questions and improves work efficiency.
[0529] The processing flow will be explained below.
[0530] Step 1:
[0531] A user accesses the chatbot interface and enters a question, for example, "How do I apply for a new project?"
[0532] Step 2:
[0533] The terminal receives the entered question text and confirms that the send button has been pressed.
[0534] Step 3:
[0535] The device sends the question text to the server. The text data is sent via a protocol such as an HTTP request or WebSocket.
[0536] Step 4:
[0537] The server acquires the text data received from the terminal.
[0538] Step 5:
[0539] The server preprocesses the text data, such as removing extra spaces and special characters, tokenizing it, and removing stop words.
[0540] Step 6:
[0541] The server inputs the preprocessed text data into a natural language processing (NLP) engine to analyze the intent of the question, for example, extracting keywords such as "project" and "application method."
[0542] Step 7:
[0543] The server searches the database for relevant FAQ entries based on the extracted keywords, and a search algorithm calculates a relevance score.
[0544] Step 8:
[0545] The server identifies the most relevant FAQ entry and retrieves its contents.
[0546] Step 9:
[0547] Based on the FAQ entries it retrieves, the server uses templates to generate easy-to-understand answers, such as "New project submissions are detailed on the project management page on our intranet. Here are the steps..."
[0548] Step 10:
[0549] The server transmits the generated answer text to the terminal.
[0550] Step 11:
[0551] The terminal displays the received response text on the chatbot interface.
[0552] Step 12:
[0553] The user checks the displayed answers and takes the next action if necessary.
[0554] Step 13:
[0555] The server logs the user's questions and the generated answers, which are then stored in a database for later analysis and system improvement.
[0556] Example 1
[0557] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0558] Conventional chatbot systems have problems such as delayed responses to user questions and inaccurate analysis of intent, resulting in inappropriate answers. Furthermore, there is a lack of consistency in text preprocessing, intent analysis, and answer generation, leading to a poor user experience. Furthermore, logs are not stored properly, making subsequent analysis and system improvements difficult.
[0559] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0560] In this invention, the server includes a means for preprocessing received questions, removing unnecessary characters, and tokenizing the questions, a means for performing natural language processing based on the preprocessed questions to analyze the intent of the questions, and a means for searching data storage for answers corresponding to the analyzed intent. This enables a prompt and appropriate response to user questions and accurate answer generation. Furthermore, storing questions and answers in log storage facilitates subsequent analysis and system improvement.
[0561] "User" refers to an individual or organization that uses the system.
[0562] A "terminal" is an electronic device that a user uses to input a question and send it to a server.
[0563] A "server" is a computer system whose role is to process information received from a user, generate an appropriate response, and send it to the terminal.
[0564] "Preprocessing" refers to the process of removing unnecessary characters and spaces from the question text and tokenizing it.
[0565] "Tokenization" is the process of dividing text into meaningful units such as words and phrases.
[0566] "Natural language processing" is a technology that allows computers to understand and analyze human language.
[0567] "Intent analysis" is the process of extracting key keywords and phrases to understand the intent of a user's text.
[0568] "Data storage" refers to a storage medium in which data for searching answers is stored in advance.
[0569] A "template" is a fixed format used when generating an answer.
[0570] "Text format" refers to string information that is formatted for easy reading.
[0571] "Log storage" is a recording medium for storing user questions and generated answers.
[0572] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. This system is composed of a server, a terminal, and a user who uses these. Specifically, its main function is to analyze user questions using natural language processing technology and provide appropriate answers. An embodiment of the system of the present invention is described in detail below.
[0573] System configuration
[0574] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the user's input to the server. The server processes the input question, generates an appropriate answer, and sends it to the terminal, which then displays the received answer to the user. At the same time, the server saves the question and the generated answer in log storage.
[0575] Hardware and software used
[0576] The system of the present invention uses the following hardware and software:
[0577] Hardware: General computers and servers, and devices that users access (e.g., PCs, smartphones, tablets)
[0578] Software: Natural language processing libraries (e.g., SpaCy, NLTK), database management systems (e.g., MySQL), template engines (e.g., Jinja2), log management systems, communication libraries (e.g., Python's requests library)
[0579] Processing flow and specific examples
[0580] How the system works will be explained using a concrete example.
[0581] For example, if a user wants to ask a chatbot, "How do I request vacation?", the user first accesses the chatbot interface using a device, types the question using the keyboard, and clicks the send button. The process then goes as follows:
[0582] The device sends the entered question to the server, converting the text data into an appropriate format (e.g., JSON) and sending it as an HTTP request.
[0583] The server preprocesses the received text data, including grammar correction, removal of unnecessary characters and spaces, tokenization, and stop-word removal. A natural language processing library (e.g., SpaCy) is used to parse the text and extract key keywords and phrases ("vacation request", "procedure").
[0584] Next, the server searches for FAQ entries from a database (e.g., MySQL) based on the extracted keywords, calculates a relevance score, and identifies the most relevant entry. For example, it retrieves information corresponding to "vacation request procedure" from the database.
[0585] The server then uses a template engine (e.g., Jinja2) to format the retrieved entries into a user-friendly format based on a template, generating a response text, such as "The procedure for requesting vacation is as follows. Please visit the vacation request page on our intranet and fill out the required information."
[0586] The server then sends the generated answer to the terminal, which displays the received answer on the chatbot interface and provides it to the user. Finally, the server stores the question and the generated answer in log storage for later analysis and system improvement.
[0587] Prompt Sentence Examples
[0588] An example of a prompt sentence to be fed into a generative AI model (e.g., GPT-3) is as follows:
[0589] Prompt statement:
[0590] Please explain in detail the process flow when a user asks about the "vacation request procedure."
[0591] Expected Output:
[0592] When a user asks "How do I apply for vacation?", the system first receives the user's input and performs preprocessing. Then, it uses an NLP engine to analyze the intent, searches for relevant FAQs in the database, and generates an answer that is easy for the user to understand. Finally, the answer is displayed to the user, and the question and answer are saved as a log.
[0593] Using this prompt, the generative AI model generates a processing flow for the chatbot system to respond to the question.
[0594] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0595] Step 1:
[0596] The user inputs a question using the chatbot interface. Specifically, the user uses the keyboard to enter a question text such as "How do I apply for a new project?" and clicks the submit button.
[0597] Input: The question text entered by the user
[0598] Output: The question text is retrieved to the terminal.
[0599] Step 2:
[0600] The device sends the acquired question text to the server. Specifically, the question text is converted into an appropriate format (e.g., JSON) and sent as an HTTP request. This is often done using the Python requests library.
[0601] Input: The question text entered by the user
[0602] Output: The question text is formatted and sent to the server as an HTTP request.
[0603] Step 3:
[0604] The server preprocesses the text data received from the device, including correcting grammar, removing unnecessary characters and spaces, tokenizing (breaking the text into individual words), and removing stop words, using a natural language processing library (e.g., SpaCy or NLTK).
[0605] Input: The question text received by the server
[0606] Output: Preprocessed text data
[0607] Step 4:
[0608] The server uses the preprocessed text data to analyze the intent of the question through natural language processing. Specifically, it identifies key keywords and phrases in the text and understands the intent. This process uses an NLP engine (e.g., Google NLP API).
[0609] Input: Preprocessed text data
[0610] Output: Parsed intent and primary keywords
[0611] Step 5:
[0612] Based on the parsed intent, the server searches for the appropriate answer from its data storage, specifically by searching a FAQ database (e.g., MySQL) using key keywords and calculating a relevance score to identify the best entry.
[0613] Input: Parsed intent and primary keywords
[0614] Output: Searched answer data
[0615] Step 6:
[0616] The server generates the searched response data in text format based on a template. Specifically, it uses a template engine (e.g., Jinja2) to format it into a human-readable format. For example, it could produce a format like, "The procedure for applying for a new project is described on the project management page on the intranet. The procedure is as follows..."
[0617] Input: Searched answer data
[0618] Output: Formatted answer text
[0619] Step 7:
[0620] The server sends the generated response text to the terminal. Specifically, it sends the generated text as an HTTP response.
[0621] Input: Formatted answer text
[0622] Output: The answer text is sent to the terminal as an HTTP response.
[0623] Step 8:
[0624] The device displays the received response text on the chatbot interface and provides it to the user. Specifically, it uses JavaScript to update the UI and display the new text in the chat window.
[0625] Input: Received response text
[0626] Output: Reply text displayed in the chat window
[0627] Step 9:
[0628] The server logs user questions and generated answers, and executes SQL queries to store question-answer pairs in a database for later analysis and system improvement.
[0629] Input: Question and answer pairs
[0630] Output: Log data saved in data storage
[0631] (Application example 1)
[0632] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0633] On traditional online shopping sites, users had to contact customer support by phone or email to inquire about product information or the status of their orders. This method was time-consuming and resulted in a poor user experience. It also placed a heavy burden on customer support staff, resulting in delayed responses. This created a growing need for a system that could respond to user questions quickly and appropriately.
[0634] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0635] In this invention, the server includes means for receiving questions from users, means for performing natural language processing based on the received questions to analyze the intent of the questions, means for searching a database for answers corresponding to the analyzed intent, means for generating the searched answers in text format, means for sending the generated answers to the users, means for displaying the generated answers on the user terminal, and means for saving the questions from the users and the generated answers as logs, thereby enabling users to quickly check information on products they are interested in and the status of their orders.
[0636] A "user" is an individual or entity that utilizes the system to enter questions and receive answers.
[0637] A "terminal" is a device that sends a question entered by a user to a server and displays the answer received from the server to the user. Examples include a smartphone and a tablet.
[0638] A "server" is a computer system that executes a series of processes, including receiving a question from a user, performing natural language processing, analyzing the intent of the question, generating an appropriate answer, and sending it to the user terminal.
[0639] "Natural language processing" is a technology that allows computers to understand and analyze human language, and is used to analyze the intent of questions entered by users.
[0640] "Question intent" refers to the true purpose and information sought behind the question entered by the user.
[0641] A "database" is a data storage system that systematically stores answers and information corresponding to questions and manages them in a searchable format.
[0642] "Text format" is a format in which the answer provided to the user is expressed as character data.
[0643] A "log" is data that records user questions and generated answers in chronological order and is saved in a format that can be referenced and analyzed later.
[0644] Systems built on these definitions are designed to enable users to obtain information quickly and appropriately.
[0645] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. This system is particularly applicable as a customer support application for online shopping sites. Specific embodiments are described below.
[0646] System Overview
[0647] This system is primarily composed of a user, a terminal, and a server. The user inputs a question and sends it to the server via the terminal. The server processes the input question, generates an appropriate answer, and sends it to the terminal. The terminal then displays the received answer to the user.
[0648] Hardware and software used
[0649] Hardware: Smartphone (iPhone, Android)
[0650] Software: AWS (Amazon Web Services), TensorFlow (NLP model), Python (backend), React Native (frontend)
[0651] Data processing and calculation flow
[0652] 1. Accepting questions
[0653] Users type their questions into a chat box within the smartphone app.
[0654] Example: "Can you tell me about discounts on new products?"
[0655] 2. Sending a text
[0656] The device sends the questions entered by the user to AWS servers.
[0657] 3. Question Preprocessing
[0658] The server preprocesses the received text with a Python script.
[0659] Grammar correction, removal of unnecessary characters and spaces, tokenization, and removal of stop words.
[0660] 4. Question Intention Analysis
[0661] The server uses TensorFlow to preprocess the text and parse it with an NLP model.
[0662] Extraction of key keywords and phrases.
[0663] Examples: "New products" and "Discount information"
[0664] 5. Finding Answers
[0665] The server searches the database based on the extracted keywords to identify related FAQs and product information.
[0666] 6. Answer Generation
[0667] The server uses templates to generate answers in a user-friendly format.
[0668] For example: "We don't currently have any new product discounts, but we'll let you know when our next sale is."
[0669] 7. Submit your response
[0670] The server sends the generated answer from the AWS server to the smartphone app.
[0671] 8. View Answers
[0672] The terminal displays the received response in a chat box and provides it to the user.
[0673] Example: If a user asks, "How do I cancel an order?" the app might respond with, "To cancel, visit your account page, select 'Order History,' select the order you want to cancel, and click the 'Cancel' button."
[0674] 9. Log storage
[0675] The server stores the questions and generated answers as a log.
[0676] This allows for later analysis and system improvement.
[0677] Prompt Sentence Examples
[0678] Here is an example of a prompt sentence to be input to the generative AI model when a user asks, "How do I cancel an order?":
[0679] Generate the best response to the user "How do I cancel my order?"
[0680] The above is an embodiment of the system of the present invention. This system allows users to receive prompt and accurate answers to their questions, making it possible to improve the efficiency of customer support operations at online shopping sites.
[0681] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0682] Step 1:
[0683] Accepting questions
[0684] Users type their questions into a chat box within the smartphone app, and the text is stored on the device.
[0685] Input: The question text entered by the user (e.g., "What are the discounts on new products?")
[0686] Output: Question text data
[0687] Step 2:
[0688] Sending a text
[0689] The device sends the stored text data to the server using the HTTPS protocol to ensure secure communication.
[0690] Input: Question text data (e.g., "Please tell me about discounts on new products.")
[0691] Output: Text data sent to the server
[0692] Step 3:
[0693] Question Preprocessing
[0694] The server preprocesses the received text data using Python scripts to correct grammar, remove unnecessary characters and spaces, tokenize, and remove stop words, producing text that is easy to parse.
[0695] Input: Received question text data
[0696] Output: Preprocessed text data (e.g., "New product discount information")
[0697] Step 4:
[0698] Question intent analysis
[0699] The server then analyzes the preprocessed text data with TensorFlow's NLP model, which extracts key keywords and phrases and interprets the intent of the question.
[0700] Input: Preprocessed text data (e.g., "New product discount information")
[0701] Output: Key keywords and intent information (e.g., "new product" or "discount information")
[0702] Step 5:
[0703] Find answers
[0704] The server searches the database based on the extracted keywords, identifies related FAQs and product information, and calculates a relevance score to obtain the most appropriate answer.
[0705] Input: Key keywords and intent information (e.g., "new product" or "discount information")
[0706] Output: The best answer found (e.g., "There are currently no discounts on new products, but we'll let you know when the next sale is.")
[0707] Step 6:
[0708] Generate answers
[0709] The server generates an answer text based on the searched answer data using a predetermined template.
[0710] Input: Searched best answer data
[0711] Output: Generated answer text (e.g., "We currently don't have any new product discounts, but we'll let you know when the next sale comes around.")
[0712] Step 7:
[0713] Submit your answer
[0714] The server sends the generated response text to the terminal, again using the HTTPS protocol.
[0715] Input: Generated answer text (e.g., "We don't currently have any new product discounts, but we'll let you know when our next sale is.")
[0716] Output: Answer text sent to the terminal
[0717] Step 8:
[0718] Show Answers
[0719] The terminal displays the received reply text in a chat box and provides it to the user, allowing the user to check the reply to their inquiry.
[0720] Input: Answer text sent to the device (e.g., "We currently have no new product discounts, but we'll let you know when the next sale comes around.")
[0721] Output: The answer text displayed to the user
[0722] Step 9:
[0723] Saving logs
[0724] The server logs the user's questions and the generated answers, and the log data is stored in a database for later analysis and system improvement.
[0725] Input: User question text and generated answer text
[0726] Output: Saved log data
[0727] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0728] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. In particular, the purpose is to improve the user experience by incorporating an emotion engine that recognizes the user's emotions and generates responses according to those emotions. Specific embodiments of the system of the present invention are described in detail below.
[0729] System configuration
[0730] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the user's input to the server. The server processes the input question and the user's emotions, generates an appropriate answer, and sends it to the terminal. The terminal displays the received answer to the user.
[0731] Processing from question reception to answer generation
[0732] 1. Questions accepted:
[0733] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[0734] 2. Sending a text:
[0735] The terminal sends the entered question text to the server as text data.
[0736] 3. Question preprocessing:
[0737] The server preprocesses the received text data, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[0738] 4. Question intent analysis:
[0739] The server uses an NLP engine to analyze the intent of the pre-processed text. This analysis extracts key keywords and phrases within the text. For example, keywords like "project" and "how to apply" are extracted.
[0740] 5. Emotion analysis:
[0741] The server analyzes the user's emotions using an emotion engine, which analyzes not only the question text but also the user's chat history to recognize the user's emotions.
[0742] 6. Finding answers:
[0743] The server searches the database for the most relevant FAQ entries based on the extracted keywords, calculating a relevance score to identify the most relevant answers.
[0744] 7. Generate answers:
[0745] The server uses templates to generate answers based on the searched FAQ entries in a format that is easy for the user to understand. It also adjusts the tone and content of the answer based on the analysis results of the emotion engine. For example, if the user is feeling anxious, it generates an answer in a reassuring tone.
[0746] 8. Submit your response:
[0747] The server transmits the generated answer text to the terminal.
[0748] 9. Show Answer:
[0749] The terminal displays the received answer on the chatbot interface and provides it to the user.
[0750] 10. Log storage:
[0751] The server stores the user's questions, generated answers, and user emotion data as logs, which can be later analyzed and used to improve the system.
[0752] Specific examples
[0753] For example, suppose a user inputs a question to the chatbot such as, "The project is delayed and I'm worried." The processing in this case will be specifically described below.
[0754] 1. The user types into the terminal, "I'm worried about the project being delayed."
[0755] 2. The terminal sends this question text to the server.
[0756] 3. The server preprocesses the received text and extracts the keywords "project," "delay," and "worry."
[0757] 4. The server uses an NLP engine to analyze the intent of the question and searches the database based on these keywords.
[0758] 5. The server uses the emotion engine to analyze the user's emotions and recognizes that the user has the emotion "worry."
[0759] 6. The server searches the relevant FAQ entries and selects the most appropriate answer.
[0760] 7. The server generates a response based on a template in a reassuring tone, such as "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as quickly as possible. You can follow the latest progress on our intranet."
[0761] 8. The server sends this response to the terminal.
[0762] 9. The terminal displays the received response to the user.
[0763] 10. The server stores the user's questions, generated answers, and user emotion data as logs.
[0764] The above is a specific embodiment for implementing the system of the present invention. By introducing an emotion engine, users can receive answers that take their emotions into consideration, which increases their satisfaction.
[0765] The processing flow will be explained below.
[0766] Step 1:
[0767] The user uses the chatbot interface to input a question into the device, for example, "I'm worried about the delay in my project."
[0768] Step 2:
[0769] The terminal receives the entered question text and confirms that the send button has been pressed.
[0770] Step 3:
[0771] The device sends the question text to the server. The text data is sent via a protocol such as an HTTP request or WebSocket.
[0772] Step 4:
[0773] The server acquires the text data received from the terminal.
[0774] Step 5:
[0775] The server performs preprocessing on the text data, which includes removing extra spaces and special characters, tokenizing, removing stop words, etc. This processing makes the text easier to parse.
[0776] Step 6:
[0777] The server then inputs the preprocessed text data into a natural language processing (NLP) engine to analyze the intent of the question. This analysis involves extracting key keywords and phrases within the text. For example, keywords like "project," "delay," and "worry" are extracted.
[0778] Step 7:
[0779] The server searches the database for relevant FAQ entries based on the keywords extracted by the NLP engine, and a search algorithm calculates a relevance score to identify the most relevant answers.
[0780] Step 8:
[0781] The server uses an emotion engine to analyze the pre-processed text data and recognize the user's emotion, for example, the emotion "worry."
[0782] Step 9:
[0783] The server adjusts the tone and content of the response based on the analysis results of the emotion engine: if the user is anxious, it generates a response with a reassuring tone.
[0784] Step 10:
[0785] The server uses templates based on the most relevant FAQ entry to generate an answer in an easy-to-understand format, such as "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as quickly as possible. You can follow the latest progress on our intranet."
[0786] Step 11:
[0787] The server transmits the generated answer text to the terminal.
[0788] Step 12:
[0789] The terminal displays the received response text on the chatbot interface.
[0790] Step 13:
[0791] The user checks the displayed answers and, if necessary, enters further questions or decides on an action.
[0792] Step 14:
[0793] The server stores the user's questions, generated answers, and user emotion data as logs, which are then stored in a database for later analysis and system improvement.
[0794] Example 2
[0795] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0796] Conventional chatbot systems generate standardized responses without considering the user's emotions, resulting in low user satisfaction. Furthermore, no systems exist that accurately analyze the user's emotions during the response generation process and adjust the tone and content accordingly. This results in a lack of improvement in the user experience and an inability to provide effective support.
[0797] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for receiving a question from a user, means for performing natural language processing based on the received question to analyze the intention of the question, means for analyzing the analyzed intention and the user's emotions, means for searching a database for an optimal answer based on the analyzed intention and emotions, means for generating the searched answer using a template in a format that is easy for the user to understand, means for sending the generated answer to the user, and means for saving the question from the user, the generated answer, and the user's emotional data as a log. This enables an appropriate response that takes the user's emotions into consideration, improving the user experience.
[0798] A "user" is someone who accesses the system and enters a question.
[0799] "Terminal" refers to the device used by a user to access the system, including PCs, smartphones, tablets, etc.
[0800] "Server" refers to a central computer system for receiving and analyzing user questions, and generating and transmitting answers.
[0801] The "means for receiving questions" refers to a function for causing the server to receive questions input by the user via the terminal.
[0802] "Natural language processing means" refers to technology for preprocessing received questions and analyzing the intent of the questions.
[0803] "Sentiment analysis means" refers to technology for analyzing a user's input text and chat history to identify the user's emotions.
[0804] "Answer retrieval means" refers to a function for retrieving the best answer from a database based on the analyzed intention and emotion.
[0805] A "template" refers to a predefined format used to generate an answer.
[0806] "Answer generation means" refers to a function for generating the searched answer using a template in a format that is easy for the user to understand.
[0807] "Answer sending means" refers to a function for sending the generated answer to the user's terminal.
[0808] The "log storage means" refers to a function for storing user questions, generated answers, and analyzed emotion data as records.
[0809] "Database" refers to a data structure that stores question and answer pairs used for answer search.
[0810] The present invention relates to a chatbot system that provides quick and appropriate answers to user questions, and aims to improve the user experience by recognizing the user's emotions and generating responses that match those emotions. The system of the present invention is composed of a user, a terminal, and a server.
[0811] System configuration
[0812] The system for implementing the invention comprises the following main components:
[0813] 1. User - Accesses the system and enters a question.
[0814] 2. Terminal - A device that receives input from a user and sends it to a server. Examples include PCs, smartphones, and tablets.
[0815] 3. Server - A central computer system that processes the entered questions, analyzes intent and sentiment, and generates appropriate answers to send to the device.
[0816] The process from receiving a question to generating an answer
[0817] Accepting questions
[0818] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[0819] Sending a text
[0820] The device sends the text data of the entered question to the server using an HTTP POST request over the Internet.
[0821] Question Preprocessing
[0822] The server performs various pre-processing steps on the received text data. The software used includes text processing libraries (e.g., NLTK, spaCy). The pre-processing steps include the following:
[0823] Grammar check and correction
[0824] Remove unnecessary characters and spaces
[0825] Tokenization
[0826] Stop word removal
[0827] Question intent analysis
[0828] The server analyzes the preprocessed text using an NLP engine (e.g., Google BERT, OpenAI GPT). The specific processing includes:
[0829] Keyword extraction
[0830] Text Classification
[0831] Emotion analysis
[0832] The server analyzes the user's emotions using an emotion engine (e.g., Affectiva, IBM Watson), which analyzes the question text and past chat history to identify the user's emotions.
[0833] Find answers
[0834] The server searches for answers from a database based on the parsed intent and sentiment, and identifies the most suitable FAQ entry through a relevance calculation. Databases used include relational databases (e.g., MySQL, PostgreSQL).
[0835] Generate answers
[0836] The server generates answers using templates based on the searched FAQ entries, using generative AI models (e.g., OpenAI GPT) to adjust tone and content depending on the emotion. For example, if the user is anxious, the answer will be generated in a reassuring tone.
[0837] Submit your answer
[0838] The server then sends the generated response to the device, using an HTTP POST request.
[0839] Show Answers
[0840] The terminal displays the received answer on the chatbot interface, through which the user can confirm the answer.
[0841] Saving logs
[0842] The server stores user questions, generated answers, and sentiment data as logs, which are used for later analysis and system improvement. The data is managed in a log management system (e.g., ELK Stack).
[0843] Specific examples
[0844] For example, if a user asks, "I'm worried because the project is delayed," the server preprocesses the text "I'm worried because the project is delayed" and extracts the keywords "project," "delay," and "worry." The emotion engine recognizes that the user has the emotion "worry." The server then searches the database for relevant FAQ entries and generates a response in a tone similar to, "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as soon as possible. You can follow the latest progress on our intranet."
[0845] Examples of prompts:
[0846] Generate an appropriate, emotionally relevant response when a user asks, "I'm worried about the project being delayed."
[0847] The above is an embodiment of the system of the present invention, which makes it possible to provide a response that takes into account the user's emotions and improve the user experience.
[0848] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0849] Step 1: The user opens the chatbot interface. The user enters a question as text into the terminal. The input is in the form of, for example, "How do I apply for a new project?" Input data: The question text entered by the user. Output data: The question text received by the terminal.
[0850] Step 2: The device sends the received question text to the server. Specifically, it sends the text data to the server using an HTTP POST request. Input data: The question text entered by the user on the device. Output data: The text data received by the server.
[0851] Step 3: The server preprocesses the received question text. Specific operations include grammar checking and correction, removing unnecessary characters and spaces, tokenization, and removing stop words. Input data: Raw text data received by the server. Output data: Preprocessed text data in a format that can be analyzed.
[0852] Step 4: The server analyzes the intent of the preprocessed text data. It uses an NLP engine to extract keywords and key phrases. Specifically, natural language processing models such as Google BERT and OpenAI GPT are used. Input data: Preprocessed text data. Output data: Data showing the extracted keywords and intent.
[0853] Step 5: The server analyzes the user's emotions. An emotion engine (e.g., Affectiva or IBM Watson) is used to analyze the question text and past chat history to recognize the user's emotions. Input data: preprocessed text data and chat history. Output data: data indicating the user's emotions.
[0854] Step 6: The server searches the database for the best answer based on the parsed intent and sentiment. It performs a relevance calculation to identify the most relevant FAQ entry. Databases used include MySQL and PostgreSQL. Input data: keywords, phrases, and user sentiment data. Output data: the best FAQ entry.
[0855] Step 7: The server generates an answer based on the FAQ entry. It uses templates to create an easy-to-understand answer and adjusts the emotional tone as needed. It uses a generative AI model (e.g., OpenAI GPT). Input data: FAQ entry, template, and user emotional data. Output data: Generated answer text.
[0856] Step 8: The server sends the generated answer text to the terminal. Again, data is sent using an HTTP POST request. Input data: The generated answer text. Output data: The answer text received by the terminal.
[0857] Step 9: The terminal displays the received answer on the chatbot interface. To display it on the interface, the text data is converted into a visually easy-to-read format. Input data: The received answer text. Output data: The answer displayed on the chatbot interface.
[0858] Step 10: The server saves the user's question, generated answer, and user sentiment data as a log. This can be used for future analysis and system improvement. Examples of systems used include log management systems such as ELK Stack. Input data: question text, generated answer text, sentiment data. Output data: data saved as a log.
[0859] (Application example 2)
[0860] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0861] Conventional chatbot systems can provide quick answers to user questions, but they are unable to generate responses that take the user's emotions into account, resulting in a poor user experience. In particular, in virtual stores and other situations where responses that take the user's emotions into consideration are required, existing systems are unable to sufficiently improve user satisfaction. The present invention aims to improve the user experience by providing quick, appropriate responses to user questions that reflect the user's emotions.
[0862] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[0863] In this invention, the server includes means for receiving a user's question, means for performing natural language processing based on the received question and analyzing the intent of the question, means for analyzing the user's emotion, means for searching a database for an answer corresponding to the analyzed intent, means for generating the searched answer in text format, means for adjusting the tone and content of the answer based on the emotion analysis result, means for sending the generated answer to the user, and means for saving the user's question and the generated answer as a log, thereby making it possible to provide a quick and appropriate response that takes into consideration the user's emotion.
[0864] The "means for receiving a question from a user" refers to a device or software that has the function of transmitting a question entered by a user to the system via a terminal and receiving the question data.
[0865] "Means for performing natural language processing and analyzing the intent of a question" refers to a device or software that has the function of analyzing the received question text, understanding its content and meaning, and identifying the intent of the question.
[0866] "Means for searching a database for an answer corresponding to the analyzed intent" refers to a device or software that has the function of finding an appropriate answer from a database based on the analysis results.
[0867] The "means for generating the searched answer in text format" refers to a device or software that has the function of converting the searched answer information into a text format that is easy for the user to understand.
[0868] The "means for sending the generated answer to the user" is a device or software having a function for returning the generated answer text to the user.
[0869] "Means for saving user questions and generated answers as a log" refers to a device or software that has the function of recording and saving the questions entered by users and the answers generated in response to them.
[0870] The "emotion analysis means" is a device or software that has the function of analyzing the user's question text and related data and determining the user's emotional state.
[0871] "Means for adjusting the tone and content of responses based on the results of emotion analysis" refers to a device or software that has the function of changing the content of responses and the way they are expressed depending on the user's emotions obtained through emotion analysis.
[0872] The present invention relates to a chatbot system for quickly and appropriately responding to user questions, and aims to improve the user experience by recognizing the user's emotions and generating responses according to those emotions. Specific embodiments of the present invention are described in detail below.
[0873] System Configuration
[0874] This chatbot system is mainly composed of a terminal that receives questions from users, a server that processes the questions, and a terminal that provides answers to users. Each component is described in detail below.
[0875] Hardware and Software Use
[0876] Hardware
[0877] General-purpose PC (CPU, memory)
[0878] software
[0879] Python 3.x: Programming Language
[0880] NLTK Library: A library for natural language processing and sentiment analysis
[0881] Transformers Library: Generative AI Models for Question Answering
[0882] Specific functions and processes
[0883] 1. Receive a user question
[0884] The user uses a terminal to input and send a question to the chatbot interface, which is sent in text format.
[0885] 2. Question preprocessing and intent analysis
[0886] The server preprocesses the received question text, which includes grammar correction, removal of unnecessary characters and spaces, tokenization, and removal of stop words. The server then uses a natural language processing (NLP) engine to analyze the intent of the question.
[0887] 3. Emotion Analysis
[0888] After the NLP engine analysis, the server uses a sentiment analysis engine to analyze the user's emotions, determining their emotional state based on the question text and the user's past chat history.
[0889] 4. Searching for answers in a database
[0890] Based on the analyzed intent and extracted keywords, the server searches a relevant database to identify the appropriate answer.
[0891] 5. Generating Emotion-Based Answers
[0892] The server takes into account the results of the emotion analysis and uses templates to generate answers in a format that is easy for the user to understand. For example, if the user has negative emotions, the server generates answers in a tone that reassures the user.
[0893] 6. Submitting answers and saving logs
[0894] The generated answers are sent from the server to the terminal and presented to the user through the chatbot interface. The user's questions and the generated answers are also saved as logs for later analysis and system improvement.
[0895] Specific examples
[0896] As a concrete example, consider the case where a user enters the question, "I'm frustrated because the product I purchased is late in arriving." In this case, the server extracts the keywords "purchase," "product," "arrival," "delay," and "frustration," and uses a sentiment analysis engine to recognize that the user's emotions are negative. It then searches the database for an appropriate response and generates a response that takes the user's emotions into consideration, such as, "We apologize for the inconvenience. We are currently checking the delivery status."
[0897] Prompt example
[0898] User: "I'm frustrated with the delay in receiving my purchase."
[0899] Example inputs to a generative AI model:
[0900] "I'm frustrated that the item I purchased is late in arriving."
[0901] As described above, the present invention aims to realize a chatbot system that takes into consideration the user's feelings and provides quick and appropriate answers.
[0902] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0903] Step 1:
[0904] A user uses a terminal to input a question into the chatbot interface and submits it. The input text is sent by the terminal to the server.
[0905] Input: User question text
[0906] Output: Question data sent to the server
[0907] Step 2:
[0908] The server preprocesses the received question text, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[0909] Input: Question text
[0910] Output: Preprocessed text
[0911] Step 3:
[0912] The server uses a natural language processing (NLP) engine to analyze the intent of the question based on the preprocessed text, extracting key keywords and phrases and identifying the meaning of the question.
[0913] Input: Preprocessed text
[0914] Output: Extracted keywords and phrases
[0915] Step 4:
[0916] The server uses a sentiment analysis engine to analyze the user's sentiment from the question text and related data, and the user's emotional state (positive, negative, neutral) is determined.
[0917] Input: Question text and related data (e.g. chat history)
[0918] Output: Emotion analysis results
[0919] Step 5:
[0920] The server searches the database based on the extracted keywords to find relevant answers, retrieving relevant FAQ entries and information.
[0921] Input: Extracted keywords
[0922] Output: Searched answer data
[0923] Step 6:
[0924] The server generates a response text using a template based on the searched response data. At the same time, the tone and content of the response are adjusted based on the results of sentiment analysis. For example, if the user expresses negative emotions, the reply will have a reassuring tone.
[0925] Input: Searched response data and sentiment analysis results
[0926] Output: Adjusted answer text
[0927] Step 7:
[0928] The server sends the generated answer text to the terminal, which then displays the received answer on the chatbot interface and provides it to the user.
[0929] Input: Adjusted answer text
[0930] Output: The answer that is displayed to the user
[0931] Step 8:
[0932] The server stores user questions, generated answers, and sentiment analysis results as logs, allowing for later analysis and system improvement.
[0933] Input: User question, generated answer, sentiment analysis results
[0934] Output: Saved log data
[0935] As described above, through the specific operations at each step, an appropriate answer that takes into consideration the user's feelings is provided to the user's question.
[0936] The specific processing unit 290 transmits the result of the specific processing to the smart glasses 214. In the smart glasses 214, the control unit 46A causes the speaker 240 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0937] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0938] In the above embodiment, an example in which the specific processing is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the smart glasses 214.
[0939] [Third embodiment]
[0940] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[0941] 5, the data processing system 310 includes the data processing device 12 and a headset type terminal 314. An example of the data processing device 12 is a server.
[0942] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0943] The headset type terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the display 343 are also connected to the bus 52.
[0944] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0945] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0946] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0947] Fig. 6 shows an example of the main functions of the data processing device 12 and the headset type terminal 314. As shown in Fig. 6, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0948] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0949] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0950] In the headset type terminal 314, a reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0951] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the headset type terminal 314 will be referred to as the "terminal."
[0952] The present invention relates to a chatbot system for quickly and appropriately responding to questions from users. This system uses NLP technology to analyze questions entered in natural language and provide appropriate answers. An embodiment of the system of the present invention will be described in detail below.
[0953] System configuration
[0954] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the input from the user to the server. The server processes the input question, generates an appropriate answer, and sends it to the terminal. The terminal displays the received answer to the user.
[0955] Processing from question reception to answer generation
[0956] 1. Questions accepted:
[0957] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[0958] 2. Sending a text:
[0959] The terminal sends the entered question to the server as text data.
[0960] 3. Question preprocessing:
[0961] The server preprocesses the received text data, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[0962] 4. Question intent analysis:
[0963] The server uses an NLP engine to analyze the intent of the pre-processed text, extracting key keywords and phrases within the text, such as "project" and "how to apply."
[0964] 5. Finding answers:
[0965] The server searches the database for the most relevant FAQ entries based on the extracted keywords, calculating a relevance score to identify the most relevant answers.
[0966] 6. Generate answers:
[0967] The server uses templates to generate user-friendly answers from the retrieved FAQ entries, such as "The instructions for submitting a new project are on the project management page on our intranet. Here are the steps..."
[0968] 7. Submit your response:
[0969] The server sends the generated response to the terminal.
[0970] 8. Show Answer:
[0971] The terminal displays the received answer on the chatbot interface and provides it to the user.
[0972] 9. Log storage:
[0973] The server logs user questions and generated answers, allowing for later analysis and system improvement.
[0974] Specific examples
[0975] For example, suppose a user inputs a question to the chatbot such as "Please tell me the procedure for applying for vacation." The processing in this case will be explained in detail below.
[0976] 1. The user types "Please tell me how to apply for vacation" into the terminal.
[0977] 2. The terminal sends this question text to the server.
[0978] 3. The server preprocesses the received text and extracts the keywords "leave application" and "procedure."
[0979] 4. The server searches the database for FAQs related to "vacation request procedures."
[0980] 5. The server generates the appropriate response based on the template, such as "The procedure for applying for leave is as follows. Please access the leave application page on the intranet and fill in the required information."
[0981] 6. The server sends this response to the terminal.
[0982] 7. The terminal displays the received response to the user.
[0983] 8. The server stores a log of the user's questions and the generated answers.
[0984] The above is a specific embodiment for implementing the system of the present invention, which allows users to obtain quick and accurate answers to their questions and improves work efficiency.
[0985] The processing flow will be explained below.
[0986] Step 1:
[0987] A user accesses the chatbot interface and enters a question, for example, "How do I apply for a new project?"
[0988] Step 2:
[0989] The terminal receives the entered question text and confirms that the send button has been pressed.
[0990] Step 3:
[0991] The device sends the question text to the server. The text data is sent via a protocol such as an HTTP request or WebSocket.
[0992] Step 4:
[0993] The server acquires the text data received from the terminal.
[0994] Step 5:
[0995] The server preprocesses the text data, such as removing extra spaces and special characters, tokenizing it, and removing stop words.
[0996] Step 6:
[0997] The server inputs the preprocessed text data into a natural language processing (NLP) engine to analyze the intent of the question, for example, extracting keywords such as "project" and "application method."
[0998] Step 7:
[0999] The server searches the database for relevant FAQ entries based on the extracted keywords, and a search algorithm calculates a relevance score.
[1000] Step 8:
[1001] The server identifies the most relevant FAQ entry and retrieves its contents.
[1002] Step 9:
[1003] Based on the FAQ entries it retrieves, the server uses templates to generate easy-to-understand answers, such as "New project submissions are detailed on the project management page on our intranet. Here are the steps..."
[1004] Step 10:
[1005] The server transmits the generated answer text to the terminal.
[1006] Step 11:
[1007] The terminal displays the received response text on the chatbot interface.
[1008] Step 12:
[1009] The user checks the displayed answers and takes the next action if necessary.
[1010] Step 13:
[1011] The server logs user questions and generated answers, which are then stored in a database for later analysis and system improvement.
[1012] Example 1
[1013] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1014] Conventional chatbot systems have problems such as delayed responses to user questions and inaccurate analysis of intent, resulting in inappropriate answers. Furthermore, there is a lack of consistency in text preprocessing, intent analysis, and answer generation, leading to a poor user experience. Furthermore, logs are not stored properly, making subsequent analysis and system improvements difficult.
[1015] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1016] In this invention, the server includes a means for preprocessing received questions, removing unnecessary characters, and tokenizing the questions, a means for performing natural language processing based on the preprocessed questions to analyze the intent of the questions, and a means for searching data storage for answers corresponding to the analyzed intent. This enables a prompt and appropriate response to user questions and accurate answer generation. Furthermore, storing questions and answers in log storage facilitates subsequent analysis and system improvement.
[1017] "User" refers to an individual or organization that uses the system.
[1018] A "terminal" is an electronic device that a user uses to input a question and send it to a server.
[1019] A "server" is a computer system whose role is to process information received from a user, generate an appropriate response, and send it to the terminal.
[1020] "Preprocessing" refers to the process of removing unnecessary characters and spaces from the question text and tokenizing it.
[1021] "Tokenization" is the process of dividing text into meaningful units such as words and phrases.
[1022] "Natural language processing" is a technology that allows computers to understand and analyze human language.
[1023] "Intent analysis" is the process of extracting key keywords and phrases to understand the intent of a user's text.
[1024] "Data storage" refers to a storage medium in which data for searching answers is stored in advance.
[1025] A "template" is a fixed format used when generating an answer.
[1026] "Text format" refers to string information that is formatted for easy reading.
[1027] "Log storage" is a recording medium for storing user questions and generated answers.
[1028] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. This system is composed of a server, a terminal, and a user who uses these. Specifically, its main function is to analyze user questions using natural language processing technology and provide appropriate answers. An embodiment of the system of the present invention is described in detail below.
[1029] System configuration
[1030] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the user's input to the server. The server processes the input question, generates an appropriate answer, and sends it to the terminal, which then displays the received answer to the user. At the same time, the server saves the question and the generated answer in log storage.
[1031] Hardware and software used
[1032] The system of the present invention uses the following hardware and software:
[1033] Hardware: General computers and servers, and devices that users access (e.g., PCs, smartphones, tablets)
[1034] Software: Natural language processing libraries (e.g., SpaCy, NLTK), database management systems (e.g., MySQL), template engines (e.g., Jinja2), log management systems, communication libraries (e.g., Python's requests library)
[1035] Processing flow and specific examples
[1036] How the system works will be explained using a concrete example.
[1037] For example, if a user wants to ask a chatbot, "How do I request vacation?", the user first accesses the chatbot interface using a device, types the question using the keyboard, and clicks the submit button. The process then goes as follows:
[1038] The device sends the entered question to the server, converting the text data into an appropriate format (e.g., JSON) and sending it as an HTTP request.
[1039] The server preprocesses the received text data, including grammar correction, removal of unnecessary characters and spaces, tokenization, and stop-word removal. A natural language processing library (e.g., SpaCy) is used to parse the text and extract key keywords and phrases ("vacation request", "procedure").
[1040] Next, the server searches for FAQ entries from a database (e.g., MySQL) based on the extracted keywords, calculates a relevance score, and identifies the most relevant entry. For example, it retrieves information corresponding to "vacation request procedure" from the database.
[1041] The server then uses a template engine (e.g., Jinja2) to format the retrieved entries into a user-friendly format based on a template, generating a response text, such as "The procedure for requesting vacation is as follows. Please visit the vacation request page on our intranet and fill out the required information."
[1042] The server then sends the generated answer to the terminal, which displays the received answer on the chatbot interface and provides it to the user. Finally, the server stores the question and the generated answer in log storage for later analysis and system improvement.
[1043] Prompt Sentence Examples
[1044] An example of a prompt sentence to be fed into a generative AI model (e.g., GPT-3) is as follows:
[1045] Prompt statement:
[1046] Please explain in detail the process flow when a user asks about the "vacation request procedure."
[1047] Expected Output:
[1048] When a user asks "How do I apply for vacation?", the system first receives the user's input and performs preprocessing. Then, it uses an NLP engine to analyze the intent, searches for relevant FAQs in the database, and generates an answer that is easy for the user to understand. Finally, the answer is displayed to the user, and the question and answer are saved as a log.
[1049] Using this prompt, the generative AI model generates a processing flow for the chatbot system to respond to the question.
[1050] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1051] Step 1:
[1052] The user inputs a question using the chatbot interface. Specifically, the user uses the keyboard to enter a question text such as "How do I apply for a new project?" and clicks the submit button.
[1053] Input: The question text entered by the user
[1054] Output: The question text is retrieved to the terminal.
[1055] Step 2:
[1056] The device sends the acquired question text to the server. Specifically, the question text is converted into an appropriate format (e.g., JSON) and sent as an HTTP request. This is often done using the Python requests library.
[1057] Input: The question text entered by the user
[1058] Output: The question text is formatted and sent to the server as an HTTP request.
[1059] Step 3:
[1060] The server preprocesses the text data received from the device, including correcting grammar, removing unnecessary characters and spaces, tokenizing (breaking the text into individual words), and removing stop words, using a natural language processing library (e.g., SpaCy or NLTK).
[1061] Input: The question text received by the server
[1062] Output: Preprocessed text data
[1063] Step 4:
[1064] The server uses the preprocessed text data to analyze the intent of the question through natural language processing. Specifically, it identifies key keywords and phrases in the text and understands the intent. This process uses an NLP engine (e.g., Google NLP API).
[1065] Input: Preprocessed text data
[1066] Output: Parsed intent and primary keywords
[1067] Step 5:
[1068] Based on the parsed intent, the server searches for the appropriate answer from its data storage, specifically by searching a FAQ database (e.g., MySQL) using key keywords and calculating a relevance score to identify the best entry.
[1069] Input: Parsed intent and primary keywords
[1070] Output: Searched answer data
[1071] Step 6:
[1072] The server generates the searched response data in text format based on a template. Specifically, it uses a template engine (e.g., Jinja2) to format it into a human-readable format. For example, it could produce a format like, "The procedure for applying for a new project is described on the project management page on the intranet. The procedure is as follows..."
[1073] Input: Searched answer data
[1074] Output: Formatted answer text
[1075] Step 7:
[1076] The server sends the generated response text to the terminal. Specifically, it sends the generated text as an HTTP response.
[1077] Input: Formatted answer text
[1078] Output: The answer text is sent to the terminal as an HTTP response.
[1079] Step 8:
[1080] The device displays the received response text on the chatbot interface and provides it to the user. Specifically, it uses JavaScript to update the UI and display the new text in the chat window.
[1081] Input: Received response text
[1082] Output: Reply text displayed in the chat window
[1083] Step 9:
[1084] The server logs user questions and generated answers, and executes SQL queries to store question-answer pairs in a database for later analysis and system improvement.
[1085] Input: Question and answer pairs
[1086] Output: Log data saved in data storage
[1087] (Application example 1)
[1088] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1089] On traditional online shopping sites, users had to contact customer support by phone or email to inquire about product information or the status of their orders. This method was time-consuming and resulted in a poor user experience. It also placed a heavy burden on customer support staff, resulting in delayed responses. This created a growing need for a system that could respond to user questions quickly and appropriately.
[1090] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[1091] In this invention, the server includes means for receiving questions from users, means for performing natural language processing based on the received questions to analyze the intent of the questions, means for searching a database for answers corresponding to the analyzed intent, means for generating the searched answers in text format, means for sending the generated answers to the users, means for displaying the generated answers on the user terminal, and means for saving the questions from the users and the generated answers as logs, thereby enabling users to quickly check information on products they are interested in and the status of their orders.
[1092] A "user" is an individual or entity that utilizes the system to enter questions and receive answers.
[1093] A "terminal" is a device that sends a question entered by a user to a server and displays the answer received from the server to the user. Examples include a smartphone and a tablet.
[1094] A "server" is a computer system that executes a series of processes, including receiving a question from a user, performing natural language processing, analyzing the intent of the question, generating an appropriate answer, and sending it to the user terminal.
[1095] "Natural language processing" is a technology that allows computers to understand and analyze human language, and is used to analyze the intent of questions entered by users.
[1096] "Question intent" refers to the true purpose and information sought behind the question entered by the user.
[1097] A "database" is a data storage system that systematically stores answers and information corresponding to questions and manages them in a searchable format.
[1098] "Text format" is a format in which the answer provided to the user is expressed as character data.
[1099] A "log" is data that records user questions and generated answers in chronological order and is saved in a format that can be referenced and analyzed later.
[1100] Systems built on these definitions are designed to enable users to obtain information quickly and appropriately.
[1101] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. This system is particularly applicable as a customer support application for online shopping sites. Specific embodiments are described below.
[1102] System Overview
[1103] This system mainly consists of a user, a terminal, and a server. The user inputs a question and sends it to the server via the terminal. The server processes the input question, generates an appropriate answer, and sends it to the terminal. The terminal displays the received answer to the user.
[1104] Hardware and software used
[1105] Hardware: Smartphone (iPhone, Android)
[1106] Software: AWS (Amazon Web Services), TensorFlow (NLP model), Python (backend), React Native (frontend)
[1107] Data processing and calculation flow
[1108] 1. Accepting questions
[1109] Users type their questions into a chat box within the smartphone app.
[1110] Example: "Can you tell me about discounts on new products?"
[1111] 2. Sending a text
[1112] The device sends the questions entered by the user to AWS servers.
[1113] 3. Question Preprocessing
[1114] The server preprocesses the received text with a Python script.
[1115] Grammar correction, removal of unnecessary characters and spaces, tokenization, and removal of stop words.
[1116] 4. Question Intention Analysis
[1117] The server uses TensorFlow to preprocess the text and parse it with an NLP model.
[1118] Extraction of key keywords and phrases.
[1119] Examples: "New products" and "Discount information"
[1120] 5. Finding Answers
[1121] The server searches the database based on the extracted keywords to identify related FAQs and product information.
[1122] 6. Answer Generation
[1123] The server uses templates to generate answers in a user-friendly format.
[1124] For example: "We don't currently have any new product discounts, but we'll let you know when our next sale is."
[1125] 7. Submit your response
[1126] The server sends the generated answer from the AWS server to the smartphone app.
[1127] 8. View Answers
[1128] The terminal displays the received response in a chat box and provides it to the user.
[1129] Example: If a user asks, "How do I cancel an order?" the app might respond with, "To cancel, visit your account page, select 'Order History,' select the order you want to cancel, and click the 'Cancel' button."
[1130] 9. Log storage
[1131] The server stores the questions and generated answers as a log.
[1132] This allows for later analysis and system improvement.
[1133] Prompt Sentence Examples
[1134] Here is an example of a prompt sentence to be input to the generative AI model when a user asks, "How do I cancel an order?":
[1135] Generate the best response to the user "How do I cancel my order?"
[1136] The above is an embodiment of the system of the present invention. This system allows users to receive prompt and accurate answers to their questions, making it possible to improve the efficiency of customer support operations at online shopping sites.
[1137] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1138] Step 1:
[1139] Accepting questions
[1140] Users type their questions into a chat box within the smartphone app, and the text is stored on the device.
[1141] Input: The question text entered by the user (e.g., "What are the discounts on new products?")
[1142] Output: Question text data
[1143] Step 2:
[1144] Sending a text
[1145] The device sends the stored text data to the server using the HTTPS protocol to ensure secure communication.
[1146] Input: Question text data (e.g., "Please tell me about discounts on new products.")
[1147] Output: Text data sent to the server
[1148] Step 3:
[1149] Question Preprocessing
[1150] The server preprocesses the received text data using Python scripts to correct grammar, remove unnecessary characters and spaces, tokenize, and remove stop words, producing text that is easy to parse.
[1151] Input: Received question text data
[1152] Output: Preprocessed text data (e.g., "New product discount information")
[1153] Step 4:
[1154] Question intent analysis
[1155] The server then analyzes the preprocessed text data with TensorFlow's NLP model, which extracts key keywords and phrases and interprets the intent of the question.
[1156] Input: Preprocessed text data (e.g., "New product discount information")
[1157] Output: Key keywords and intent information (e.g., "new product" or "discount information")
[1158] Step 5:
[1159] Find answers
[1160] The server searches the database based on the extracted keywords, identifies related FAQs and product information, and calculates a relevance score to obtain the most appropriate answer.
[1161] Input: Key keywords and intent information (e.g., "new product" or "discount information")
[1162] Output: The best answer found (e.g., "There are currently no discounts on new products, but we'll let you know when the next sale is.")
[1163] Step 6:
[1164] Generate answers
[1165] The server generates an answer text based on the searched answer data using a predetermined template.
[1166] Input: Searched best answer data
[1167] Output: Generated answer text (e.g., "We currently don't have any new product discounts, but we'll let you know when the next sale comes around.")
[1168] Step 7:
[1169] Submit your answer
[1170] The server sends the generated response text to the terminal, again using the HTTPS protocol.
[1171] Input: Generated answer text (e.g., "We don't currently have any new product discounts, but we'll let you know when our next sale is.")
[1172] Output: Answer text sent to the terminal
[1173] Step 8:
[1174] Show Answers
[1175] The terminal displays the received reply text in a chat box and provides it to the user, allowing the user to check the reply to their inquiry.
[1176] Input: Answer text sent to the device (e.g., "We currently have no new product discounts, but we'll let you know when the next sale comes around.")
[1177] Output: The answer text displayed to the user
[1178] Step 9:
[1179] Saving logs
[1180] The server logs the user's questions and the generated answers, and the log data is stored in a database for later analysis and system improvement.
[1181] Input: User question text and generated answer text
[1182] Output: Saved log data
[1183] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[1184] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. In particular, the purpose is to improve the user experience by incorporating an emotion engine that recognizes the user's emotions and generates responses according to those emotions. Specific embodiments of the system of the present invention are described in detail below.
[1185] System configuration
[1186] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the user's input to the server. The server processes the input question and the user's emotions, generates an appropriate answer, and sends it to the terminal. The terminal displays the received answer to the user.
[1187] Processing from question reception to answer generation
[1188] 1. Questions accepted:
[1189] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[1190] 2. Sending a text:
[1191] The terminal sends the entered question text to the server as text data.
[1192] 3. Question preprocessing:
[1193] The server preprocesses the received text data, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[1194] 4. Question intent analysis:
[1195] The server uses an NLP engine to analyze the intent of the pre-processed text. This analysis extracts key keywords and phrases within the text. For example, keywords like "project" and "how to apply" are extracted.
[1196] 5. Emotion analysis:
[1197] The server analyzes the user's emotions using an emotion engine, which analyzes not only the question text but also the user's chat history to recognize the user's emotions.
[1198] 6. Finding answers:
[1199] The server searches the database for the most relevant FAQ entries based on the extracted keywords, calculating a relevance score to identify the most relevant answers.
[1200] 7. Generate answers:
[1201] The server uses templates to generate answers based on the searched FAQ entries in a format that is easy for the user to understand. It also adjusts the tone and content of the answer based on the analysis results of the emotion engine. For example, if the user is feeling anxious, it generates an answer in a reassuring tone.
[1202] 8. Submit your response:
[1203] The server transmits the generated answer text to the terminal.
[1204] 9. Show Answer:
[1205] The terminal displays the received answer on the chatbot interface and provides it to the user.
[1206] 10. Log storage:
[1207] The server stores the user's questions, generated answers, and user emotion data as logs, which can be later analyzed and used to improve the system.
[1208] Specific examples
[1209] For example, suppose a user inputs a question to the chatbot such as, "The project is delayed and I'm worried." The processing in this case will be specifically described below.
[1210] 1. The user types into the terminal, "I'm worried about the project being delayed."
[1211] 2. The terminal sends this question text to the server.
[1212] 3. The server preprocesses the received text and extracts the keywords "project," "delay," and "worry."
[1213] 4. The server uses an NLP engine to analyze the intent of the question and searches the database based on these keywords.
[1214] 5. The server uses the emotion engine to analyze the user's emotions and recognizes that the user has the emotion "worry."
[1215] 6. The server searches the relevant FAQ entries and selects the most appropriate answer.
[1216] 7. The server generates a response based on a template in a reassuring tone, such as "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as quickly as possible. You can follow the latest progress on our intranet."
[1217] 8. The server sends this response to the terminal.
[1218] 9. The terminal displays the received response to the user.
[1219] 10. The server stores the user's questions, generated answers, and user emotion data as logs.
[1220] The above is a specific embodiment for implementing the system of the present invention. By introducing an emotion engine, users can receive answers that take their emotions into consideration, which increases their satisfaction.
[1221] The processing flow will be explained below.
[1222] Step 1:
[1223] The user uses the chatbot interface to input a question into the device, for example, "I'm worried about the delay in my project."
[1224] Step 2:
[1225] The terminal receives the entered question text and confirms that the send button has been pressed.
[1226] Step 3:
[1227] The device sends the question text to the server. The text data is sent via a protocol such as an HTTP request or WebSocket.
[1228] Step 4:
[1229] The server acquires the text data received from the terminal.
[1230] Step 5:
[1231] The server performs preprocessing on the text data, which includes removing extra spaces and special characters, tokenizing, removing stop words, etc. This processing makes the text easier to parse.
[1232] Step 6:
[1233] The server then inputs the preprocessed text data into a natural language processing (NLP) engine to analyze the intent of the question. This analysis involves extracting key keywords and phrases within the text. For example, keywords like "project," "delay," and "worry" are extracted.
[1234] Step 7:
[1235] The server searches the database for relevant FAQ entries based on the keywords extracted by the NLP engine, and a search algorithm calculates a relevance score to identify the most relevant answers.
[1236] Step 8:
[1237] The server uses an emotion engine to analyze the pre-processed text data and recognize the user's emotion, for example, the emotion "worry."
[1238] Step 9:
[1239] The server adjusts the tone and content of the response based on the analysis results of the emotion engine: if the user is anxious, it generates a response with a reassuring tone.
[1240] Step 10:
[1241] The server uses templates based on the most relevant FAQ entry to generate an answer in an easy-to-understand format, such as "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as quickly as possible. You can follow the latest progress on our intranet."
[1242] Step 11:
[1243] The server transmits the generated answer text to the terminal.
[1244] Step 12:
[1245] The terminal displays the received response text on the chatbot interface.
[1246] Step 13:
[1247] The user checks the displayed answers and, if necessary, enters further questions or decides on an action.
[1248] Step 14:
[1249] The server stores the user's questions, generated answers, and user emotion data as logs, which are then stored in a database for later analysis and system improvement.
[1250] Example 2
[1251] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1252] Conventional chatbot systems generate standardized responses without considering the user's emotions, resulting in low user satisfaction. Furthermore, no systems exist that accurately analyze the user's emotions during the response generation process and adjust the tone and content accordingly. This results in a lack of improvement in the user experience and an inability to provide effective support.
[1253] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for receiving a question from a user, means for performing natural language processing based on the received question to analyze the intention of the question, means for analyzing the analyzed intention and the user's emotions, means for searching a database for an optimal answer based on the analyzed intention and emotions, means for generating the searched answer using a template in a format that is easy for the user to understand, means for sending the generated answer to the user, and means for saving the question from the user, the generated answer, and the user's emotional data as a log. This enables an appropriate response that takes the user's emotions into consideration, improving the user experience.
[1254] A "user" is someone who accesses the system and enters a question.
[1255] "Terminal" refers to the device used by a user to access the system, including PCs, smartphones, tablets, etc.
[1256] "Server" refers to a central computer system for receiving and analyzing user questions, and generating and transmitting answers.
[1257] The "means for receiving questions" refers to a function for causing the server to receive questions input by the user via the terminal.
[1258] "Natural language processing means" refers to technology for preprocessing received questions and analyzing the intent of the questions.
[1259] "Sentiment analysis means" refers to technology for analyzing a user's input text and chat history to identify the user's emotions.
[1260] "Answer retrieval means" refers to a function for retrieving the best answer from a database based on the analyzed intention and emotion.
[1261] A "template" refers to a predefined format used to generate an answer.
[1262] "Answer generation means" refers to a function for generating the searched answer using a template in a format that is easy for the user to understand.
[1263] "Answer sending means" refers to a function for sending the generated answer to the user's terminal.
[1264] The "log storage means" refers to a function for storing user questions, generated answers, and analyzed emotion data as records.
[1265] "Database" refers to a data structure that stores question and answer pairs used for answer search.
[1266] The present invention relates to a chatbot system that provides quick and appropriate answers to user questions, and aims to improve the user experience by recognizing the user's emotions and generating responses that match those emotions. The system of the present invention is composed of a user, a terminal, and a server.
[1267] System configuration
[1268] The system for implementing the invention comprises the following main components:
[1269] 1. User - Accesses the system and enters a question.
[1270] 2. Terminal - A device that receives input from a user and sends it to a server. Examples include PCs, smartphones, and tablets.
[1271] 3. Server - A central computer system that processes the entered questions, analyzes intent and sentiment, and generates appropriate answers to send to the device.
[1272] The process from receiving a question to generating an answer
[1273] Accepting questions
[1274] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[1275] Sending a text
[1276] The device sends the text data of the entered question to the server using an HTTP POST request over the Internet.
[1277] Question Preprocessing
[1278] The server performs various pre-processing steps on the received text data. The software used includes text processing libraries (e.g., NLTK, spaCy). The pre-processing steps include the following:
[1279] Grammar check and correction
[1280] Remove unnecessary characters and spaces
[1281] Tokenization
[1282] Stop word removal
[1283] Question intent analysis
[1284] The server analyzes the preprocessed text using an NLP engine (e.g., Google BERT, OpenAI GPT). The specific processing includes:
[1285] Keyword extraction
[1286] Text Classification
[1287] Emotion analysis
[1288] The server analyzes the user's emotions using an emotion engine (e.g., Affectiva, IBM Watson), which analyzes the question text and past chat history to identify the user's emotions.
[1289] Find answers
[1290] The server searches for answers from a database based on the parsed intent and sentiment, and identifies the most suitable FAQ entry through a relevance calculation. Databases used include relational databases (e.g., MySQL, PostgreSQL).
[1291] Generate answers
[1292] The server generates answers using templates based on the searched FAQ entries, using generative AI models (e.g., OpenAI GPT) to adjust tone and content depending on the emotion. For example, if the user is anxious, the answer will be generated in a reassuring tone.
[1293] Submit your answer
[1294] The server then sends the generated response to the device, using an HTTP POST request.
[1295] Show Answers
[1296] The terminal displays the received answer on the chatbot interface, through which the user can confirm the answer.
[1297] Saving logs
[1298] The server stores user questions, generated answers, and sentiment data as logs, which are used for later analysis and system improvement. The data is managed in a log management system (e.g., ELK Stack).
[1299] Specific examples
[1300] For example, if a user asks, "I'm worried because the project is delayed," the server preprocesses the text "I'm worried because the project is delayed" and extracts the keywords "project," "delay," and "worry." The emotion engine recognizes that the user has the emotion "worry." The server then searches the database for relevant FAQ entries and generates a response in a tone similar to, "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as soon as possible. You can follow the latest progress on our intranet."
[1301] Examples of prompts:
[1302] Generate an appropriate, emotionally relevant response when a user asks, "I'm worried about the project being delayed."
[1303] The above is an embodiment of the system of the present invention, which makes it possible to provide a response that takes into account the user's emotions and improve the user experience.
[1304] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1305] Step 1: The user opens the chatbot interface. The user enters a question as text into the terminal. The input is in the form of, for example, "How do I apply for a new project?" Input data: The question text entered by the user. Output data: The question text received by the terminal.
[1306] Step 2: The device sends the received question text to the server. Specifically, it sends the text data to the server using an HTTP POST request. Input data: The question text entered by the user on the device. Output data: The text data received by the server.
[1307] Step 3: The server preprocesses the received question text. Specific operations include grammar checking and correction, removing unnecessary characters and spaces, tokenization, and removing stop words. Input data: Raw text data received by the server. Output data: Preprocessed text data in a format that can be analyzed.
[1308] Step 4: The server analyzes the intent of the preprocessed text data. It uses an NLP engine to extract keywords and key phrases. Specifically, natural language processing models such as Google BERT and OpenAI GPT are used. Input data: Preprocessed text data. Output data: Data showing the extracted keywords and intent.
[1309] Step 5: The server analyzes the user's emotions. An emotion engine (e.g., Affectiva or IBM Watson) is used to analyze the question text and past chat history to recognize the user's emotions. Input data: preprocessed text data and chat history. Output data: data indicating the user's emotions.
[1310] Step 6: The server searches the database for the best answer based on the parsed intent and sentiment. It performs a relevance calculation to identify the most relevant FAQ entry. Databases used include MySQL and PostgreSQL. Input data: keywords, phrases, and user sentiment data. Output data: the best FAQ entry.
[1311] Step 7: The server generates an answer based on the FAQ entry. It uses templates to create an easy-to-understand answer and adjusts the emotional tone as needed. It uses a generative AI model (e.g., OpenAI GPT). Input data: FAQ entry, template, and user emotional data. Output data: Generated answer text.
[1312] Step 8: The server sends the generated answer text to the terminal. Again, data is sent using an HTTP POST request. Input data: The generated answer text. Output data: The answer text received by the terminal.
[1313] Step 9: The terminal displays the received answer on the chatbot interface. To display it on the interface, the text data is converted into a visually easy-to-read format. Input data: The received answer text. Output data: The answer displayed on the chatbot interface.
[1314] Step 10: The server saves the user's question, generated answer, and user sentiment data as a log. This can be used for future analysis and system improvement. Examples of systems used include log management systems such as ELK Stack. Input data: question text, generated answer text, sentiment data. Output data: data saved as a log.
[1315] (Application example 2)
[1316] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1317] Conventional chatbot systems can provide quick answers to user questions, but they are unable to generate responses that take the user's emotions into account, resulting in a poor user experience. In particular, in virtual stores and other situations where responses that take the user's emotions into consideration are required, existing systems are unable to sufficiently improve user satisfaction. The present invention aims to improve the user experience by providing quick, appropriate responses to user questions that reflect the user's emotions.
[1318] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1319] In this invention, the server includes means for receiving a user's question, means for performing natural language processing based on the received question and analyzing the intent of the question, means for analyzing the user's emotion, means for searching a database for an answer corresponding to the analyzed intent, means for generating the searched answer in text format, means for adjusting the tone and content of the answer based on the emotion analysis result, means for sending the generated answer to the user, and means for saving the user's question and the generated answer as a log, thereby making it possible to provide a quick and appropriate response that takes into consideration the user's emotion.
[1320] The "means for receiving a question from a user" refers to a device or software that has the function of transmitting a question entered by a user to the system via a terminal and receiving the question data.
[1321] "Means for performing natural language processing and analyzing the intent of a question" refers to a device or software that has the function of analyzing the received question text, understanding its content and meaning, and identifying the intent of the question.
[1322] "Means for searching a database for an answer corresponding to the analyzed intent" refers to a device or software that has the function of finding an appropriate answer from a database based on the analysis results.
[1323] The "means for generating the searched answer in text format" refers to a device or software that has the function of converting the searched answer information into a text format that is easy for the user to understand.
[1324] The "means for sending the generated answer to the user" is a device or software having a function for returning the generated answer text to the user.
[1325] "Means for saving user questions and generated answers as a log" refers to a device or software that has the function of recording and saving the questions entered by users and the answers generated in response to them.
[1326] The "emotion analysis means" is a device or software that has the function of analyzing the user's question text and related data and determining the user's emotional state.
[1327] "Means for adjusting the tone and content of responses based on the results of emotion analysis" refers to a device or software that has the function of changing the content of responses and the way they are expressed depending on the user's emotions obtained through emotion analysis.
[1328] The present invention relates to a chatbot system for quickly and appropriately responding to user questions, and aims to improve the user experience by recognizing the user's emotions and generating responses according to those emotions. Specific embodiments of the present invention are described in detail below.
[1329] System Configuration
[1330] This chatbot system is mainly composed of a terminal that receives questions from users, a server that processes the questions, and a terminal that provides answers to users. Each component is described in detail below.
[1331] Hardware and Software Use
[1332] Hardware
[1333] General-purpose PC (CPU, memory)
[1334] software
[1335] Python 3.x: Programming Language
[1336] NLTK Library: A library for natural language processing and sentiment analysis
[1337] Transformers Library: Generative AI Models for Question Answering
[1338] Specific functions and processes
[1339] 1. Receive a user question
[1340] The user uses a terminal to input and send a question to the chatbot interface, which is sent in text format.
[1341] 2. Question preprocessing and intent analysis
[1342] The server preprocesses the received question text, which includes grammar correction, removal of unnecessary characters and spaces, tokenization, and removal of stop words. The server then uses a natural language processing (NLP) engine to analyze the intent of the question.
[1343] 3. Emotion Analysis
[1344] After the NLP engine analysis, the server uses a sentiment analysis engine to analyze the user's emotions, determining their emotional state based on the question text and the user's past chat history.
[1345] 4. Searching for answers in a database
[1346] Based on the analyzed intent and extracted keywords, the server searches a relevant database to identify the appropriate answer.
[1347] 5. Generating Emotion-Based Answers
[1348] The server takes into account the results of the emotion analysis and uses templates to generate answers in a format that is easy for the user to understand. For example, if the user has negative emotions, the server generates answers in a tone that reassures the user.
[1349] 6. Submitting answers and saving logs
[1350] The generated answers are sent from the server to the terminal and presented to the user through the chatbot interface. The user's questions and the generated answers are also saved as logs for later analysis and system improvement.
[1351] Specific examples
[1352] As a concrete example, consider the case where a user enters the question, "I'm frustrated because the product I purchased is late in arriving." In this case, the server extracts the keywords "purchase," "product," "arrival," "delay," and "frustration," and uses a sentiment analysis engine to recognize that the user's emotions are negative. It then searches the database for an appropriate response and generates a response that takes the user's emotions into consideration, such as, "We apologize for the inconvenience. We are currently checking the delivery status."
[1353] Prompt example
[1354] User: "I'm frustrated with the delay in receiving my purchase."
[1355] Example inputs to a generative AI model:
[1356] "I'm frustrated that the item I purchased is late in arriving."
[1357] As described above, the present invention aims to realize a chatbot system that takes into consideration the user's feelings and provides quick and appropriate answers.
[1358] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1359] Step 1:
[1360] A user uses a terminal to input a question into the chatbot interface and submits it. The input text is sent by the terminal to the server.
[1361] Input: User question text
[1362] Output: Question data sent to the server
[1363] Step 2:
[1364] The server preprocesses the received question text, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[1365] Input: Question text
[1366] Output: Preprocessed text
[1367] Step 3:
[1368] The server uses a natural language processing (NLP) engine to analyze the intent of the question based on the preprocessed text, extracting key keywords and phrases and identifying the meaning of the question.
[1369] Input: Preprocessed text
[1370] Output: Extracted keywords and phrases
[1371] Step 4:
[1372] The server uses a sentiment analysis engine to analyze the user's sentiment from the question text and related data, and the user's emotional state (positive, negative, neutral) is determined.
[1373] Input: Question text and related data (e.g. chat history)
[1374] Output: Emotion analysis results
[1375] Step 5:
[1376] The server searches the database based on the extracted keywords to find relevant answers, retrieving relevant FAQ entries and information.
[1377] Input: Extracted keywords
[1378] Output: Searched answer data
[1379] Step 6:
[1380] The server generates a response text using a template based on the searched response data. At the same time, the tone and content of the response are adjusted based on the results of sentiment analysis. For example, if the user expresses negative emotions, the reply will have a reassuring tone.
[1381] Input: Searched response data and sentiment analysis results
[1382] Output: Adjusted answer text
[1383] Step 7:
[1384] The server sends the generated answer text to the terminal, which then displays the received answer on the chatbot interface and provides it to the user.
[1385] Input: Adjusted answer text
[1386] Output: The answer that is displayed to the user
[1387] Step 8:
[1388] The server stores user questions, generated answers, and sentiment analysis results as logs, allowing for later analysis and system improvement.
[1389] Input: User question, generated answer, sentiment analysis results
[1390] Output: Saved log data
[1391] As described above, through the specific operations at each step, an appropriate answer that takes into consideration the user's feelings is provided to the user's question.
[1392] The specific processing unit 290 transmits the result of the specific processing to the headset type terminal 314. In the headset type terminal 314, the control unit 46A causes the speaker 240 and the display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[1393] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1394] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the headset type terminal 314.
[1395] [Fourth embodiment]
[1396] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[1397] 7, a data processing system 410 includes a data processing device 12 and a robot 414. An example of the data processing device 12 is a server.
[1398] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[1399] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a control target 443. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the control target 443 are also connected to the bus 52.
[1400] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[1401] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[1402] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[1403] The control object 443 includes a display device, LEDs in the eyes, and motors for driving the arms, hands, and feet. The posture and gestures of the robot 414 are controlled by controlling the motors of the arms, hands, and feet. Some of the emotions of the robot 414 can be expressed by controlling these motors. In addition, the facial expressions of the robot 414 can also be expressed by controlling the light emission state of the LEDs in the eyes of the robot 414.
[1404] Fig. 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Fig. 8, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[1405] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[1406] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[1407] In the robot 414, the processor 46 performs the reception output process. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[1408] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1409] The present invention relates to a chatbot system for quickly and appropriately responding to questions from users. This system uses NLP technology to analyze questions entered in natural language and provide appropriate answers. An embodiment of the system of the present invention will be described in detail below.
[1410] System configuration
[1411] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the input from the user to the server. The server processes the input question, generates an appropriate answer, and sends it to the terminal. The terminal displays the received answer to the user.
[1412] Processing from question reception to answer generation
[1413] 1. Questions accepted:
[1414] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[1415] 2. Sending a text:
[1416] The terminal sends the entered question to the server as text data.
[1417] 3. Question preprocessing:
[1418] The server preprocesses the received text data, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[1419] 4. Question intent analysis:
[1420] The server uses an NLP engine to analyze the intent of the pre-processed text, extracting key keywords and phrases within the text, such as "project" and "how to apply."
[1421] 5. Finding answers:
[1422] The server searches the database for the most relevant FAQ entries based on the extracted keywords, calculating a relevance score to identify the most relevant answers.
[1423] 6. Generate answers:
[1424] The server uses templates to generate user-friendly answers from the retrieved FAQ entries, such as "The instructions for submitting a new project are on the project management page on our intranet. Here are the steps..."
[1425] 7. Submit your response:
[1426] The server sends the generated response to the terminal.
[1427] 8. Show Answer:
[1428] The terminal displays the received answer on the chatbot interface and provides it to the user.
[1429] 9. Log storage:
[1430] The server logs user questions and generated answers, allowing for later analysis and system improvement.
[1431] Specific examples
[1432] For example, suppose a user inputs a question to the chatbot such as "Please tell me the procedure for applying for vacation." The processing in this case will be explained in detail below.
[1433] 1. The user types "Please tell me how to apply for vacation" into the terminal.
[1434] 2. The terminal sends this question text to the server.
[1435] 3. The server preprocesses the received text and extracts the keywords "leave application" and "procedure."
[1436] 4. The server searches the database for FAQs related to "vacation request procedures."
[1437] 5. The server generates the appropriate response based on the template, such as "The procedure for applying for leave is as follows. Please access the leave application page on the intranet and fill in the required information."
[1438] 6. The server sends this response to the terminal.
[1439] 7. The terminal displays the received response to the user.
[1440] 8. The server stores a log of the user's questions and the generated answers.
[1441] The above is a specific embodiment for implementing the system of the present invention, which allows users to obtain quick and accurate answers to their questions and improves work efficiency.
[1442] The processing flow will be explained below.
[1443] Step 1:
[1444] A user accesses the chatbot interface and enters a question, for example, "How do I apply for a new project?"
[1445] Step 2:
[1446] The terminal receives the entered question text and confirms that the send button has been pressed.
[1447] Step 3:
[1448] The device sends the question text to the server. The text data is sent via a protocol such as an HTTP request or WebSocket.
[1449] Step 4:
[1450] The server acquires the text data received from the terminal.
[1451] Step 5:
[1452] The server preprocesses the text data, such as removing extra spaces and special characters, tokenizing it, and removing stop words.
[1453] Step 6:
[1454] The server inputs the preprocessed text data into a natural language processing (NLP) engine to analyze the intent of the question, for example, extracting keywords such as "project" and "application method."
[1455] Step 7:
[1456] The server searches the database for relevant FAQ entries based on the extracted keywords, and a search algorithm calculates a relevance score.
[1457] Step 8:
[1458] The server identifies the most relevant FAQ entry and retrieves its contents.
[1459] Step 9:
[1460] Based on the FAQ entries it retrieves, the server uses templates to generate easy-to-understand answers, such as "New project submissions are detailed on the project management page on our intranet. Here are the steps..."
[1461] Step 10:
[1462] The server transmits the generated answer text to the terminal.
[1463] Step 11:
[1464] The terminal displays the received response text on the chatbot interface.
[1465] Step 12:
[1466] The user checks the displayed answers and takes the next action if necessary.
[1467] Step 13:
[1468] The server logs user questions and generated answers, which are then stored in a database for later analysis and system improvement.
[1469] Example 1
[1470] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1471] Conventional chatbot systems have problems such as delayed responses to user questions and inaccurate analysis of intent, resulting in inappropriate answers. Furthermore, there is a lack of consistency in text preprocessing, intent analysis, and answer generation, leading to a poor user experience. Furthermore, logs are not stored properly, making subsequent analysis and system improvements difficult.
[1472] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1473] In this invention, the server includes a means for preprocessing received questions, removing unnecessary characters, and tokenizing the questions, a means for performing natural language processing based on the preprocessed questions to analyze the intent of the questions, and a means for searching data storage for answers corresponding to the analyzed intent. This enables a prompt and appropriate response to user questions and accurate answer generation. Furthermore, storing questions and answers in log storage facilitates subsequent analysis and system improvement.
[1474] "User" refers to an individual or organization that uses the system.
[1475] A "terminal" is an electronic device that a user uses to input a question and send it to a server.
[1476] A "server" is a computer system whose role is to process information received from a user, generate an appropriate response, and send it to the terminal.
[1477] "Preprocessing" refers to the process of removing unnecessary characters and spaces from the question text and tokenizing it.
[1478] "Tokenization" is the process of dividing text into meaningful units such as words and phrases.
[1479] "Natural language processing" is a technology that allows computers to understand and analyze human language.
[1480] "Intent analysis" is the process of extracting key keywords and phrases to understand the intent of a user's text.
[1481] "Data storage" refers to a storage medium in which data for searching answers is stored in advance.
[1482] A "template" is a fixed format used when generating an answer.
[1483] "Text format" refers to string information that is formatted for easy reading.
[1484] "Log storage" is a recording medium for storing user questions and generated answers.
[1485] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. This system is composed of a server, a terminal, and a user who uses these. Specifically, its main function is to analyze user questions using natural language processing technology and provide appropriate answers. An embodiment of the system of the present invention is described in detail below.
[1486] System configuration
[1487] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the user's input to the server. The server processes the input question, generates an appropriate answer, and sends it to the terminal, which then displays the received answer to the user. At the same time, the server saves the question and the generated answer in log storage.
[1488] Hardware and software used
[1489] The system of the present invention uses the following hardware and software:
[1490] Hardware: General computers and servers, and devices that users access (e.g., PCs, smartphones, tablets)
[1491] Software: Natural language processing libraries (e.g., SpaCy, NLTK), database management systems (e.g., MySQL), template engines (e.g., Jinja2), log management systems, communication libraries (e.g., Python's requests library)
[1492] Processing flow and specific examples
[1493] How the system works will be explained using a concrete example.
[1494] For example, if a user wants to ask a chatbot, "How do I request vacation?", the user first accesses the chatbot interface using a device, types the question using the keyboard, and clicks the submit button. The process then goes as follows:
[1495] The device sends the entered question to the server, converting the text data into an appropriate format (e.g., JSON) and sending it as an HTTP request.
[1496] The server preprocesses the received text data, including grammar correction, removal of unnecessary characters and spaces, tokenization, and stop-word removal. A natural language processing library (e.g., SpaCy) is used to parse the text and extract key keywords and phrases ("vacation request", "procedure").
[1497] Next, the server searches for FAQ entries from a database (e.g., MySQL) based on the extracted keywords, calculates a relevance score, and identifies the most relevant entry. For example, it retrieves information corresponding to "vacation request procedure" from the database.
[1498] The server then uses a template engine (e.g., Jinja2) to format the retrieved entries into a user-friendly format based on a template, generating a response text, such as "The procedure for requesting vacation is as follows. Please visit the vacation request page on our intranet and fill out the required information."
[1499] The server then sends the generated answer to the terminal, which displays the received answer on the chatbot interface and provides it to the user. Finally, the server stores the question and the generated answer in log storage for later analysis and system improvement.
[1500] Prompt Sentence Examples
[1501] An example of a prompt sentence to be fed into a generative AI model (e.g., GPT-3) is as follows:
[1502] Prompt statement:
[1503] Please explain in detail the process flow when a user asks about the "vacation request procedure."
[1504] Expected Output:
[1505] When a user asks "How do I apply for vacation?", the system first receives the user's input and performs preprocessing. Then, it uses an NLP engine to analyze the intent, searches for relevant FAQs in the database, and generates an answer that is easy for the user to understand. Finally, the answer is displayed to the user, and the question and answer are saved as a log.
[1506] Using this prompt, the generative AI model generates a processing flow for the chatbot system to respond to the question.
[1507] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1508] Step 1:
[1509] The user inputs a question using the chatbot interface. Specifically, the user uses the keyboard to enter a question text such as "How do I apply for a new project?" and clicks the submit button.
[1510] Input: The question text entered by the user
[1511] Output: The question text is retrieved to the terminal.
[1512] Step 2:
[1513] The device sends the acquired question text to the server. Specifically, the question text is converted into an appropriate format (e.g., JSON) and sent as an HTTP request. This is often done using the Python requests library.
[1514] Input: The question text entered by the user
[1515] Output: The question text is formatted and sent to the server as an HTTP request.
[1516] Step 3:
[1517] The server preprocesses the text data received from the device, including correcting grammar, removing unnecessary characters and spaces, tokenizing (breaking the text into individual words), and removing stop words, using a natural language processing library (e.g., SpaCy or NLTK).
[1518] Input: The question text received by the server
[1519] Output: Preprocessed text data
[1520] Step 4:
[1521] The server uses the preprocessed text data to analyze the intent of the question through natural language processing. Specifically, it identifies key keywords and phrases in the text and understands the intent. This process uses an NLP engine (e.g., Google NLP API).
[1522] Input: Preprocessed text data
[1523] Output: Parsed intent and primary keywords
[1524] Step 5:
[1525] Based on the parsed intent, the server searches for the appropriate answer from its data storage, specifically by searching a FAQ database (e.g., MySQL) using key keywords and calculating a relevance score to identify the best entry.
[1526] Input: Parsed intent and primary keywords
[1527] Output: Searched answer data
[1528] Step 6:
[1529] The server generates the searched response data in text format based on a template. Specifically, it uses a template engine (e.g., Jinja2) to format it into a human-readable format. For example, it could produce a format like, "The procedure for applying for a new project is described on the project management page on the intranet. The procedure is as follows..."
[1530] Input: Searched answer data
[1531] Output: Formatted answer text
[1532] Step 7:
[1533] The server sends the generated response text to the terminal. Specifically, it sends the generated text as an HTTP response.
[1534] Input: Formatted answer text
[1535] Output: The answer text is sent to the terminal as an HTTP response.
[1536] Step 8:
[1537] The device displays the received response text on the chatbot interface and provides it to the user. Specifically, it uses JavaScript to update the UI and display the new text in the chat window.
[1538] Input: Received response text
[1539] Output: Reply text displayed in the chat window
[1540] Step 9:
[1541] The server logs user questions and generated answers, and executes SQL queries to store question-answer pairs in a database for later analysis and system improvement.
[1542] Input: Question and answer pairs
[1543] Output: Log data saved in data storage
[1544] (Application example 1)
[1545] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1546] On traditional online shopping sites, users had to contact customer support by phone or email to inquire about product information or the status of their orders. This method was time-consuming and resulted in a poor user experience. It also placed a heavy burden on customer support staff, resulting in delayed responses. This created a growing need for a system that could respond to user questions quickly and appropriately.
[1547] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[1548] In this invention, the server includes means for receiving questions from users, means for performing natural language processing based on the received questions to analyze the intent of the questions, means for searching a database for answers corresponding to the analyzed intent, means for generating the searched answers in text format, means for sending the generated answers to the users, means for displaying the generated answers on the user terminal, and means for saving the questions from the users and the generated answers as logs, thereby enabling users to quickly check information on products they are interested in and the status of their orders.
[1549] A "user" is an individual or entity that utilizes the system to enter questions and receive answers.
[1550] A "terminal" is a device that sends a question entered by a user to a server and displays the answer received from the server to the user. Examples include a smartphone and a tablet.
[1551] A "server" is a computer system that executes a series of processes, including receiving a question from a user, performing natural language processing, analyzing the intent of the question, generating an appropriate answer, and sending it to the user terminal.
[1552] "Natural language processing" is a technology that allows computers to understand and analyze human language, and is used to analyze the intent of questions entered by users.
[1553] "Question intent" refers to the true purpose and information sought behind the question entered by the user.
[1554] A "database" is a data storage system that systematically stores answers and information corresponding to questions and manages them in a searchable format.
[1555] "Text format" is a format in which the answer provided to the user is expressed as character data.
[1556] A "log" is data that records user questions and generated answers in chronological order and is saved in a format that can be referenced and analyzed later.
[1557] Systems built on these definitions are designed to enable users to obtain information quickly and appropriately.
[1558] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. This system is particularly applicable as a customer support application for online shopping sites. Specific embodiments are described below.
[1559] System Overview
[1560] This system mainly consists of a user, a terminal, and a server. The user inputs a question and sends it to the server via the terminal. The server processes the input question, generates an appropriate answer, and sends it to the terminal. The terminal displays the received answer to the user.
[1561] Hardware and software used
[1562] Hardware: Smartphone (iPhone, Android)
[1563] Software: AWS (Amazon Web Services), TensorFlow (NLP model), Python (backend), React Native (frontend)
[1564] Data processing and calculation flow
[1565] 1. Accepting questions
[1566] Users type their questions into a chat box within the smartphone app.
[1567] Example: "Can you tell me about discounts on new products?"
[1568] 2. Sending a text
[1569] The device sends the questions entered by the user to AWS servers.
[1570] 3. Question Preprocessing
[1571] The server preprocesses the received text with a Python script.
[1572] Grammar correction, removal of unnecessary characters and spaces, tokenization, and removal of stop words.
[1573] 4. Question Intention Analysis
[1574] The server uses TensorFlow to preprocess the text and parse it with an NLP model.
[1575] Extraction of key keywords and phrases.
[1576] Examples: "New products" and "Discount information"
[1577] 5. Finding Answers
[1578] The server searches the database based on the extracted keywords to identify related FAQs and product information.
[1579] 6. Answer Generation
[1580] The server uses templates to generate answers in a user-friendly format.
[1581] For example: "We don't currently have any new product discounts, but we'll let you know when our next sale is."
[1582] 7. Submit your response
[1583] The server sends the generated answer from the AWS server to the smartphone app.
[1584] 8. View Answers
[1585] The terminal displays the received response in a chat box and provides it to the user.
[1586] Example: If a user asks, "How do I cancel an order?" the app might respond with, "To cancel, visit your account page, select 'Order History,' select the order you want to cancel, and click the 'Cancel' button."
[1587] 9. Log storage
[1588] The server stores the questions and generated answers as a log.
[1589] This allows for later analysis and system improvement.
[1590] Prompt Sentence Examples
[1591] Here is an example of a prompt sentence to be input to the generative AI model when a user asks, "How do I cancel an order?":
[1592] Generate the best response to the user "How do I cancel my order?"
[1593] The above is an embodiment of the system of the present invention. This system allows users to receive prompt and accurate answers to their questions, making it possible to improve the efficiency of customer support operations at online shopping sites.
[1594] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1595] Step 1:
[1596] Accepting questions
[1597] Users type their questions into a chat box within the smartphone app, and the text is stored on the device.
[1598] Input: The question text entered by the user (e.g., "What are the discounts on new products?")
[1599] Output: Question text data
[1600] Step 2:
[1601] Sending a text
[1602] The device sends the stored text data to the server using the HTTPS protocol to ensure secure communication.
[1603] Input: Question text data (e.g., "Please tell me about discounts on new products.")
[1604] Output: Text data sent to the server
[1605] Step 3:
[1606] Question Preprocessing
[1607] The server preprocesses the received text data using Python scripts to correct grammar, remove unnecessary characters and spaces, tokenize, and remove stop words, producing text that is easy to parse.
[1608] Input: Received question text data
[1609] Output: Preprocessed text data (e.g., "New product discount information")
[1610] Step 4:
[1611] Question intent analysis
[1612] The server then analyzes the preprocessed text data with TensorFlow's NLP model, which extracts key keywords and phrases and interprets the intent of the question.
[1613] Input: Preprocessed text data (e.g., "New product discount information")
[1614] Output: Key keywords and intent information (e.g., "new product" or "discount information")
[1615] Step 5:
[1616] Find answers
[1617] The server searches the database based on the extracted keywords, identifies related FAQs and product information, and calculates a relevance score to obtain the most appropriate answer.
[1618] Input: Key keywords and intent information (e.g., "new product" or "discount information")
[1619] Output: The best answer found (e.g., "There are currently no discounts on new products, but we'll let you know when the next sale is.")
[1620] Step 6:
[1621] Generate answers
[1622] The server generates an answer text based on the searched answer data using a predetermined template.
[1623] Input: Searched best answer data
[1624] Output: Generated answer text (e.g., "We currently don't have any new product discounts, but we'll let you know when the next sale comes around.")
[1625] Step 7:
[1626] Submit your answer
[1627] The server sends the generated response text to the terminal, again using the HTTPS protocol.
[1628] Input: Generated answer text (e.g., "We don't currently have any new product discounts, but we'll let you know when our next sale is.")
[1629] Output: Answer text sent to the terminal
[1630] Step 8:
[1631] Show Answers
[1632] The terminal displays the received reply text in a chat box and provides it to the user, allowing the user to check the reply to their inquiry.
[1633] Input: Answer text sent to the device (e.g., "We currently have no new product discounts, but we'll let you know when the next sale comes around.")
[1634] Output: The answer text displayed to the user
[1635] Step 9:
[1636] Saving logs
[1637] The server logs the user's questions and the generated answers, and the log data is stored in a database for later analysis and system improvement.
[1638] Input: User question text and generated answer text
[1639] Output: Saved log data
[1640] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[1641] The present invention relates to a chatbot system for quickly and appropriately responding to user questions. In particular, the purpose is to improve the user experience by incorporating an emotion engine that recognizes the user's emotions and generates responses according to those emotions. Specific embodiments of the system of the present invention are described in detail below.
[1642] System configuration
[1643] This system consists of a user, a terminal, and a server. The user accesses the system and inputs a question, and the terminal sends the user's input to the server. The server processes the input question and the user's emotions, generates an appropriate answer, and sends it to the terminal. The terminal displays the received answer to the user.
[1644] Processing from question reception to answer generation
[1645] 1. Questions accepted:
[1646] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[1647] 2. Sending a text:
[1648] The terminal sends the entered question text to the server as text data.
[1649] 3. Question preprocessing:
[1650] The server preprocesses the received text data, which includes correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[1651] 4. Question intent analysis:
[1652] The server uses an NLP engine to analyze the intent of the pre-processed text. This analysis extracts key keywords and phrases within the text. For example, keywords like "project" and "how to apply" are extracted.
[1653] 5. Emotion analysis:
[1654] The server analyzes the user's emotions using an emotion engine, which analyzes not only the question text but also the user's chat history to recognize the user's emotions.
[1655] 6. Finding answers:
[1656] The server searches the database for the most relevant FAQ entries based on the extracted keywords, calculating a relevance score to identify the most relevant answers.
[1657] 7. Generate answers:
[1658] The server uses templates to generate answers based on the searched FAQ entries in a format that is easy for the user to understand. It also adjusts the tone and content of the answer based on the analysis results of the emotion engine. For example, if the user is feeling anxious, it generates an answer in a reassuring tone.
[1659] 8. Submit your response:
[1660] The server transmits the generated answer text to the terminal.
[1661] 9. Show Answer:
[1662] The terminal displays the received answer on the chatbot interface and provides it to the user.
[1663] 10. Log storage:
[1664] The server stores the user's questions, generated answers, and user emotion data as logs, which can be later analyzed and used to improve the system.
[1665] Specific examples
[1666] For example, suppose a user inputs a question to the chatbot such as, "The project is delayed and I'm worried." The processing in this case will be specifically described below.
[1667] 1. The user types into the terminal, "I'm worried about the project being delayed."
[1668] 2. The terminal sends this question text to the server.
[1669] 3. The server preprocesses the received text and extracts the keywords "project," "delay," and "worry."
[1670] 4. The server uses an NLP engine to analyze the intent of the question and searches the database based on these keywords.
[1671] 5. The server uses the emotion engine to analyze the user's emotions and recognizes that the user has the emotion "worry."
[1672] 6. The server searches the relevant FAQ entries and selects the most appropriate answer.
[1673] 7. The server generates a response based on a template in a reassuring tone, such as "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as quickly as possible. You can follow the latest progress on our intranet."
[1674] 8. The server sends this response to the terminal.
[1675] 9. The terminal displays the received response to the user.
[1676] 10. The server stores the user's questions, generated answers, and user emotion data as logs.
[1677] The above is a specific embodiment for implementing the system of the present invention. By introducing an emotion engine, users can receive answers that take their emotions into consideration, which increases their satisfaction.
[1678] The processing flow will be explained below.
[1679] Step 1:
[1680] The user uses the chatbot interface to input a question into the device, for example, "I'm worried about the delay in my project."
[1681] Step 2:
[1682] The terminal receives the entered question text and confirms that the send button has been pressed.
[1683] Step 3:
[1684] The device sends the question text to the server. The text data is sent via a protocol such as an HTTP request or WebSocket.
[1685] Step 4:
[1686] The server acquires the text data received from the terminal.
[1687] Step 5:
[1688] The server performs preprocessing on the text data, which includes removing extra spaces and special characters, tokenizing, removing stop words, etc. This processing makes the text easier to parse.
[1689] Step 6:
[1690] The server then inputs the preprocessed text data into a natural language processing (NLP) engine to analyze the intent of the question. This analysis involves extracting key keywords and phrases within the text. For example, keywords like "project," "delay," and "worry" are extracted.
[1691] Step 7:
[1692] The server searches the database for relevant FAQ entries based on the keywords extracted by the NLP engine, and a search algorithm calculates a relevance score to identify the most relevant answers.
[1693] Step 8:
[1694] The server uses an emotion engine to analyze the pre-processed text data and recognize the user's emotion, for example, the emotion "worry."
[1695] Step 9:
[1696] The server adjusts the tone and content of the response based on the analysis results of the emotion engine: if the user is anxious, it generates a response with a reassuring tone.
[1697] Step 10:
[1698] The server uses templates based on the most relevant FAQ entry to generate an answer in an easy-to-understand format, such as "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as quickly as possible. You can follow the latest progress on our intranet."
[1699] Step 11:
[1700] The server transmits the generated answer text to the terminal.
[1701] Step 12:
[1702] The terminal displays the received response text on the chatbot interface.
[1703] Step 13:
[1704] The user checks the displayed answers and, if necessary, enters further questions or decides on an action.
[1705] Step 14:
[1706] The server stores the user's questions, generated answers, and user emotion data as logs, which are then stored in a database for later analysis and system improvement.
[1707] Example 2
[1708] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1709] Conventional chatbot systems generate standardized responses without considering the user's emotions, resulting in low user satisfaction. Furthermore, no systems exist that accurately analyze the user's emotions during the response generation process and adjust the tone and content accordingly. This results in a lack of improvement in the user experience and an inability to provide effective support.
[1710] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for receiving a question from a user, means for performing natural language processing based on the received question to analyze the intention of the question, means for analyzing the analyzed intention and the user's emotions, means for searching a database for an optimal answer based on the analyzed intention and emotions, means for generating the searched answer using a template in a format that is easy for the user to understand, means for sending the generated answer to the user, and means for saving the question from the user, the generated answer, and the user's emotional data as a log. This enables an appropriate response that takes the user's emotions into consideration, improving the user experience.
[1711] A "user" is someone who accesses the system and enters a question.
[1712] "Terminal" refers to the device used by a user to access the system, including PCs, smartphones, tablets, etc.
[1713] "Server" refers to a central computer system for receiving and analyzing user questions, and generating and transmitting answers.
[1714] The "means for receiving questions" refers to a function for causing the server to receive questions input by the user via the terminal.
[1715] "Natural language processing means" refers to technology for preprocessing received questions and analyzing the intent of the questions.
[1716] "Sentiment analysis means" refers to technology for analyzing a user's input text and chat history to identify the user's emotions.
[1717] "Answer retrieval means" refers to a function for retrieving the best answer from a database based on the analyzed intention and emotion.
[1718] A "template" refers to a predefined format used to generate an answer.
[1719] "Answer generation means" refers to a function for generating the searched answer using a template in a format that is easy for the user to understand.
[1720] "Answer sending means" refers to a function for sending the generated answer to the user's terminal.
[1721] The "log storage means" refers to a function for storing user questions, generated answers, and analyzed emotion data as records.
[1722] "Database" refers to a data structure that stores question and answer pairs used for answer search.
[1723] The present invention relates to a chatbot system that provides quick and appropriate answers to user questions, and aims to improve the user experience by recognizing the user's emotions and generating responses that match those emotions. The system of the present invention is composed of a user, a terminal, and a server.
[1724] System configuration
[1725] The system for implementing the invention comprises the following main components:
[1726] 1. User - Accesses the system and enters a question.
[1727] 2. Terminal - A device that receives input from a user and sends it to a server. Examples include PCs, smartphones, and tablets.
[1728] 3. Server - A central computer system that processes the entered questions, analyzes intent and sentiment, and generates appropriate answers to send to the device.
[1729] The process from receiving a question to generating an answer
[1730] Accepting questions
[1731] The user uses the chatbot interface to input a question from the terminal, for example, "How do I apply for a new project?"
[1732] Sending a text
[1733] The device sends the text data of the entered question to the server using an HTTP POST request over the Internet.
[1734] Question Preprocessing
[1735] The server performs various pre-processing steps on the received text data. The software used includes text processing libraries (e.g., NLTK, spaCy). The pre-processing steps include the following:
[1736] Grammar check and correction
[1737] Remove unnecessary characters and spaces
[1738] Tokenization
[1739] Stop word removal
[1740] Question intent analysis
[1741] The server analyzes the preprocessed text using an NLP engine (e.g., Google BERT, OpenAI GPT). The specific processing includes:
[1742] Keyword extraction
[1743] Text Classification
[1744] Emotion analysis
[1745] The server analyzes the user's emotions using an emotion engine (e.g., Affectiva, IBM Watson), which analyzes the question text and past chat history to identify the user's emotions.
[1746] Find answers
[1747] The server searches for answers from a database based on the parsed intent and sentiment, and identifies the most suitable FAQ entry through a relevance calculation. Databases used include relational databases (e.g., MySQL, PostgreSQL).
[1748] Generate answers
[1749] The server generates answers using templates based on the searched FAQ entries, using generative AI models (e.g., OpenAI GPT) to adjust tone and content depending on the emotion. For example, if the user is anxious, the answer will be generated in a reassuring tone.
[1750] Submit your answer
[1751] The server then sends the generated response to the device, using an HTTP POST request.
[1752] Show Answers
[1753] The terminal displays the received answer on the chatbot interface, through which the user can confirm the answer.
[1754] Saving logs
[1755] The server stores user questions, generated answers, and sentiment data as logs, which are used for later analysis and system improvement. The data is managed in a log management system (e.g., ELK Stack).
[1756] Specific examples
[1757] For example, if a user asks, "I'm worried because the project is delayed," the server preprocesses the text "I'm worried because the project is delayed" and extracts the keywords "project," "delay," and "worry." The emotion engine recognizes that the user has the emotion "worry." The server then searches the database for relevant FAQ entries and generates a response in a tone similar to, "Thank you for your concern about the project delay. Our team is currently working to resolve the issue as soon as possible. You can follow the latest progress on our intranet."
[1758] Examples of prompts:
[1759] Generate an appropriate, emotionally relevant response when a user asks, "I'm worried about the project being delayed."
[1760] The above is an embodiment of the system of the present invention, which makes it possible to provide a response that takes into account the user's emotions and improve the user experience.
[1761] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1762] Step 1: The user opens the chatbot interface. The user enters a question as text into the terminal. The input is in the form of, for example, "How do I apply for a new project?" Input data: The question text entered by the user. Output data: The question text received by the terminal.
[1763] Step 2: The device sends the received question text to the server. Specifically, it sends the text data to the server using an HTTP POST request. Input data: The question text entered by the user on the device. Output data: The text data received by the server.
[1764] Step 3: The server preprocesses the received question text. Specific operations include grammar checking and correction, removing unnecessary characters and spaces, tokenization, and removing stop words. Input data: Raw text data received by the server. Output data: Preprocessed text data in a format that can be analyzed.
[1765] Step 4: The server analyzes the intent of the preprocessed text data. It uses an NLP engine to extract keywords and key phrases. Specifically, natural language processing models such as Google BERT and OpenAI GPT are used. Input data: Preprocessed text data. Output data: Data showing the extracted keywords and intent.
[1766] Step 5: The server analyzes the user's emotions. An emotion engine (e.g., Affectiva or IBM Watson) is used to analyze the question text and past chat history to recognize the user's emotions. Input data: preprocessed text data and chat history. Output data: data indicating the user's emotions.
[1767] Step 6: The server searches the database for the best answer based on the parsed intent and sentiment. It performs a relevance calculation to identify the most relevant FAQ entry. Databases used include MySQL and PostgreSQL. Input data: keywords, phrases, and user sentiment data. Output data: the best FAQ entry.
[1768] Step 7: The server generates an answer based on the FAQ entry. It uses templates to create an easy-to-understand answer and adjusts the emotional tone as needed. It uses a generative AI model (e.g., OpenAI GPT). Input data: FAQ entry, template, and user emotional data. Output data: Generated answer text.
[1769] Step 8: The server sends the generated answer text to the terminal. Again, data is sent using an HTTP POST request. Input data: The generated answer text. Output data: The answer text received by the terminal.
[1770] Step 9: The terminal displays the received answer on the chatbot interface. To display it on the interface, the text data is converted into a visually easy-to-read format. Input data: The received answer text. Output data: The answer displayed on the chatbot interface.
[1771] Step 10: The server saves the user's question, generated answer, and user sentiment data as a log. This can be used for future analysis and system improvement. Examples of systems used include log management systems such as ELK Stack. Input data: question text, generated answer text, sentiment data. Output data: data saved as a log.
[1772] (Application example 2)
[1773] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1774] Conventional chatbot systems can provide quick answers to user questions, but they are unable to generate responses that take the user's emotions into account, resulting in a poor user experience. In particular, in virtual stores and other situations where responses that take the user's emotions into consideration are required, existing systems are unable to sufficiently improve user satisfaction. The present invention aims to improve the user experience by providing quick, appropriate responses to user questions that reflect the user's emotions.
[1775] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.
[1776] In this invention, the server includes means for receiving a user's question, means for performing natural language processing based on the received question and analyzing the intent of the question, means for analyzing the user's emotion, means for searching a database for an answer corresponding to the analyzed intent, means for generating the searched answer in text format, means for adjusting the tone and content of the answer based on the emotion analysis result, means for sending the generated answer to the user, and means for saving the user's question and the generated answer as a log, thereby making it possible to provide a quick and appropriate response that takes into consideration the user's emotion.
[1777] The "means for receiving a question from a user" refers to a device or software that has the function of transmitting a question entered by a user to the system via a terminal and receiving the question data.
[1778] "Means for performing natural language processing and analyzing the intent of a question" refers to a device or software that has the function of analyzing the received question text, understanding its content and meaning, and identifying the intent of the question.
[1779] "Means for searching a database for an answer corresponding to the analyzed intent" refers to a device or software that has the function of finding an appropriate answer from a database based on the analysis results.
[1780] The "means for generating the searched answer in text format" refers to a device or software that has the function of converting the searched answer information into a text format that is easy for the user to understand.
[1781] The "means for transmitting the generated answer to the user" is a device or software having a function for returning the generated answer text to the user.
[1782] "Means for saving user questions and generated answers as a log" refers to a device or software that has the function of recording and saving the questions entered by users and the answers generated in response to them.
[1783] The "emotion analysis means" is a device or software that has the function of analyzing the user's question text and related data and determining the user's emotional state.
[1784] "Means for adjusting the tone and content of responses based on the results of emotion analysis" refers to a device or software that has the function of changing the content of responses and the way they are expressed depending on the user's emotions obtained through emotion analysis.
[1785] The present invention relates to a chatbot system for quickly and appropriately responding to user questions, and aims to improve the user experience by recognizing the user's emotions and generating responses according to those emotions. Specific embodiments of the present invention are described in detail below.
[1786] System Configuration
[1787] This chatbot system is mainly composed of a terminal that receives questions from users, a server that processes the questions, and a terminal that provides answers to users. Each component is described in detail below.
[1788] Hardware and Software Use
[1789] Hardware
[1790] General-purpose PC (CPU, memory)
[1791] software
[1792] Python 3.x: Programming Language
[1793] NLTK Library: A library for natural language processing and sentiment analysis
[1794] Transformers Library: Generative AI Models for Question Answering
[1795] Specific functions and processes
[1796] 1. Receive a user question
[1797] The user uses a terminal to input and send a question to the chatbot interface, which is sent in text format.
[1798] 2. Question preprocessing and intent analysis
[1799] The server preprocesses the received question text, which includes grammar correction, removal of unnecessary characters and spaces, tokenization, and removal of stop words. The server then uses a natural language processing (NLP) engine to analyze the intent of the question.
[1800] 3. Emotion Analysis
[1801] After the NLP engine analysis, the server uses a sentiment analysis engine to analyze the user's emotions, determining their emotional state based on the question text and the user's past chat history.
[1802] 4. Searching for answers in a database
[1803] Based on the analyzed intent and extracted keywords, the server searches a relevant database to identify the appropriate answer.
[1804] 5. Generating Emotion-Based Answers
[1805] The server takes into account the results of the emotion analysis and uses templates to generate answers in a format that is easy for the user to understand. For example, if the user has negative emotions, the server generates answers in a tone that reassures the user.
[1806] 6. Submitting answers and saving logs
[1807] The generated answers are sent from the server to the terminal and presented to the user through the chatbot interface. The user's questions and the generated answers are also saved as logs for later analysis and system improvement.
[1808] Specific examples
[1809] As a concrete example, consider the case where a user enters the question, "I'm frustrated because the product I purchased is late in arriving." In this case, the server extracts the keywords "purchase," "product," "arrival," "delay," and "frustration," and uses a sentiment analysis engine to recognize that the user's emotions are negative. It then searches the database for an appropriate response and generates a response that takes the user's emotions into consideration, such as, "We apologize for the inconvenience. We are currently checking the delivery status."
[1810] Prompt example
[1811] User: "I'm frustrated with the delay in receiving my purchase."
[1812] Example inputs to a generative AI model:
[1813] "I'm frustrated that the item I purchased is late in arriving."
[1814] As described above, the present invention aims to realize a chatbot system that takes into consideration the user's feelings and provides quick and appropriate answers.
[1815] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1816] Step 1:
[1817] A user uses a terminal to input a question into the chatbot interface and submits it. The input text is sent by the terminal to the server.
[1818] Input: User question text
[1819] Output: Question data sent to the server
[1820] Step 2:
[1821] The server preprocesses the received question text, including correcting grammar, removing unnecessary characters and spaces, tokenizing, and removing stop words, making the text easier to parse.
[1822] Input: Question text
[1823] Output: Preprocessed text
[1824] Step 3:
[1825] The server uses a natural language processing (NLP) engine to analyze the intent of the question based on the preprocessed text, extracting key keywords and phrases and identifying the meaning of the question.
[1826] Input: Preprocessed text
[1827] Output: Extracted keywords and phrases
[1828] Step 4:
[1829] The server uses a sentiment analysis engine to analyze the user's sentiment from the question text and related data, and the user's emotional state (positive, negative, neutral) is determined.
[1830] Input: Question text and related data (e.g. chat history)
[1831] Output: Emotion analysis results
[1832] Step 5:
[1833] The server searches the database based on the extracted keywords to find relevant answers, retrieving relevant FAQ entries and information.
[1834] Input: Extracted keywords
[1835] Output: Searched answer data
[1836] Step 6:
[1837] The server generates a response text using a template based on the searched response data. At the same time, the tone and content of the response are adjusted based on the results of sentiment analysis. For example, if the user expresses negative emotions, the reply will have a reassuring tone.
[1838] Input: Searched response data and sentiment analysis results
[1839] Output: Adjusted answer text
[1840] Step 7:
[1841] The server sends the generated answer text to the terminal, which then displays the received answer on the chatbot interface and provides it to the user.
[1842] Input: Adjusted answer text
[1843] Output: The answer that is displayed to the user
[1844] Step 8:
[1845] The server stores user questions, generated answers, and sentiment analysis results as logs, allowing for later analysis and system improvement.
[1846] Input: User question, generated answer, sentiment analysis results
[1847] Output: Saved log data
[1848] As described above, through the specific operations at each step, an appropriate answer that takes into consideration the user's feelings is provided to the user's question.
[1849] The specific processing unit 290 transmits the result of the specific processing to the robot 414. In the robot 414, the control unit 46A causes the speaker 240 and the control target 443 to output the result of the specific processing. The microphone 238 acquires voice indicating a user input regarding the result of the specific processing. The control unit 46A transmits voice data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.
[1850] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1851] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the robot 414.
[1852] The emotion identification model 59 as an emotion engine may determine the user's emotion according to a specific mapping. Specifically, the emotion identification model 59 may determine the user's emotion according to an emotion map (see FIG. 9), which is a specific mapping. Similarly, the emotion identification model 59 may determine the robot's emotion, and the identification processing unit 290 may perform identification processing using the robot's emotion.
[1853] FIG. 9 illustrates an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and behaviors arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.
[1854] These emotions are distributed in the 3 o'clock direction on emotion map 400, and typically fluctuate between relief and anxiety. In the right half of emotion map 400, situational awareness dominates over internal sensations, resulting in a sense of calm.
[1855] The inside of emotion map 400 represents what is going on in the mind, and the outside of emotion map 400 represents behavior, so the further you go outside emotion map 400, the more visible the emotions become (the more they are expressed in behavior).
[1856] Human emotions are based on various balances, such as posture and blood sugar levels. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. Emotions can also be created for robots, automobiles, and motorcycles, based on various balances, such as posture and remaining battery life. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. An emotion map can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on Voice Emotion Recognition and Emotional Brain Physiological Signal Analysis Systems, Tokushima University, Doctoral Dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). The left half of the emotion map lists emotions belonging to the "reaction" domain, where sensation is dominant. The right half of the emotion map lists emotions belonging to the "situation" domain, where situational awareness is dominant.
[1857] The emotion map defines two emotions that promote learning. One is a negative emotion on the situation side, around the middle of "repentance" or "reflection." In other words, this occurs when the robot experiences negative emotions such as "I never want to feel this way again" or "I don't want to be scolded again." The other is a positive emotion on the response side, around "desire." In other words, this occurs when the robot experiences positive feelings such as "I want more" or "I want to know more."
[1858] The emotion identification model 59 inputs user input into a pre-trained neural network, obtains emotion values indicating each emotion shown in the emotion map 400, and determines the user's emotion. This neural network is pre-trained based on multiple pieces of training data that are combinations of user input and emotion values indicating each emotion shown in the emotion map 400. Furthermore, this neural network is trained so that emotions that are located close to each other have similar values, as in the emotion map 900 shown in FIG. 10. FIG. 10 shows an example in which multiple emotions, "relieved," "calm," and "reassuring," have similar emotion values.
[1859] The system according to the present disclosure has been described above mainly with respect to the functions of the data processing device 12, but the system according to the present disclosure is not necessarily implemented on a server. The system according to the present disclosure may be implemented as a general information processing system. The present disclosure may be implemented, for example, as a software program running on a personal computer or an application running on a smartphone, etc. The method according to the present disclosure may be provided to users in the form of SaaS (Software as a Service).
[1860] In the above embodiment, an example was given in which the specific processing is performed by one computer 22, but the technology of the present disclosure is not limited to this, and the specific processing may be distributed and performed by a plurality of computers including the computer 22. For example, the data generation model 58 may be provided in an external device of the data processing device 12, and data may be generated in the external device in accordance with input data.
[1861] In the above embodiment, an example in which the specific processing program 56 is stored in the storage 32 has been described, but the technology of the present disclosure is not limited to this. For example, the specific processing program 56 may be stored in a portable, computer-readable, non-transitory storage medium such as a USB (Universal Serial Bus) memory. The specific processing program 56 stored in the non-transitory storage medium is installed in the computer 22 of the data processing device 12. The processor 28 executes the specific processing in accordance with the specific processing program 56.
[1862] Alternatively, the specific processing program 56 may be stored in a storage device such as a server connected to the data processing device 12 via the network 54, and the specific processing program 56 may be downloaded and installed on the computer 22 in response to a request from the data processing device 12.
[1863] It is not necessary to store all of the specific processing program 56 in a storage device such as a server connected to the data processing device 12 via the network 54, or to store all of the specific processing program 56 in the storage 32; only a portion of the specific processing program 56 may be stored.
[1864] The hardware resource for executing a specific process can be any of the following processors: An example of a processor is a CPU, which is a general-purpose processor that functions as a hardware resource for executing a specific process by executing software, i.e., a program. Another example of a processor is a dedicated electrical circuit, such as an FPGA (Field-Programmable Gate Array), a PLD (Programmable Logic Device), or an ASIC (Application Specific Integrated Circuit), which is a processor with a circuit configuration designed specifically for executing a specific process. Each processor has built-in or connected memory, and each processor uses the memory to execute the specific process.
[1865] The hardware resource that executes the specific processing may be configured with one of these various processors, or may be configured with a combination of two or more processors of the same or different types (for example, a combination of multiple FPGAs, or a combination of a CPU and an FPGA). Also, the hardware resource that executes the specific processing may be a single processor.
[1866] As an example of a system configured with a single processor, first, one processor is configured by combining one or more CPUs and software, and this processor functions as a hardware resource that executes a specific process. Second, there is a system that uses a processor that realizes the functions of an entire system including multiple hardware resources that execute a specific process on a single IC chip, as typified by SoC (System-on-a-chip). In this way, a specific process is realized using one or more of the above-mentioned various processors as hardware resources.
[1867] Furthermore, the hardware structure of these various processors can be, more specifically, an electric circuit that combines circuit elements such as semiconductor devices. The specific processing described above is merely an example. Therefore, it goes without saying that unnecessary steps may be deleted, new steps may be added, or the processing order may be rearranged, without departing from the spirit of the invention.
[1868] The above-described description and illustrations are a detailed explanation of the parts related to the technology of the present disclosure and are merely an example of the technology of the present disclosure. For example, the above description of the configuration, functions, actions, and effects is an explanation of an example of the configuration, functions, actions, and effects of the parts related to the technology of the present disclosure. Therefore, it goes without saying that unnecessary parts may be deleted, new elements may be added, or replacements may be made to the above-described description and illustrations within the scope of the gist of the technology of the present disclosure. Furthermore, to avoid confusion and facilitate understanding of the parts related to the technology of the present disclosure, the above-described description and illustrations omit explanations of common technical knowledge that do not require particular explanation to enable the implementation of the technology of the present disclosure.
[1869] All publications, patent applications, and technical standards mentioned in this specification are herein incorporated by reference to the same extent as if each individual publication, patent application, or technical standard was specifically and individually indicated to be incorporated by reference.
[1870] The following is further disclosed regarding the above embodiment.
[1871] (Claim 1)
[1872] means for receiving a query from a user;
[1873] means for performing natural language processing based on the received question and analyzing the intent of the question;
[1874] A means for searching a database for an answer corresponding to the parsed intent;
[1875] means for generating the retrieved answers in text form;
[1876] means for transmitting the generated answer to the user;
[1877] a means for storing a log of user questions and generated answers;
[1878] A system including:
[1879] (Claim 2)
[1880] 2. The system of claim 1, wherein the natural language processing means preprocesses the received question to extract keywords and phrases.
[1881] (Claim 3)
[1882] 2. The system according to claim 1, wherein the answer generating means generates the answer text using a predetermined template.
[1883] "Example 1"
[1884] (Claim 1)
[1885] means for receiving a question from a user at a terminal;
[1886] means for transmitting the query received by the terminal to a server;
[1887] means for preprocessing the received questions at the server to remove unnecessary characters and tokenize the questions;
[1888] A means for performing natural language processing based on the preprocessed question and analyzing the intent of the question;
[1889] means for retrieving answers corresponding to the parsed intent from the data storage;
[1890] a means for generating the retrieved answers in text format using templates;
[1891] means for transmitting the generated answer to a terminal and displaying it to a user;
[1892] A means for storing questions from users and generated answers in a log storage;
[1893] A system including:
[1894] (Claim 2)
[1895] 2. The system of claim 1, wherein the natural language processing means preprocesses the received question, removes unnecessary characters and spaces, and extracts keywords and phrases.
[1896] (Claim 3)
[1897] 2. The system according to claim 1, wherein the answer generating means generates the answer text using a predetermined template.
[1898] "Application Example 1"
[1899] (Claim 1)
[1900] means for receiving a query from a user;
[1901] means for performing natural language processing based on the received question and analyzing the intent of the question;
[1902] A means for searching a database for an answer corresponding to the parsed intent;
[1903] means for generating the retrieved answers in text form;
[1904] means for transmitting the generated answer to the user;
[1905] means for displaying the generated answer on a user terminal;
[1906] a means for storing a log of user questions and generated answers;
[1907] A system including:
[1908] (Claim 2)
[1909] 2. The system of claim 1, wherein the natural language processing means preprocesses the received question to extract keywords and phrases.
[1910] (Claim 3)
[1911] 2. The system according to claim 1, wherein the answer generating means generates the answer text using a predetermined template.
[1912] "Example 2: Combining Emotion Engines"
[1913] (Claim 1)
[1914] means for receiving a query from a user;
[1915] means for performing natural language processing based on the received question and analyzing the intent of the question;
[1916] means for analyzing the analyzed intent and user sentiment;
[1917] a means for searching a database for an optimal answer based on the analyzed intent and sentiment;
[1918] A means for generating the searched answer in a format that is easy for the user to understand using a template;
[1919] means for transmitting the generated answer to the user;
[1920] a means for saving questions from users, generated answers, and emotional data of the users as a log;
[1921] A system including:
[1922] (Claim 2)
[1923] 2. The system of claim 1, wherein the natural language processing means preprocesses the received question to extract keywords and phrases.
[1924] (Claim 3)
[1925] 2. The system according to claim 1, wherein the answer generating means uses a predetermined template to generate an answer text having a tone and content adjusted according to the analyzed emotion.
[1926] "Application example 2 when combining emotion engines"
[1927] (Claim 1)
[1928] means for receiving a query from a user;
[1929] means for performing natural language processing based on the received question and analyzing the intent of the question;
[1930] A means for searching a database for an answer corresponding to the parsed intent;
[1931] means for generating the retrieved answers in text form;
[1932] means for transmitting the generated answer to the user;
[1933] a means for storing a log of user questions and generated answers;
[1934] emotion analysis means for analyzing the emotion of a user;
[1935] A means to adjust the tone and content of responses based on sentiment analysis results;
[1936] A system including:
[1937] (Claim 2)
[1938] 2. The system of claim 1, wherein the natural language processing means preprocesses the received question to extract keywords and phrases.
[1939] (Claim 3)
[1940] 2. The system according to claim 1, wherein the answer generating means generates an answer text using a predetermined template and adjusts the answer based on the result of analysis by the sentiment analyzing means. [Explanation of symbols]
[1941] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Device 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robot< / url:> < / url:> < / url:> < / url:>
Claims
1. means for receiving a query from a user; means for performing natural language processing based on the received question and analyzing the intent of the question; A means for searching a database for an answer corresponding to the parsed intent; means for generating the retrieved answers in text form; means for transmitting the generated answer to the user; a means for storing a log of user questions and generated answers; A system including:
2. 2. The system of claim 1, wherein the natural language processing means preprocesses the received question to extract keywords and phrases.
3. 2. The system according to claim 1, wherein the answer generating means generates the answer text using a predetermined template.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A