System

The system addresses the challenge of using generative AI models in local environments by fine-tuning them for specific tasks, providing specialized chatbot responses efficiently and cost-effectively.

JP2026034266APending Publication Date: 2026-02-27SOFTBANK GROUP CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024137387
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Chatbots using generative AI models rely heavily on cloud environments and external APIs, making them difficult to use in local environments, and existing models generate general answers unsuitable for specific tasks, posing challenges for small and medium-sized enterprises due to high costs.

Method used

A system that enables fine-tuning of generative models for specific tasks, allowing them to operate in local environments without external dependencies, using a pre-trained model like GPT-2, and providing a conversational interface for specialized answers.

Benefits of technology

Enables efficient and cost-effective deployment of specialized chatbots in local environments, reducing dependency on external services and improving response relevance for specific tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026034266000001_ABST
    Figure 2026034266000001_ABST
Patent Text Reader

Abstract

A system is provided.SOLUTION: A system comprising: means for generating a sentence using a generative model; means for fine-tuning data related to a specific task based on the generative model; means for constructing a chatbot that operates in a local environment using the fine-tuned generative model; means for preparing a dataset; means for tokenizing the generative model; and means for providing an interaction interface with the chatbot.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

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] Chatbots using generative AI models currently rely heavily on cloud environments and external APIs, making them difficult to use in local environments. Furthermore, existing generative models generate general answers, meaning they cannot meet the needs of users seeking answers specialized for specific tasks. Furthermore, small and medium-sized enterprises (SMEs) face the challenge of finding high-performance generative AI systems due to cost. [Means for solving the problem]

[0005] The present invention provides a means for generating sentences using a generative model, a means for fine-tuning data related to specific tasks based on the generative model, and a means for building a chatbot that runs in a local environment using the fine-tuned generative model. This makes it possible to generate answers specialized for specific tasks, eliminates dependency on external APIs or the cloud, and enables operation in a local environment. Furthermore, the system includes a means for preparing a dataset, a means for tokenizing the generative model, and a means for providing a conversational interface with the chatbot, allowing users to easily fine-tune using their own data and reducing implementation costs.

[0006] A "generative model" is an algorithm that learns from prior training data and generates meaningful sentences for new input data.

[0007] "Finetuning" is the process of improving the performance of an existing generative model for a specific task or domain by using additional datasets.

[0008] A "local environment" is an environment in which the system runs on the user's local device or on an in-house server, without relying on external networks or cloud services.

[0009] A "chatbot" is a natural language dialogue system that generates responses to user input.

[0010] "Tokenizing" is the process of dividing text data into small units (tokens) such as words or subwords.

[0011] A "dataset" is a set of data used to train a generative model and fine-tune it.

[0012] An "interface" is the means or method by which a user and a system communicate with each other.

[0013] "FAQ data" is a dataset of frequently asked questions and their answers, containing information based on a specific context. [Brief explanation of the drawings]

[0014] [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

[0015] 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.

[0016] First, the terms used in the following description will be explained.

[0017] 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).

[0018] 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.

[0019] 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.

[0020] 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.

[0021] 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."

[0022] [First embodiment]

[0023] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.

[0024] 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.

[0025] 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).

[0026] 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.

[0027] 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.

[0028] 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.

[0029] 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.

[0030] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.

[0031] 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.

[0032] 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.

[0033] 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.

[0034] 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."

[0035] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks. Specific embodiments for implementing the present invention are described below.

[0036] System Overview

[0037] The system is broadly composed of the following elements:

[0038] 1. A method for generating sentences using a generative model

[0039] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0040] 3. A way to build chatbots that run locally using fine-tuned generative models

[0041] 4. How to prepare the dataset

[0042] 5. Means of tokenizing generative models

[0043] 6. Means of providing a conversational interface with chatbots

[0044] Program processing

[0045] Preparing the dataset

[0046] Users prepare business-specific FAQ data as a text file, which contains specific questions and their corresponding answers. The server reads this text file and processes it as a dataset.

[0047] Setting up the model and tokenizer

[0048] The server loads a pre-trained generative model (e.g., GPT-2 model) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks.

[0049] Performing fine tuning

[0050] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[0051] Building and interacting with chatbots

[0052] The server uses the fine-tuned generative model to build a chatbot. This chatbot runs in a local environment and provides accurate responses to user inquiries. The user can freely input questions using a user interface provided through the terminal, and the chatbot generates responses based on the questions.

[0053] Specific examples

[0054] Scenario 1: Product return process inquiry

[0055] The user asks, "What is the product return process?" via their device. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying, "You can return the product within 30 days of the purchase date. If you would like to return the product, please fill out this form." and sends it back to the user via their device.

[0056] Scenario 2: Inquiring about the delivery status of an item

[0057] The user asks, "Where can I check the delivery status of my item?" The server processes this question using a similar process, and from its fine-tuned model generates a response such as, "You can check the delivery status of your item on my page on our website," and notifies the user.

[0058] The system of this invention eliminates dependency on external APIs and cloud computing and can be easily implemented and operated in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide advanced chatbots efficiently and at low cost.

[0059] The processing flow will be explained below.

[0060] Step 1: Prepare the dataset

[0061] A user prepares FAQ data as a text file and uploads it to the server. The server reads the uploaded text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[0062] Step 2: Setting up the model and tokenizer

[0063] The server loads a pre-trained generative model (GPT-2 model) along with a tokenizer to be applied to the generative model, preparing to convert text data into a token format that the model can understand.

[0064] Step 3: Prepare for Fine Tuning

[0065] The server takes the text dataset generated in step 1, splits the dataset into batches, and prepares the data for input to the model. Here, DataCollatorForLanguageModeling is used to create the batches of data.

[0066] Step 4: Perform fine tuning

[0067] The server begins fine-tuning the generative model by setting training parameters (e.g., number of epochs, batch size, etc.) and training the model. In the process, the server improves its ability to generate sentences based on data relevant to a specific task.

[0068] Step 5: Save the Fine-Tuning Model

[0069] The server saves the fine-tuned generative model in the specified directory, which is then used to generate responses for the chatbot.

[0070] Step 6: Build your chatbot

[0071] The server uses the fine-tuned generative model to build a chatbot, which then configures a dialogue system including a user interface to enable the chatbot to respond to user questions.

[0072] Step 7: User Initiates Interaction

[0073] The user initiates a dialogue with the chatbot through the terminal. When the user inputs a question to the chatbot, the input is sent to the server.

[0074] Step 8: Tokenize user input

[0075] The server uses a tokenizer to convert user input into tokens, which are then passed to the generative model.

[0076] Step 9: Response generation using the generative model

[0077] The server inputs the tokenized user input into the generative model and generates an appropriate response, which is then decoded back into text form.

[0078] Step 10: Returning a response to the user

[0079] The server then sends the generated response back to the terminal. The user can check the response from the chatbot on the screen. This process is repeated continuously, ensuring smooth dialogue between the user and the chatbot.

[0080] Example 1

[0081] 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."

[0082] Conventional chatbots rely on external APIs and cloud services, which can create responses tailored to specific tasks, resulting in high costs and complex management. Data security is also often an issue. The present invention aims to solve these issues by providing a chatbot system that can operate in a local environment and efficiently process data related to specific tasks.

[0083] 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.

[0084] In this invention, the server includes means for preparing a dataset, means for tokenizing a generative model, means for generating sentences using the generative model, means for fine-tuning data related to a specific job role based on the generative model, means for constructing a chatbot that runs in a local environment using the fine-tuned generative model, means for providing a dialogue interface with the chatbot, means for tokenizing inquiries from users and passing them to the fine-tuned generative model, and means for providing generated responses to the user. This makes it possible to provide an efficient, low-cost chatbot that can be easily introduced and operated in a local environment and is specialized for a specific job role.

[0085] A "dataset" is a collection of data collected and organized for a specific purpose.

[0086] A "generative model" is a machine learning model trained to generate sentences in natural language processing.

[0087] "Tokenization" is the process of dividing a sentence into the smallest units called words or tokens.

[0088] "Fine-tuning" is the process of further training an existing generative model to suit a specific purpose.

[0089] A "local environment" is an environment in which the system operates using the user's own computing resources, without relying on a specific network or cloud service.

[0090] A "chatbot" is a program that simulates natural language dialogue and automatically generates responses to user inquiries.

[0091] A "conversational interface" is an interface that allows users to interact with a chatbot via text or voice.

[0092] An "inquiry" is a question or request made by a user to a chatbot.

[0093] A "response" is a reply that a chatbot generates in response to a user's inquiry.

[0094] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks. Specific embodiments for implementing the present invention are described below.

[0095] Preparing the dataset

[0096] Users prepare business-specific FAQ data as a text file. This data contains specific questions and their corresponding answers. For example, it may include questions and answers about the product return process or delivery status. The server reads this text file and processes it as a dataset. To read the data, a general file manipulation program is used.

[0097] Setting up the model and tokenizer

[0098] The server loads a pre-trained generative model (e.g., the GPT-2 model) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks. The tokenizer splits user input or datasets into tokens and converts them into a format that the model can easily process.

[0099] Performing fine tuning

[0100] The server then fine-tunes the generative model using the prepared dataset. It sets training parameters such as the number of epochs and batch size to optimize the model's performance. This process equips the model with the ability to generate sentences based on data relevant to a specific task. For example, it can generate detailed answers about the return process or specific responses about the delivery status of an item.

[0101] Building and interacting with chatbots

[0102] The server uses the fine-tuned generative model to build a chatbot. This chatbot runs in a local environment and provides accurate responses to user inquiries. The user can freely input questions using a user interface provided through the terminal, and the chatbot generates responses based on those questions. For example, a user can enter text using a chat window in a web application, and the server tokenizes it, passes it to the generative model, and returns a response.

[0103] Specific examples

[0104] Scenario 1: Product return process inquiry

[0105] The user asks, "What is the product return process?" via their device. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying, "You can return the product within 30 days of the purchase date. If you would like to return the product, please fill out this form." and sends it back to the user via their device.

[0106] Scenario 2: Inquiring about the delivery status of an item

[0107] The user asks, "Where can I check the delivery status of my item?" The server processes this question using a similar process, and from its fine-tuned model generates a response such as, "You can check the delivery status of your item on my page on our website," and notifies the user.

[0108] The system of this invention eliminates dependency on external APIs and cloud computing and can be easily implemented and operated in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide advanced chatbots efficiently and at low cost.

[0109] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0110] Step 1: Prepare the dataset

[0111] The user prepares FAQ data specific to the business as a text file.

[0112] Input: FAQ data (text file)

[0113] Output: Prepared text file

[0114] What it does: Users collect and create text files containing work-related questions and answers.

[0115] The server reads this text file and processes it as a dataset.

[0116] Input: User-prepared text file

[0117] Output: Tokenized dataset

[0118] What happens: The server opens the text file, reads the contents into memory, and extracts each question-answer pair to form a dataset.

[0119] Step 2: Setting up the model and tokenizer

[0120] The server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer.

[0121] Input: GPT-2 model and tokenizer

[0122] Output: Loaded model and tokenizer

[0123] Specific operation: The server downloads the generative model (GPT-2) and tokenizer from a predefined library and loads them into memory.

[0124] Step 3: Perform fine tuning

[0125] The server uses the prepared dataset to fine-tune the generative model.

[0126] Input: Tokenized dataset

[0127] Output: A fine-tuned generative model

[0128] How it works: The server sets training parameters such as the number of epochs and batch size, and retrains the generative model based on the tokenized dataset. In this process, the model's performance is optimized for the specific business data.

[0129] Step 4: Build and interact with your chatbot

[0130] The server builds a chatbot using a fine-tuned generative model.

[0131] Input: Fine-tuned generative model

[0132] Output: Chatbot running in local environment

[0133] Specific operation: Implement chatbot functions based on the fine-tuned model and configure it to run properly on a local server.

[0134] The user inputs a question through a user interface provided through the terminal.

[0135] Input: User question (text input)

[0136] Output: Query data from the terminal to the server

[0137] How it works: A user types a question using a chat window in a web application, and the data is sent to the server.

[0138] The server tokenizes this input and passes it to the generative model.

[0139] Input: User question (text data)

[0140] Output: Input tokens to the generative model

[0141] Specific operation: The server uses a tokenizer to convert the user's question into tokens and input them into the generative model.

[0142] The generated response is provided to the user.

[0143] Input: Response data from the generative model

[0144] Output: Response to user (text)

[0145] Specific behavior: The response obtained from the generative model is decoded and sent back to the user as text.

[0146] Specific operation example

[0147] Scenario 1: Product return process inquiry

[0148] Question: "What is the process for returning products?"

[0149] Response: "You can return an item within 30 days of purchase. If you would like to return an item, please fill out this form."

[0150] Scenario 2: Inquiring about the delivery status of an item

[0151] Question: "Where can I check the delivery status of my item?"

[0152] Response: "You can check your delivery status on My Page on our website."

[0153] (Application example 1)

[0154] 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."

[0155] At logistics centers, many staff members are tasked with inventory management and checking delivery status, and they are required to respond to inquiries quickly and accurately. Therefore, it is necessary to use an efficient interactive system to reduce the workload on staff and improve work efficiency.

[0156] 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.

[0157] In this invention, the server includes means for generating sentences using a generative model, means for fine-tuning data related to a specific task based on the generative model, means for building a chatbot that runs in a local environment using the fine-tuned generative model, means for preparing a dataset, means for tokenizing the generative model, means for providing a dialogue interface with the chatbot via an application installed on a mobile information terminal used by staff in the logistics center, and means for generating responses to inquiries about inventory and delivery status. This enables staff in the logistics center to quickly and accurately check inventory and delivery status using their mobile information terminals.

[0158] A "generative model" is a pre-trained algorithm, a system for generating new sentences or text based on input text.

[0159] "Fine-tuning" is the process of further training a pre-trained generative model using a specific dataset to adapt it to a specific task or application.

[0160] A "chatbot" is a computer program that interacts with users and is a system that uses natural language processing technology to generate appropriate responses to questions.

[0161] A "dataset" is a collection of data used to train or fine-tune a generative model, including questions and answers relevant to a particular task.

[0162] "Tokenization" is the process of dividing text data into smaller units such as words or subwords, and is a preprocessing step for input into a generative model.

[0163] "Personal digital assistant" refers to a portable computing device, including smartphones and tablets.

[0164] A "conversational interface" is a user interface that allows a user to effectively interact with a chatbot, providing the ability to input text and receive responses.

[0165] "Inventory check" refers to the process of checking the inventory status within a logistics center, and is a means of checking the current inventory amount and location.

[0166] "Delivery status confirmation" is a process for checking the current delivery status of shipped products, and is a means for checking product tracking information and the estimated delivery date and time.

[0167] This invention is a chatbot system that responds quickly and accurately to inquiries such as inventory checks and delivery status checks via an application installed on a mobile information terminal used by staff in a logistics center. Specific embodiments are described below.

[0168] System Overview

[0169] The system is broadly composed of the following elements:

[0170] 1. A method for generating sentences using a generative model

[0171] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0172] 3. A way to build chatbots that run locally using fine-tuned generative models

[0173] 4. How to prepare the dataset

[0174] 5. Means of tokenizing generative models

[0175] 6. A means of providing a conversational interface with the chatbot via an application installed on mobile devices used by staff in the distribution center.

[0176] 7. Means of generating responses to inventory and delivery status queries

[0177] Hardware and Software

[0178] We use a server and a mobile information device (smartphone or tablet). The server is equipped with a high-performance GPU and uses PyTorch and the Transformers library to train and fine-tune the generative model.

[0179] Server: PC / server with high performance GPU

[0180] software:

[0181] PyTorch: A deep learning framework

[0182] Transformers: Library for Transformer models (Hugging Face)

[0183] Data processing and calculation

[0184] Prepare the dataset:

[0185] The user prepares FAQ data specific to the operations within the distribution center as a text file, which contains specific questions and their corresponding answers.

[0186] Setting up the model and tokenizer:

[0187] The server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks.

[0188] Perform fine tuning:

[0189] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[0190] Build and interact with chatbots:

[0191] The server uses the fine-tuned generative model to build a chatbot, which runs in a local environment. The chatbot uses a user interface provided by a mobile information terminal to allow users to freely input questions, and the chatbot generates responses based on the questions.

[0192] Specific examples

[0193] Scenario 1: Checking inventory

[0194] The user asks "How do I check inventory?" via a mobile information terminal. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying "You can check all inventory status by accessing the logistics system and clicking the inventory tab," and sends it back to the user via the terminal.

[0195] Scenario 2: Checking Delivery Status

[0196] The user asks "Where can I check the delivery status of my product?" via a mobile information terminal. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying "You can check your delivery status from your personal page in the logistics system," and notifies the user via the terminal.

[0197] This system allows staff at the logistics center to use smartphones and tablets to carry out their work efficiently and obtain the information they need quickly and accurately.

[0198] Example prompt sentence:

[0199] "Please explain the normal inventory check procedure at your distribution center."

[0200] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[0201] Step 1:

[0202] A user uses a handheld device to input a question about inventory or delivery status. This input is in text format and is sent by the user through the application's dialogue interface.

[0203] Input: The question text entered by the user (e.g., "How do I check inventory?")

[0204] Output: The question text is sent to the server

[0205] Step 2:

[0206] The terminal sends the user's question text to the server, which communicates over the Internet and waits for the text to be processed appropriately.

[0207] Input: Question text submitted by the user

[0208] Output: Question text for server input

[0209] Step 3:

[0210] The server tokenizes the received question text. Specifically, it uses a tokenizer compatible with the GPT-2 model to convert the text into tokens (words and subwords). This process prepares the text in a format that can be input to a generative model.

[0211] Input: Question text

[0212] Output: Tokenized text data

[0213] Step 4:

[0214] The server runs a generative model on the tokenized text data to generate a response. The fine-tuned GPT-2 model performs computations to generate a coherent response based on the input tokens.

[0215] Input: Tokenized text data

[0216] Output: The response text generated by the generative model

[0217] Step 5:

[0218] The server then detokenizes the generated response text, specifically by using a tokenizer to convert the tokens back into natural language sentences. This process results in a text response that can be provided directly to the user.

[0219] Input: Tokenized response text

[0220] Output: Natural language response text

[0221] Step 6:

[0222] The server then sends the detokenized response text to the terminal, which also communicates over the Internet, enabling real-time responses.

[0223] Input: Natural language response text

[0224] Output: Response text sent to the terminal

[0225] Step 7:

[0226] The terminal displays the response text received from the server to the user, who can then check the generated response through the dialogue interface and decide on the next action based on the content of the response.

[0227] Input: Response text received from the server

[0228] Output: The response text that is displayed to the user

[0229] Through these processing steps, users will be able to receive prompt and accurate responses to inquiries such as inventory checks and delivery status confirmations. This system will streamline operations within the logistics center and reduce the workload of staff.

[0230] 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.

[0231] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks, while recognizing the user's emotions and generating responses according to those emotions. Specific embodiments for implementing the present invention are described below.

[0232] System Overview

[0233] The system is broadly composed of the following elements:

[0234] 1. A method for generating sentences using a generative model

[0235] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0236] 3. A way to build chatbots that run locally using fine-tuned generative models

[0237] 4. A method for recognizing user emotions using an emotion engine

[0238] 5. A means of selecting appropriate responses based on perceived emotions

[0239] 6. How to prepare the dataset

[0240] 7. Means of tokenizing generative models

[0241] 8. Means of providing a conversational interface with chatbots

[0242] Program processing

[0243] Preparing the dataset

[0244] A user prepares FAQ data as a text file and uploads it to the server. The server reads the text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[0245] Setting up the model and tokenizer

[0246] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer, ready to convert text data into a token format that the model can understand.

[0247] Performing fine tuning

[0248] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[0249] Emotion engine setup and emotion recognition

[0250] The server sets up an emotion engine to analyze the text input from the user and recognize emotions. The emotion engine extracts emotions (e.g., joy, sadness, anger) from the user's input text and provides the emotion information to the generative model.

[0251] Building and interacting with chatbots

[0252] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot that runs in a local environment. This chatbot recognizes emotions in response to user inquiries and generates optimal responses based on the results. The user can freely input questions using a user interface provided through the device, and the chatbot generates a response based on the question and the recognized emotions.

[0253] Specific examples

[0254] Scenario 1: Product return process inquiry

[0255] The user asks, "What is the process for returning products?" The server tokenizes this input and passes it to the generative model. At the same time, it uses an emotion engine to recognize the user's emotions. The model generates a response and displays it on the device: "You can return a product within 30 days of the purchase date. If you wish to return a product, please fill out this form."

[0256] Scenario 2: An angry inquiry about the delivery status of a product

[0257] The user asks in frustration, "Why hasn't my item arrived yet?" The server uses a tokenizer and a generative model to generate a response, while also using an emotion engine to recognize the user's angry emotion. Based on this recognition, the server adjusts the response to return a more polite and empathetic message. For example, the server might reply to the user via their device, "We understand your frustration. We will immediately check the delivery status, so please wait a moment."

[0258] The system of this invention eliminates dependency on external APIs and cloud computing, allowing for easy deployment and operation in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide sophisticated chatbots efficiently and at low cost. Furthermore, by integrating an emotion engine, appropriate responses based on the user's emotions can be provided, significantly improving the user experience.

[0259] The processing flow will be explained below.

[0260] Step 1: Prepare the dataset

[0261] Users prepare business-specific FAQ data as text files and upload them to the server. The server reads the uploaded text files and processes them as a dataset. Specifically, it tokenizes the text in the files using a tokenizer to generate a text dataset.

[0262] Step 2: Setting up the model and tokenizer

[0263] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer, ready to convert text data into a token format that the model can understand.

[0264] Step 3: Prepare for Fine Tuning

[0265] The server takes the text dataset generated in step 1, splits the dataset into batches, and prepares the data for input to the model. Here, DataCollatorForLanguageModeling is used to create the batches of data.

[0266] Step 4: Perform fine tuning

[0267] The server begins fine-tuning the generative model by setting training parameters (e.g., number of epochs, batch size, etc.) and training the model. In the process, the server improves its ability to generate sentences based on data relevant to a specific task.

[0268] Step 5: Save the Fine-Tuning Model

[0269] The server saves the fine-tuned generative model in the specified directory, which is then used to generate responses for the chatbot.

[0270] Step 6: Setting up the Emotion Engine

[0271] The server sets up an emotion engine to analyze and recognize emotions from the user's input text. The emotion engine contains algorithms to extract emotions such as joy, sadness, anger, etc. from the user's input.

[0272] Step 7: Build your chatbot

[0273] The server integrates the fine-tuned generative model and emotion engine to build a chatbot that runs in a local environment. Here, a dialogue system including a user interface is set up, allowing the chatbot to respond based on user questions and emotions.

[0274] Step 8: User Initiates Interaction

[0275] The user initiates a dialogue with the chatbot through the terminal. When the user inputs a question to the chatbot, the input is sent to the server.

[0276] Step 9: Tokenize user input

[0277] The server uses a tokenizer to convert user input into tokens, which are then passed to the generative model.

[0278] Step 10: Emotion Recognition

[0279] The server analyzes and recognizes emotions from the user's input text using an emotion engine. The recognized emotion information is used to generate responses in the generative model.

[0280] Step 11: Response generation using the generative model

[0281] The server inputs the tokenized user input and the recognized emotion information into a generative model to generate an appropriate response, which is then decoded back into text format.

[0282] Step 12: Returning a response to the user

[0283] The server then sends the generated response back to the terminal. The user can check the response from the chatbot on the screen. This process is repeated continuously, ensuring smooth dialogue between the user and the chatbot.

[0284] Example 2

[0285] 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."

[0286] The present invention relates to a chatbot system. Conventional chatbots have had issues with their difficulty in accurately responding to data related to specific tasks and lacking responses that take user emotions into consideration. This can lead to a decline in the quality of the user experience and a loss of system reliability. There is also a need for a high-performance chatbot system that can be operated in a local environment without relying on external APIs or cloud services.

[0287] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[0288] In this invention, the server includes: means for generating sentences using a generative model; means for fine-tuning data related to a specific task based on the generative model; means for building a chatbot that operates in a local environment using the fine-tuned generative model; means for preparing a dataset; means for tokenizing the generative model; means for recognizing a user's emotion using an emotion engine; means for selecting an appropriate response based on the recognized emotion; and means for providing a dialogue interface with the chatbot. This makes it possible to generate accurate responses that take the user's emotion into consideration and provide an enhanced user experience. It also makes it possible to realize a chatbot system that can be operated efficiently and at low cost in a local environment.

[0289] A "generative model" is a machine learning model designed to generate new sentences from text data using natural language processing algorithms.

[0290] "Fine-tuning" is the process of further training a pre-trained model with a specific dataset to optimize it for a particular task or application.

[0291] A "local environment" is a computing environment that operates independently within a company's or individual's computer system, rather than on a cloud server or external network.

[0292] A "dataset" is a collection of data used to train and evaluate machine learning models.

[0293] "Tokenization" is the process of breaking down text data into smaller units (tokens) and converting them into a format that can be processed by machine learning models.

[0294] An "emotion engine" is an algorithm or system that analyzes text data entered by a user and identifies emotions such as joy, sadness, and anger.

[0295] An "interactive interface" is a user interface that includes a communication means and a display screen for a user to input and receive responses from the system.

[0296] The "means for selecting a response" is a mechanism for selecting the optimal response based on specific criteria from multiple response candidates generated by the generative model.

[0297] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks, while recognizing the user's emotions and generating responses according to those emotions. Specific embodiments for implementing the present invention are described below.

[0298] System Overview

[0299] The system is broadly composed of the following elements:

[0300] 1. A method for generating sentences using a generative model

[0301] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0302] 3. A way to build chatbots that run locally using fine-tuned generative models

[0303] 4. How to prepare the dataset

[0304] 5. Means of tokenizing generative models

[0305] 6. Means of recognizing user emotions using an emotion engine

[0306] 7. A means of selecting appropriate responses based on perceived emotions

[0307] 8. Means of providing a conversational interface with chatbots

[0308] First, a user prepares FAQ data as a text file and uploads it to the server. The server reads the text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[0309] Next, the server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer, which allows it to convert text data into a tokenized form that the model can understand.

[0310] The server then fine-tunes the generative model using the prepared dataset, enabling the model to generate sentences based on data relevant to the specific task. The fine-tuning process involves specifically setting training parameters such as the number of epochs and batch size to optimize the model's performance.

[0311] Furthermore, the server sets up an emotion engine to analyze the text input from the user and recognize emotions. The emotion engine extracts emotions (e.g., joy, sadness, anger) from the user's input text and provides the emotion information to the generative model.

[0312] Finally, the server integrates the fine-tuned generative model and the emotion engine to build a chatbot that runs in the local environment. This chatbot recognizes emotions in response to user inquiries and generates optimal responses based on the results. The user can freely input questions using a user interface provided through the device, and the chatbot generates responses based on the questions and the recognized emotions.

[0313] Specific examples

[0314] Scenario 1: Product return process inquiry

[0315] A user asks, "What is the process for returning a product?"

[0316] The server tokenizes this input and passes it to the generative model, while simultaneously using the emotion engine to recognize the user's emotions.

[0317] The model generates a response that displays on the device: "You can return the product within 30 days of the date of purchase. If you would like to return the product, please fill out this form."

[0318] Scenario 2: An angry inquiry about the delivery status of a product

[0319] The user asks in frustration, "Why hasn't my item arrived yet?"

[0320] The server uses a tokenizer and a generative model to generate a response, while using an emotion engine to recognize the user's anger emotion.

[0321] Based on this knowledge, it can adjust its response to be more polite and empathetic, for example, replying to the user via the device, "We understand your frustration. We will check the delivery status immediately, so please wait a moment."

[0322] The system of this invention eliminates dependency on external APIs and cloud computing, allowing for easy deployment and operation in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide sophisticated chatbots efficiently and at low cost. Furthermore, by integrating an emotion engine, appropriate responses based on the user's emotions can be provided, significantly improving the user experience.

[0323] The flow of the identification process in the second embodiment will be described with reference to FIG.

[0324] Step 1:

[0325] Preparing the dataset

[0326] A user prepares FAQ data as a text file and uploads the file to the server.

[0327] Users compile FAQs related to a particular task into a text file.

[0328] The user submits this text file to the server via the system's upload interface.

[0329] The server reads this text file and processes it as a dataset.

[0330] The server reads the received text file and analyzes its contents.

[0331] Input: FAQ text file, Output: tokenized dataset

[0332] The server passes the text to a tokenizer, which converts each string into a token.

[0333] The tokenized data is saved as a dataset used for fine-tuning.

[0334] Step 2:

[0335] Setting up the model and tokenizer

[0336] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer.

[0337] The server loads a pre-trained generative model (GPT-2) from external or local storage and deploys it in memory.

[0338] Input: GPT-2 model from external storage, Output: unpacked GPT-2 model in memory

[0339] At the same time, the tokenizer is loaded and ready to convert text data into token format.

[0340] Step 3:

[0341] Performing fine tuning

[0342] The server uses the prepared dataset to fine-tune the generative model.

[0343] The server passes the dataset to the training module to fine-tune the generative model.

[0344] Input: Tokenized dataset and training parameters (number of epochs, batch size, etc.), Output: Fine-tuned generative model

[0345] During this process, training parameters such as the number of epochs and batch size are set to efficiently optimize the model.

[0346] Once fine-tuned, the generative model will have the ability to generate sentences specialized for a specific task.

[0347] Step 4:

[0348] Emotion engine setup and emotion recognition

[0349] The server sets up an emotion engine to analyze text input from the user and recognize emotions.

[0350] The server loads the emotion engine and prepares to parse emotions from the user's text input.

[0351] Input: Emotion engine, user input text, Output: Parsed emotion data

[0352] The text entered by the user through the terminal is sent to the server and analyzed by the emotion engine.

[0353] The recognized emotion (happiness, sadness, anger, etc.) is used in the next step.

[0354] Step 5:

[0355] Building and interacting with chatbots

[0356] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot that runs in a local environment.

[0357] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot system.

[0358] Input: Fine-tuned generative model, emotion engine, user input text, Output: Response provided to user

[0359] The user inputs questions or inquiries through the terminal.

[0360] The server receives the input, tokenizes it using a tokenizer, and passes it to the generative model.

[0361] At the same time, an emotion engine is used to analyze the user's emotions and provide that information to the generative model.

[0362] The generative model generates an optimal response based on the question content and the analyzed emotions and sends it to the device.

[0363] The terminal displays the generated response to the user.

[0364] (Application example 2)

[0365] 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."

[0366] Conventional chatbot systems often only return standard responses to user inquiries, and have had the problem of difficulty in recognizing the user's emotions and responding appropriately. This has led to problems such as a poor user experience and difficulty in improving satisfaction. To solve these problems, the present invention aims to provide a system that recognizes the user's emotions and automatically generates responses based on them.

[0367] 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.

[0368] In this invention, the server includes means for generating sentences using a generative model, means for fine-tuning data related to a specific task based on the generative model, means for building a chatbot that operates in a local environment using the fine-tuned generative model, means for preparing a dataset, means for tokenizing the generative model, means for providing a dialogue interface with the chatbot, means for recognizing a user's emotion using an emotion engine, and means for selecting an appropriate response based on the recognized emotion. This enables responses to be generated taking the user's emotion into consideration, thereby providing a more satisfying user experience.

[0369] A "generative model" is an artificial intelligence model that uses machine learning algorithms to automatically generate natural language sentences.

[0370] "Fine-tuning" is the process of retraining a pre-trained machine learning model with data relevant to a specific task or domain to improve its accuracy and performance.

[0371] "Running in a local environment" means running the system on a company or individual's dedicated server or computer without using an external server or cloud.

[0372] A "chatbot" is a software robot that automatically conducts conversations with users, usually through text-based interactions.

[0373] A "dataset" is a set of data used to train and evaluate a machine learning model.

[0374] "Tokenization" is the process of dividing a natural language sentence into small units (tokens) such as words or subwords.

[0375] An "interactive interface" is an interface that allows a user to interact with a system, and includes text input, button operations, and the like.

[0376] An "emotion engine" is a software component that analyzes and recognizes emotions from text entered by the user.

[0377] An "emotion-based response" is a response generated taking into account the emotion expressed by the user, and includes a message that is appropriately tailored to, for example, joy or anger.

[0378] The present invention relates to a chatbot system for recognizing a user's emotions and automatically generating a response based on the emotions. Specific embodiments for carrying out the present invention will be described below.

[0379] System Configuration

[0380] The system consists of the following main components:

[0381] 1. A method for generating sentences using a generative model

[0382] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0383] 3. A way to build chatbots that run locally using fine-tuned generative models

[0384] 4. How to prepare the dataset

[0385] 5. Means of tokenizing generative models

[0386] 6. Means of providing a conversational interface with chatbots

[0387] 7. Means of recognizing user emotions using an emotion engine

[0388] 8. A means of selecting appropriate responses based on perceived emotions

[0389] Hardware and software used

[0390] Hardware: Server equipped with high-performance CPU / GPU

[0391] software:

[0392] Generative AI model: GPT-2 (pre-trained)

[0393] Tokenizer: Hugging Face's Tokenizer

[0394] Sentiment engine: Sentiment Analysis API (e.g., Google® Cloud Natural Language API)

[0395] Web framework: Flask

[0396] Mobile app: Flutter (registered trademark)

[0397] System Operation Overview

[0398] 1. Dataset preparation

[0399] A user collects FAQ data from an online shopping site as a text file and uploads it to the server, which then reads the text file, tokenizes it using a tokenizer, and generates a dataset.

[0400] 2. Setting up the model and tokenizer

[0401] The server loads a pre-trained GPT-2 model and its corresponding tokenizer, which is then ready to convert text data into a tokenized format that the model can understand.

[0402] 3. Perform fine tuning

[0403] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task.

[0404] 4. Emotion Engine Setup and Emotion Recognition

[0405] The text entered by the user is analyzed using the server's emotion engine (Sentiment Analysis API) to recognize emotions. This emotion engine extracts emotions (such as joy, sadness, and anger) from the user's input text and provides the emotion information to the generative model.

[0406] 5. Building and interacting with chatbots

[0407] The server integrates a fine-tuned generative model and an emotion engine to run a chatbot in a local environment. The chatbot performs emotion recognition on user inquiries through a smartphone application (built using Flutter) and generates optimal responses based on the results.

[0408] Specific examples

[0409] Scenario 1: Requesting product details

[0410] The user types into the app, "Tell me more about this product."

[0411] The emotion engine recognizes the user's emotion as "neutral."

[0412] The GPT-2 model generates a response like this: "This product is made from high-quality materials and is available in a variety of sizes and colors. Click here to learn more."

[0413] Scenario 2: Late delivery claim

[0414] The user types in frustration, "Why hasn't my item arrived yet?"

[0415] The emotion engine recognizes the user's emotion as "anger."

[0416] The response generated by the GPT-2 model reads: "We understand your frustration. We will check the delivery status as soon as possible. Please wait a moment."

[0417] Prompt Sentence Examples

[0418] An example of a bad customer inquiry: "Why hasn't my item arrived yet? I've been waiting so long."

[0419] Example of a neutral inquiry: "What are the specifications of this product?"

[0420] This makes it possible to generate a response that takes the user's emotions into consideration, thereby improving customer satisfaction.

[0421] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[0422] Step 1: Prepare the dataset

[0423] A user collects FAQ data from an online shopping site as a text file and uploads it to the server. The server reads the uploaded text file, tokenizes it using a tokenizer, and generates a dataset.

[0424] Input: FAQ data text file

[0425] Output: Tokenized dataset

[0426] What it does: The server reads a text file from the file system, then uses a tokenizer to tokenize the text and convert it into a format that the generative AI model can understand.

[0427] Step 2: Setting up the model and tokenizer

[0428] The server loads a pre-trained GPT-2 model and its corresponding tokenizer.

[0429] Input: None

[0430] Output: Loaded GPT-2 model and tokenizer

[0431] What happens: The server loads the GPT-2 model file and tokenizer from disk and unpacks it into memory, allowing the model to understand and process text data.

[0432] Step 3: Perform fine tuning

[0433] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task.

[0434] Input: Tokenized dataset, pre-trained GPT-2 model

[0435] Output: A fine-tuned GPT-2 model

[0436] How it works: The server splits the dataset into batches and uses each batch to adjust the model parameters. With each epoch, the model improves and becomes more adaptable to the given task.

[0437] Step 4: Setting up the emotion engine and emotion recognition

[0438] The text entered by the user is analyzed using the server's emotion engine to recognize emotions, and this emotion information is provided to the generative model.

[0439] Input: Text entered by the user

[0440] Output: Recognized emotion data

[0441] Specific operation: The server calls the emotion engine and analyzes the user input text. The emotion engine extracts emotions from the text and passes the results to the generative model.

[0442] Step 5: Build and interact with your chatbot

[0443] The server integrates a fine-tuned generative model and an emotion engine to run the chatbot in a local environment. It recognizes emotions in response to user inquiries and generates optimal responses via a smartphone app.

[0444] Input: User query, recognized emotion data

[0445] Output: Response message to the user

[0446] How it works: When a user types a question into a chatbot app, the text is sent to the server, which analyzes the emotion using an emotion engine and inputs that information into a generative model. The generative model then generates a text response, which is then displayed through the user interface.

[0447] Step 6: Providing a User Interface

[0448] The device (smartphone) provides an interface through which the user can interact with the chatbot, inputting inquiries and receiving responses.

[0449] Input: User query

[0450] Output: Chatbot response

[0451] Specific operation: The device is an app built using Flutter that captures user input, sends it to the server, receives the response from the server, and displays it on the screen.

[0452] 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.

[0453] 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.

[0454] 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.

[0455] [Second embodiment]

[0456] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.

[0457] 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.

[0458] 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).

[0459] 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.

[0460] 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.

[0461] 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).

[0462] 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.

[0463] 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.

[0464] 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.

[0465] 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.

[0466] 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.

[0467] 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."

[0468] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks. Specific embodiments for implementing the present invention are described below.

[0469] System Overview

[0470] The system is broadly composed of the following elements:

[0471] 1. A method for generating sentences using a generative model

[0472] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0473] 3. A way to build chatbots that run locally using fine-tuned generative models

[0474] 4. How to prepare the dataset

[0475] 5. Means of tokenizing generative models

[0476] 6. Means of providing a conversational interface with chatbots

[0477] Program processing

[0478] Preparing the dataset

[0479] Users prepare business-specific FAQ data as a text file, which contains specific questions and their corresponding answers. The server reads this text file and processes it as a dataset.

[0480] Setting up the model and tokenizer

[0481] The server loads a pre-trained generative model (e.g., GPT-2 model) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks.

[0482] Performing fine tuning

[0483] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[0484] Building and interacting with chatbots

[0485] The server uses the fine-tuned generative model to build a chatbot. This chatbot runs in a local environment and provides accurate responses to user inquiries. The user can freely input questions using a user interface provided through the terminal, and the chatbot generates responses based on the questions.

[0486] Specific examples

[0487] Scenario 1: Product return process inquiry

[0488] The user asks, "What is the product return process?" via their device. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying, "You can return the product within 30 days of the purchase date. If you would like to return the product, please fill out this form." and sends it back to the user via their device.

[0489] Scenario 2: Inquiring about the delivery status of an item

[0490] The user asks, "Where can I check the delivery status of my item?" The server processes this question using a similar process, and from its fine-tuned model generates a response such as, "You can check the delivery status of your item on my page on our website," and notifies the user.

[0491] The system of this invention eliminates dependency on external APIs and cloud computing and can be easily implemented and operated in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide advanced chatbots efficiently and at low cost.

[0492] The processing flow will be explained below.

[0493] Step 1: Prepare the dataset

[0494] A user prepares FAQ data as a text file and uploads it to the server. The server reads the uploaded text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[0495] Step 2: Setting up the model and tokenizer

[0496] The server loads a pre-trained generative model (GPT-2 model) along with a tokenizer to be applied to the generative model, preparing to convert text data into a token format that the model can understand.

[0497] Step 3: Prepare for Fine Tuning

[0498] The server takes the text dataset generated in step 1, splits the dataset into batches, and prepares the data for input to the model. Here, DataCollatorForLanguageModeling is used to create the batches of data.

[0499] Step 4: Perform fine tuning

[0500] The server begins fine-tuning the generative model by setting training parameters (e.g., number of epochs, batch size, etc.) and training the model. In the process, the server improves its ability to generate sentences based on data relevant to a specific task.

[0501] Step 5: Save the Fine-Tuning Model

[0502] The server saves the fine-tuned generative model in the specified directory, which is then used to generate responses for the chatbot.

[0503] Step 6: Build your chatbot

[0504] The server uses the fine-tuned generative model to build a chatbot, which then configures a dialogue system including a user interface to enable the chatbot to respond to user questions.

[0505] Step 7: User Initiates Interaction

[0506] The user initiates a dialogue with the chatbot through the terminal. When the user inputs a question to the chatbot, the input is sent to the server.

[0507] Step 8: Tokenize user input

[0508] The server uses a tokenizer to convert user input into tokens, which are then passed to the generative model.

[0509] Step 9: Response generation using the generative model

[0510] The server inputs the tokenized user input into the generative model and generates an appropriate response, which is then decoded back into text form.

[0511] Step 10: Returning a response to the user

[0512] The server then sends the generated response back to the terminal. The user can check the response from the chatbot on the screen. This process is repeated continuously, ensuring smooth dialogue between the user and the chatbot.

[0513] Example 1

[0514] 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."

[0515] Conventional chatbots rely on external APIs and cloud services, which can create responses tailored to specific tasks, resulting in high costs and complex management. Data security is also often an issue. The present invention aims to solve these issues by providing a chatbot system that can operate in a local environment and efficiently process data related to specific tasks.

[0516] 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.

[0517] In this invention, the server includes means for preparing a dataset, means for tokenizing a generative model, means for generating sentences using the generative model, means for fine-tuning data related to a specific job role based on the generative model, means for constructing a chatbot that runs in a local environment using the fine-tuned generative model, means for providing a dialogue interface with the chatbot, means for tokenizing inquiries from users and passing them to the fine-tuned generative model, and means for providing generated responses to the user. This makes it possible to provide an efficient, low-cost chatbot that can be easily introduced and operated in a local environment and is specialized for a specific job role.

[0518] A "dataset" is a collection of data collected and organized for a specific purpose.

[0519] A "generative model" is a machine learning model trained to generate sentences in natural language processing.

[0520] "Tokenization" is the process of dividing a sentence into the smallest units called words or tokens.

[0521] "Fine-tuning" is the process of further training an existing generative model to suit a specific purpose.

[0522] A "local environment" is an environment in which the system operates using the user's own computing resources, without relying on a specific network or cloud service.

[0523] A "chatbot" is a program that simulates natural language dialogue and automatically generates responses to user inquiries.

[0524] A "conversational interface" is an interface that allows users to interact with a chatbot via text or voice.

[0525] An "inquiry" is a question or request made by a user to a chatbot.

[0526] A "response" is a reply that a chatbot generates in response to a user's inquiry.

[0527] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks. Specific embodiments for implementing the present invention are described below.

[0528] Preparing the dataset

[0529] Users prepare business-specific FAQ data as a text file. This data contains specific questions and their corresponding answers. For example, it may include questions and answers about the product return process or delivery status. The server reads this text file and processes it as a dataset. To read the data, a general file manipulation program is used.

[0530] Setting up the model and tokenizer

[0531] The server loads a pre-trained generative model (e.g., the GPT-2 model) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks. The tokenizer splits user input or datasets into tokens and converts them into a format that the model can easily process.

[0532] Performing fine tuning

[0533] The server then fine-tunes the generative model using the prepared dataset. It sets training parameters such as the number of epochs and batch size to optimize the model's performance. This process equips the model with the ability to generate sentences based on data relevant to a specific task. For example, it can generate detailed answers about the return process or specific responses about the delivery status of an item.

[0534] Building and interacting with chatbots

[0535] The server uses the fine-tuned generative model to build a chatbot. This chatbot runs in a local environment and provides accurate responses to user inquiries. The user can freely input questions using a user interface provided through the terminal, and the chatbot generates responses based on those questions. For example, a user can enter text using a chat window in a web application, and the server tokenizes it, passes it to the generative model, and returns a response.

[0536] Specific examples

[0537] Scenario 1: Product return process inquiry

[0538] The user asks, "What is the product return process?" via their device. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying, "You can return the product within 30 days of the purchase date. If you would like to return the product, please fill out this form." and sends it back to the user via their device.

[0539] Scenario 2: Inquiring about the delivery status of an item

[0540] The user asks, "Where can I check the delivery status of my item?" The server processes this question using a similar process, and from its fine-tuned model generates a response such as, "You can check the delivery status of your item on my page on our website," and notifies the user.

[0541] The system of this invention eliminates dependency on external APIs and cloud computing and can be easily implemented and operated in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide advanced chatbots efficiently and at low cost.

[0542] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0543] Step 1: Prepare the dataset

[0544] The user prepares FAQ data specific to the business as a text file.

[0545] Input: FAQ data (text file)

[0546] Output: Prepared text file

[0547] What it does: Users collect and create text files containing work-related questions and answers.

[0548] The server reads this text file and processes it as a dataset.

[0549] Input: User-prepared text file

[0550] Output: Tokenized dataset

[0551] What happens: The server opens the text file, reads the contents into memory, and extracts each question-answer pair to form a dataset.

[0552] Step 2: Setting up the model and tokenizer

[0553] The server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer.

[0554] Input: GPT-2 model and tokenizer

[0555] Output: Loaded model and tokenizer

[0556] Specific operation: The server downloads the generative model (GPT-2) and tokenizer from a predefined library and loads them into memory.

[0557] Step 3: Perform fine tuning

[0558] The server uses the prepared dataset to fine-tune the generative model.

[0559] Input: Tokenized dataset

[0560] Output: A fine-tuned generative model

[0561] How it works: The server sets training parameters such as the number of epochs and batch size, and retrains the generative model based on the tokenized dataset. In this process, the model's performance is optimized for the specific business data.

[0562] Step 4: Build and interact with your chatbot

[0563] The server builds a chatbot using a fine-tuned generative model.

[0564] Input: Fine-tuned generative model

[0565] Output: Chatbot running in local environment

[0566] Specific operation: Implement chatbot functions based on the fine-tuned model and configure it to run properly on a local server.

[0567] The user inputs a question through a user interface provided through the terminal.

[0568] Input: User question (text input)

[0569] Output: Query data from the terminal to the server

[0570] How it works: A user types a question using a chat window in a web application, and the data is sent to the server.

[0571] The server tokenizes this input and passes it to the generative model.

[0572] Input: User question (text data)

[0573] Output: Input tokens to the generative model

[0574] Specific operation: The server uses a tokenizer to convert the user's question into tokens and input them into the generative model.

[0575] The generated response is provided to the user.

[0576] Input: Response data from the generative model

[0577] Output: Response to user (text)

[0578] Specific behavior: The response obtained from the generative model is decoded and sent back to the user as text.

[0579] Specific operation example

[0580] Scenario 1: Product return process inquiry

[0581] Question: "What is the process for returning products?"

[0582] Response: "You can return an item within 30 days of purchase. If you would like to return an item, please fill out this form."

[0583] Scenario 2: Inquiring about the delivery status of an item

[0584] Question: "Where can I check the delivery status of my item?"

[0585] Response: "You can check your delivery status on My Page on our website."

[0586] (Application example 1)

[0587] 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."

[0588] At logistics centers, many staff members are tasked with inventory management and checking delivery status, and they are required to respond to inquiries quickly and accurately. Therefore, it is necessary to use an efficient interactive system to reduce the workload on staff and improve work efficiency.

[0589] 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.

[0590] In this invention, the server includes means for generating sentences using a generative model, means for fine-tuning data related to a specific task based on the generative model, means for building a chatbot that runs in a local environment using the fine-tuned generative model, means for preparing a dataset, means for tokenizing the generative model, means for providing a dialogue interface with the chatbot via an application installed on a mobile information terminal used by staff in the logistics center, and means for generating responses to inquiries about inventory and delivery status. This enables staff in the logistics center to quickly and accurately check inventory and delivery status using their mobile information terminals.

[0591] A "generative model" is a pre-trained algorithm, a system for generating new sentences or text based on input text.

[0592] "Fine-tuning" is the process of further training a pre-trained generative model using a specific dataset to adapt it to a specific task or application.

[0593] A "chatbot" is a computer program that interacts with users and is a system that uses natural language processing technology to generate appropriate responses to questions.

[0594] A "dataset" is a collection of data used to train or fine-tune a generative model, including questions and answers relevant to a particular task.

[0595] "Tokenization" is the process of dividing text data into smaller units such as words or subwords, and is a preprocessing step for input into a generative model.

[0596] "Personal digital assistant" refers to a portable computing device, including smartphones and tablets.

[0597] A "conversational interface" is a user interface that allows a user to effectively interact with a chatbot, providing the ability to input text and receive responses.

[0598] "Inventory check" refers to the process of checking the inventory status within a logistics center, and is a means of checking the current inventory amount and location.

[0599] "Delivery status confirmation" is a process for checking the current delivery status of shipped products, and is a means for checking product tracking information and the estimated delivery date and time.

[0600] This invention is a chatbot system that responds quickly and accurately to inquiries such as inventory checks and delivery status checks via an application installed on a mobile information terminal used by staff in a logistics center. Specific embodiments are described below.

[0601] System Overview

[0602] The system is broadly composed of the following elements:

[0603] 1. A method for generating sentences using a generative model

[0604] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0605] 3. A way to build chatbots that run locally using fine-tuned generative models

[0606] 4. How to prepare the dataset

[0607] 5. Means of tokenizing generative models

[0608] 6. A means of providing a conversational interface with the chatbot via an application installed on mobile devices used by staff in the distribution center.

[0609] 7. Means of generating responses to inventory and delivery status queries

[0610] Hardware and Software

[0611] We use a server and a mobile information device (smartphone or tablet). The server is equipped with a high-performance GPU and uses PyTorch and the Transformers library to train and fine-tune the generative model.

[0612] Server: PC / server with high performance GPU

[0613] software:

[0614] PyTorch: A deep learning framework

[0615] Transformers: Library for Transformer models (Hugging Face)

[0616] Data processing and calculation

[0617] Prepare the dataset:

[0618] The user prepares FAQ data specific to the operations within the distribution center as a text file, which contains specific questions and their corresponding answers.

[0619] Setting up the model and tokenizer:

[0620] The server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks.

[0621] Perform fine tuning:

[0622] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[0623] Build and interact with chatbots:

[0624] The server uses the fine-tuned generative model to build a chatbot, which runs in a local environment. The chatbot uses a user interface provided by a mobile information terminal to allow users to freely input questions, and the chatbot generates responses based on the questions.

[0625] Specific examples

[0626] Scenario 1: Checking inventory

[0627] The user asks "How do I check inventory?" via a mobile information terminal. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying "You can check all inventory status by accessing the logistics system and clicking the inventory tab," and sends it back to the user via the terminal.

[0628] Scenario 2: Checking Delivery Status

[0629] The user asks "Where can I check the delivery status of my product?" via a mobile information terminal. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying "You can check your delivery status from your personal page in the logistics system," and notifies the user via the terminal.

[0630] This system allows staff at the logistics center to use smartphones and tablets to carry out their work efficiently and obtain the information they need quickly and accurately.

[0631] Example prompt sentence:

[0632] "Please explain the normal inventory check procedure at your distribution center."

[0633] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[0634] Step 1:

[0635] A user uses a handheld device to input a question about inventory or delivery status. This input is in text format and is sent by the user through the application's dialogue interface.

[0636] Input: The question text entered by the user (e.g., "How do I check inventory?")

[0637] Output: The question text is sent to the server

[0638] Step 2:

[0639] The terminal sends the user's question text to the server, which communicates over the Internet and waits for the text to be processed appropriately.

[0640] Input: Question text submitted by the user

[0641] Output: Question text for server input

[0642] Step 3:

[0643] The server tokenizes the received question text. Specifically, it converts the text into tokens (words and subwords) using a tokenizer compatible with the GPT-2 model. This process prepares the text in a format suitable for input to a generative model.

[0644] Input: Question text

[0645] Output: Tokenized text data

[0646] Step 4:

[0647] The server runs a generative model on the tokenized text data to generate a response. The fine-tuned GPT-2 model performs computations to generate a coherent response based on the input tokens.

[0648] Input: Tokenized text data

[0649] Output: The response text generated by the generative model

[0650] Step 5:

[0651] The server then detokenizes the generated response text, specifically by using a tokenizer to convert the tokens back into natural language sentences. This process results in a text response that can be provided directly to the user.

[0652] Input: Tokenized response text

[0653] Output: Natural language response text

[0654] Step 6:

[0655] The server then sends the detokenized response text to the terminal, which also communicates over the Internet, enabling real-time responses.

[0656] Input: Natural language response text

[0657] Output: Response text sent to the terminal

[0658] Step 7:

[0659] The terminal displays the response text received from the server to the user, who can then check the generated response through the dialogue interface and decide on the next action based on the content of the response.

[0660] Input: Response text received from the server

[0661] Output: The response text that is displayed to the user

[0662] Through these processing steps, users will be able to receive prompt and accurate responses to inquiries such as inventory checks and delivery status confirmations. This system will streamline operations within the logistics center and reduce the workload of staff.

[0663] 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.

[0664] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks, while recognizing the user's emotions and generating responses according to those emotions. Specific embodiments for implementing the present invention are described below.

[0665] System Overview

[0666] The system is broadly composed of the following elements:

[0667] 1. A method for generating sentences using a generative model

[0668] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0669] 3. A way to build chatbots that run locally using fine-tuned generative models

[0670] 4. A method for recognizing user emotions using an emotion engine

[0671] 5. A means of selecting appropriate responses based on perceived emotions

[0672] 6. How to prepare the dataset

[0673] 7. Means of tokenizing generative models

[0674] 8. Means of providing a conversational interface with chatbots

[0675] Program processing

[0676] Preparing the dataset

[0677] A user prepares FAQ data as a text file and uploads it to the server. The server reads the text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[0678] Setting up the model and tokenizer

[0679] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer, ready to convert text data into a token format that the model can understand.

[0680] Performing fine tuning

[0681] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[0682] Emotion engine setup and emotion recognition

[0683] The server sets up an emotion engine to analyze the text input from the user and recognize emotions. The emotion engine extracts emotions (e.g., joy, sadness, anger) from the user's input text and provides the emotion information to the generative model.

[0684] Building and interacting with chatbots

[0685] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot that runs in a local environment. This chatbot recognizes emotions in response to user inquiries and generates optimal responses based on the results. The user can freely input questions using a user interface provided through the device, and the chatbot generates a response based on the question and the recognized emotions.

[0686] Specific examples

[0687] Scenario 1: Product return process inquiry

[0688] The user asks, "What is the process for returning products?" The server tokenizes this input and passes it to the generative model. At the same time, it uses an emotion engine to recognize the user's emotions. The model generates a response and displays it on the device: "You can return a product within 30 days of the purchase date. If you wish to return a product, please fill out this form."

[0689] Scenario 2: An angry inquiry about the delivery status of a product

[0690] The user asks in frustration, "Why hasn't my item arrived yet?" The server uses a tokenizer and a generative model to generate a response, while also using an emotion engine to recognize the user's angry emotion. Based on this recognition, the server adjusts the response to return a more polite and empathetic message. For example, the server might reply to the user via their device, "We understand your frustration. We will immediately check the delivery status, so please wait a moment."

[0691] The system of this invention eliminates dependency on external APIs and cloud computing, allowing for easy deployment and operation in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide sophisticated chatbots efficiently and at low cost. Furthermore, by integrating an emotion engine, appropriate responses based on the user's emotions can be provided, significantly improving the user experience.

[0692] The processing flow will be explained below.

[0693] Step 1: Prepare the dataset

[0694] Users prepare business-specific FAQ data as text files and upload them to the server. The server reads the uploaded text files and processes them as a dataset. Specifically, it tokenizes the text in the files using a tokenizer to generate a text dataset.

[0695] Step 2: Setting up the model and tokenizer

[0696] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer, ready to convert text data into a token format that the model can understand.

[0697] Step 3: Prepare for Fine Tuning

[0698] The server takes the text dataset generated in step 1, splits the dataset into batches, and prepares the data for input to the model. Here, DataCollatorForLanguageModeling is used to create the batches of data.

[0699] Step 4: Perform fine tuning

[0700] The server begins fine-tuning the generative model by setting training parameters (e.g., number of epochs, batch size, etc.) and training the model. In the process, the server improves its ability to generate sentences based on data relevant to a specific task.

[0701] Step 5: Save the Fine-Tuning Model

[0702] The server saves the fine-tuned generative model in the specified directory, which is then used to generate responses for the chatbot.

[0703] Step 6: Setting up the Emotion Engine

[0704] The server sets up an emotion engine to analyze and recognize emotions from the user's input text. The emotion engine contains algorithms to extract emotions such as joy, sadness, anger, etc. from the user's input.

[0705] Step 7: Build your chatbot

[0706] The server integrates the fine-tuned generative model and emotion engine to build a chatbot that runs in a local environment. Here, a dialogue system including a user interface is set up, allowing the chatbot to respond based on user questions and emotions.

[0707] Step 8: User Initiates Interaction

[0708] The user initiates a dialogue with the chatbot through the terminal. When the user inputs a question to the chatbot, the input is sent to the server.

[0709] Step 9: Tokenize user input

[0710] The server uses a tokenizer to convert user input into tokens, which are then passed to the generative model.

[0711] Step 10: Emotion Recognition

[0712] The server analyzes and recognizes emotions from the user's input text using an emotion engine. The recognized emotion information is used to generate responses in the generative model.

[0713] Step 11: Response generation using the generative model

[0714] The server inputs the tokenized user input and the recognized emotion information into a generative model to generate an appropriate response, which is then decoded back into text format.

[0715] Step 12: Returning a response to the user

[0716] The server then sends the generated response back to the terminal. The user can check the response from the chatbot on the screen. This process is repeated continuously, ensuring smooth dialogue between the user and the chatbot.

[0717] Example 2

[0718] 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."

[0719] The present invention relates to a chatbot system. Conventional chatbots have had issues with their difficulty in accurately responding to data related to specific tasks and lacking responses that take user emotions into consideration. This can lead to a decline in the quality of the user experience and a risk of impairing system reliability. There is also a need for a high-performance chatbot system that can be operated in a local environment without relying on external APIs or cloud services.

[0720] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[0721] In this invention, the server includes: means for generating sentences using a generative model; means for fine-tuning data related to a specific task based on the generative model; means for building a chatbot that operates in a local environment using the fine-tuned generative model; means for preparing a dataset; means for tokenizing the generative model; means for recognizing a user's emotion using an emotion engine; means for selecting an appropriate response based on the recognized emotion; and means for providing a dialogue interface with the chatbot. This makes it possible to generate accurate responses that take the user's emotion into consideration and provide an enhanced user experience. It also makes it possible to realize a chatbot system that can be operated efficiently and at low cost in a local environment.

[0722] A "generative model" is a machine learning model designed to generate new sentences from text data using natural language processing algorithms.

[0723] "Fine-tuning" is the process of further training a pre-trained model with a specific dataset to optimize it for a particular task or application.

[0724] A "local environment" is a computing environment that operates independently within a company's or individual's computer system, rather than on a cloud server or external network.

[0725] A "dataset" is a collection of data used to train and evaluate machine learning models.

[0726] "Tokenization" is the process of breaking down text data into smaller units (tokens) and converting them into a format that can be processed by machine learning models.

[0727] An "emotion engine" is an algorithm or system that analyzes text data entered by a user and identifies emotions such as joy, sadness, and anger.

[0728] An "interactive interface" is a user interface that includes a communication means and a display screen for a user to input and receive responses from the system.

[0729] The "means for selecting a response" is a mechanism for selecting the optimal response based on specific criteria from multiple response candidates generated by the generative model.

[0730] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks, while recognizing the user's emotions and generating responses according to those emotions. Specific embodiments for implementing the present invention are described below.

[0731] System Overview

[0732] The system is broadly composed of the following elements:

[0733] 1. A method for generating sentences using a generative model

[0734] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0735] 3. A way to build chatbots that run locally using fine-tuned generative models

[0736] 4. How to prepare the dataset

[0737] 5. Means of tokenizing generative models

[0738] 6. Means of recognizing user emotions using an emotion engine

[0739] 7. A means of selecting appropriate responses based on perceived emotions

[0740] 8. Means of providing a conversational interface with chatbots

[0741] First, a user prepares FAQ data as a text file and uploads it to the server. The server reads the text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[0742] Next, the server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer, which allows it to convert text data into a tokenized form that the model can understand.

[0743] The server then fine-tunes the generative model using the prepared dataset, enabling the model to generate sentences based on data relevant to the specific task. The fine-tuning process involves specifically setting training parameters such as the number of epochs and batch size to optimize the model's performance.

[0744] Furthermore, the server sets up an emotion engine to analyze the text input from the user and recognize emotions. The emotion engine extracts emotions (e.g., joy, sadness, anger) from the user's input text and provides the emotion information to the generative model.

[0745] Finally, the server integrates the fine-tuned generative model and the emotion engine to build a chatbot that runs in the local environment. This chatbot recognizes emotions in response to user inquiries and generates optimal responses based on the results. The user can freely input questions using a user interface provided through the device, and the chatbot generates responses based on the questions and the recognized emotions.

[0746] Specific examples

[0747] Scenario 1: Product return process inquiry

[0748] A user asks, "What is the process for returning a product?"

[0749] The server tokenizes this input and passes it to the generative model, while simultaneously using the emotion engine to recognize the user's emotions.

[0750] The model generates a response that displays on the device: "You can return the product within 30 days of the date of purchase. If you would like to return the product, please fill out this form."

[0751] Scenario 2: An angry inquiry about the delivery status of a product

[0752] The user asks in frustration, "Why hasn't my item arrived yet?"

[0753] The server uses a tokenizer and a generative model to generate a response, while using an emotion engine to recognize the user's anger emotion.

[0754] Based on this knowledge, it can adjust its response to be more polite and empathetic, for example, replying to the user via the device, "We understand your frustration. We will check the delivery status immediately, so please wait a moment."

[0755] The system of this invention eliminates dependency on external APIs and cloud computing, allowing for easy deployment and operation in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide sophisticated chatbots efficiently and at low cost. Furthermore, by integrating an emotion engine, appropriate responses based on the user's emotions can be provided, significantly improving the user experience.

[0756] The flow of the identification process in the second embodiment will be described with reference to FIG.

[0757] Step 1:

[0758] Preparing the dataset

[0759] A user prepares FAQ data as a text file and uploads the file to the server.

[0760] Users compile FAQs related to a particular task into a text file.

[0761] The user submits this text file to the server via the system's upload interface.

[0762] The server reads this text file and processes it as a dataset.

[0763] The server reads the received text file and analyzes its contents.

[0764] Input: FAQ text file, Output: tokenized dataset

[0765] The server passes the text to a tokenizer, which converts each string into a token.

[0766] The tokenized data is saved as a dataset used for fine-tuning.

[0767] Step 2:

[0768] Setting up the model and tokenizer

[0769] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer.

[0770] The server loads a pre-trained generative model (GPT-2) from external or local storage and deploys it in memory.

[0771] Input: GPT-2 model from external storage, Output: unpacked GPT-2 model in memory

[0772] At the same time, the tokenizer is loaded and ready to convert text data into token format.

[0773] Step 3:

[0774] Performing fine tuning

[0775] The server uses the prepared dataset to fine-tune the generative model.

[0776] The server passes the dataset to the training module to fine-tune the generative model.

[0777] Input: Tokenized dataset and training parameters (number of epochs, batch size, etc.), Output: Fine-tuned generative model

[0778] During this process, training parameters such as the number of epochs and batch size are set to efficiently optimize the model.

[0779] Once fine-tuned, the generative model will have the ability to generate sentences specialized for a specific task.

[0780] Step 4:

[0781] Emotion engine setup and emotion recognition

[0782] The server sets up an emotion engine to analyze text input from the user and recognize emotions.

[0783] The server loads the emotion engine and prepares to parse emotions from the user's text input.

[0784] Input: Emotion engine, user input text, Output: Parsed emotion data

[0785] The text entered by the user through the terminal is sent to the server and analyzed by the emotion engine.

[0786] The recognized emotion (happiness, sadness, anger, etc.) is used in the next step.

[0787] Step 5:

[0788] Building and interacting with chatbots

[0789] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot that runs in a local environment.

[0790] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot system.

[0791] Input: Fine-tuned generative model, emotion engine, user input text, Output: Response provided to user

[0792] The user inputs questions or inquiries through the terminal.

[0793] The server receives the input, tokenizes it using a tokenizer, and passes it to the generative model.

[0794] At the same time, an emotion engine is used to analyze the user's emotions and provide that information to the generative model.

[0795] The generative model generates an optimal response based on the question content and the analyzed emotions and sends it to the device.

[0796] The terminal displays the generated response to the user.

[0797] (Application example 2)

[0798] 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."

[0799] Conventional chatbot systems often only return standard responses to user inquiries, and have had the problem of difficulty in recognizing the user's emotions and responding appropriately. This has led to problems such as a poor user experience and difficulty in improving satisfaction. To solve these problems, the present invention aims to provide a system that recognizes the user's emotions and automatically generates responses based on them.

[0800] 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.

[0801] In this invention, the server includes means for generating sentences using a generative model, means for fine-tuning data related to a specific task based on the generative model, means for building a chatbot that operates in a local environment using the fine-tuned generative model, means for preparing a dataset, means for tokenizing the generative model, means for providing a dialogue interface with the chatbot, means for recognizing a user's emotion using an emotion engine, and means for selecting an appropriate response based on the recognized emotion. This enables responses to be generated taking the user's emotion into consideration, thereby providing a more satisfying user experience.

[0802] A "generative model" is an artificial intelligence model that uses machine learning algorithms to automatically generate natural language sentences.

[0803] "Fine-tuning" is the process of retraining a pre-trained machine learning model with data relevant to a specific task or domain to improve its accuracy and performance.

[0804] "Running in a local environment" means running the system on a company or individual's dedicated server or computer without using an external server or cloud.

[0805] A "chatbot" is a software robot that automatically conducts conversations with users, usually through text-based interactions.

[0806] A "dataset" is a set of data used to train and evaluate a machine learning model.

[0807] "Tokenization" is the process of dividing a natural language sentence into small units (tokens) such as words or subwords.

[0808] An "interactive interface" is an interface that allows a user to interact with a system, and includes text input, button operations, and the like.

[0809] An "emotion engine" is a software component that analyzes and recognizes emotions from text entered by the user.

[0810] An "emotion-based response" is a response generated taking into account the emotion expressed by the user, and includes a message that is appropriately tailored to, for example, joy or anger.

[0811] The present invention relates to a chatbot system for recognizing a user's emotions and automatically generating a response based on the emotions. Specific embodiments for carrying out the present invention will be described below.

[0812] System Configuration

[0813] The system consists of the following main components:

[0814] 1. A method for generating sentences using a generative model

[0815] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0816] 3. A way to build chatbots that run locally using fine-tuned generative models

[0817] 4. How to prepare the dataset

[0818] 5. Means of tokenizing generative models

[0819] 6. Means of providing a conversational interface with chatbots

[0820] 7. Means of recognizing user emotions using an emotion engine

[0821] 8. A means of selecting appropriate responses based on perceived emotions

[0822] Hardware and software used

[0823] Hardware: Server equipped with high-performance CPU / GPU

[0824] software:

[0825] Generative AI model: GPT-2 (pre-trained)

[0826] Tokenizer: Hugging Face's Tokenizer

[0827] Sentiment engine: Sentiment Analysis API (e.g. Google Cloud Natural Language API)

[0828] Web framework: Flask

[0829] Mobile App: Flutter

[0830] System Operation Overview

[0831] 1. Dataset preparation

[0832] A user collects FAQ data from an online shopping site as a text file and uploads it to the server, which then reads the text file, tokenizes it using a tokenizer, and generates a dataset.

[0833] 2. Setting up the model and tokenizer

[0834] The server loads a pre-trained GPT-2 model and its corresponding tokenizer, which is then ready to convert text data into a tokenized format that the model can understand.

[0835] 3. Perform fine tuning

[0836] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task.

[0837] 4. Emotion Engine Setup and Emotion Recognition

[0838] The text entered by the user is analyzed using the server's emotion engine (Sentiment Analysis API) to recognize emotions. This emotion engine extracts emotions (such as joy, sadness, and anger) from the user's input text and provides the emotion information to the generative model.

[0839] 5. Building and interacting with chatbots

[0840] The server integrates a fine-tuned generative model and an emotion engine to run a chatbot in a local environment. The chatbot performs emotion recognition on user inquiries through a smartphone application (built using Flutter) and generates optimal responses based on the results.

[0841] Specific examples

[0842] Scenario 1: Requesting product details

[0843] The user types into the app, "Tell me more about this product."

[0844] The emotion engine recognizes the user's emotion as "neutral."

[0845] The GPT-2 model generates a response like this: "This product is made from high-quality materials and is available in a variety of sizes and colors. Click here to learn more."

[0846] Scenario 2: Late delivery claim

[0847] The user types in frustration, "Why hasn't my item arrived yet?"

[0848] The emotion engine recognizes the user's emotion as "anger."

[0849] The response generated by the GPT-2 model reads: "We understand your frustration. We will check the delivery status as soon as possible. Please wait a moment."

[0850] Prompt Sentence Examples

[0851] An example of a bad customer inquiry: "Why hasn't my item arrived yet? I've been waiting so long."

[0852] Example of a neutral inquiry: "What are the specifications of this product?"

[0853] This makes it possible to generate a response that takes the user's emotions into consideration, thereby improving customer satisfaction.

[0854] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[0855] Step 1: Prepare the dataset

[0856] A user collects FAQ data from an online shopping site as a text file and uploads it to the server. The server reads the uploaded text file, tokenizes it using a tokenizer, and generates a dataset.

[0857] Input: FAQ data text file

[0858] Output: Tokenized dataset

[0859] What it does: The server reads a text file from the file system, then uses a tokenizer to tokenize the text and convert it into a format that the generative AI model can understand.

[0860] Step 2: Setting up the model and tokenizer

[0861] The server loads a pre-trained GPT-2 model and its corresponding tokenizer.

[0862] Input: None

[0863] Output: Loaded GPT-2 model and tokenizer

[0864] What happens: The server loads the GPT-2 model file and tokenizer from disk and unpacks it into memory, allowing the model to understand and process text data.

[0865] Step 3: Perform fine tuning

[0866] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task.

[0867] Input: Tokenized dataset, pre-trained GPT-2 model

[0868] Output: A fine-tuned GPT-2 model

[0869] How it works: The server splits the dataset into batches and uses each batch to adjust the model parameters. With each epoch, the model improves and becomes more adaptable to the given task.

[0870] Step 4: Setting up the emotion engine and emotion recognition

[0871] The text entered by the user is analyzed using the server's emotion engine to recognize emotions, and this emotion information is provided to the generative model.

[0872] Input: Text entered by the user

[0873] Output: Recognized emotion data

[0874] Specific operation: The server calls the emotion engine and analyzes the user input text. The emotion engine extracts emotions from the text and passes the results to the generative model.

[0875] Step 5: Build and interact with your chatbot

[0876] The server integrates a fine-tuned generative model and an emotion engine to run the chatbot in a local environment. It recognizes emotions in response to user inquiries and generates optimal responses via a smartphone app.

[0877] Input: User query, recognized emotion data

[0878] Output: Response message to the user

[0879] How it works: When a user types a question into a chatbot app, the text is sent to the server, which analyzes the emotion using an emotion engine and inputs that information into a generative model. The generative model then generates a text response, which is then displayed through the user interface.

[0880] Step 6: Providing a User Interface

[0881] The device (smartphone) provides an interface through which the user can interact with the chatbot, inputting inquiries and receiving responses.

[0882] Input: User query

[0883] Output: Chatbot response

[0884] Specific operation: The device is an app built using Flutter that captures user input, sends it to the server, receives the response from the server, and displays it on the screen.

[0885] 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.

[0886] 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.

[0887] 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.

[0888] [Third embodiment]

[0889] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.

[0890] 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.

[0891] 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).

[0892] 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.

[0893] 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.

[0894] 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).

[0895] 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.

[0896] 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.

[0897] 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.

[0898] 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.

[0899] 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.

[0900] 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."

[0901] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks. Specific embodiments for implementing the present invention are described below.

[0902] System Overview

[0903] The system is broadly composed of the following elements:

[0904] 1. A method for generating sentences using a generative model

[0905] 2. A means to fine-tune data relevant to specific tasks based on generative models

[0906] 3. A way to build chatbots that run locally using fine-tuned generative models

[0907] 4. How to prepare the dataset

[0908] 5. Means of tokenizing generative models

[0909] 6. Means of providing a conversational interface with chatbots

[0910] Program processing

[0911] Preparing the dataset

[0912] Users prepare business-specific FAQ data as a text file, which contains specific questions and their corresponding answers. The server reads this text file and processes it as a dataset.

[0913] Setting up the model and tokenizer

[0914] The server loads a pre-trained generative model (e.g., GPT-2 model) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks.

[0915] Performing fine tuning

[0916] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[0917] Building and interacting with chatbots

[0918] The server uses the fine-tuned generative model to build a chatbot. This chatbot runs in a local environment and provides accurate responses to user inquiries. The user can freely input questions using a user interface provided through the terminal, and the chatbot generates responses based on the questions.

[0919] Specific examples

[0920] Scenario 1: Product return process inquiry

[0921] The user asks, "What is the product return process?" via their device. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying, "You can return the product within 30 days of the purchase date. If you would like to return the product, please fill out this form." and sends it back to the user via their device.

[0922] Scenario 2: Inquiring about the delivery status of an item

[0923] The user asks, "Where can I check the delivery status of my item?" The server processes this question using a similar process, and from its fine-tuned model generates a response such as, "You can check the delivery status of your item on my page on our website," and notifies the user.

[0924] The system of this invention eliminates dependency on external APIs and cloud computing and can be easily implemented and operated in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide advanced chatbots efficiently and at low cost.

[0925] The processing flow will be explained below.

[0926] Step 1: Prepare the dataset

[0927] A user prepares FAQ data as a text file and uploads it to the server. The server reads the uploaded text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[0928] Step 2: Setting up the model and tokenizer

[0929] The server loads a pre-trained generative model (GPT-2 model) along with a tokenizer to be applied to the generative model, preparing to convert text data into a token format that the model can understand.

[0930] Step 3: Prepare for Fine Tuning

[0931] The server takes the text dataset generated in step 1, splits the dataset into batches, and prepares the data for input to the model. Here, DataCollatorForLanguageModeling is used to create the batches of data.

[0932] Step 4: Perform fine tuning

[0933] The server begins fine-tuning the generative model by setting training parameters (e.g., number of epochs, batch size, etc.) and training the model. In the process, the server improves its ability to generate sentences based on data relevant to a specific task.

[0934] Step 5: Save the Fine-Tuning Model

[0935] The server saves the fine-tuned generative model in the specified directory, which is then used to generate responses for the chatbot.

[0936] Step 6: Build your chatbot

[0937] The server uses the fine-tuned generative model to build a chatbot, which then configures a dialogue system including a user interface to enable the chatbot to respond to user questions.

[0938] Step 7: User Initiates Interaction

[0939] The user initiates a dialogue with the chatbot through the terminal. When the user inputs a question to the chatbot, the input is sent to the server.

[0940] Step 8: Tokenize user input

[0941] The server uses a tokenizer to convert user input into tokens, which are then passed to the generative model.

[0942] Step 9: Response generation using the generative model

[0943] The server inputs the tokenized user input into the generative model and generates an appropriate response, which is then decoded back into text form.

[0944] Step 10: Returning a response to the user

[0945] The server then sends the generated response back to the terminal. The user can check the response from the chatbot on the screen. This process is repeated continuously, ensuring smooth dialogue between the user and the chatbot.

[0946] Example 1

[0947] 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."

[0948] Conventional chatbots rely on external APIs and cloud services, which can create responses tailored to specific tasks, resulting in high costs and complex management. Data security is also often an issue. The present invention aims to solve these issues by providing a chatbot system that can operate in a local environment and efficiently process data related to specific tasks.

[0949] 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.

[0950] In this invention, the server includes means for preparing a dataset, means for tokenizing a generative model, means for generating sentences using the generative model, means for fine-tuning data related to a specific job role based on the generative model, means for constructing a chatbot that runs in a local environment using the fine-tuned generative model, means for providing a dialogue interface with the chatbot, means for tokenizing inquiries from users and passing them to the fine-tuned generative model, and means for providing generated responses to the user. This makes it possible to provide an efficient, low-cost chatbot that can be easily introduced and operated in a local environment and is specialized for a specific job role.

[0951] A "dataset" is a collection of data collected and organized for a specific purpose.

[0952] A "generative model" is a machine learning model trained to generate sentences in natural language processing.

[0953] "Tokenization" is the process of dividing a sentence into the smallest units called words or tokens.

[0954] "Fine-tuning" is the process of further training an existing generative model to suit a specific purpose.

[0955] A "local environment" is an environment in which the system operates using the user's own computing resources, without relying on a specific network or cloud service.

[0956] A "chatbot" is a program that simulates natural language dialogue and automatically generates responses to user inquiries.

[0957] A "conversational interface" is an interface that allows users to interact with a chatbot via text or voice.

[0958] An "inquiry" is a question or request made by a user to a chatbot.

[0959] A "response" is a reply that a chatbot generates in response to a user's inquiry.

[0960] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks. Specific embodiments for implementing the present invention are described below.

[0961] Preparing the dataset

[0962] Users prepare business-specific FAQ data as a text file. This data contains specific questions and their corresponding answers. For example, it may include questions and answers about the product return process or delivery status. The server reads this text file and processes it as a dataset. To read the data, a general file manipulation program is used.

[0963] Setting up the model and tokenizer

[0964] The server loads a pre-trained generative model (e.g., the GPT-2 model) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks. The tokenizer splits user input or datasets into tokens and converts them into a format that the model can easily process.

[0965] Performing fine tuning

[0966] The server then fine-tunes the generative model using the prepared dataset. It sets training parameters such as the number of epochs and batch size to optimize the model's performance. This process equips the model with the ability to generate sentences based on data relevant to a specific task. For example, it can generate detailed answers about the return process or specific responses about the delivery status of an item.

[0967] Building and interacting with chatbots

[0968] The server uses the fine-tuned generative model to build a chatbot. This chatbot runs in a local environment and provides accurate responses to user inquiries. The user can freely input questions using a user interface provided through the terminal, and the chatbot generates responses based on those questions. For example, a user can enter text using a chat window in a web application, and the server tokenizes it, passes it to the generative model, and returns a response.

[0969] Specific examples

[0970] Scenario 1: Product return process inquiry

[0971] The user asks, "What is the product return process?" via their device. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying, "You can return the product within 30 days of the purchase date. If you would like to return the product, please fill out this form." and sends it back to the user via their device.

[0972] Scenario 2: Inquiring about the delivery status of an item

[0973] The user asks, "Where can I check the delivery status of my item?" The server processes this question using a similar process, and from its fine-tuned model generates a response such as, "You can check the delivery status of your item on my page on our website," and notifies the user.

[0974] The system of this invention eliminates dependency on external APIs and cloud computing and can be easily implemented and operated in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide advanced chatbots efficiently and at low cost.

[0975] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0976] Step 1: Prepare the dataset

[0977] The user prepares FAQ data specific to the business as a text file.

[0978] Input: FAQ data (text file)

[0979] Output: Prepared text file

[0980] What it does: Users collect and create text files containing work-related questions and answers.

[0981] The server reads this text file and processes it as a dataset.

[0982] Input: User-prepared text file

[0983] Output: Tokenized dataset

[0984] What happens: The server opens the text file, reads the contents into memory, and extracts each question-answer pair to form a dataset.

[0985] Step 2: Setting up the model and tokenizer

[0986] The server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer.

[0987] Input: GPT-2 model and tokenizer

[0988] Output: Loaded model and tokenizer

[0989] Specific operation: The server downloads the generative model (GPT-2) and tokenizer from a predefined library and loads them into memory.

[0990] Step 3: Perform fine tuning

[0991] The server uses the prepared dataset to fine-tune the generative model.

[0992] Input: Tokenized dataset

[0993] Output: A fine-tuned generative model

[0994] How it works: The server sets training parameters such as the number of epochs and batch size, and retrains the generative model based on the tokenized dataset. In this process, the model's performance is optimized for the specific business data.

[0995] Step 4: Build and interact with your chatbot

[0996] The server builds a chatbot using a fine-tuned generative model.

[0997] Input: Fine-tuned generative model

[0998] Output: Chatbot running in local environment

[0999] Specific operation: Implement chatbot functions based on the fine-tuned model and configure it to run properly on a local server.

[1000] The user inputs a question through a user interface provided through the terminal.

[1001] Input: User question (text input)

[1002] Output: Query data from the terminal to the server

[1003] How it works: A user types a question using a chat window in a web application, and the data is sent to the server.

[1004] The server tokenizes this input and passes it to the generative model.

[1005] Input: User question (text data)

[1006] Output: Input tokens to the generative model

[1007] Specific operation: The server uses a tokenizer to convert the user's question into tokens and input them into the generative model.

[1008] The generated response is provided to the user.

[1009] Input: Response data from the generative model

[1010] Output: Response to user (text)

[1011] Specific behavior: The response obtained from the generative model is decoded and sent back to the user as text.

[1012] Specific operation example

[1013] Scenario 1: Product return process inquiry

[1014] Question: "What is the process for returning products?"

[1015] Response: "You can return an item within 30 days of purchase. If you would like to return an item, please fill out this form."

[1016] Scenario 2: Inquiring about the delivery status of an item

[1017] Question: "Where can I check the delivery status of my item?"

[1018] Response: "You can check your delivery status on My Page on our website."

[1019] (Application example 1)

[1020] 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."

[1021] At logistics centers, many staff members are tasked with inventory management and checking delivery status, and they are required to respond to inquiries quickly and accurately. Therefore, it is necessary to use an efficient interactive system to reduce the workload on staff and improve work efficiency.

[1022] 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.

[1023] In this invention, the server includes means for generating sentences using a generative model, means for fine-tuning data related to a specific task based on the generative model, means for building a chatbot that runs in a local environment using the fine-tuned generative model, means for preparing a dataset, means for tokenizing the generative model, means for providing a dialogue interface with the chatbot via an application installed on a mobile information terminal used by staff in the logistics center, and means for generating responses to inquiries about inventory and delivery status. This enables staff in the logistics center to quickly and accurately check inventory and delivery status using their mobile information terminals.

[1024] A "generative model" is a pre-trained algorithm, a system for generating new sentences or text based on input text.

[1025] "Fine-tuning" is the process of further training a pre-trained generative model using a specific dataset to adapt it to a specific task or application.

[1026] A "chatbot" is a computer program that interacts with users and is a system that uses natural language processing technology to generate appropriate responses to questions.

[1027] A "dataset" is a collection of data used to train or fine-tune a generative model, including questions and answers relevant to a particular task.

[1028] "Tokenization" is the process of dividing text data into smaller units such as words or subwords, and is a preprocessing step for input into a generative model.

[1029] "Personal digital assistant" refers to a portable computing device, including smartphones and tablets.

[1030] A "conversational interface" is a user interface that allows a user to effectively interact with a chatbot, providing the ability to input text and receive responses.

[1031] "Inventory check" refers to the process of checking the inventory status within a logistics center, and is a means of checking the current inventory amount and location.

[1032] "Delivery status confirmation" is a process for checking the current delivery status of shipped products, and is a means for checking product tracking information and the estimated delivery date and time.

[1033] This invention is a chatbot system that responds quickly and accurately to inquiries such as inventory checks and delivery status checks via an application installed on a mobile information terminal used by staff in a logistics center. Specific embodiments are described below.

[1034] System Overview

[1035] The system is broadly composed of the following elements:

[1036] 1. A method for generating sentences using a generative model

[1037] 2. A means to fine-tune data relevant to specific tasks based on generative models

[1038] 3. A way to build chatbots that run locally using fine-tuned generative models

[1039] 4. How to prepare the dataset

[1040] 5. How to tokenize a generative model

[1041] 6. A means of providing a conversational interface with the chatbot via an application installed on mobile devices used by staff in the distribution center.

[1042] 7. Means of generating responses to inventory and delivery status queries

[1043] Hardware and Software

[1044] We use a server and a mobile information device (smartphone or tablet). The server is equipped with a high-performance GPU and uses PyTorch and the Transformers library to train and fine-tune the generative model.

[1045] Server: PC / server with high performance GPU

[1046] software:

[1047] PyTorch: A deep learning framework

[1048] Transformers: Library for Transformer models (Hugging Face)

[1049] Data processing and calculation

[1050] Prepare the dataset:

[1051] The user prepares FAQ data specific to the operations within the distribution center as a text file, which contains specific questions and their corresponding answers.

[1052] Setting up the model and tokenizer:

[1053] The server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks.

[1054] Perform fine tuning:

[1055] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[1056] Build and interact with chatbots:

[1057] The server uses the fine-tuned generative model to build a chatbot, which runs in a local environment. The chatbot uses a user interface provided by a mobile information terminal to allow users to freely input questions, and the chatbot generates responses based on the questions.

[1058] Specific examples

[1059] Scenario 1: Checking inventory

[1060] The user asks "How do I check inventory?" via a mobile information terminal. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying "You can check all inventory status by accessing the logistics system and clicking the inventory tab," and sends it back to the user via the terminal.

[1061] Scenario 2: Checking Delivery Status

[1062] The user asks "Where can I check the delivery status of my product?" via a mobile information terminal. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying "You can check your delivery status from your personal page in the logistics system," and notifies the user via the terminal.

[1063] This system allows staff at the logistics center to use smartphones and tablets to carry out their work efficiently and obtain the information they need quickly and accurately.

[1064] Example prompt sentence:

[1065] "Please explain the normal inventory check procedure at your distribution center."

[1066] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[1067] Step 1:

[1068] A user uses a handheld device to input a question about inventory or delivery status. This input is in text format and is sent by the user through the application's dialogue interface.

[1069] Input: The question text entered by the user (e.g., "How do I check inventory?")

[1070] Output: The question text is sent to the server

[1071] Step 2:

[1072] The terminal sends the user's question text to the server, which communicates over the Internet and waits for the text to be processed appropriately.

[1073] Input: Question text submitted by the user

[1074] Output: Question text for server input

[1075] Step 3:

[1076] The server tokenizes the received question text. Specifically, it uses a tokenizer compatible with the GPT-2 model to convert the text into tokens (words and subwords). This process prepares the text in a format that can be input to a generative model.

[1077] Input: Question text

[1078] Output: Tokenized text data

[1079] Step 4:

[1080] The server runs a generative model on the tokenized text data to generate a response. The fine-tuned GPT-2 model performs computations to generate a coherent response based on the input tokens.

[1081] Input: Tokenized text data

[1082] Output: The response text generated by the generative model

[1083] Step 5:

[1084] The server then detokenizes the generated response text, specifically by using a tokenizer to convert the tokens back into natural language sentences. This process results in a text response that can be provided directly to the user.

[1085] Input: Tokenized response text

[1086] Output: Natural language response text

[1087] Step 6:

[1088] The server then sends the detokenized response text to the terminal, which also communicates over the Internet, enabling real-time responses.

[1089] Input: Natural language response text

[1090] Output: Response text sent to the terminal

[1091] Step 7:

[1092] The terminal displays the response text received from the server to the user, who can then check the generated response through the dialogue interface and decide on the next action based on the content of the response.

[1093] Input: Response text received from the server

[1094] Output: The response text that is displayed to the user

[1095] Through these processing steps, users will be able to receive prompt and accurate responses to inquiries such as inventory checks and delivery status confirmations. This system will streamline operations within the logistics center and reduce the workload of staff.

[1096] 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.

[1097] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks, while recognizing the user's emotions and generating responses according to those emotions. Specific embodiments for implementing the present invention are described below.

[1098] System Overview

[1099] The system is broadly composed of the following elements:

[1100] 1. A method for generating sentences using a generative model

[1101] 2. A means to fine-tune data relevant to specific tasks based on generative models

[1102] 3. A way to build chatbots that run locally using fine-tuned generative models

[1103] 4. A method for recognizing user emotions using an emotion engine

[1104] 5. A means of selecting appropriate responses based on perceived emotions

[1105] 6. How to prepare the dataset

[1106] 7. Means of tokenizing generative models

[1107] 8. Means of providing a conversational interface with chatbots

[1108] Program processing

[1109] Preparing the dataset

[1110] A user prepares FAQ data as a text file and uploads it to the server. The server reads the text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[1111] Setting up the model and tokenizer

[1112] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer, ready to convert text data into a token format that the model can understand.

[1113] Performing fine tuning

[1114] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[1115] Emotion engine setup and emotion recognition

[1116] The server sets up an emotion engine to analyze the text input from the user and recognize emotions. The emotion engine extracts emotions (e.g., joy, sadness, anger) from the user's input text and provides the emotion information to the generative model.

[1117] Building and interacting with chatbots

[1118] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot that runs in a local environment. This chatbot recognizes emotions in response to user inquiries and generates optimal responses based on the results. The user can freely input questions using a user interface provided through the device, and the chatbot generates a response based on the question and the recognized emotions.

[1119] Specific examples

[1120] Scenario 1: Product return process inquiry

[1121] The user asks, "What is the process for returning products?" The server tokenizes this input and passes it to the generative model. At the same time, it uses an emotion engine to recognize the user's emotions. The model generates a response and displays it on the device: "You can return a product within 30 days of the purchase date. If you wish to return a product, please fill out this form."

[1122] Scenario 2: An angry inquiry about the delivery status of a product

[1123] The user asks in frustration, "Why hasn't my item arrived yet?" The server uses a tokenizer and a generative model to generate a response, while also using an emotion engine to recognize the user's angry emotion. Based on this recognition, the server adjusts the response to return a more polite and empathetic message. For example, the server might reply to the user via their device, "We understand your frustration. We will immediately check the delivery status, so please wait a moment."

[1124] The system of this invention eliminates dependency on external APIs and cloud computing, allowing for easy deployment and operation in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide sophisticated chatbots efficiently and at low cost. Furthermore, by integrating an emotion engine, appropriate responses based on the user's emotions can be provided, significantly improving the user experience.

[1125] The processing flow will be explained below.

[1126] Step 1: Prepare the dataset

[1127] Users prepare business-specific FAQ data as text files and upload them to the server. The server reads the uploaded text files and processes them as a dataset. Specifically, it tokenizes the text in the files using a tokenizer to generate a text dataset.

[1128] Step 2: Setting up the model and tokenizer

[1129] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer, ready to convert text data into a token format that the model can understand.

[1130] Step 3: Prepare for Fine Tuning

[1131] The server takes the text dataset generated in step 1, splits the dataset into batches, and prepares the data for input to the model. Here, DataCollatorForLanguageModeling is used to create the batches of data.

[1132] Step 4: Perform fine tuning

[1133] The server begins fine-tuning the generative model by setting training parameters (e.g., number of epochs, batch size, etc.) and training the model. In the process, the server improves its ability to generate sentences based on data relevant to a specific task.

[1134] Step 5: Save the Fine-Tuning Model

[1135] The server saves the fine-tuned generative model in the specified directory, which is then used to generate responses for the chatbot.

[1136] Step 6: Setting up the Emotion Engine

[1137] The server sets up an emotion engine to analyze and recognize emotions from the user's input text. The emotion engine contains algorithms to extract emotions such as joy, sadness, anger, etc. from the user's input.

[1138] Step 7: Build your chatbot

[1139] The server integrates the fine-tuned generative model and emotion engine to build a chatbot that runs in a local environment. Here, a dialogue system including a user interface is set up, allowing the chatbot to respond based on user questions and emotions.

[1140] Step 8: User Initiates Interaction

[1141] The user initiates a dialogue with the chatbot through the terminal. When the user inputs a question to the chatbot, the input is sent to the server.

[1142] Step 9: Tokenize user input

[1143] The server uses a tokenizer to convert user input into tokens, which are then passed to the generative model.

[1144] Step 10: Emotion Recognition

[1145] The server analyzes and recognizes emotions from the user's input text using an emotion engine. The recognized emotion information is used to generate responses in the generative model.

[1146] Step 11: Response generation using the generative model

[1147] The server inputs the tokenized user input and the recognized emotion information into a generative model to generate an appropriate response, which is then decoded back into text format.

[1148] Step 12: Returning a response to the user

[1149] The server then sends the generated response back to the terminal. The user can check the response from the chatbot on the screen. This process is repeated continuously, ensuring smooth dialogue between the user and the chatbot.

[1150] Example 2

[1151] 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."

[1152] The present invention relates to a chatbot system. Conventional chatbots have had issues with their difficulty in accurately responding to data related to specific tasks and lacking responses that take user emotions into consideration. This can lead to a decline in the quality of the user experience and a risk of impairing system reliability. There is also a need for a high-performance chatbot system that can be operated in a local environment without relying on external APIs or cloud services.

[1153] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[1154] In this invention, the server includes: means for generating sentences using a generative model; means for fine-tuning data related to a specific task based on the generative model; means for building a chatbot that operates in a local environment using the fine-tuned generative model; means for preparing a dataset; means for tokenizing the generative model; means for recognizing a user's emotion using an emotion engine; means for selecting an appropriate response based on the recognized emotion; and means for providing a dialogue interface with the chatbot. This makes it possible to generate accurate responses that take the user's emotion into consideration and provide an enhanced user experience. It also makes it possible to realize a chatbot system that can be operated efficiently and at low cost in a local environment.

[1155] A "generative model" is a machine learning model designed to generate new sentences from text data using natural language processing algorithms.

[1156] "Fine-tuning" is the process of further training a pre-trained model with a specific dataset to optimize it for a particular task or application.

[1157] A "local environment" is a computing environment that operates independently within a company's or individual's computer system, rather than on a cloud server or external network.

[1158] A "dataset" is a collection of data used to train and evaluate machine learning models.

[1159] "Tokenization" is the process of breaking down text data into smaller units (tokens) and converting them into a format that can be processed by machine learning models.

[1160] An "emotion engine" is an algorithm or system that analyzes text data entered by a user and identifies emotions such as joy, sadness, and anger.

[1161] An "interactive interface" is a user interface that includes a communication means and a display screen for a user to input and receive responses from the system.

[1162] The "means for selecting a response" is a mechanism for selecting the optimal response based on specific criteria from multiple response candidates generated by the generative model.

[1163] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks, while recognizing the user's emotions and generating responses according to those emotions. Specific embodiments for implementing the present invention are described below.

[1164] System Overview

[1165] The system is broadly composed of the following elements:

[1166] 1. A method for generating sentences using a generative model

[1167] 2. A means to fine-tune data relevant to specific tasks based on generative models

[1168] 3. A way to build chatbots that run locally using fine-tuned generative models

[1169] 4. How to prepare the dataset

[1170] 5. Means of tokenizing generative models

[1171] 6. Means of recognizing user emotions using an emotion engine

[1172] 7. A means of selecting appropriate responses based on perceived emotions

[1173] 8. Means of providing a conversational interface with chatbots

[1174] First, a user prepares FAQ data as a text file and uploads it to the server. The server reads the text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[1175] Next, the server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer, which allows it to convert text data into a tokenized form that the model can understand.

[1176] The server then fine-tunes the generative model using the prepared dataset, enabling the model to generate sentences based on data relevant to the specific task. The fine-tuning process involves specifically setting training parameters such as the number of epochs and batch size to optimize the model's performance.

[1177] Furthermore, the server sets up an emotion engine to analyze the text input from the user and recognize emotions. The emotion engine extracts emotions (e.g., joy, sadness, anger) from the user's input text and provides the emotion information to the generative model.

[1178] Finally, the server integrates the fine-tuned generative model and the emotion engine to build a chatbot that runs in the local environment. This chatbot recognizes emotions in response to user inquiries and generates optimal responses based on the results. The user can freely input questions using a user interface provided through the device, and the chatbot generates responses based on the questions and the recognized emotions.

[1179] Specific examples

[1180] Scenario 1: Product return process inquiry

[1181] A user asks, "What is the process for returning a product?"

[1182] The server tokenizes this input and passes it to the generative model, while simultaneously using the emotion engine to recognize the user's emotions.

[1183] The model generates a response that displays on the device: "You can return the product within 30 days of the date of purchase. If you would like to return the product, please fill out this form."

[1184] Scenario 2: An angry inquiry about the delivery status of a product

[1185] The user asks in frustration, "Why hasn't my item arrived yet?"

[1186] The server uses a tokenizer and a generative model to generate a response, while using an emotion engine to recognize the user's anger emotion.

[1187] Based on this knowledge, it can adjust its response to be more polite and empathetic, for example, replying to the user via the device, "We understand your frustration. We will check the delivery status immediately, so please wait a moment."

[1188] The system of this invention eliminates dependency on external APIs and cloud computing, allowing for easy deployment and operation in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide sophisticated chatbots efficiently and at low cost. Furthermore, by integrating an emotion engine, appropriate responses based on the user's emotions can be provided, significantly improving the user experience.

[1189] The flow of the identification process in the second embodiment will be described with reference to FIG.

[1190] Step 1:

[1191] Preparing the dataset

[1192] A user prepares FAQ data as a text file and uploads the file to the server.

[1193] Users compile FAQs related to a particular task into a text file.

[1194] The user submits this text file to the server via the system's upload interface.

[1195] The server reads this text file and processes it as a dataset.

[1196] The server reads the received text file and analyzes its contents.

[1197] Input: FAQ text file, Output: tokenized dataset

[1198] The server passes the text to a tokenizer, which converts each string into a token.

[1199] The tokenized data is saved as a dataset used for fine-tuning.

[1200] Step 2:

[1201] Setting up the model and tokenizer

[1202] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer.

[1203] The server loads a pre-trained generative model (GPT-2) from external or local storage and deploys it in memory.

[1204] Input: GPT-2 model from external storage, Output: unpacked GPT-2 model in memory

[1205] At the same time, the tokenizer is loaded and ready to convert text data into token format.

[1206] Step 3:

[1207] Performing fine tuning

[1208] The server uses the prepared dataset to fine-tune the generative model.

[1209] The server passes the dataset to the training module to fine-tune the generative model.

[1210] Input: Tokenized dataset and training parameters (number of epochs, batch size, etc.), Output: Fine-tuned generative model

[1211] During this process, training parameters such as the number of epochs and batch size are set to efficiently optimize the model.

[1212] Once fine-tuned, the generative model will have the ability to generate sentences specialized for a specific task.

[1213] Step 4:

[1214] Emotion engine setup and emotion recognition

[1215] The server sets up an emotion engine to analyze text input from the user and recognize emotions.

[1216] The server loads the emotion engine and prepares to parse emotions from the user's text input.

[1217] Input: Emotion engine, user input text, Output: Parsed emotion data

[1218] The text entered by the user through the terminal is sent to the server and analyzed by the emotion engine.

[1219] The recognized emotion (happiness, sadness, anger, etc.) is used in the next step.

[1220] Step 5:

[1221] Building and interacting with chatbots

[1222] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot that runs in a local environment.

[1223] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot system.

[1224] Input: Fine-tuned generative model, emotion engine, user input text, Output: Response provided to user

[1225] The user inputs questions or inquiries through the terminal.

[1226] The server receives the input, tokenizes it using a tokenizer, and passes it to the generative model.

[1227] At the same time, an emotion engine is used to analyze the user's emotions and provide that information to the generative model.

[1228] The generative model generates an optimal response based on the question content and the analyzed emotions and sends it to the device.

[1229] The terminal displays the generated response to the user.

[1230] (Application example 2)

[1231] 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."

[1232] Conventional chatbot systems often only return standard responses to user inquiries, and have had the problem of difficulty in recognizing the user's emotions and responding appropriately. This has led to problems such as a poor user experience and difficulty in improving satisfaction. To solve these problems, the present invention aims to provide a system that recognizes the user's emotions and automatically generates responses based on them.

[1233] 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.

[1234] In this invention, the server includes means for generating sentences using a generative model, means for fine-tuning data related to a specific task based on the generative model, means for building a chatbot that operates in a local environment using the fine-tuned generative model, means for preparing a dataset, means for tokenizing the generative model, means for providing a dialogue interface with the chatbot, means for recognizing a user's emotion using an emotion engine, and means for selecting an appropriate response based on the recognized emotion. This enables responses to be generated taking the user's emotion into consideration, thereby providing a more satisfying user experience.

[1235] A "generative model" is an artificial intelligence model that uses machine learning algorithms to automatically generate natural language sentences.

[1236] "Fine-tuning" is the process of retraining a pre-trained machine learning model with data relevant to a specific task or domain to improve its accuracy and performance.

[1237] "Running in a local environment" means running the system on a company or individual's dedicated server or computer without using an external server or cloud.

[1238] A "chatbot" is a software robot that automatically conducts conversations with users, usually through text-based interactions.

[1239] A "dataset" is a set of data used to train and evaluate a machine learning model.

[1240] "Tokenization" is the process of dividing a natural language sentence into small units (tokens) such as words or subwords.

[1241] An "interactive interface" is an interface that allows a user to interact with a system, and includes text input, button operations, and the like.

[1242] An "emotion engine" is a software component that analyzes and recognizes emotions from text entered by the user.

[1243] An "emotion-based response" is a response generated taking into account the emotion expressed by the user, and includes a message that is appropriately tailored to, for example, joy or anger.

[1244] The present invention relates to a chatbot system for recognizing a user's emotions and automatically generating a response based on the emotions. Specific embodiments for carrying out the present invention will be described below.

[1245] System Configuration

[1246] The system consists of the following main components:

[1247] 1. A method for generating sentences using a generative model

[1248] 2. A means to fine-tune data relevant to specific tasks based on generative models

[1249] 3. A way to build chatbots that run locally using fine-tuned generative models

[1250] 4. How to prepare the dataset

[1251] 5. Means of tokenizing generative models

[1252] 6. Means of providing a conversational interface with chatbots

[1253] 7. Means of recognizing user emotions using an emotion engine

[1254] 8. A means of selecting appropriate responses based on perceived emotions

[1255] Hardware and software used

[1256] Hardware: Server equipped with high-performance CPU / GPU

[1257] software:

[1258] Generative AI model: GPT-2 (pre-trained)

[1259] Tokenizer: Hugging Face's Tokenizer

[1260] Sentiment engine: Sentiment Analysis API (e.g. Google Cloud Natural Language API)

[1261] Web framework: Flask

[1262] Mobile App: Flutter

[1263] System Operation Overview

[1264] 1. Dataset preparation

[1265] A user collects FAQ data from an online shopping site as a text file and uploads it to the server, which then reads the text file, tokenizes it using a tokenizer, and generates a dataset.

[1266] 2. Setting up the model and tokenizer

[1267] The server loads a pre-trained GPT-2 model and its corresponding tokenizer, which is then ready to convert text data into a tokenized format that the model can understand.

[1268] 3. Perform fine tuning

[1269] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task.

[1270] 4. Emotion Engine Setup and Emotion Recognition

[1271] The text entered by the user is analyzed using the server's emotion engine (Sentiment Analysis API) to recognize emotions. This emotion engine extracts emotions (such as joy, sadness, and anger) from the user's input text and provides the emotion information to the generative model.

[1272] 5. Building and interacting with chatbots

[1273] The server integrates a fine-tuned generative model and an emotion engine to run a chatbot in a local environment. The chatbot performs emotion recognition on user inquiries through a smartphone application (built using Flutter) and generates optimal responses based on the results.

[1274] Specific examples

[1275] Scenario 1: Requesting product details

[1276] The user types into the app, "Tell me more about this product."

[1277] The emotion engine recognizes the user's emotion as "neutral."

[1278] The GPT-2 model generates a response like this: "This product is made from high-quality materials and is available in a variety of sizes and colors. Click here to learn more."

[1279] Scenario 2: Late delivery claim

[1280] The user types in frustration, "Why hasn't my item arrived yet?"

[1281] The emotion engine recognizes the user's emotion as "anger."

[1282] The response generated by the GPT-2 model reads: "We understand your frustration. We will check the delivery status as soon as possible. Please wait a moment."

[1283] Prompt Sentence Examples

[1284] An example of a bad customer inquiry: "Why hasn't my item arrived yet? I've been waiting so long."

[1285] Example of a neutral inquiry: "What are the specifications of this product?"

[1286] This makes it possible to generate a response that takes the user's emotions into consideration, thereby improving customer satisfaction.

[1287] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[1288] Step 1: Prepare the dataset

[1289] A user collects FAQ data from an online shopping site as a text file and uploads it to the server. The server reads the uploaded text file, tokenizes it using a tokenizer, and generates a dataset.

[1290] Input: FAQ data text file

[1291] Output: Tokenized dataset

[1292] What it does: The server reads a text file from the file system, then uses a tokenizer to tokenize the text and convert it into a format that the generative AI model can understand.

[1293] Step 2: Setting up the model and tokenizer

[1294] The server loads a pre-trained GPT-2 model and its corresponding tokenizer.

[1295] Input: None

[1296] Output: Loaded GPT-2 model and tokenizer

[1297] What happens: The server loads the GPT-2 model file and tokenizer from disk and unpacks it into memory, allowing the model to understand and process text data.

[1298] Step 3: Perform fine tuning

[1299] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task.

[1300] Input: Tokenized dataset, pre-trained GPT-2 model

[1301] Output: A fine-tuned GPT-2 model

[1302] How it works: The server splits the dataset into batches and uses each batch to adjust the model parameters. With each epoch, the model improves and becomes more adaptable to the given task.

[1303] Step 4: Setting up the emotion engine and emotion recognition

[1304] The text entered by the user is analyzed using the server's emotion engine to recognize emotions, and this emotion information is provided to the generative model.

[1305] Input: Text entered by the user

[1306] Output: Recognized emotion data

[1307] Specific operation: The server calls the emotion engine and analyzes the user input text. The emotion engine extracts emotions from the text and passes the results to the generative model.

[1308] Step 5: Build and interact with your chatbot

[1309] The server integrates a fine-tuned generative model and an emotion engine to run the chatbot in a local environment. It recognizes emotions in response to user inquiries and generates optimal responses via a smartphone app.

[1310] Input: User query, recognized emotion data

[1311] Output: Response message to the user

[1312] How it works: When a user types a question into a chatbot app, the text is sent to the server, which analyzes the emotion using an emotion engine and inputs that information into a generative model. The generative model then generates a text response, which is then displayed through the user interface.

[1313] Step 6: Providing a User Interface

[1314] The device (smartphone) provides an interface through which the user can interact with the chatbot, inputting inquiries and receiving responses.

[1315] Input: User query

[1316] Output: Chatbot response

[1317] Specific operation: The device is an app built using Flutter that captures user input, sends it to the server, receives the response from the server, and displays it on the screen.

[1318] 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.

[1319] 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.

[1320] 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.

[1321] [Fourth embodiment]

[1322] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.

[1323] 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.

[1324] 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).

[1325] 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.

[1326] 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.

[1327] 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).

[1328] 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.

[1329] 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.

[1330] 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.

[1331] 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.

[1332] 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.

[1333] 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.

[1334] 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."

[1335] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks. Specific embodiments for implementing the present invention are described below.

[1336] System Overview

[1337] The system is broadly composed of the following elements:

[1338] 1. A method for generating sentences using a generative model

[1339] 2. A means to fine-tune data relevant to specific tasks based on generative models

[1340] 3. A way to build chatbots that run locally using fine-tuned generative models

[1341] 4. How to prepare the dataset

[1342] 5. Means of tokenizing generative models

[1343] 6. Means of providing a conversational interface with chatbots

[1344] Program processing

[1345] Preparing the dataset

[1346] Users prepare business-specific FAQ data as a text file, which contains specific questions and their corresponding answers. The server reads this text file and processes it as a dataset.

[1347] Setting up the model and tokenizer

[1348] The server loads a pre-trained generative model (e.g., GPT-2 model) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks.

[1349] Performing fine tuning

[1350] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[1351] Building and interacting with chatbots

[1352] The server uses the fine-tuned generative model to build a chatbot. This chatbot runs in a local environment and provides accurate responses to user inquiries. The user can freely input questions using a user interface provided through the terminal, and the chatbot generates responses based on the questions.

[1353] Specific examples

[1354] Scenario 1: Product return process inquiry

[1355] The user asks, "What is the product return process?" via their device. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying, "You can return the product within 30 days of the purchase date. If you would like to return the product, please fill out this form." and sends it back to the user via their device.

[1356] Scenario 2: Inquiring about the delivery status of an item

[1357] The user asks, "Where can I check the delivery status of my item?" The server processes this question using a similar process, and from its fine-tuned model generates a response such as, "You can check the delivery status of your item on my page on our website," and notifies the user.

[1358] The system of this invention eliminates dependency on external APIs and cloud computing and can be easily implemented and operated in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide advanced chatbots efficiently and at low cost.

[1359] The processing flow will be explained below.

[1360] Step 1: Prepare the dataset

[1361] A user prepares FAQ data as a text file and uploads it to the server. The server reads the uploaded text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[1362] Step 2: Setting up the model and tokenizer

[1363] The server loads a pre-trained generative model (GPT-2 model) along with a tokenizer to be applied to the generative model, preparing to convert text data into a token format that the model can understand.

[1364] Step 3: Prepare for Fine Tuning

[1365] The server takes the text dataset generated in step 1, splits the dataset into batches, and prepares the data for input to the model. Here, DataCollatorForLanguageModeling is used to create the batches of data.

[1366] Step 4: Perform fine tuning

[1367] The server begins fine-tuning the generative model by setting training parameters (e.g., number of epochs, batch size, etc.) and training the model. In the process, the server improves its ability to generate sentences based on data relevant to a specific task.

[1368] Step 5: Save the Fine-Tuning Model

[1369] The server saves the fine-tuned generative model in the specified directory, which is then used to generate responses for the chatbot.

[1370] Step 6: Build your chatbot

[1371] The server uses the fine-tuned generative model to build a chatbot, which then configures a dialogue system including a user interface to enable the chatbot to respond to user questions.

[1372] Step 7: User Initiates Interaction

[1373] The user initiates a dialogue with the chatbot through the terminal. When the user inputs a question to the chatbot, the input is sent to the server.

[1374] Step 8: Tokenize user input

[1375] The server uses a tokenizer to convert user input into tokens, which are then passed to the generative model.

[1376] Step 9: Response generation using the generative model

[1377] The server inputs the tokenized user input into the generative model and generates an appropriate response, which is then decoded back into text form.

[1378] Step 10: Returning a response to the user

[1379] The server then sends the generated response back to the terminal. The user can check the response from the chatbot on the screen. This process is repeated continuously, ensuring smooth dialogue between the user and the chatbot.

[1380] Example 1

[1381] 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."

[1382] Conventional chatbots rely on external APIs and cloud services, which can create responses tailored to specific tasks, resulting in high costs and complex management. Data security is also often an issue. The present invention aims to solve these issues by providing a chatbot system that can operate in a local environment and efficiently process data related to specific tasks.

[1383] 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.

[1384] In this invention, the server includes means for preparing a dataset, means for tokenizing a generative model, means for generating sentences using the generative model, means for fine-tuning data related to a specific job role based on the generative model, means for constructing a chatbot that runs in a local environment using the fine-tuned generative model, means for providing a dialogue interface with the chatbot, means for tokenizing inquiries from users and passing them to the fine-tuned generative model, and means for providing generated responses to the user. This makes it possible to provide an efficient, low-cost chatbot that can be easily introduced and operated in a local environment and is specialized for a specific job role.

[1385] A "dataset" is a collection of data collected and organized for a specific purpose.

[1386] A "generative model" is a machine learning model trained to generate sentences in natural language processing.

[1387] "Tokenization" is the process of dividing a sentence into the smallest units called words or tokens.

[1388] "Fine-tuning" is the process of further training an existing generative model to suit a specific purpose.

[1389] A "local environment" is an environment in which the system operates using the user's own computing resources, without relying on a specific network or cloud service.

[1390] A "chatbot" is a program that simulates natural language dialogue and automatically generates responses to user inquiries.

[1391] A "conversational interface" is an interface that allows users to interact with a chatbot via text or voice.

[1392] An "inquiry" is a question or request made by a user to a chatbot.

[1393] A "response" is a reply that a chatbot generates in response to a user's inquiry.

[1394] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks. Specific embodiments for implementing the present invention are described below.

[1395] Preparing the dataset

[1396] Users prepare business-specific FAQ data as a text file. This data contains specific questions and their corresponding answers. For example, it may include questions and answers about the product return process or delivery status. The server reads this text file and processes it as a dataset. To read the data, a general file manipulation program is used.

[1397] Setting up the model and tokenizer

[1398] The server loads a pre-trained generative model (e.g., the GPT-2 model) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks. The tokenizer splits user input or datasets into tokens and converts them into a format that the model can easily process.

[1399] Performing fine tuning

[1400] The server then fine-tunes the generative model using the prepared dataset. It sets training parameters such as the number of epochs and batch size to optimize the model's performance. This process equips the model with the ability to generate sentences based on data relevant to a specific task. For example, it can generate detailed answers about the return process or specific responses about the delivery status of an item.

[1401] Building and interacting with chatbots

[1402] The server uses the fine-tuned generative model to build a chatbot. This chatbot runs in a local environment and provides accurate responses to user inquiries. The user can freely input questions using a user interface provided through the terminal, and the chatbot generates responses based on those questions. For example, a user can enter text using a chat window in a web application, and the server tokenizes it, passes it to the generative model, and returns a response.

[1403] Specific examples

[1404] Scenario 1: Product return process inquiry

[1405] The user asks, "What is the product return process?" via their device. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying, "You can return the product within 30 days of the purchase date. If you would like to return the product, please fill out this form." and sends it back to the user via their device.

[1406] Scenario 2: Inquiring about the delivery status of an item

[1407] The user asks, "Where can I check the delivery status of my item?" The server processes this question using a similar process, and from its fine-tuned model generates a response such as, "You can check the delivery status of your item on my page on our website," and notifies the user.

[1408] The system of this invention eliminates dependency on external APIs and cloud computing and can be easily implemented and operated in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide advanced chatbots efficiently and at low cost.

[1409] The flow of the identification process in the first embodiment will be described with reference to FIG.

[1410] Step 1: Prepare the dataset

[1411] The user prepares FAQ data specific to the business as a text file.

[1412] Input: FAQ data (text file)

[1413] Output: Prepared text file

[1414] What it does: Users collect and create text files containing work-related questions and answers.

[1415] The server reads this text file and processes it as a dataset.

[1416] Input: User-prepared text file

[1417] Output: Tokenized dataset

[1418] What happens: The server opens the text file, reads the contents into memory, and extracts each question-answer pair to form a dataset.

[1419] Step 2: Setting up the model and tokenizer

[1420] The server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer.

[1421] Input: GPT-2 model and tokenizer

[1422] Output: Loaded model and tokenizer

[1423] Specific operation: The server downloads the generative model (GPT-2) and tokenizer from a predefined library and loads them into memory.

[1424] Step 3: Perform fine tuning

[1425] The server uses the prepared dataset to fine-tune the generative model.

[1426] Input: Tokenized dataset

[1427] Output: A fine-tuned generative model

[1428] How it works: The server sets training parameters such as the number of epochs and batch size, and retrains the generative model based on the tokenized dataset. In this process, the model's performance is optimized for the specific business data.

[1429] Step 4: Build and interact with your chatbot

[1430] The server builds a chatbot using a fine-tuned generative model.

[1431] Input: Fine-tuned generative model

[1432] Output: Chatbot running in local environment

[1433] Specific operation: Implement chatbot functions based on the fine-tuned model and configure it to run properly on a local server.

[1434] The user inputs a question through a user interface provided through the terminal.

[1435] Input: User question (text input)

[1436] Output: Query data from the terminal to the server

[1437] How it works: A user types a question using a chat window in a web application, and the data is sent to the server.

[1438] The server tokenizes this input and passes it to the generative model.

[1439] Input: User question (text data)

[1440] Output: Input tokens to the generative model

[1441] Specific operation: The server uses a tokenizer to convert the user's question into tokens and input them into the generative model.

[1442] The generated response is provided to the user.

[1443] Input: Response data from the generative model

[1444] Output: Response to user (text)

[1445] Specific behavior: The response obtained from the generative model is decoded and sent back to the user as text.

[1446] Specific operation example

[1447] Scenario 1: Product return process inquiry

[1448] Question: "What is the process for returning products?"

[1449] Response: "You can return an item within 30 days of purchase. If you would like to return an item, please fill out this form."

[1450] Scenario 2: Inquiring about the delivery status of an item

[1451] Question: "Where can I check the delivery status of my item?"

[1452] Response: "You can check your delivery status on My Page on our website."

[1453] (Application example 1)

[1454] 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."

[1455] At logistics centers, many staff members are tasked with inventory management and checking delivery status, and they are required to respond to inquiries quickly and accurately. Therefore, it is necessary to use an efficient interactive system to reduce the workload on staff and improve work efficiency.

[1456] 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.

[1457] In this invention, the server includes means for generating sentences using a generative model, means for fine-tuning data related to a specific task based on the generative model, means for building a chatbot that runs in a local environment using the fine-tuned generative model, means for preparing a dataset, means for tokenizing the generative model, means for providing a dialogue interface with the chatbot via an application installed on a mobile information terminal used by staff in the logistics center, and means for generating responses to inquiries about inventory and delivery status. This enables staff in the logistics center to quickly and accurately check inventory and delivery status using their mobile information terminals.

[1458] A "generative model" is a pre-trained algorithm, a system for generating new sentences or text based on input text.

[1459] "Fine-tuning" is the process of further training a pre-trained generative model using a specific dataset to adapt it to a specific task or application.

[1460] A "chatbot" is a computer program that interacts with users and is a system that uses natural language processing technology to generate appropriate responses to questions.

[1461] A "dataset" is a collection of data used to train or fine-tune a generative model, including questions and answers relevant to a particular task.

[1462] "Tokenization" is the process of dividing text data into smaller units such as words or subwords, and is a preprocessing step for input into a generative model.

[1463] "Personal digital assistant" refers to a portable computing device, including smartphones and tablets.

[1464] A "conversational interface" is a user interface that allows a user to effectively interact with a chatbot, providing the ability to input text and receive responses.

[1465] "Inventory check" refers to the process of checking the inventory status within a logistics center, and is a means of checking the current inventory amount and location.

[1466] "Delivery status confirmation" is a process for checking the current delivery status of shipped products, and is a means for checking product tracking information and the estimated delivery date and time.

[1467] This invention is a chatbot system that responds quickly and accurately to inquiries such as inventory checks and delivery status checks via an application installed on a mobile information terminal used by staff in a logistics center. Specific embodiments are described below.

[1468] System Overview

[1469] The system is broadly composed of the following elements:

[1470] 1. A method for generating sentences using a generative model

[1471] 2. A means to fine-tune data relevant to specific tasks based on generative models

[1472] 3. A way to build chatbots that run locally using fine-tuned generative models

[1473] 4. How to prepare the dataset

[1474] 5. How to tokenize a generative model

[1475] 6. A means of providing a conversational interface with the chatbot via an application installed on mobile devices used by staff in the distribution center.

[1476] 7. Means of generating responses to inventory and delivery status queries

[1477] Hardware and Software

[1478] We use a server and a mobile information device (smartphone or tablet). The server is equipped with a high-performance GPU and uses PyTorch and the Transformers library to train and fine-tune the generative model.

[1479] Server: PC / server with high performance GPU

[1480] software:

[1481] PyTorch: A deep learning framework

[1482] Transformers: Library for Transformer models (Hugging Face)

[1483] Data processing and calculation

[1484] Prepare the dataset:

[1485] The user prepares FAQ data specific to the operations within the distribution center as a text file, which contains specific questions and their corresponding answers.

[1486] Setting up the model and tokenizer:

[1487] The server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer. This generative model is capable of generating general sentences and requires additional training to adapt to specific tasks.

[1488] Perform fine tuning:

[1489] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[1490] Build and interact with chatbots:

[1491] The server uses the fine-tuned generative model to build a chatbot, which runs in a local environment. The chatbot uses a user interface provided by a mobile information terminal to allow users to freely input questions, and the chatbot generates responses based on the questions.

[1492] Specific examples

[1493] Scenario 1: Checking inventory

[1494] The user asks "How do I check inventory?" via a mobile information terminal. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying "You can check all inventory status by accessing the logistics system and clicking the inventory tab," and sends it back to the user via the terminal.

[1495] Scenario 2: Checking Delivery Status

[1496] The user asks "Where can I check the delivery status of my product?" via a mobile information terminal. The server tokenizes this input and passes it to the generative model. Based on the fine-tuned data, the model generates a response saying "You can check your delivery status from your personal page in the logistics system," and notifies the user via the terminal.

[1497] This system allows staff at the logistics center to use smartphones and tablets to carry out their work efficiently and obtain the information they need quickly and accurately.

[1498] Example prompt sentence:

[1499] "Please explain the normal inventory check procedure at your distribution center."

[1500] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[1501] Step 1:

[1502] A user uses a handheld device to input a question about inventory or delivery status. This input is in text format and is sent by the user through the application's dialogue interface.

[1503] Input: The question text entered by the user (e.g., "How do I check inventory?")

[1504] Output: The question text is sent to the server

[1505] Step 2:

[1506] The terminal sends the user's question text to the server, which communicates over the Internet and waits for the text to be processed appropriately.

[1507] Input: Question text submitted by the user

[1508] Output: Question text for server input

[1509] Step 3:

[1510] The server tokenizes the received question text. Specifically, it uses a tokenizer compatible with the GPT-2 model to convert the text into tokens (words and subwords). This process prepares the text in a format that can be input to a generative model.

[1511] Input: Question text

[1512] Output: Tokenized text data

[1513] Step 4:

[1514] The server runs a generative model on the tokenized text data to generate a response. The fine-tuned GPT-2 model performs computations to generate a coherent response based on the input tokens.

[1515] Input: Tokenized text data

[1516] Output: The response text generated by the generative model

[1517] Step 5:

[1518] The server then detokenizes the generated response text, specifically by using a tokenizer to convert the tokens back into natural language sentences. This process results in a text response that can be provided directly to the user.

[1519] Input: Tokenized response text

[1520] Output: Natural language response text

[1521] Step 6:

[1522] The server then sends the detokenized response text to the terminal, which also communicates over the Internet, enabling real-time responses.

[1523] Input: Natural language response text

[1524] Output: Response text sent to the terminal

[1525] Step 7:

[1526] The terminal displays the response text received from the server to the user, who can then check the generated response through the dialogue interface and decide on the next action based on the content of the response.

[1527] Input: Response text received from the server

[1528] Output: The response text that is displayed to the user

[1529] Through these processing steps, users will be able to receive prompt and accurate responses to inquiries such as inventory checks and delivery status confirmations. This system will streamline operations within the logistics center and reduce the workload of staff.

[1530] 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.

[1531] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks, while recognizing the user's emotions and generating responses according to those emotions. Specific embodiments for implementing the present invention are described below.

[1532] System Overview

[1533] The system is broadly composed of the following elements:

[1534] 1. A method for generating sentences using a generative model

[1535] 2. A means to fine-tune data relevant to specific tasks based on generative models

[1536] 3. A way to build chatbots that run locally using fine-tuned generative models

[1537] 4. A method for recognizing user emotions using an emotion engine

[1538] 5. A means of selecting appropriate responses based on perceived emotions

[1539] 6. How to prepare the dataset

[1540] 7. Means of tokenizing generative models

[1541] 8. Means of providing a conversational interface with chatbots

[1542] Program processing

[1543] Preparing the dataset

[1544] A user prepares FAQ data as a text file and uploads it to the server. The server reads the text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[1545] Setting up the model and tokenizer

[1546] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer, ready to convert text data into a token format that the model can understand.

[1547] Performing fine tuning

[1548] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task. This fine-tuning process involves setting specific training parameters, such as the number of epochs and batch size, to optimize the model's performance.

[1549] Emotion engine setup and emotion recognition

[1550] The server sets up an emotion engine to analyze the text input from the user and recognize emotions. The emotion engine extracts emotions (e.g., joy, sadness, anger) from the user's input text and provides the emotion information to the generative model.

[1551] Building and interacting with chatbots

[1552] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot that runs in a local environment. This chatbot recognizes emotions in response to user inquiries and generates optimal responses based on the results. The user can freely input questions using a user interface provided through the device, and the chatbot generates a response based on the question and the recognized emotions.

[1553] Specific examples

[1554] Scenario 1: Product return process inquiry

[1555] The user asks, "What is the process for returning products?" The server tokenizes this input and passes it to the generative model. At the same time, it uses an emotion engine to recognize the user's emotions. The model generates a response and displays it on the device: "You can return a product within 30 days of the purchase date. If you wish to return a product, please fill out this form."

[1556] Scenario 2: An angry inquiry about the delivery status of a product

[1557] The user asks in frustration, "Why hasn't my item arrived yet?" The server uses a tokenizer and a generative model to generate a response, while also using an emotion engine to recognize the user's angry emotion. Based on this recognition, the server adjusts the response to return a more polite and empathetic message. For example, the server might reply to the user via their device, "We understand your frustration. We will immediately check the delivery status, so please wait a moment."

[1558] The system of this invention eliminates dependency on external APIs and cloud computing, allowing for easy deployment and operation in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide sophisticated chatbots efficiently and at low cost. Furthermore, by integrating an emotion engine, appropriate responses based on the user's emotions can be provided, significantly improving the user experience.

[1559] The processing flow will be explained below.

[1560] Step 1: Prepare the dataset

[1561] Users prepare business-specific FAQ data as text files and upload them to the server. The server reads the uploaded text files and processes them as a dataset. Specifically, it tokenizes the text in the files using a tokenizer to generate a text dataset.

[1562] Step 2: Setting up the model and tokenizer

[1563] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer, ready to convert text data into a token format that the model can understand.

[1564] Step 3: Prepare for Fine Tuning

[1565] The server takes the text dataset generated in step 1, splits the dataset into batches, and prepares the data for input to the model. Here, DataCollatorForLanguageModeling is used to create the batches of data.

[1566] Step 4: Perform fine tuning

[1567] The server begins fine-tuning the generative model by setting training parameters (e.g., number of epochs, batch size, etc.) and training the model. In the process, the server improves its ability to generate sentences based on data relevant to a specific task.

[1568] Step 5: Save the Fine-Tuning Model

[1569] The server saves the fine-tuned generative model in the specified directory, which is then used to generate responses for the chatbot.

[1570] Step 6: Setting up the Emotion Engine

[1571] The server sets up an emotion engine to analyze and recognize emotions from the user's input text. The emotion engine contains algorithms to extract emotions such as joy, sadness, anger, etc. from the user's input.

[1572] Step 7: Build your chatbot

[1573] The server integrates the fine-tuned generative model and emotion engine to build a chatbot that runs in a local environment. Here, a dialogue system including a user interface is set up, allowing the chatbot to respond based on user questions and emotions.

[1574] Step 8: User Initiates Interaction

[1575] The user initiates a dialogue with the chatbot through the terminal. When the user inputs a question to the chatbot, the input is sent to the server.

[1576] Step 9: Tokenize user input

[1577] The server uses a tokenizer to convert user input into tokens, which are then passed to the generative model.

[1578] Step 10: Emotion Recognition

[1579] The server analyzes and recognizes emotions from the user's input text using an emotion engine. The recognized emotion information is used to generate responses in the generative model.

[1580] Step 11: Response generation using the generative model

[1581] The server inputs the tokenized user input and the recognized emotion information into a generative model to generate an appropriate response, which is then decoded back into text format.

[1582] Step 12: Returning a response to the user

[1583] The server then sends the generated response back to the terminal. The user can check the response from the chatbot on the screen. This process is repeated continuously, ensuring smooth dialogue between the user and the chatbot.

[1584] Example 2

[1585] 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."

[1586] The present invention relates to a chatbot system. Conventional chatbots have had issues with their difficulty in accurately responding to data related to specific tasks and lacking responses that take user emotions into consideration. This can lead to a decline in the quality of the user experience and a risk of impairing system reliability. There is also a need for a high-performance chatbot system that can be operated in a local environment without relying on external APIs or cloud services.

[1587] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[1588] In this invention, the server includes: means for generating sentences using a generative model; means for fine-tuning data related to a specific task based on the generative model; means for building a chatbot that operates in a local environment using the fine-tuned generative model; means for preparing a dataset; means for tokenizing the generative model; means for recognizing a user's emotion using an emotion engine; means for selecting an appropriate response based on the recognized emotion; and means for providing a dialogue interface with the chatbot. This makes it possible to generate accurate responses that take the user's emotion into consideration and provide an enhanced user experience. It also makes it possible to realize a chatbot system that can be operated efficiently and at low cost in a local environment.

[1589] A "generative model" is a machine learning model designed to generate new sentences from text data using natural language processing algorithms.

[1590] "Fine-tuning" is the process of further training a pre-trained model with a specific dataset to optimize it for a particular task or application.

[1591] A "local environment" is a computing environment that operates independently within a company's or individual's computer system, rather than on a cloud server or external network.

[1592] A "dataset" is a collection of data used to train and evaluate machine learning models.

[1593] "Tokenization" is the process of breaking down text data into smaller units (tokens) and converting them into a format that can be processed by machine learning models.

[1594] An "emotion engine" is an algorithm or system that analyzes text data entered by a user and identifies emotions such as joy, sadness, and anger.

[1595] An "interactive interface" is a user interface that includes a communication means and a display screen for a user to input and receive responses from the system.

[1596] The "means for selecting a response" is a mechanism for selecting the optimal response based on specific criteria from multiple response candidates generated by the generative model.

[1597] The present invention is a chatbot system that uses a generative AI model and provides appropriate answers according to the user's needs by fine-tuning data related to specific tasks, while recognizing the user's emotions and generating responses according to those emotions. Specific embodiments for implementing the present invention are described below.

[1598] System Overview

[1599] The system is broadly composed of the following elements:

[1600] 1. A method for generating sentences using a generative model

[1601] 2. A means to fine-tune data relevant to specific tasks based on generative models

[1602] 3. A way to build chatbots that run locally using fine-tuned generative models

[1603] 4. How to prepare the dataset

[1604] 5. Means of tokenizing generative models

[1605] 6. Means of recognizing user emotions using an emotion engine

[1606] 7. A means of selecting appropriate responses based on perceived emotions

[1607] 8. Means of providing a conversational interface with chatbots

[1608] First, a user prepares FAQ data as a text file and uploads it to the server. The server reads the text file and processes it as a dataset. Specifically, it tokenizes the text in the file using a tokenizer to generate a text dataset.

[1609] Next, the server loads a pre-trained generative model (e.g., GPT-2) and its corresponding tokenizer, which allows it to convert text data into a tokenized form that the model can understand.

[1610] The server then fine-tunes the generative model using the prepared dataset, enabling the model to generate sentences based on data relevant to the specific task. The fine-tuning process involves specifically setting training parameters such as the number of epochs and batch size to optimize the model's performance.

[1611] Furthermore, the server sets up an emotion engine to analyze the text input from the user and recognize emotions. The emotion engine extracts emotions (e.g., joy, sadness, anger) from the user's input text and provides the emotion information to the generative model.

[1612] Finally, the server integrates the fine-tuned generative model and the emotion engine to build a chatbot that runs in the local environment. This chatbot recognizes emotions in response to user inquiries and generates optimal responses based on the results. The user can freely input questions using a user interface provided through the device, and the chatbot generates responses based on the questions and the recognized emotions.

[1613] Specific examples

[1614] Scenario 1: Product return process inquiry

[1615] A user asks, "What is the process for returning a product?"

[1616] The server tokenizes this input and passes it to the generative model, while simultaneously using the emotion engine to recognize the user's emotions.

[1617] The model generates a response that displays on the device: "You can return the product within 30 days of the date of purchase. If you would like to return the product, please fill out this form."

[1618] Scenario 2: An angry inquiry about the delivery status of a product

[1619] The user asks in frustration, "Why hasn't my item arrived yet?"

[1620] The server uses a tokenizer and a generative model to generate a response, while using an emotion engine to recognize the user's anger emotion.

[1621] Based on this knowledge, it can adjust its response to be more polite and empathetic, for example, replying to the user via the device, "We understand your frustration. We will check the delivery status immediately, so please wait a moment."

[1622] The system of this invention eliminates dependency on external APIs and cloud computing, allowing for easy deployment and operation in a local environment. Furthermore, by fine-tuning the model using data specialized for specific tasks, even small and medium-sized enterprises can provide sophisticated chatbots efficiently and at low cost. Furthermore, by integrating an emotion engine, appropriate responses based on the user's emotions can be provided, significantly improving the user experience.

[1623] The flow of the identification process in the second embodiment will be described with reference to FIG.

[1624] Step 1:

[1625] Preparing the dataset

[1626] A user prepares FAQ data as a text file and uploads the file to the server.

[1627] Users compile FAQs related to a particular task into a text file.

[1628] The user submits this text file to the server via the system's upload interface.

[1629] The server reads this text file and processes it as a dataset.

[1630] The server reads the received text file and analyzes its contents.

[1631] Input: FAQ text file, Output: tokenized dataset

[1632] The server passes the text to a tokenizer, which converts each string into a token.

[1633] The tokenized data is saved as a dataset used for fine-tuning.

[1634] Step 2:

[1635] Setting up the model and tokenizer

[1636] The server loads a pre-trained generative model (GPT-2 model) and its corresponding tokenizer.

[1637] The server loads a pre-trained generative model (GPT-2) from external or local storage and deploys it in memory.

[1638] Input: GPT-2 model from external storage, Output: unpacked GPT-2 model in memory

[1639] At the same time, the tokenizer is loaded and ready to convert text data into token format.

[1640] Step 3:

[1641] Performing fine tuning

[1642] The server uses the prepared dataset to fine-tune the generative model.

[1643] The server passes the dataset to the training module to fine-tune the generative model.

[1644] Input: Tokenized dataset and training parameters (number of epochs, batch size, etc.), Output: Fine-tuned generative model

[1645] During this process, training parameters such as the number of epochs and batch size are set to efficiently optimize the model.

[1646] Once fine-tuned, the generative model will have the ability to generate sentences specialized for a specific task.

[1647] Step 4:

[1648] Emotion engine setup and emotion recognition

[1649] The server sets up an emotion engine to analyze text input from the user and recognize emotions.

[1650] The server loads the emotion engine and prepares to parse emotions from the user's text input.

[1651] Input: Emotion engine, user input text, Output: Parsed emotion data

[1652] The text entered by the user through the terminal is sent to the server and analyzed by the emotion engine.

[1653] The recognized emotion (happiness, sadness, anger, etc.) is used in the next step.

[1654] Step 5:

[1655] Building and interacting with chatbots

[1656] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot that runs in a local environment.

[1657] The server integrates a fine-tuned generative model and an emotion engine to build a chatbot system.

[1658] Input: Fine-tuned generative model, emotion engine, user input text, Output: Response provided to user

[1659] The user inputs questions or inquiries through the terminal.

[1660] The server receives the input, tokenizes it using a tokenizer, and passes it to the generative model.

[1661] At the same time, an emotion engine is used to analyze the user's emotions and provide that information to the generative model.

[1662] The generative model generates an optimal response based on the question content and the analyzed emotions and sends it to the device.

[1663] The terminal displays the generated response to the user.

[1664] (Application example 2)

[1665] 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."

[1666] Conventional chatbot systems often only return standard responses to user inquiries, and have had the problem of difficulty in recognizing the user's emotions and responding appropriately. This has led to problems such as a poor user experience and difficulty in improving satisfaction. To solve these problems, the present invention aims to provide a system that recognizes the user's emotions and automatically generates responses based on them.

[1667] 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.

[1668] In this invention, the server includes means for generating sentences using a generative model, means for fine-tuning data related to a specific task based on the generative model, means for building a chatbot that operates in a local environment using the fine-tuned generative model, means for preparing a dataset, means for tokenizing the generative model, means for providing a dialogue interface with the chatbot, means for recognizing a user's emotion using an emotion engine, and means for selecting an appropriate response based on the recognized emotion. This enables responses to be generated taking the user's emotion into consideration, thereby providing a more satisfying user experience.

[1669] A "generative model" is an artificial intelligence model that uses machine learning algorithms to automatically generate natural language sentences.

[1670] "Fine-tuning" is the process of retraining a pre-trained machine learning model with data relevant to a specific task or domain to improve its accuracy and performance.

[1671] "Running in a local environment" means running the system on a company's or individual's dedicated server or computer, without using an external server or cloud.

[1672] A "chatbot" is a software robot that automatically conducts conversations with users, usually through text-based interactions.

[1673] A "dataset" is a set of data used to train and evaluate a machine learning model.

[1674] "Tokenization" is the process of dividing a natural language sentence into small units (tokens) such as words or subwords.

[1675] An "interactive interface" is an interface that allows a user to interact with a system, and includes text input, button operations, and the like.

[1676] An "emotion engine" is a software component that analyzes and recognizes emotions from text entered by the user.

[1677] An "emotion-based response" is a response generated taking into account the emotion expressed by the user, and includes a message that is appropriately tailored to the emotion, such as joy or anger.

[1678] The present invention relates to a chatbot system for recognizing a user's emotions and automatically generating a response based on the emotions. Specific embodiments for carrying out the present invention will be described below.

[1679] System Configuration

[1680] The system consists of the following main components:

[1681] 1. A method for generating sentences using a generative model

[1682] 2. A means to fine-tune data relevant to specific tasks based on generative models

[1683] 3. A way to build chatbots that run locally using fine-tuned generative models

[1684] 4. How to prepare the dataset

[1685] 5. Means of tokenizing generative models

[1686] 6. Means of providing a conversational interface with chatbots

[1687] 7. Means of recognizing user emotions using an emotion engine

[1688] 8. A means of selecting appropriate responses based on perceived emotions

[1689] Hardware and software used

[1690] Hardware: Server equipped with high-performance CPU / GPU

[1691] software:

[1692] Generative AI model: GPT-2 (pre-trained)

[1693] Tokenizer: Hugging Face's Tokenizer

[1694] Sentiment engine: Sentiment Analysis API (e.g. Google Cloud Natural Language API)

[1695] Web framework: Flask

[1696] Mobile App: Flutter

[1697] System Operation Overview

[1698] 1. Dataset preparation

[1699] A user collects FAQ data from an online shopping site as a text file and uploads it to the server, which then reads the text file, tokenizes it using a tokenizer, and generates a dataset.

[1700] 2. Setting up the model and tokenizer

[1701] The server loads a pre-trained GPT-2 model and its corresponding tokenizer, which is then ready to convert text data into a tokenized format that the model can understand.

[1702] 3. Perform fine tuning

[1703] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task.

[1704] 4. Emotion Engine Setup and Emotion Recognition

[1705] The text entered by the user is analyzed using the server's emotion engine (Sentiment Analysis API) to recognize emotions. This emotion engine extracts emotions (such as joy, sadness, and anger) from the user's input text and provides the emotion information to the generative model.

[1706] 5. Building and interacting with chatbots

[1707] The server integrates a fine-tuned generative model and an emotion engine to run a chatbot in a local environment. The chatbot performs emotion recognition on user inquiries through a smartphone application (built using Flutter) and generates optimal responses based on the results.

[1708] Specific examples

[1709] Scenario 1: Requesting product details

[1710] The user types into the app, "Tell me more about this product."

[1711] The emotion engine recognizes the user's emotion as "neutral."

[1712] The GPT-2 model generates a response like this: "This product is made from high-quality materials and is available in a variety of sizes and colors. Click here to learn more."

[1713] Scenario 2: Late delivery claim

[1714] The user types in frustration, "Why hasn't my item arrived yet?"

[1715] The emotion engine recognizes the user's emotion as "anger."

[1716] The response generated by the GPT-2 model reads: "We understand your frustration. We will check the delivery status as soon as possible. Please wait a moment."

[1717] Prompt Sentence Examples

[1718] An example of a bad customer inquiry: "Why hasn't my item arrived yet? I've been waiting so long."

[1719] Example of a neutral inquiry: "What are the specifications of this product?"

[1720] This makes it possible to generate a response that takes the user's emotions into consideration, thereby improving customer satisfaction.

[1721] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[1722] Step 1: Prepare the dataset

[1723] A user collects FAQ data from an online shopping site as a text file and uploads it to the server. The server reads the uploaded text file, tokenizes it using a tokenizer, and generates a dataset.

[1724] Input: FAQ data text file

[1725] Output: Tokenized dataset

[1726] What it does: The server reads a text file from the file system, then uses a tokenizer to tokenize the text and convert it into a format that the generative AI model can understand.

[1727] Step 2: Setting up the model and tokenizer

[1728] The server loads a pre-trained GPT-2 model and its corresponding tokenizer.

[1729] Input: None

[1730] Output: Loaded GPT-2 model and tokenizer

[1731] What happens: The server loads the GPT-2 model file and tokenizer from disk and unpacks it into memory, allowing the model to understand and process text data.

[1732] Step 3: Perform fine tuning

[1733] The server uses the prepared dataset to fine-tune the generative model, enabling it to generate sentences based on data relevant to a specific task.

[1734] Input: Tokenized dataset, pre-trained GPT-2 model

[1735] Output: A fine-tuned GPT-2 model

[1736] How it works: The server splits the dataset into batches and uses each batch to adjust the model parameters. With each epoch, the model improves and becomes more adaptable to the given task.

[1737] Step 4: Setting up the emotion engine and emotion recognition

[1738] The text entered by the user is analyzed using the server's emotion engine to recognize emotions, and this emotion information is provided to the generative model.

[1739] Input: Text entered by the user

[1740] Output: Recognized emotion data

[1741] Specific operation: The server calls the emotion engine and analyzes the user input text. The emotion engine extracts emotions from the text and passes the results to the generative model.

[1742] Step 5: Build and interact with your chatbot

[1743] The server integrates a fine-tuned generative model and an emotion engine to run the chatbot in a local environment. It recognizes emotions in response to user inquiries and generates optimal responses via a smartphone app.

[1744] Input: User query, recognized emotion data

[1745] Output: Response message to the user

[1746] How it works: When a user types a question into a chatbot app, the text is sent to the server, which analyzes the emotion using an emotion engine and inputs that information into a generative model. The generative model then generates a text response, which is then displayed through the user interface.

[1747] Step 6: Providing a User Interface

[1748] The device (smartphone) provides an interface through which the user can interact with the chatbot, inputting inquiries and receiving responses.

[1749] Input: User query

[1750] Output: Chatbot response

[1751] Specific operation: The device is an app built using Flutter that captures user input, sends it to the server, receives the response from the server, and displays it on the screen.

[1752] 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.

[1753] 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.

[1754] 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.

[1755] 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.

[1756] FIG. 9 is a diagram illustrating 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 actions 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.

[1757] 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.

[1758] 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).

[1759] 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.

[1760] 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."

[1761] 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.

[1762] 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).

[1763] 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.

[1764] 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.

[1765] 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.

[1766] 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.

[1767] 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.

[1768] 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.

[1769] 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.

[1770] 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.

[1771] 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.

[1772] 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.

[1773] The following is further disclosed regarding the above embodiment.

[1774] (Claim 1)

[1775] a means for generating sentences using a generative model;

[1776] means for fine-tuning data relevant to a particular task based on the generative model;

[1777] A means to build chatbots that run locally using fine-tuned generative models; and

[1778] a means for preparing a dataset;

[1779] A means of tokenizing the generative model;

[1780] A system including means for providing a dialogue interface with a chatbot.

[1781] (Claim 2)

[1782] 10. The system of claim 1, wherein the generative model is pre-trained to generate coherent sentences.

[1783] (Claim 3)

[1784] 10. The system of claim 1, wherein FAQ data is used in fine-tuning a generative model based on a particular dataset.

[1785]

[1786] "Example 1"

[1787] (Claim 1)

[1788] a means for preparing a dataset;

[1789] A means of tokenizing the generative model;

[1790] a means for generating sentences using a generative model;

[1791] a means for fine-tuning data relevant to a particular job role based on a generative model;

[1792] A means to build chatbots that run locally using fine-tuned generative models; and

[1793] a means for providing a conversational interface with the chatbot;

[1794] A means to tokenize user queries and pass them to a fine-tuned generative model;

[1795] The system includes a means for providing the generated response to a user.

[1796] (Claim 2)

[1797] 10. The system of claim 1, wherein the generative model is pre-trained to generate coherent sentences.

[1798] (Claim 3)

[1799] 10. The system of claim 1, wherein FAQ data is used in fine-tuning a generative model based on a particular dataset.

[1800] "Application Example 1"

[1801] (Claim 1)

[1802] a means for generating sentences using a generative model;

[1803] means for fine-tuning data relevant to a particular task based on the generative model;

[1804] A means to build chatbots that run locally using fine-tuned generative models; and

[1805] a means for preparing a dataset;

[1806] A means of tokenizing the generative model;

[1807] A means for providing a conversational interface with the chatbot via an application installed on a mobile information terminal used by staff in the logistics center;

[1808] means for generating responses to inventory and delivery status inquiries;

[1809] A system including:

[1810] (Claim 2)

[1811] 10. The system of claim 1, wherein the generative model is pre-trained to generate coherent sentences.

[1812] (Claim 3)

[1813] 10. The system of claim 1, wherein FAQ data is used in fine-tuning a generative model based on a particular dataset.

[1814] "Example 2: Combining Emotion Engines"

[1815] (Claim 1)

[1816] a means for generating sentences using a generative model;

[1817] means for fine-tuning data relevant to a particular task based on the generative model;

[1818] A means to build chatbots that run locally using fine-tuned generative models; and

[1819] a means for preparing a dataset;

[1820] A means of tokenizing the generative model;

[1821] means for recognizing a user's emotion using an emotion engine;

[1822] a means for selecting an appropriate response based on the recognized emotion;

[1823] A system including means for providing a dialogue interface with a chatbot.

[1824] (Claim 2)

[1825] 10. The system of claim 1, wherein the generative model is pre-trained to generate coherent sentences.

[1826] (Claim 3)

[1827] 10. The system of claim 1, wherein FAQ data is used in fine-tuning a generative model based on a particular dataset.

[1828] "Application example 2 when combining emotion engines"

[1829] (Claim 1)

[1830] a means for generating sentences using a generative model;

[1831] means for fine-tuning data relevant to a particular task based on the generative model;

[1832] A means to build chatbots that run locally using fine-tuned generative models; and

[1833] a means for preparing a dataset;

[1834] A means of tokenizing the generative model;

[1835] a means for providing a conversational interface with the chatbot;

[1836] means for recognizing a user's emotion using an emotion engine;

[1837] The system includes a means for selecting an appropriate response based on the recognized emotion.

[1838] (Claim 2)

[1839] 10. The system of claim 1, wherein the generative model is pre-trained to generate coherent sentences.

[1840] (Claim 3)

[1841] 10. The system of claim 1, wherein FAQ data is used in fine-tuning a generative model based on a particular dataset. [Explanation of symbols]

[1842] 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. a means for generating sentences using a generative model; means for fine-tuning data relevant to a particular task based on the generative model; A means to build chatbots that run locally using fine-tuned generative models; and a means for preparing a dataset; A means of tokenizing the generative model; A system including means for providing a dialogue interface with a chatbot.

2. The system of claim 1 , wherein the generative model is pre-trained to generate coherent sentences.

3. The system of claim 1 , wherein FAQ data is used when fine-tuning a generative model based on a particular dataset.

Citation Information

Patent Citations

  • Persona chatbot control method and system

    JP2022180282A