System
The legal chatbot system addresses the challenge of providing prompt and accurate legal responses by preprocessing and post-processing user inquiries through a generative AI model, enhancing corporate legal department efficiency and enabling 24-hour support.
Patent Information
- Application Number
- JP2024130373
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2026-02-19
AI Technical Summary
Existing legal chatbot systems struggle to provide prompt and appropriate responses to specialized legal inquiries, placing a heavy burden on corporate legal departments and making it difficult to offer 24-hour support, while also requiring efficient resource management and accurate legal knowledge dissemination.
A legal chatbot system utilizing a generative AI model that preprocesses user questions by tokenizing and removing stop words, inputs the processed question into a generative AI model trained on the Six Codes of Law and latest legal cases, and post-processes the answer for accurate formatting and display on a terminal.
Enables fast and accurate legal answers, reducing the burden on corporate legal departments and allowing 24-hour support, thereby improving efficiency and risk management.
Smart Images

Figure 2026028075000001_ABST
Abstract
Description
[Technical Field]
[0001] The technology of the present disclosure relates to a system. [Background technology]
[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]
[0004] There is a problem in that it is not possible to receive prompt and appropriate responses to specialized legal inquiries. This places a heavy burden on corporate legal departments, making it difficult to provide 24-hour support. Furthermore, the wide range of legal inquiries requires efficient resource management for legal departments. Furthermore, providing appropriate legal knowledge is essential for each employee to promote risk management. [Means for solving the problem]
[0005] The present invention provides a legal chatbot system that utilizes a generative AI model. Specifically, the system solves the above-mentioned problems by including a means for a user to input a legal question; a means for receiving the input question and tokenizing the text and removing stop words as part of preprocessing; a means for inputting the preprocessed question into a generative AI model and generating a legally based answer; a means for postprocessing the generated answer, formatting it, and sending it to a terminal; and a means for the terminal to display the formatted answer. In addition, by using a means for tagging the question text with parts of speech and a generative AI model trained based on the Six Codes of Law and the latest legal cases, it is possible to provide more accurate and specialized legal answers.
[0006] A "user" is an entity that uses the system to enter legal questions and obtain answers.
[0007] A "question" is text or a phrase that a user enters into the system seeking legal information.
[0008] A "terminal" is a device that allows a user to access the system, enter questions, and receive answers; examples include a personal computer or smartphone.
[0009] "Preprocessing" refers to a series of steps taken to convert the input question into a format that is easy for the generative AI model to process, including text tokenization, stop word removal, and part-of-speech tagging.
[0010] "Tokenization" refers to the process of breaking down input text into smaller units such as words or phrases.
[0011] "Stop words" refer to general words that are not considered to have any particular meaning in semantic analysis of text, and examples include "no," "wa," and "ga."
[0012] "Part-of-speech tagging" refers to the process of identifying and tagging each word with its part of speech (noun, verb, adjective, etc.).
[0013] A "generative AI model" is an artificial intelligence that has been trained in advance based on the Complete Law Collection and the latest legal cases, and generates appropriate answers to users' questions.
[0014] "Answer" refers to the text information generated by the generative AI model in response to a user's question.
[0015] "Post-processing" refers to the process of formatting the answers generated by a generative AI model, including tasks such as removing line breaks and checking for terminology.
[0016] The Six Codes of Law is a collection of the six major laws that form the basis of Japanese law, including the Constitution, Civil Code, Criminal Code, Commercial Code, Code of Civil Procedure, and Code of Criminal Procedure.
[0017] "Legal cases" refer to specific cases and precedents concerning the application and interpretation of law. [Brief explanation of the drawings]
[0018] [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
[0019] 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.
[0020] First, the terms used in the following description will be explained.
[0021] 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).
[0022] 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.
[0023] 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.
[0024] 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.
[0025] 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."
[0026] [First embodiment]
[0027] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0028] 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.
[0029] 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).
[0030] 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.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0035] 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.
[0036] 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.
[0037] 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.
[0038] 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."
[0039] The present invention relates to a legal chatbot system that utilizes a generative AI model, and details a specific embodiment that allows users to input legal questions and receive prompt and appropriate answers.
[0040] First, a user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, a user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[0041] The question is then sent from the device to the server, which preprocesses it by tokenizing the question text into words, removing common words (stop words), and tagging each word with a part-of-speech tag.
[0042] Once preprocessing is complete, the question is input into a generative AI model. The generative AI model is trained based on the Roppo Zensho and the latest legal cases, and generates an appropriate answer to the input question. The generated answer is then sent to post-processing, where it is formatted by removing unnecessary line breaks and checking for technical terminology.
[0043] After post-processing is complete, the answer is sent from the server to the terminal and displayed to the user. For example, in response to a question entered by a user such as "Please tell me about Article 15 of the Labor Contract Act," the following answer is generated and displayed on the terminal: "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, the reason for terminating the contract and the procedure for doing so must be clearly stated."
[0044] This system allows users to quickly obtain appropriate legal information. It also reduces the burden on corporate legal departments, allowing them to respond 24 hours a day. Furthermore, the increased collection and analysis of legal cases improves risk management for each employee.
[0045] Specific examples of the present invention are shown below.
[0046] Example 1: Checking the contract
[0047] The user types into the terminal, "What effect do certain provisions in Article 10 of this contract have in the event of cancellation or termination?"
[0048] The question is sent to the server, where natural language processing is used to tokenize and remove stop words.
[0049] Based on the question, the generative AI model generated the answer: "Article 10 contains specific provisions regarding the cancellation or termination of the contract, and stipulates the grounds for termination and the associated obligations and compensation."
[0050] The answer is formatted and sent back to the terminal for the user to confirm.
[0051] Example 2: Claiming unpaid overtime
[0052] The user types into the terminal, "If an employee wants to claim unpaid overtime, how many years back can they claim?"
[0053] The question is sent to the server, where it is tokenized, stopword removed, and tagged with part-of-speech using natural language processing.
[0054] The generative AI model responded to the question by saying, "You can usually claim unpaid overtime wages for up to five years. However, this may vary depending on the situation."
[0055] The answer is formatted and sent back to the terminal for the user to confirm.
[0056] In this way, the present invention provides fast and accurate answers to legal questions, improving the efficiency of corporate legal departments. In addition, the system's 24-hour response time allows for timely legal support.
[0057] The processing flow will be explained below.
[0058] Step 1:
[0059] The user types a legal question into the terminal, for example, "Please tell me about Article 15 of the Labor Contract Act."
[0060] Step 2:
[0061] The device sends the entered question to the server, where the data is encoded into the appropriate format.
[0062] Step 3:
[0063] The server checks the received question and begins preprocessing. First, it tokenizes the input text, which splits the sentence into words.
[0064] Step 4:
[0065] As part of the preprocessing, the server removes stop words, which are common words such as "no" and "wa" that are not necessary for content analysis.
[0066] Step 5:
[0067] The server tags the tokens with part-of-speech tags, which means that each word is tagged as a noun, verb, adjective, etc.
[0068] Step 6:
[0069] After completing preprocessing, the server inputs the question into the generative AI model, which uses training data from the Six Codes and the latest legal cases to generate an appropriate answer to the question.
[0070] Step 7:
[0071] The server receives the output from the generative AI model and begins post-processing the answer, specifically removing unnecessary line breaks and checking for terminology.
[0072] Step 8:
[0073] The server then sends the post-processed response to the terminal, properly formatting the data before sending it.
[0074] Step 9:
[0075] The terminal displays the answer received from the server to the user, who can review the answer and obtain the appropriate legal information for their question.
[0076] For example, if a user asks a question about the Labor Contract Act, the device will display an answer such as, "Article 15 of the Labor Contract Act stipulates the conditions for terminating an employee's contract. Specifically, the reason for terminating the contract and the procedure for doing so must be clearly stated."
[0077] Example 1
[0078] 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."
[0079] Currently, legal inquiries require a lot of resources, making it difficult to provide a fast and accurate response. Furthermore, it is difficult to provide 24-hour support, which reduces user convenience. Furthermore, the quality of answers to questions is often inconsistent, resulting in a lack of trust for users.
[0080] 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.
[0081] In this invention, the server includes means for receiving a legal question from a user, tokenizing the text and removing stop words as preprocessing, inputting the preprocessed question into a generative AI model to generate a legally based answer, and post-processing the generated answer to remove unnecessary line breaks and spaces, check for terminology, format it, and send it to a terminal, thereby enabling the provision of prompt and appropriate legal advice.
[0082] "User" means any person or entity that enters a legal question into the system.
[0083] "Terminal" refers to an information processing device through which a user inputs questions and uses the system.
[0084] "Question" refers to a textual inquiry entered by a user seeking legal information.
[0085] "Preprocessing" refers to a series of processes that tokenize the input question, remove stop words, and tag parts of speech.
[0086] "Tokenization" refers to the process of dividing input text into words and phrases.
[0087] "Stop words" are common words that have little importance in semantic analysis and search results.
[0088] "Part-of-speech tagging" refers to the process of assigning part-of-speech information (e.g., noun, verb, adjective, etc.) to each tokenized word.
[0089] A "generative AI model" refers to an artificial intelligence model that is trained based on existing legal documents and the latest legal cases.
[0090] "Answer" refers to the law-based response generated by a generative AI model in response to a user's question.
[0091] "Post-processing" refers to a series of processes that remove unnecessary line breaks and spaces, check for terminology, and format the generated answers.
[0092] The present invention relates to a legal chatbot system that utilizes a generative AI model, and a specific embodiment is described below that allows users to input legal questions and receive quick and appropriate answers.
[0093] First, the user accesses the legal chatbot using a device such as a PC or smartphone. The device provides an interface for inputting legal questions. For example, the user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[0094] The question is then sent from the device to the server, which preprocesses the received question. This preprocessing includes tokenizing the question text into words, removing common words (stop words), and tagging each word with a part-of-speech tag. This preprocessing is performed using natural language processing techniques.
[0095] After preprocessing, the question is input into a generative AI model. This generative AI model is trained based on laws and regulations and the latest legal cases, and generates an appropriate answer to the input question. For example, GPT-3 is used as a generative AI model.
[0096] The generated answers are post-processed on the server, which includes formatting tasks such as removing unnecessary line breaks and whitespace, checking for terminology, etc. After post-processing is complete, the answers are sent from the server to the device and displayed to the user.
[0097] As a concrete example, let's consider the case where a user types in "Please tell me about Article 15 of the Labor Contract Act." In response to this question, the generative AI model generates the answer "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, it is required that the reason for contract termination and the procedure for it be clearly stated," and this answer is displayed on the device.
[0098] Furthermore, as another specific example, it can also handle the case where a user inputs, "If an employee wants to claim unpaid overtime wages, how many years back can they claim?" In response to this question, the generative AI model generates the answer, "Unpaid overtime wages can usually be claimed for up to five years. However, this may vary depending on the situation," and displays it on the terminal.
[0099] In this way, the present invention provides fast and accurate answers to legal questions, improving the efficiency of corporate legal departments. In addition, the system's 24-hour response time allows for timely legal support.
[0100] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0101] Step 1:
[0102] The user accesses the legal chatbot on a device and enters a question.
[0103] Specific operation: A user accesses the chatbot interface using a computer or smartphone. The user inputs a legal question. For example, the user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[0104] Input: Legal Question (Text)
[0105] Output: The question text entered
[0106] Step 2:
[0107] The terminal sends a question to the server.
[0108] What happens: The device captures the entered question and sends an HTTP request to the server, which includes the question text entered by the user.
[0109] Input: The entered question text
[0110] Output: Question text sent to the server
[0111] Step 3:
[0112] The server pre-processes the query.
[0113] Specific operation: The server first tokenizes the received question. For example, "Please tell me about Article 15 of the Labor Contract Act" is divided into words such as "Labor Contract Act," "Article 15," "about," "tell me," and "please." Next, stop words (e.g., "about," "please") are removed, and only important words are extracted. The remaining words are then tagged with part-of-speech tags. For example, the resulting format would be "Labor Contract Act / NOUN," "Article 15 / NOUN," and "teach me / VERB."
[0114] Input: Question text sent to the server
[0115] Output: Preprocessed question text (tokenized, stopword-removed, part-of-speech-tagged)
[0116] Step 4:
[0117] The server inputs the preprocessed question into a generative AI model to generate an answer.
[0118] Specific operation: The server inputs the preprocessed question text into a generative AI model. The generative AI model (e.g., GPT-3) is trained based on laws and regulations and the latest legal cases, and generates an appropriate answer to the input question. For example, it generates the answer, "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, the reason for termination of the contract and the procedure for doing so must be clearly stated."
[0119] Input: Preprocessed question text
[0120] Output: Generated answer text
[0121] Step 5:
[0122] The server post-processes the generated answer.
[0123] What it does: The server post-processes the answers obtained from the generative AI model, removing unnecessary line breaks and whitespace, and formatting the answers. It also checks for terminology and adds supplementary explanations as needed.
[0124] Input: Generated answer text
[0125] Output: Post-processed answer text
[0126] Step 6:
[0127] The server sends the post-processed answer to the terminal for display to the user.
[0128] Specific operation: The server sends the post-processed answer to the terminal as an HTTP response. The terminal displays the received answer to the user. The user confirms the answer on the terminal. For example, the answer displayed might be "Article 15 of the Labor Contract Act states..."
[0129] Input: Post-processed answer text
[0130] Output: The answer text that is displayed to the user
[0131] (Application example 1)
[0132] 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."
[0133] In security operations, there are many situations where security guards on the scene need fast and accurate legal advice. However, conventional legal chatbot systems have difficulty immediately providing appropriate responses tailored to specific situations. In addition, systems incorporating voice input and speech recognition functions using smartphones or robots have not been fully developed. In these circumstances, there is a need for a means for security guards to quickly obtain legal advice on the scene.
[0134] 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.
[0135] In this invention, the server includes means for a user to input a legal question, means for receiving the input question and tokenizing the text to remove common words as part of preprocessing, means for inputting the preprocessed question into a generative AI model to generate a legal answer, means for post-processing and formatting the generated answer before sending it to a terminal, means for the terminal to display the formatted answer, and means with voice input and speech recognition capabilities for providing rapid legal advice in security-related situations, thereby enabling security guards to obtain rapid legal advice on the scene.
[0136] A "user" is a person who utilizes the system to enter a legal question.
[0137] "Legal questions" refer to questions or inquiries related to the interpretation or application of laws and regulations, or specific legal issues.
[0138] "Input means" refers to a method or device for a user to input a question into a terminal, and includes a keyboard, a touch panel, voice input, and the like.
[0139] "Tokenization" is the process of breaking down the text of a question into smaller units to make it easier to process.
[0140] The "means for removing common words" is a processing method for removing words with little meaning (stop words) from the question text.
[0141] A "generative AI model" is an artificial intelligence model that uses machine learning to generate appropriate answers from legal knowledge and case studies.
[0142] A "legally based answer" is a legally based response provided by a generative AI model to a user's question.
[0143] "Post-processing" refers to formatting and removing unnecessary information from the generated answers before displaying them to the user.
[0144] A "terminal" is a device that a user uses to enter questions and receive answers.
[0145] "Display means" refers to a method or device for displaying the answer results on a terminal, and includes screen display, audio output, etc.
[0146] A "security-related situation" is an event that a security guard faces in the field that involves legal issues.
[0147] "Fast legal advice" means prompt and appropriate legal advice or guidance on a legal matter.
[0148] "Voice input and speech recognition" refers to technology that allows users to input questions by voice and convert them into text.
[0149] This invention provides a system that utilizes generative AI models to enable security guards to obtain fast and accurate legal advice on the spot. The system is mainly composed of three elements: a server, a terminal, and a user.
[0150] First, users input legal questions using devices such as smartphones or robots. This input method includes voice input and speech recognition, so users can input questions by voice. The voice input is converted into text using a speech recognition API such as Google Cloud Speech-to-Text.
[0151] The device then sends the entered question to the server, which then preprocesses the received question. Preprocessing includes tokenization and removal of common words (stop words). For example, if a user enters the question "What legal action will be taken in case of trespassing?", this text will be tokenized and important words such as "trespassing," "legal action," and "taken" will be extracted.
[0152] After preprocessing, the question is input into a generative AI model stored on the server. This generative AI model is trained based on laws and regulations and the latest legal cases, and generates an appropriate legal answer. For example, it might generate an answer such as, "Trespassing is a violation of the criminal law. Violators may be subject to fines or imprisonment."
[0153] The generated answers are then formatted through post-processing, which includes removing unnecessary line breaks and checking for terminology, before finally being sent to the device.
[0154] The terminal displays the formatted answer to the user. The display means includes a screen display and an audio output, so the user can immediately check the answer.
[0155] Specific examples
[0156] Consider a security guard using a smartphone to type a question. The question is asked via voice input, and the text is "What legal action will be taken in the case of trespassing?" This question is sent to a server for pre-processing. A generative AI model then generates an answer, which, after post-processing, is finally displayed on the smartphone: "Trespassing is a violation of criminal law. Violators may be subject to fines or imprisonment."
[0157] Prompt Sentence Examples
[0158] User: What legal action is taken in case of trespass?
[0159] AI: Trespassing is a criminal offense. Violators can be fined or imprisoned.
[0160] In this way, the system improves on-site efficiency in security-related operations by providing real-time legal advice.
[0161] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0162] Step 1:
[0163] A user inputs a legal question using a smartphone or robotic device. The input method also includes a voice input function. When the user inputs a question by voice, the voice is converted into text using a speech recognition API (for example, Google Cloud Speech-to-Text). The input data is the user's question text.
[0164] Step 2:
[0165] The terminal sends the entered question to the server, and the data sent is the user's question text.
[0166] Step 3:
[0167] The server pre-processes the received question text, which includes:
[0168] 1. Tokenization: Divide the text into words. The input is the user's question text, and the output is a list of tokenized words.
[0169] 2. Stop word removal: remove common words (stop words) from the list. The input is a list of tokenized words, and the output is a list containing only important words.
[0170] Example: Input "What legal action will be taken in case of trespassing?" → Tokenized output "Trespassing", "In that case", "How", "Legal action", "Take?"
[0171] Step 4:
[0172] The preprocessed question text is input to the generative AI model. The server sends a prompt to the generative AI model based on the results of the preprocessing, and generates an appropriate legal answer. The input is the preprocessed question text, and the output is the generated legal answer text.
[0173] Example: Prompt: "What legal action can be taken in the case of trespass?" → Generated answer: "Trespassing is against the criminal law. Violators can be fined or imprisoned."
[0174] Step 5:
[0175] The server post-processes the generated answer text, which includes:
[0176] 1. Formatting: Remove unnecessary line breaks and check for technical terms. The input is the generated answer text, and the output is the formatted answer text.
[0177] Example: Before: "Trespassing is a violation of the criminal code. Violators may be subject to fines or imprisonment." → After: "Trespassing is a violation of the criminal code. Violators may be subject to fines or imprisonment."
[0178] Step 6:
[0179] The server sends the post-processed answer text to the terminal. The data sent is the formatted answer text.
[0180] Step 7:
[0181] The terminal displays the formatted answer to the user. The display means may include a screen display or an audio output, so that the user can immediately check the answer. The displayed data is the formatted answer text.
[0182] 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.
[0183] This invention combines a legal chatbot system that utilizes a generative AI model with an emotion engine, and details a specific embodiment that allows users to input legal questions and receive quick and appropriate answers based on those questions.
[0184] First, a user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, the user might input a question such as, "Please tell me about the conditions for contract termination."
[0185] The question is then sent from the device to the server, which preprocesses the received question, including tokenizing the question text, removing stop words, and tagging parts of speech.
[0186] After preprocessing, the question is fed into a generative AI model, which generates an appropriate legally based answer. However, the present invention also incorporates an emotion engine, which recognizes emotions from the user's input text and adjusts the tone of the generated answer based on the recognized emotions. This adjustment allows the answer to be provided while taking into account the user's emotional state.
[0187] The emotion engine also records the user's emotional history for each question, which can be used to improve the quality of future answers. For example, if a user frequently asks questions in an anxious state, future answers will use a more friendly and reassuring tone.
[0188] The post-processed answer is sent from the server to the terminal and displayed to the user, who can review the answer and obtain the appropriate legal information for their question.
[0189] Specific examples of the present invention are shown below.
[0190] Example 1: Contract verification and emotion recognition
[0191] The user types into the terminal, "What effect do certain provisions in Article 10 of this contract have in the event of cancellation or termination?"
[0192] The question is sent to the server, where natural language processing is used to tokenize it, remove stop words, and tag parts of speech.
[0193] Based on the question, the generative AI model generated the answer: "Article 10 contains specific provisions regarding the cancellation or termination of the contract, which usually stipulates the grounds for termination and the resulting obligations and compensation."
[0194] If the emotion engine recognizes emotions from the user's text and determines that the user is feeling anxious, it will adjust the tone of the response to something like, "Don't worry. Article 10 clearly sets out guidelines for cancellation or termination of the contract."
[0195] The answer is formatted and sent back to the terminal for the user to confirm.
[0196] Example 2: Claiming unpaid overtime and emotional history
[0197] The user types into the terminal, "If an employee wants to claim unpaid overtime, how many years back can they claim?"
[0198] The question is sent to the server, where natural language processing is performed to tokenize it, remove stop words, and tag parts of speech.
[0199] The generative AI model responded to the question by saying, "You can usually claim unpaid overtime wages for up to five years. However, this may vary depending on the situation."
[0200] If the emotion engine recognizes the emotion from the user's text and determines from past emotional history that the user wants more information, it will adjust the tone of the response to something like, "Don't worry. You can usually claim unpaid overtime for up to five years, but we recommend consulting a legal professional about your specific situation."
[0201] The answer is formatted and sent back to the terminal for the user to confirm.
[0202] In this way, by combining the emotion engine, the present invention can provide legal information that takes into account the user's emotional state, further improving the efficiency of corporate legal departments. In addition, the system's 24-hour response capability enables timely and flexible legal support.
[0203] The processing flow will be explained below.
[0204] Step 1:
[0205] The user types a legal question into the terminal, for example, "What are the terms of contract termination?"
[0206] Step 2:
[0207] The device sends the entered question to the server, where the data is encoded into the appropriate format.
[0208] Step 3:
[0209] The server checks the received question and begins preprocessing. First, it tokenizes the input text, which splits the sentence into words.
[0210] Step 4:
[0211] As part of the preprocessing, the server removes stop words, which are common words such as "no" and "wa" that are not necessary for content analysis.
[0212] Step 5:
[0213] The server tags the tokens with part-of-speech tags, which means that each word is tagged as a noun, verb, adjective, etc.
[0214] Step 6:
[0215] After completing preprocessing, the server inputs the question into the generative AI model, which uses training data from the Six Codes and the latest legal cases to generate an appropriate answer to the question.
[0216] Step 7:
[0217] The server receives the output from the generative AI model and generates a preliminary answer, which includes basic legal explanations.
[0218] Step 8:
[0219] The server uses an emotion engine to recognize emotions from the text of the question entered by the user. For example, it can recognize that the user is feeling "anxiety" or "doubt" based on the words and context in the sentence.
[0220] Step 9:
[0221] The server adjusts the tone of the generated response based on the perceived sentiment, for example adding friendly phrases like "Don't worry" or "We'll provide more information."
[0222] Step 10:
[0223] The server uses an emotion engine to record the user's emotion history, which is then saved as data to improve the quality of answers in the future.
[0224] Step 11:
[0225] The server then sends the post-processed response to the terminal, properly formatting the data before sending it.
[0226] Step 12:
[0227] The terminal displays the answer received from the server to the user, who can review the answer and obtain the appropriate legal information for their question.
[0228] For example, if a user asks, "Please tell me about the conditions for contract termination," the device will display a response such as, "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Don't worry. Specifically, you are required to clearly state the reason and procedure for contract termination." This allows users to receive legally appropriate information, including emotional care.
[0229] Example 2
[0230] 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."
[0231] Conventional legal chatbot systems provide answers without considering the user's emotional state, making it difficult for users to obtain answers that are relatable to them. Furthermore, the system's inability to provide an appropriate response tone based on the user's emotional state led to problems with reduced user satisfaction. Furthermore, the accuracy of preprocessing and answer generation was insufficient, resulting in the inability to provide appropriate legal information quickly.
[0232] 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.
[0233] In this invention, the server includes means for accepting legal input data from a user, means for preprocessing the accepted input data, tokenizing the text, and removing stop words, means for inputting the preprocessed data into a generative AI model to generate legal results, means for processing the generated results with an emotion engine and adjusting the tone of the results based on the user's emotional state, means for post-processing and formatting the final adjusted results before transmitting them to a terminal, and means for the terminal to display the formatted results. This makes it possible to quickly and accurately provide user-friendly legal information that takes the user's emotions into consideration.
[0234] "User" means any person or entity that utilizes the System to enter legal questions and obtain answers.
[0235] A "terminal" refers to an information processing device such as a personal computer, smartphone, or tablet that is used by a user to access the system, input questions, and display answers.
[0236] The "server" is a computer system that receives questions sent by users, performs preprocessing, generates answers using a generative AI model, adjusts the tone using an emotion engine, performs postprocessing, and finally sends the answers to the terminal.
[0237] "Input Data" means the legal question in text form that the user types into the terminal.
[0238] "Preprocessing" refers to the initial data processing step that the server performs on input data, specifically processing that includes tokenization and removal of stop words.
[0239] "Tokenization" is the process of dividing input data into words and phrases.
[0240] "Stop word removal" is the process of removing common meaningless words from a sentence.
[0241] "Part-of-speech tagging" refers to the process of assigning a part of speech, such as a noun, verb, or adjective, to each token.
[0242] A "generative AI model" is an artificial intelligence model that generates legally relevant results based on input data. The model is trained on legal documents and recent legal cases.
[0243] An "emotion engine" is a system component that recognizes emotions from user input data and adjusts the tone of the generated response.
[0244] "Results" are legally based answers generated by a generative AI model and tone-adjusted by an emotion engine.
[0245] "Post-processing" refers to the process of formatting the generated results so that they are suitable for presentation to a user.
[0246] "Display" means providing the final answer visually to the user at the terminal.
[0247] The present invention is a legal chatbot system that combines a generative AI model and an emotion engine. The system aims to enable users to input legal questions and receive prompt and appropriate answers based on those questions. A specific embodiment of the system is described in detail below.
[0248] A user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, the user inputs a question such as, "Please tell me about the conditions for contract termination."
[0249] The question is then sent from the device to the server, which preprocesses the received question. This preprocessing includes tokenizing the question text, removing stop words, and tagging it with part-of-speech tags. Tokenization splits the text into words and phrases, stop word removal removes meaningless words, and part-of-speech tagging assigns each word a part of speech.
[0250] Once preprocessing is complete, the question is fed into a generative AI model, which generates an answer based on the appropriate law. For example, the question "What are the conditions for terminating a contract?" will generate the answer "The conditions for terminating a contract are determined by the specific clauses in the contract and the law."
[0251] The present invention further incorporates an emotion engine. The emotion engine recognizes emotions from the user's input text and adjusts the tone of the generated answer based on the recognized emotion. This adjustment allows the answer to be provided taking into consideration the user's emotional state. For example, if the emotion engine determines that the user is feeling "anxious" while inputting a question, it adjusts the tone of the answer to "Don't worry. The terms of contract cancellation are clearly defined, so please check the details."
[0252] The emotion engine also records the user's emotional history for each question, which can be used to improve the quality of future answers. For example, if a user frequently asks questions in an anxious state, future answers will use a more friendly and reassuring tone.
[0253] The post-processed answer is sent from the server to the terminal and displayed to the user, who can review the answer and obtain the appropriate legal information for their question.
[0254] Below are some examples and prompts:
[0255] Example 1: Contract verification and emotion recognition
[0256] The user types into their device, "How do the specific provisions in Article 10 of this contract affect cancellation or termination?" The question is sent to the server, where natural language processing is used to tokenize, remove stop words, and tag parts of speech. A generative AI model generates a response based on the question: "Article 10 contains specific provisions regarding cancellation or termination of the contract, which typically outline the grounds for termination and the associated obligations and compensation." If the emotion engine recognizes emotions from the user's text and determines that the user is anxious, it adjusts the tone of the response to something like, "Don't worry. Article 10 clearly outlines guidelines for cancellation or termination." The response is formatted and sent back to the device for the user to confirm.
[0257] Example 2: Claiming unpaid overtime and emotional history
[0258] The user types into the device, "If an employee wants to claim unpaid overtime, how many years back can they claim?" The question is sent to the server, where natural language processing is used to tokenize it, remove stop words, and tag parts of speech. The generative AI model generates an answer to the question: "Unpaid overtime can usually be claimed for up to five years. However, this may vary depending on the situation." The emotion engine recognizes emotions from the user's text and, if it determines from past emotion history that the user wants more information, adjusts the tone of the answer to something like, "Don't worry. Unpaid overtime can usually be claimed for up to five years, but we recommend consulting a legal professional about your specific situation." The answer is formatted and sent back to the device for the user to confirm.
[0259] In this way, by combining the emotion engine, the present invention can provide legal information that takes into account the user's emotional state, improving the efficiency of legal departments. In addition, the system's 24-hour response capability enables timely and flexible legal support.
[0260] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0261] Step 1:
[0262] The user creates the input data.
[0263] The user accesses the legal chatbot using a device and inputs a legal question. For example, the user might input, "Please tell me about the conditions for contract termination." The input data is temporarily stored on the device.
[0264] Step 2:
[0265] The terminal sends the input data to the server.
[0266] The terminal sends the question entered by the user to the server as an HTTP request. The input data is sent to the server in text format. The output of this step is the text data received by the server.
[0267] Step 3:
[0268] The server pre-processes the query.
[0269] The server performs preprocessing on the received text data. Specifically, it first tokenizes the text and splits it into words and phrases. Then it removes stop words and eliminates meaningless words. Finally, it performs part-of-speech tagging, assigning each word a part of speech, such as noun, verb, or adjective. The output of the preprocessing is text data that has been tokenized, stop words removed, and part-of-speech tagged.
[0270] Step 4:
[0271] The server generates an answer using a generative AI model.
[0272] The server inputs the preprocessed text data into a generative AI model to generate an answer based on the appropriate law. The generative AI model is trained based on legal codes and the latest legal cases. For example, in response to the question, "What are the conditions for terminating a contract?", the generated answer is, "The conditions for terminating a contract are determined based on specific clauses and laws set out in the contract." The generated answer text is the output of this step.
[0273] Step 5:
[0274] The server uses an emotion engine to adjust the tone of the response.
[0275] The server passes the generated response text along with the input data to the emotion engine to analyze the user's emotions. For example, if the emotion engine recognizes "anxiety" from the user's input text, it adjusts the tone of the response to something more friendly, such as "Don't worry. The terms of contract cancellation are clearly specified, so please check the details." The tone-adjusted response text is the output of this step.
[0276] Step 6:
[0277] The server post-processes the response and sends it to the terminal.
[0278] The server post-processes and formats the tone-adjusted answer text. The post-processed answer text is converted into HTML or JSON format and sent to the device as an HTTP response. The post-processed answer text is the output of this step.
[0279] Step 7:
[0280] The user checks the answer through the terminal.
[0281] The terminal displays the answer received from the server to the user, who can review the answer on the terminal screen and obtain legal information for their question. The output of this step is the final answer that the user reviews.
[0282] (Application example 2)
[0283] 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."
[0284] Current legal chatbot systems provide highly accurate answers to user questions, but the answers do not take into account the user's emotional state, resulting in a poor user experience. Furthermore, when providing legal advice related to security, users often ask questions while feeling anxious or nervous, and special consideration is required for these emotions. Under these circumstances, it becomes difficult for users to receive appropriate legal advice.
[0285] The identification process by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for recognizing emotions from the user's input text using an emotion engine and adjusting the tone of the generated answer based on the recognized emotion, means for tagging the question text with parts of speech as part of preprocessing, and means for the generation AI model to be a model trained based on a collection of statutes and the latest legal cases. This allows for the generation of answers that take the user's emotional state into consideration, improving the user experience.
[0286] "Means for users to input legal questions" refers to any interface that allows users to input legal questions using a terminal.
[0287] "A means of receiving an input question and tokenizing the text and removing stop words as part of preprocessing" refers to a system or algorithm that breaks down (tokenizes) the text entered by the user into smaller pieces and removes words (stop words) that are not necessary for generating an answer.
[0288] "Means of inputting preprocessed questions into a generative AI model and generating legally based answers" refers to an AI model and its implementation method for generating appropriate answers based on laws, regulations, and case studies, using preprocessed questions.
[0289] "Means for recognizing emotions from user input text and adjusting the tone of the generated response based on the recognized emotions" refers to an engine or algorithm that analyzes emotions from user input and modifies the tone or expression of the response based on the results of that analysis.
[0290] "Means for post-processing, formatting and transmitting the generated response to the device" refers to a system or algorithm that organizes the generated text data, converts it into a displayable format and transmits it to the user's device.
[0291] "Means for the terminal to display the formatted answer" refers to an interface or application function on the user's terminal for visually displaying the received answer.
[0292] An "emotion engine" refers to software or hardware functionality that analyzes and recognizes a user's emotions from input text and adjusts responses based on the results.
[0293] "Statutes and Current Legal Cases" refers to an information resource that compiles the laws and regulations in force in a jurisdiction, as well as the latest legal precedents and cases.
[0294] This invention combines a legal chatbot system that utilizes a generative AI model with an emotion engine, and details a specific embodiment that allows users to input legal questions and receive quick and appropriate answers based on those questions.
[0295] System configuration
[0296] The system mainly consists of the following components:
[0297] 1. User device: The device through which the user enters the question, including a smartphone or computer.
[0298] 2. Server: The central location that processes questions, generates AI, analyzes sentiment, adjusts the tone of the answers, and sends them.
[0299] Program processing
[0300] Hardware and Software Configuration
[0301] Natural language processing libraries: spaCy and NLTK for tokenizing question text, removing stop words, and tagging parts of speech.
[0302] Generative AI model: Uses OpenAI's API to generate answers to questions.
[0303] Sentiment Analysis Engine: Analyzes sentiment from user input text using sentiment analysis tools such as VADER and TextBlob.
[0304] Answer generation and tone adjustment: Proprietary algorithms for adjusting the tone of answers based on sentiment analysis.
[0305] Operating Procedure
[0306] 1. A user accesses the legal chatbot using a device:
[0307] Users use a smartphone or computer interface to enter a legal question, such as "Is it illegal for police to enter my house without a search warrant?"
[0308] 2. The server receives the query and preprocesses it:
[0309] The entered question is sent to the server, where it is tokenized, stopwords are removed, and parts of speech are tagged as preprocessing steps for natural language processing.
[0310] 3. The generative AI model generates an answer based on the question:
[0311] Once preprocessed, the question is fed into a generative AI model that generates an answer based on the appropriate law, leveraging OpenAI's API.
[0312] 4. Sentiment analysis and tone adjustment:
[0313] The emotion engine recognizes emotions from the user's input text and adjusts the tone of the generated response. For example, if the user is feeling anxious, the tone of the response will be adjusted to "Don't worry."
[0314] 5. Post-processing and sending of responses:
[0315] The generated answer is formatted and sent from the server to the user's device.
[0316] 6. The terminal will display the formatted answer:
[0317] The answer is sent back to the user's terminal and displayed visually.
[0318] Examples and prompts
[0319] Examples:
[0320] A user asks, "Is it illegal for police to enter my home without a search warrant?"
[0321] The server receives and processes the query.
[0322] The emotion engine recognizes that the user is feeling anxious and adjusts the tone to say, "Don't worry."
[0323] The answer that appears on the user's device is, "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergencies."
[0324] Example prompt sentence:
[0325] Enter: Is it illegal for police to enter my home without a search warrant?
[0326] Emotion: fear
[0327] Generated Answer: Searching a home without a search warrant is generally illegal, but exceptions may apply in emergency situations.
[0328] Adjusted answer: Don't worry. Searching a home without a search warrant is generally illegal, but exceptions may apply in emergency situations.
[0329] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0330] Step 1:
[0331] A user accesses the legal chatbot using a device and inputs a legal question in the form of natural language text, such as "Is it illegal for the police to enter my home without a search warrant?"
[0332] Step 2:
[0333] The server receives the input question. This input text is tokenized using a natural language processing (NLP) library (e.g., spaCy or NLTK) and stop words are removed. The input text is split into words, such as "search warrant," "house," "police," and "illegal," and unnecessary words are removed.
[0334] Step 3:
[0335] The server performs part-of-speech tagging on the preprocessed question text. An NLP library is used to assign part-of-speech tags (e.g., noun, verb, etc.) to each token. This results in tokens being tagged as "search warrant / noun," "house / noun," "police / noun," and "illegal / adjective."
[0336] Step 4:
[0337] The server inputs the preprocessed question into a generative AI model (e.g., OpenAI's API) to generate an appropriate legal answer. Based on the tokenized and tagged question, the generative AI model generates the answer, "In principle, searches without a search warrant are illegal, but exceptions may apply in emergency situations."
[0338] Step 5:
[0339] The server analyzes the generated answer using an emotion engine (e.g., VADER or TextBlob) to determine the user's emotional state from the input text and recognizes that the user is feeling anxious. Based on this emotion, the tone of the answer is adjusted. For example, the answer is adjusted by adding "Don't worry." The adjusted answer generated is "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergency situations."
[0340] Step 6:
[0341] The server then post-processes and formats the tailored response before sending it to the device, which includes grammar checking and text formatting.
[0342] Step 7:
[0343] The device receives and displays the formatted response. The user can see the formatted response on the device screen: "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergency situations."
[0344] 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.
[0345] 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.
[0346] 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.
[0347] [Second embodiment]
[0348] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0349] 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.
[0350] 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).
[0351] 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.
[0352] 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.
[0353] 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).
[0354] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0355] 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.
[0356] 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.
[0357] 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.
[0358] 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.
[0359] 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."
[0360] The present invention relates to a legal chatbot system that utilizes a generative AI model, and details a specific embodiment that allows users to input legal questions and receive prompt and appropriate answers.
[0361] First, a user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, a user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[0362] The question is then sent from the device to the server, which preprocesses it by tokenizing the question text into words, removing common words (stop words), and tagging each word with a part-of-speech tag.
[0363] Once preprocessing is complete, the question is input into a generative AI model. The generative AI model is trained based on the Roppo Zensho and the latest legal cases, and generates an appropriate answer to the input question. The generated answer is then sent to post-processing, where it is formatted by removing unnecessary line breaks and checking for technical terminology.
[0364] After post-processing is complete, the answer is sent from the server to the terminal and displayed to the user. For example, in response to a question entered by a user such as "Please tell me about Article 15 of the Labor Contract Act," the following answer is generated and displayed on the terminal: "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, the reason for terminating the contract and the procedure for doing so must be clearly stated."
[0365] This system allows users to quickly obtain appropriate legal information. It also reduces the burden on corporate legal departments, allowing them to respond 24 hours a day. Furthermore, the increased collection and analysis of legal cases improves risk management for each employee.
[0366] Specific examples of the present invention are shown below.
[0367] Example 1: Checking the contract
[0368] The user types into the terminal, "What effect do certain provisions in Article 10 of this contract have in the event of cancellation or termination?"
[0369] The question is sent to the server, where natural language processing is used to tokenize and remove stop words.
[0370] Based on the question, the generative AI model generated the answer: "Article 10 contains specific provisions regarding the cancellation or termination of the contract, and stipulates the grounds for termination and the associated obligations and compensation."
[0371] The answer is formatted and sent back to the terminal for the user to confirm.
[0372] Example 2: Claiming unpaid overtime
[0373] The user types into the terminal, "If an employee wants to claim unpaid overtime, how many years back can they claim?"
[0374] The question is sent to the server, where it is tokenized, stopword removed, and tagged with part-of-speech using natural language processing.
[0375] The generative AI model responded to the question by saying, "You can usually claim unpaid overtime wages for up to five years. However, this may vary depending on the situation."
[0376] The answer is formatted and sent back to the terminal for the user to confirm.
[0377] In this way, the present invention provides fast and accurate answers to legal questions, improving the efficiency of corporate legal departments. In addition, the system's 24-hour response time allows for timely legal support.
[0378] The processing flow will be explained below.
[0379] Step 1:
[0380] The user types a legal question into the terminal, for example, "Please tell me about Article 15 of the Labor Contract Act."
[0381] Step 2:
[0382] The device sends the entered question to the server, where the data is encoded into the appropriate format.
[0383] Step 3:
[0384] The server checks the received question and begins preprocessing. First, it tokenizes the input text, which splits the sentence into words.
[0385] Step 4:
[0386] As part of the preprocessing, the server removes stop words, which are common words such as "no" and "wa" that are not necessary for content analysis.
[0387] Step 5:
[0388] The server tags the tokens with part-of-speech tags, which means that each word is tagged as a noun, verb, adjective, etc.
[0389] Step 6:
[0390] After completing preprocessing, the server inputs the question into the generative AI model, which uses training data from the Six Codes and the latest legal cases to generate an appropriate answer to the question.
[0391] Step 7:
[0392] The server receives the output from the generative AI model and begins post-processing the answer, specifically removing unnecessary line breaks and checking for terminology.
[0393] Step 8:
[0394] The server then sends the post-processed response to the terminal, properly formatting the data before sending it.
[0395] Step 9:
[0396] The terminal displays the answer received from the server to the user, who can review the answer and obtain the appropriate legal information for their question.
[0397] For example, if a user asks a question about the Labor Contract Act, the device will display an answer such as, "Article 15 of the Labor Contract Act stipulates the conditions for terminating an employee's contract. Specifically, the reason for terminating the contract and the procedure for doing so must be clearly stated."
[0398] Example 1
[0399] 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."
[0400] Currently, legal inquiries require a lot of resources, making it difficult to provide a fast and accurate response. Furthermore, it is difficult to provide 24-hour support, which reduces user convenience. Furthermore, the quality of answers to questions is often inconsistent, resulting in a lack of trust for users.
[0401] 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.
[0402] In this invention, the server includes means for receiving a legal question from a user, tokenizing the text and removing stop words as preprocessing, inputting the preprocessed question into a generative AI model to generate a legally based answer, and post-processing the generated answer to remove unnecessary line breaks and spaces, check for terminology, format it, and send it to a terminal, thereby enabling the provision of prompt and appropriate legal advice.
[0403] "User" means any person or entity that enters a legal question into the system.
[0404] "Terminal" refers to an information processing device through which a user inputs questions and uses the system.
[0405] "Question" refers to a textual inquiry entered by a user seeking legal information.
[0406] "Preprocessing" refers to a series of processes that tokenize the input question, remove stop words, and tag parts of speech.
[0407] "Tokenization" refers to the process of dividing input text into words and phrases.
[0408] "Stop words" are common words that have little importance in semantic analysis and search results.
[0409] "Part-of-speech tagging" refers to the process of assigning part-of-speech information (e.g., noun, verb, adjective, etc.) to each tokenized word.
[0410] A "generative AI model" refers to an artificial intelligence model that is trained based on existing legal documents and the latest legal cases.
[0411] "Answer" refers to the law-based response generated by a generative AI model in response to a user's question.
[0412] "Post-processing" refers to a series of processes that remove unnecessary line breaks and spaces, check for terminology, and format the generated answers.
[0413] The present invention relates to a legal chatbot system that utilizes a generative AI model, and a specific embodiment is described below that allows users to input legal questions and receive quick and appropriate answers.
[0414] First, the user accesses the legal chatbot using a device such as a PC or smartphone. The device provides an interface for inputting legal questions. For example, the user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[0415] The question is then sent from the device to the server, which preprocesses the received question. This preprocessing includes tokenizing the question text into words, removing common words (stop words), and tagging each word with a part-of-speech tag. This preprocessing is performed using natural language processing techniques.
[0416] After preprocessing, the question is input into a generative AI model. This generative AI model is trained based on laws and regulations and the latest legal cases, and generates an appropriate answer to the input question. For example, GPT-3 is used as a generative AI model.
[0417] The generated answers are post-processed on the server, which includes formatting tasks such as removing unnecessary line breaks and whitespace, checking for terminology, etc. After post-processing is complete, the answers are sent from the server to the device and displayed to the user.
[0418] As a concrete example, let's consider the case where a user types in "Please tell me about Article 15 of the Labor Contract Act." In response to this question, the generative AI model generates the answer "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, it is required that the reason for contract termination and the procedure for it be clearly stated," and this answer is displayed on the device.
[0419] Furthermore, as another specific example, it can also handle the case where a user inputs, "If an employee wants to claim unpaid overtime wages, how many years back can they claim?" In response to this question, the generative AI model generates the answer, "Unpaid overtime wages can usually be claimed for up to five years. However, this may vary depending on the situation," and displays it on the terminal.
[0420] In this way, the present invention provides fast and accurate answers to legal questions, improving the efficiency of corporate legal departments. In addition, the system's 24-hour response time allows for timely legal support.
[0421] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0422] Step 1:
[0423] The user accesses the legal chatbot on a device and enters a question.
[0424] Specific operation: A user accesses the chatbot interface using a computer or smartphone. The user inputs a legal question. For example, the user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[0425] Input: Legal Question (Text)
[0426] Output: The question text entered
[0427] Step 2:
[0428] The terminal sends a question to the server.
[0429] What happens: The device captures the entered question and sends an HTTP request to the server, which includes the question text entered by the user.
[0430] Input: The entered question text
[0431] Output: Question text sent to the server
[0432] Step 3:
[0433] The server pre-processes the query.
[0434] Specific operation: The server first tokenizes the received question. For example, "Please tell me about Article 15 of the Labor Contract Act" is divided into words such as "Labor Contract Act," "Article 15," "about," "tell me," and "please." Next, stop words (e.g., "about," "please") are removed, and only important words are extracted. The remaining words are then tagged with part-of-speech tags. For example, the resulting format would be "Labor Contract Act / NOUN," "Article 15 / NOUN," and "teach me / VERB."
[0435] Input: Question text sent to the server
[0436] Output: Preprocessed question text (tokenized, stopword-removed, part-of-speech-tagged)
[0437] Step 4:
[0438] The server inputs the preprocessed question into a generative AI model to generate an answer.
[0439] Specific operation: The server inputs the preprocessed question text into a generative AI model. The generative AI model (e.g., GPT-3) is trained based on laws and regulations and the latest legal cases, and generates an appropriate answer to the input question. For example, it generates the answer, "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, the reason for termination of the contract and the procedure for doing so must be clearly stated."
[0440] Input: Preprocessed question text
[0441] Output: Generated answer text
[0442] Step 5:
[0443] The server post-processes the generated answer.
[0444] What it does: The server post-processes the answers obtained from the generative AI model, removing unnecessary line breaks and whitespace, and formatting the answers. It also checks for terminology and adds supplementary explanations as needed.
[0445] Input: Generated answer text
[0446] Output: Post-processed answer text
[0447] Step 6:
[0448] The server sends the post-processed answer to the terminal for display to the user.
[0449] Specific operation: The server sends the post-processed answer to the terminal as an HTTP response. The terminal displays the received answer to the user. The user confirms the answer on the terminal. For example, the answer displayed might be "Article 15 of the Labor Contract Act states..."
[0450] Input: Post-processed answer text
[0451] Output: The answer text that is displayed to the user
[0452] (Application example 1)
[0453] 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."
[0454] In security operations, there are many situations where security guards on the scene need fast and accurate legal advice. However, conventional legal chatbot systems have difficulty immediately providing appropriate responses tailored to specific situations. In addition, systems incorporating voice input and speech recognition functions using smartphones or robots have not been fully developed. In these circumstances, there is a need for a means for security guards to quickly obtain legal advice on the scene.
[0455] 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.
[0456] In this invention, the server includes means for a user to input a legal question, means for receiving the input question and tokenizing the text to remove common words as part of preprocessing, means for inputting the preprocessed question into a generative AI model to generate a legal answer, means for post-processing and formatting the generated answer before sending it to a terminal, means for the terminal to display the formatted answer, and means with voice input and speech recognition capabilities for providing rapid legal advice in security-related situations, thereby enabling security guards to obtain rapid legal advice on the scene.
[0457] A "user" is a person who utilizes the system to enter a legal question.
[0458] "Legal questions" refer to questions or inquiries related to the interpretation or application of laws and regulations, or specific legal issues.
[0459] "Input means" refers to a method or device for a user to input a question into a terminal, and includes a keyboard, a touch panel, voice input, and the like.
[0460] "Tokenization" is the process of breaking down the text of a question into smaller units to make it easier to process.
[0461] The "means for removing common words" is a processing method for removing words with little meaning (stop words) from the question text.
[0462] A "generative AI model" is an artificial intelligence model that uses machine learning to generate appropriate answers from legal knowledge and case studies.
[0463] A "legally based answer" is a legally based response provided by a generative AI model to a user's question.
[0464] "Post-processing" refers to formatting and removing unnecessary information from the generated answers before displaying them to the user.
[0465] A "terminal" is a device that a user uses to enter questions and receive answers.
[0466] "Display means" refers to a method or device for displaying the answer results on a terminal, and includes screen display, audio output, etc.
[0467] A "security-related situation" is an event that a security guard faces in the field that involves legal issues.
[0468] "Fast legal advice" means prompt and appropriate legal advice or guidance on a legal matter.
[0469] "Voice input and speech recognition" refers to technology that allows users to input questions by voice and convert them into text.
[0470] This invention provides a system that utilizes generative AI models to enable security guards to obtain fast and accurate legal advice on the spot. The system is mainly composed of three elements: a server, a terminal, and a user.
[0471] First, users input legal questions using devices such as smartphones or robots. This input method includes voice input and speech recognition, so users can input questions by voice. The voice input is converted into text using a speech recognition API such as Google Cloud Speech-to-Text.
[0472] The device then sends the entered question to the server, which then preprocesses the received question. Preprocessing includes tokenization and removal of common words (stop words). For example, if a user enters the question "What legal action will be taken in case of trespassing?", this text will be tokenized and important words such as "trespassing," "legal action," and "taken" will be extracted.
[0473] After preprocessing, the question is input into a generative AI model stored on the server. This generative AI model is trained based on laws and regulations and the latest legal cases, and generates an appropriate legal answer. For example, it might generate an answer such as, "Trespassing is a violation of the criminal law. Violators may be subject to fines or imprisonment."
[0474] The generated answers are then formatted through post-processing, which includes removing unnecessary line breaks and checking for terminology, before finally being sent to the device.
[0475] The terminal displays the formatted answer to the user. The display means includes a screen display and an audio output, so the user can immediately check the answer.
[0476] Specific examples
[0477] Consider a security guard using a smartphone to type a question. The question is asked via voice input, and the text is "What legal action will be taken in the case of trespassing?" This question is sent to a server for pre-processing. A generative AI model then generates an answer, which, after post-processing, is finally displayed on the smartphone: "Trespassing is a violation of criminal law. Violators may be subject to fines or imprisonment."
[0478] Prompt Sentence Examples
[0479] User: What legal action is taken in case of trespass?
[0480] AI: Trespassing is a criminal offense. Violators can be fined or imprisoned.
[0481] In this way, the system improves on-site efficiency in security-related operations by providing real-time legal advice.
[0482] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0483] Step 1:
[0484] A user inputs a legal question using a smartphone or robotic device. The input method also includes a voice input function. When the user inputs a question by voice, the voice is converted into text using a speech recognition API (for example, Google Cloud Speech-to-Text). The input data is the user's question text.
[0485] Step 2:
[0486] The terminal sends the entered question to the server, and the data sent is the user's question text.
[0487] Step 3:
[0488] The server pre-processes the received question text, which includes:
[0489] 1. Tokenization: Divide the text into words. The input is the user's question text, and the output is a list of tokenized words.
[0490] 2. Stop word removal: remove common words (stop words) from the list. The input is a list of tokenized words, and the output is a list containing only important words.
[0491] Example: Input "What legal action will be taken in case of trespassing?" → Tokenized output "Trespassing", "In that case", "How", "Legal action", "Take?"
[0492] Step 4:
[0493] The preprocessed question text is input to the generative AI model. The server sends a prompt to the generative AI model based on the results of the preprocessing, and generates an appropriate legal answer. The input is the preprocessed question text, and the output is the generated legal answer text.
[0494] Example: Prompt: "What legal action can be taken in the case of trespass?" → Generated answer: "Trespassing is against the criminal law. Violators can be fined or imprisoned."
[0495] Step 5:
[0496] The server post-processes the generated answer text, which includes:
[0497] 1. Formatting: Remove unnecessary line breaks and check for technical terms. The input is the generated answer text, and the output is the formatted answer text.
[0498] Example: Before: "Trespassing is a violation of the criminal code. Violators may be subject to fines or imprisonment." → After: "Trespassing is a violation of the criminal code. Violators may be subject to fines or imprisonment."
[0499] Step 6:
[0500] The server sends the post-processed answer text to the terminal. The data sent is the formatted answer text.
[0501] Step 7:
[0502] The terminal displays the formatted answer to the user. The display means may include a screen display or an audio output, so that the user can immediately check the answer. The displayed data is the formatted answer text.
[0503] 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.
[0504] This invention combines a legal chatbot system that utilizes a generative AI model with an emotion engine, and details a specific embodiment that allows users to input legal questions and receive quick and appropriate answers based on those questions.
[0505] First, a user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, the user might input a question such as, "Please tell me about the conditions for contract termination."
[0506] The question is then sent from the device to the server, which preprocesses the received question, including tokenizing the question text, removing stop words, and tagging parts of speech.
[0507] After preprocessing, the question is fed into a generative AI model, which generates an appropriate legally based answer. However, the present invention also incorporates an emotion engine, which recognizes emotions from the user's input text and adjusts the tone of the generated answer based on the recognized emotions. This adjustment allows the answer to be provided while taking into account the user's emotional state.
[0508] The emotion engine also records the user's emotional history for each question, which can be used to improve the quality of future answers. For example, if a user frequently asks questions in an anxious state, future answers will use a more friendly and reassuring tone.
[0509] The post-processed answer is sent from the server to the terminal and displayed to the user, who can review the answer and obtain the appropriate legal information for their question.
[0510] Specific examples of the present invention are shown below.
[0511] Example 1: Contract verification and emotion recognition
[0512] The user types into the terminal, "What effect do certain provisions in Article 10 of this contract have in the event of cancellation or termination?"
[0513] The question is sent to the server, where natural language processing is used to tokenize it, remove stop words, and tag parts of speech.
[0514] Based on the question, the generative AI model generated the answer: "Article 10 contains specific provisions regarding the cancellation or termination of the contract, which usually stipulates the grounds for termination and the resulting obligations and compensation."
[0515] If the emotion engine recognizes emotions from the user's text and determines that the user is feeling anxious, it will adjust the tone of the response to something like, "Don't worry. Article 10 clearly sets out guidelines for cancellation or termination of the contract."
[0516] The answer is formatted and sent back to the terminal for the user to confirm.
[0517] Example 2: Claiming unpaid overtime and emotional history
[0518] The user types into the terminal, "If an employee wants to claim unpaid overtime, how many years back can they claim?"
[0519] The question is sent to the server, where natural language processing is performed to tokenize it, remove stop words, and tag parts of speech.
[0520] The generative AI model responded to the question by saying, "You can usually claim unpaid overtime wages for up to five years. However, this may vary depending on the situation."
[0521] If the emotion engine recognizes the emotion from the user's text and determines from past emotional history that the user wants more information, it will adjust the tone of the response to something like, "Don't worry. You can usually claim unpaid overtime for up to five years, but we recommend consulting a legal professional about your specific situation."
[0522] The answer is formatted and sent back to the terminal for the user to confirm.
[0523] In this way, by combining the emotion engine, the present invention can provide legal information that takes into account the user's emotional state, further improving the efficiency of corporate legal departments. In addition, the system's 24-hour response capability enables timely and flexible legal support.
[0524] The processing flow will be explained below.
[0525] Step 1:
[0526] The user types a legal question into the terminal, for example, "What are the terms of contract termination?"
[0527] Step 2:
[0528] The device sends the entered question to the server, where the data is encoded into the appropriate format.
[0529] Step 3:
[0530] The server checks the received question and begins preprocessing. First, it tokenizes the input text, which splits the sentence into words.
[0531] Step 4:
[0532] As part of the preprocessing, the server removes stop words, which are common words such as "no" and "wa" that are not necessary for content analysis.
[0533] Step 5:
[0534] The server tags the tokens with part-of-speech tags, which means that each word is tagged as a noun, verb, adjective, etc.
[0535] Step 6:
[0536] After completing preprocessing, the server inputs the question into the generative AI model, which uses training data from the Six Codes and the latest legal cases to generate an appropriate answer to the question.
[0537] Step 7:
[0538] The server receives the output from the generative AI model and generates a preliminary answer, which includes basic legal explanations.
[0539] Step 8:
[0540] The server uses an emotion engine to recognize emotions from the text of the question entered by the user. For example, it can recognize that the user is feeling "anxiety" or "doubt" based on the words and context in the sentence.
[0541] Step 9:
[0542] The server adjusts the tone of the generated response based on the perceived sentiment, for example adding friendly phrases like "Don't worry" or "We'll provide more information."
[0543] Step 10:
[0544] The server uses an emotion engine to record the user's emotion history, which is then saved as data to improve the quality of answers in the future.
[0545] Step 11:
[0546] The server then sends the post-processed response to the terminal, properly formatting the data before sending it.
[0547] Step 12:
[0548] The terminal displays the answer received from the server to the user, who can review the answer and obtain the appropriate legal information for their question.
[0549] For example, if a user asks, "Please tell me about the conditions for contract termination," the device will display a response such as, "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Don't worry. Specifically, you are required to clearly state the reason and procedure for contract termination." This allows users to receive legally appropriate information, including emotional care.
[0550] Example 2
[0551] 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."
[0552] Conventional legal chatbot systems provide answers without considering the user's emotional state, making it difficult for users to obtain answers that are relatable to them. Furthermore, the system's inability to provide an appropriate response tone based on the user's emotional state led to problems with reduced user satisfaction. Furthermore, the accuracy of preprocessing and answer generation was insufficient, resulting in the inability to provide appropriate legal information quickly.
[0553] 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.
[0554] In this invention, the server includes means for accepting legal input data from a user, means for preprocessing the accepted input data, tokenizing the text, and removing stop words, means for inputting the preprocessed data into a generative AI model to generate legal results, means for processing the generated results with an emotion engine and adjusting the tone of the results based on the user's emotional state, means for post-processing and formatting the final adjusted results before transmitting them to a terminal, and means for the terminal to display the formatted results. This makes it possible to quickly and accurately provide user-friendly legal information that takes the user's emotions into consideration.
[0555] "User" means any person or entity that utilizes the System to enter legal questions and obtain answers.
[0556] A "terminal" refers to an information processing device such as a personal computer, smartphone, or tablet that is used by a user to access the system, input questions, and display answers.
[0557] The "server" is a computer system that receives questions sent by users, performs preprocessing, generates answers using a generative AI model, adjusts the tone using an emotion engine, performs postprocessing, and finally sends the answers to the terminal.
[0558] "Input Data" means the legal question in text form that the user types into the terminal.
[0559] "Preprocessing" refers to the initial data processing step that the server performs on input data, specifically processing that includes tokenization and removal of stop words.
[0560] "Tokenization" is the process of dividing input data into words and phrases.
[0561] "Stop word removal" is the process of removing common meaningless words from a sentence.
[0562] "Part-of-speech tagging" refers to the process of assigning a part of speech, such as a noun, verb, or adjective, to each token.
[0563] A "generative AI model" is an artificial intelligence model that generates legally relevant results based on input data. The model is trained on legal documents and recent legal cases.
[0564] An "emotion engine" is a system component that recognizes emotions from user input data and adjusts the tone of the generated response.
[0565] "Results" are legally based answers generated by a generative AI model and tone-adjusted by an emotion engine.
[0566] "Post-processing" refers to the process of formatting the generated results so that they are suitable for presentation to a user.
[0567] "Display" means providing the final answer visually to the user at the terminal.
[0568] The present invention is a legal chatbot system that combines a generative AI model and an emotion engine. The system aims to enable users to input legal questions and receive prompt and appropriate answers based on those questions. A specific embodiment of the system is described in detail below.
[0569] A user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, the user inputs a question such as, "Please tell me about the conditions for contract termination."
[0570] The question is then sent from the device to the server, which preprocesses the received question. This preprocessing includes tokenizing the question text, removing stop words, and tagging it with part-of-speech tags. Tokenization splits the text into words and phrases, stop word removal removes meaningless words, and part-of-speech tagging assigns each word a part of speech.
[0571] Once preprocessing is complete, the question is fed into a generative AI model, which generates an answer based on the appropriate law. For example, the question "What are the conditions for terminating a contract?" will generate the answer "The conditions for terminating a contract are determined by the specific clauses in the contract and the law."
[0572] The present invention further incorporates an emotion engine. The emotion engine recognizes emotions from the user's input text and adjusts the tone of the generated answer based on the recognized emotion. This adjustment allows the answer to be provided taking into consideration the user's emotional state. For example, if the emotion engine determines that the user is feeling "anxious" while inputting a question, it adjusts the tone of the answer to "Don't worry. The terms of contract cancellation are clearly defined, so please check the details."
[0573] The emotion engine also records the user's emotional history for each question, which can be used to improve the quality of future answers. For example, if a user frequently asks questions in an anxious state, future answers will use a more friendly and reassuring tone.
[0574] The post-processed answer is sent from the server to the terminal and displayed to the user, who can review the answer and obtain the appropriate legal information for their question.
[0575] Below are some examples and prompts:
[0576] Example 1: Contract verification and emotion recognition
[0577] The user types into their device, "How do the specific provisions in Article 10 of this contract affect cancellation or termination?" The question is sent to the server, where natural language processing is used to tokenize, remove stop words, and tag parts of speech. A generative AI model generates a response based on the question: "Article 10 contains specific provisions regarding cancellation or termination of the contract, which typically outline the grounds for termination and the associated obligations and compensation." If the emotion engine recognizes emotions from the user's text and determines that the user is anxious, it adjusts the tone of the response to something like, "Don't worry. Article 10 clearly outlines guidelines for cancellation or termination." The response is formatted and sent back to the device for the user to confirm.
[0578] Example 2: Claiming unpaid overtime and emotional history
[0579] The user types into the device, "If an employee wants to claim unpaid overtime, how many years back can they claim?" The question is sent to the server, where natural language processing is used to tokenize it, remove stop words, and tag parts of speech. The generative AI model generates an answer to the question: "Unpaid overtime can usually be claimed for up to five years. However, this may vary depending on the situation." The emotion engine recognizes emotions from the user's text and, if it determines from past emotion history that the user wants more information, adjusts the tone of the answer to something like, "Don't worry. Unpaid overtime can usually be claimed for up to five years, but we recommend consulting a legal professional about your specific situation." The answer is formatted and sent back to the device for the user to confirm.
[0580] In this way, by combining the emotion engine, the present invention can provide legal information that takes into account the user's emotional state, improving the efficiency of legal departments. In addition, the system's 24-hour response capability enables timely and flexible legal support.
[0581] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0582] Step 1:
[0583] The user creates the input data.
[0584] The user accesses the legal chatbot using a device and inputs a legal question. For example, the user might input, "Please tell me about the conditions for contract termination." The input data is temporarily stored on the device.
[0585] Step 2:
[0586] The terminal sends the input data to the server.
[0587] The terminal sends the question entered by the user to the server as an HTTP request. The input data is sent to the server in text format. The output of this step is the text data received by the server.
[0588] Step 3:
[0589] The server pre-processes the query.
[0590] The server performs preprocessing on the received text data. Specifically, it first tokenizes the text and splits it into words and phrases. Then it removes stop words and eliminates meaningless words. Finally, it performs part-of-speech tagging, assigning each word a part of speech, such as noun, verb, or adjective. The output of the preprocessing is text data that has been tokenized, stop words removed, and part-of-speech tagged.
[0591] Step 4:
[0592] The server generates an answer using a generative AI model.
[0593] The server inputs the preprocessed text data into a generative AI model to generate an answer based on the appropriate law. The generative AI model is trained based on legal codes and the latest legal cases. For example, in response to the question, "What are the conditions for terminating a contract?", the generated answer is, "The conditions for terminating a contract are determined based on specific clauses and laws set out in the contract." The generated answer text is the output of this step.
[0594] Step 5:
[0595] The server uses an emotion engine to adjust the tone of the response.
[0596] The server passes the generated response text along with the input data to the emotion engine to analyze the user's emotions. For example, if the emotion engine recognizes "anxiety" from the user's input text, it adjusts the tone of the response to something more friendly, such as "Don't worry. The terms of contract cancellation are clearly specified, so please check the details." The tone-adjusted response text is the output of this step.
[0597] Step 6:
[0598] The server post-processes the response and sends it to the terminal.
[0599] The server post-processes and formats the tone-adjusted answer text. The post-processed answer text is converted into HTML or JSON format and sent to the device as an HTTP response. The post-processed answer text is the output of this step.
[0600] Step 7:
[0601] The user checks the answer through the terminal.
[0602] The terminal displays the answer received from the server to the user, who can review the answer on the terminal screen and obtain legal information for their question. The output of this step is the final answer that the user reviews.
[0603] (Application example 2)
[0604] 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."
[0605] Current legal chatbot systems provide highly accurate answers to user questions, but the answers do not take into account the user's emotional state, resulting in a poor user experience. Furthermore, when providing legal advice related to security, users often ask questions while feeling anxious or nervous, and special consideration is required for these emotions. Under these circumstances, it becomes difficult for users to receive appropriate legal advice.
[0606] The identification process by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for recognizing emotions from the user's input text using an emotion engine and adjusting the tone of the generated answer based on the recognized emotion, means for tagging the question text with parts of speech as part of preprocessing, and means for the generation AI model to be a model trained based on a collection of statutes and the latest legal cases. This allows for the generation of answers that take the user's emotional state into consideration, improving the user experience.
[0607] "Means for users to input legal questions" refers to any interface that allows users to input legal questions using a terminal.
[0608] "A means of receiving an input question and tokenizing the text and removing stop words as part of preprocessing" refers to a system or algorithm that breaks down (tokenizes) the text entered by the user into smaller pieces and removes words (stop words) that are not necessary for generating an answer.
[0609] "Means of inputting preprocessed questions into a generative AI model and generating legally based answers" refers to an AI model and its implementation method for generating appropriate answers based on laws, regulations, and case studies, using preprocessed questions.
[0610] "Means for recognizing emotions from user input text and adjusting the tone of the generated response based on the recognized emotions" refers to an engine or algorithm that analyzes emotions from user input and modifies the tone or expression of the response based on the results of that analysis.
[0611] "Means for post-processing, formatting and transmitting the generated response to the device" refers to a system or algorithm that organizes the generated text data, converts it into a displayable format and transmits it to the user's device.
[0612] "Means for the terminal to display the formatted answer" refers to an interface or application function on the user's terminal for visually displaying the received answer.
[0613] An "emotion engine" refers to software or hardware functionality that analyzes and recognizes a user's emotions from input text and adjusts responses based on the results.
[0614] "Statutes and Current Legal Cases" refers to an information resource that compiles the laws and regulations in force in a jurisdiction, as well as the latest legal precedents and cases.
[0615] This invention combines a legal chatbot system that utilizes a generative AI model with an emotion engine, and details a specific embodiment that allows users to input legal questions and receive quick and appropriate answers based on those questions.
[0616] System configuration
[0617] The system mainly consists of the following components:
[0618] 1. User device: The device through which the user enters the question, including a smartphone or computer.
[0619] 2. Server: The central location that processes questions, generates AI, analyzes sentiment, adjusts the tone of the answers, and sends them.
[0620] Program processing
[0621] Hardware and Software Configuration
[0622] Natural language processing libraries: spaCy and NLTK for tokenizing question text, removing stop words, and tagging parts of speech.
[0623] Generative AI model: Uses OpenAI's API to generate answers to questions.
[0624] Sentiment Analysis Engine: Analyzes sentiment from user input text using sentiment analysis tools such as VADER and TextBlob.
[0625] Answer generation and tone adjustment: Proprietary algorithms for adjusting the tone of answers based on sentiment analysis.
[0626] Operating Procedure
[0627] 1. A user accesses the legal chatbot using a device:
[0628] Users use a smartphone or computer interface to enter a legal question, such as "Is it illegal for police to enter my house without a search warrant?"
[0629] 2. The server receives the query and preprocesses it:
[0630] The entered question is sent to the server, where it is tokenized, stopwords are removed, and parts of speech are tagged as preprocessing steps for natural language processing.
[0631] 3. The generative AI model generates an answer based on the question:
[0632] Once preprocessed, the question is fed into a generative AI model that generates an answer based on the appropriate law, leveraging OpenAI's API.
[0633] 4. Sentiment analysis and tone adjustment:
[0634] The emotion engine recognizes emotions from the user's input text and adjusts the tone of the generated response. For example, if the user is feeling anxious, the tone of the response will be adjusted to "Don't worry."
[0635] 5. Post-processing and sending of responses:
[0636] The generated answer is formatted and sent from the server to the user's device.
[0637] 6. The terminal will display the formatted answer:
[0638] The answer is sent back to the user's terminal and displayed visually.
[0639] Examples and prompts
[0640] Examples:
[0641] A user asks, "Is it illegal for police to enter my home without a search warrant?"
[0642] The server receives and processes the query.
[0643] The emotion engine recognizes that the user is feeling anxious and adjusts the tone to say, "Don't worry."
[0644] The answer that appears on the user's device is, "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergencies."
[0645] Example prompt sentence:
[0646] Enter: Is it illegal for police to enter my home without a search warrant?
[0647] Emotion: fear
[0648] Generated Answer: Searching a home without a search warrant is generally illegal, but exceptions may apply in emergency situations.
[0649] Adjusted answer: Don't worry. Searching a home without a search warrant is generally illegal, but exceptions may apply in emergency situations.
[0650] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0651] Step 1:
[0652] A user accesses the legal chatbot using a device and inputs a legal question in the form of natural language text, such as "Is it illegal for the police to enter my home without a search warrant?"
[0653] Step 2:
[0654] The server receives the input question. This input text is tokenized using a natural language processing (NLP) library (e.g., spaCy or NLTK) and stop words are removed. The input text is split into words, such as "search warrant," "house," "police," and "illegal," and unnecessary words are removed.
[0655] Step 3:
[0656] The server performs part-of-speech tagging on the preprocessed question text. An NLP library is used to assign part-of-speech tags (e.g., noun, verb, etc.) to each token. This results in tokens being tagged as "search warrant / noun," "house / noun," "police / noun," and "illegal / adjective."
[0657] Step 4:
[0658] The server inputs the preprocessed question into a generative AI model (e.g., OpenAI's API) to generate an appropriate legal answer. Based on the tokenized and tagged question, the generative AI model generates the answer, "In principle, searches without a search warrant are illegal, but exceptions may apply in emergency situations."
[0659] Step 5:
[0660] The server analyzes the generated answer using an emotion engine (e.g., VADER or TextBlob) to determine the user's emotional state from the input text and recognizes that the user is feeling anxious. Based on this emotion, the tone of the answer is adjusted. For example, the answer is adjusted by adding "Don't worry." The adjusted answer generated is "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergency situations."
[0661] Step 6:
[0662] The server then post-processes and formats the tailored response before sending it to the device, which includes grammar checking and text formatting.
[0663] Step 7:
[0664] The device receives and displays the formatted response. The user can see the formatted response on the device screen: "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergency situations."
[0665] 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.
[0666] 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.
[0667] 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.
[0668] [Third embodiment]
[0669] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[0670] 5, the data processing system 310 includes the data processing device 12 and a headset terminal 314. An example of the data processing device 12 is a server.
[0671] 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).
[0672] 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.
[0673] 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.
[0674] 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).
[0675] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0676] 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.
[0677] 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.
[0678] 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.
[0679] 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.
[0680] 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."
[0681] The present invention relates to a legal chatbot system that utilizes a generative AI model, and details a specific embodiment that allows users to input legal questions and receive prompt and appropriate answers.
[0682] First, a user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, a user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[0683] The question is then sent from the device to the server, which preprocesses it by tokenizing the question text into words, removing common words (stop words), and tagging each word with a part-of-speech tag.
[0684] Once preprocessing is complete, the question is input into a generative AI model. The generative AI model is trained based on the Roppo Zensho and the latest legal cases, and generates an appropriate answer to the input question. The generated answer is then sent to post-processing, where it is formatted by removing unnecessary line breaks and checking for technical terminology.
[0685] After post-processing is complete, the answer is sent from the server to the terminal and displayed to the user. For example, in response to a question entered by a user such as "Please tell me about Article 15 of the Labor Contract Act," the following answer is generated and displayed on the terminal: "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, the reason for terminating the contract and the procedure for doing so must be clearly stated."
[0686] This system allows users to quickly obtain appropriate legal information. It also reduces the burden on corporate legal departments, allowing them to respond 24 hours a day. Furthermore, the increased collection and analysis of legal cases improves risk management for each employee.
[0687] Specific examples of the present invention are shown below.
[0688] Example 1: Checking the contract
[0689] The user types into the terminal, "What effect do certain provisions in Article 10 of this contract have in the event of cancellation or termination?"
[0690] The question is sent to the server, where natural language processing is used to tokenize and remove stop words.
[0691] Based on the question, the generative AI model generated the answer: "Article 10 contains specific provisions regarding the cancellation or termination of the contract, and stipulates the grounds for termination and the associated obligations and compensation."
[0692] The answer is formatted and sent back to the terminal for the user to confirm.
[0693] Example 2: Claiming unpaid overtime
[0694] The user types into the terminal, "If an employee wants to claim unpaid overtime, how many years back can they claim?"
[0695] The question is sent to the server, where it is tokenized, stopword removed, and tagged with part-of-speech using natural language processing.
[0696] The generative AI model responded to the question by saying, "You can usually claim unpaid overtime wages for up to five years. However, this may vary depending on the situation."
[0697] The answer is formatted and sent back to the terminal for the user to confirm.
[0698] In this way, the present invention provides fast and accurate answers to legal questions, improving the efficiency of corporate legal departments. In addition, the system's 24-hour response time allows for timely legal support.
[0699] The processing flow will be explained below.
[0700] Step 1:
[0701] The user types a legal question into the terminal, for example, "Please tell me about Article 15 of the Labor Contract Act."
[0702] Step 2:
[0703] The device sends the entered question to the server, where the data is encoded into the appropriate format.
[0704] Step 3:
[0705] The server checks the received question and begins preprocessing. First, it tokenizes the input text, which splits the sentence into words.
[0706] Step 4:
[0707] As part of the preprocessing, the server removes stop words, which are common words such as "no" and "wa" that are not necessary for content analysis.
[0708] Step 5:
[0709] The server tags the tokens with part-of-speech tags, which means that each word is tagged as a noun, verb, adjective, etc.
[0710] Step 6:
[0711] After completing preprocessing, the server inputs the question into the generative AI model, which uses training data from the Six Codes and the latest legal cases to generate an appropriate answer to the question.
[0712] Step 7:
[0713] The server receives the output from the generative AI model and begins post-processing the answer, specifically removing unnecessary line breaks and checking for terminology.
[0714] Step 8:
[0715] The server then sends the post-processed response to the terminal, properly formatting the data before sending it.
[0716] Step 9:
[0717] The terminal displays the answer received from the server to the user, who can review the answer and obtain the appropriate legal information for their question.
[0718] For example, if a user asks a question about the Labor Contract Act, the device will display an answer such as, "Article 15 of the Labor Contract Act stipulates the conditions for terminating an employee's contract. Specifically, the reason for terminating the contract and the procedure for doing so must be clearly stated."
[0719] Example 1
[0720] 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."
[0721] Currently, legal inquiries require a lot of resources, making it difficult to provide a fast and accurate response. Furthermore, it is difficult to provide 24-hour support, which reduces user convenience. Furthermore, the quality of answers to questions is often inconsistent, resulting in a lack of trust for users.
[0722] 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.
[0723] In this invention, the server includes means for receiving a legal question from a user, tokenizing the text and removing stop words as preprocessing, inputting the preprocessed question into a generative AI model to generate a legally based answer, and post-processing the generated answer to remove unnecessary line breaks and spaces, check for terminology, format it, and send it to a terminal, thereby enabling the provision of prompt and appropriate legal advice.
[0724] "User" means any person or entity that enters a legal question into the system.
[0725] "Terminal" refers to an information processing device through which a user inputs questions and uses the system.
[0726] "Question" refers to a textual inquiry entered by a user seeking legal information.
[0727] "Preprocessing" refers to a series of processes that tokenize the input question, remove stop words, and tag parts of speech.
[0728] "Tokenization" refers to the process of dividing input text into words and phrases.
[0729] "Stop words" are common words that have little importance in semantic analysis and search results.
[0730] "Part-of-speech tagging" refers to the process of assigning part-of-speech information (e.g., noun, verb, adjective, etc.) to each tokenized word.
[0731] A "generative AI model" refers to an artificial intelligence model that is trained based on existing legal documents and the latest legal cases.
[0732] "Answer" refers to the law-based response generated by a generative AI model in response to a user's question.
[0733] "Post-processing" refers to a series of processes that remove unnecessary line breaks and spaces, check for terminology, and format the generated answers.
[0734] The present invention relates to a legal chatbot system that utilizes a generative AI model, and a specific embodiment is described below that allows users to input legal questions and receive quick and appropriate answers.
[0735] First, the user accesses the legal chatbot using a device such as a PC or smartphone. The device provides an interface for inputting legal questions. For example, the user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[0736] The question is then sent from the device to the server, which preprocesses the received question. This preprocessing includes tokenizing the question text into words, removing common words (stop words), and tagging each word with a part-of-speech tag. This preprocessing is performed using natural language processing techniques.
[0737] After preprocessing, the question is input into a generative AI model. This generative AI model is trained based on laws and regulations and the latest legal cases, and generates an appropriate answer to the input question. For example, GPT-3 is used as a generative AI model.
[0738] The generated answers are post-processed on the server, which includes formatting tasks such as removing unnecessary line breaks and whitespace, checking for terminology, etc. After post-processing is complete, the answers are sent from the server to the device and displayed to the user.
[0739] As a concrete example, let's consider the case where a user types in "Please tell me about Article 15 of the Labor Contract Act." In response to this question, the generative AI model generates the answer "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, it is required that the reason for contract termination and the procedure for it be clearly stated," and this answer is displayed on the device.
[0740] Furthermore, as another specific example, it can also handle the case where a user inputs, "If an employee wants to claim unpaid overtime wages, how many years back can they claim?" In response to this question, the generative AI model generates the answer, "Unpaid overtime wages can usually be claimed for up to five years. However, this may vary depending on the situation," and displays it on the terminal.
[0741] In this way, the present invention provides fast and accurate answers to legal questions, improving the efficiency of corporate legal departments. In addition, the system's 24-hour response time allows for timely legal support.
[0742] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0743] Step 1:
[0744] The user accesses the legal chatbot on a device and enters a question.
[0745] Specific operation: A user accesses the chatbot interface using a computer or smartphone. The user inputs a legal question. For example, the user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[0746] Input: Legal Question (Text)
[0747] Output: The question text entered
[0748] Step 2:
[0749] The terminal sends a question to the server.
[0750] What happens: The device captures the entered question and sends an HTTP request to the server, which includes the question text entered by the user.
[0751] Input: The entered question text
[0752] Output: Question text sent to the server
[0753] Step 3:
[0754] The server pre-processes the query.
[0755] Specific operation: The server first tokenizes the received question. For example, "Please tell me about Article 15 of the Labor Contract Act" is divided into words such as "Labor Contract Act," "Article 15," "about," "tell me," and "please." Next, stop words (e.g., "about," "please") are removed, and only important words are extracted. The remaining words are then tagged with part-of-speech tags. For example, the resulting format would be "Labor Contract Act / NOUN," "Article 15 / NOUN," and "teach me / VERB."
[0756] Input: Question text sent to the server
[0757] Output: Preprocessed question text (tokenized, stopword-removed, part-of-speech-tagged)
[0758] Step 4:
[0759] The server inputs the preprocessed question into a generative AI model to generate an answer.
[0760] Specific operation: The server inputs the preprocessed question text into a generative AI model. The generative AI model (e.g., GPT-3) is trained based on laws and regulations and the latest legal cases, and generates an appropriate answer to the input question. For example, it generates the answer, "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, the reason for termination of the contract and the procedure for doing so must be clearly stated."
[0761] Input: Preprocessed question text
[0762] Output: Generated answer text
[0763] Step 5:
[0764] The server post-processes the generated answer.
[0765] What it does: The server post-processes the answers obtained from the generative AI model, removing unnecessary line breaks and whitespace, and formatting the answers. It also checks for terminology and adds supplementary explanations as needed.
[0766] Input: Generated answer text
[0767] Output: Post-processed answer text
[0768] Step 6:
[0769] The server sends the post-processed answer to the terminal for display to the user.
[0770] Specific operation: The server sends the post-processed answer to the terminal as an HTTP response. The terminal displays the received answer to the user. The user confirms the answer on the terminal. For example, the answer displayed might be "Article 15 of the Labor Contract Act states..."
[0771] Input: Post-processed answer text
[0772] Output: The answer text that is displayed to the user
[0773] (Application example 1)
[0774] 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."
[0775] In security operations, there are many situations where security guards on the scene need fast and accurate legal advice. However, conventional legal chatbot systems have difficulty immediately providing appropriate responses tailored to specific situations. In addition, systems incorporating voice input and speech recognition functions using smartphones or robots have not been fully developed. In these circumstances, there is a need for a means for security guards to quickly obtain legal advice on the scene.
[0776] 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.
[0777] In this invention, the server includes means for a user to input a legal question, means for receiving the input question and tokenizing the text to remove common words as part of preprocessing, means for inputting the preprocessed question into a generative AI model to generate a legal answer, means for post-processing and formatting the generated answer before sending it to a terminal, means for the terminal to display the formatted answer, and means with voice input and speech recognition capabilities for providing rapid legal advice in security-related situations, thereby enabling security guards to obtain rapid legal advice on the scene.
[0778] A "user" is a person who utilizes the system to enter a legal question.
[0779] "Legal questions" refer to questions or inquiries related to the interpretation or application of laws and regulations, or specific legal issues.
[0780] "Input means" refers to a method or device for a user to input a question into a terminal, and includes a keyboard, a touch panel, voice input, and the like.
[0781] "Tokenization" is the process of breaking down the text of a question into smaller units to make it easier to process.
[0782] The "means for removing common words" is a processing method for removing words with little meaning (stop words) from the question text.
[0783] A "generative AI model" is an artificial intelligence model that uses machine learning to generate appropriate answers from legal knowledge and case studies.
[0784] A "legally based answer" is a legally based response provided by a generative AI model to a user's question.
[0785] "Post-processing" refers to formatting and removing unnecessary information from the generated answers before displaying them to the user.
[0786] A "terminal" is a device that a user uses to enter questions and receive answers.
[0787] "Display means" refers to a method or device for displaying the answer results on a terminal, and includes screen display, audio output, etc.
[0788] A "security-related situation" is an event that a security guard faces in the field that involves legal issues.
[0789] "Fast legal advice" means prompt and appropriate legal advice or guidance on a legal matter.
[0790] "Voice input and speech recognition" refers to technology that allows users to input questions by voice and convert them into text.
[0791] This invention provides a system that utilizes generative AI models to enable security guards to obtain fast and accurate legal advice on the spot. The system is mainly composed of three elements: a server, a terminal, and a user.
[0792] First, users input legal questions using devices such as smartphones or robots. This input method includes voice input and speech recognition, so users can input questions by voice. The voice input is converted into text using a speech recognition API such as Google Cloud Speech-to-Text.
[0793] The device then sends the entered question to the server, which then preprocesses the received question. Preprocessing includes tokenization and removal of common words (stop words). For example, if a user enters the question "What legal action will be taken in case of trespassing?", this text will be tokenized and important words such as "trespassing," "legal action," and "taken" will be extracted.
[0794] After preprocessing, the question is input into a generative AI model stored on the server. This generative AI model is trained based on laws and regulations and the latest legal cases, and generates an appropriate legal answer. For example, it might generate an answer such as, "Trespassing is a violation of the criminal law. Violators may be subject to fines or imprisonment."
[0795] The generated answers are then formatted through post-processing, which includes removing unnecessary line breaks and checking for terminology, before finally being sent to the device.
[0796] The terminal displays the formatted answer to the user. The display means includes a screen display and an audio output, so the user can immediately check the answer.
[0797] Specific examples
[0798] Consider a security guard using a smartphone to type a question. The question is asked via voice input, and the text is "What legal action will be taken in the case of trespassing?" This question is sent to a server for pre-processing. A generative AI model then generates an answer, which, after post-processing, is finally displayed on the smartphone: "Trespassing is a violation of criminal law. Violators may be subject to fines or imprisonment."
[0799] Prompt Sentence Examples
[0800] User: What legal action is taken in case of trespass?
[0801] AI: Trespassing is a criminal offense. Violators can be fined or imprisoned.
[0802] In this way, the system improves on-site efficiency in security-related operations by providing real-time legal advice.
[0803] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0804] Step 1:
[0805] A user inputs a legal question using a smartphone or robotic device. The input method also includes a voice input function. When the user inputs a question by voice, the voice is converted into text using a speech recognition API (for example, Google Cloud Speech-to-Text). The input data is the user's question text.
[0806] Step 2:
[0807] The terminal sends the entered question to the server, and the data sent is the user's question text.
[0808] Step 3:
[0809] The server pre-processes the received question text, which includes:
[0810] 1. Tokenization: Divide the text into words. The input is the user's question text, and the output is a list of tokenized words.
[0811] 2. Stop word removal: remove common words (stop words) from the list. The input is a list of tokenized words, and the output is a list containing only important words.
[0812] Example: Input "What legal action will be taken in case of trespassing?" → Tokenized output "Trespassing", "In that case", "How", "Legal action", "Take?"
[0813] Step 4:
[0814] The preprocessed question text is input to the generative AI model. The server sends a prompt to the generative AI model based on the results of the preprocessing, and generates an appropriate legal answer. The input is the preprocessed question text, and the output is the generated legal answer text.
[0815] Example: Prompt: "What legal action can be taken in the case of trespass?" → Generated answer: "Trespassing is against the criminal law. Violators can be fined or imprisoned."
[0816] Step 5:
[0817] The server post-processes the generated answer text, which includes:
[0818] 1. Formatting: Remove unnecessary line breaks and check for technical terms. The input is the generated answer text, and the output is the formatted answer text.
[0819] Example: Before: "Trespassing is a violation of the criminal code. Violators may be subject to fines or imprisonment." → After: "Trespassing is a violation of the criminal code. Violators may be subject to fines or imprisonment."
[0820] Step 6:
[0821] The server sends the post-processed answer text to the terminal. The data sent is the formatted answer text.
[0822] Step 7:
[0823] The terminal displays the formatted answer to the user. The display means may include a screen display or an audio output, so that the user can immediately check the answer. The displayed data is the formatted answer text.
[0824] 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.
[0825] This invention combines a legal chatbot system that utilizes a generative AI model with an emotion engine, and details a specific embodiment that allows users to input legal questions and receive quick and appropriate answers based on those questions.
[0826] First, a user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, the user might input a question such as, "Please tell me about the conditions for contract termination."
[0827] The question is then sent from the device to the server, which preprocesses the received question, including tokenizing the question text, removing stop words, and tagging parts of speech.
[0828] After preprocessing, the question is fed into a generative AI model, which generates an appropriate legally based answer. However, the present invention also incorporates an emotion engine, which recognizes emotions from the user's input text and adjusts the tone of the generated answer based on the recognized emotions. This adjustment allows the answer to be provided while taking into account the user's emotional state.
[0829] The emotion engine also records the user's emotional history for each question, which can be used to improve the quality of future answers. For example, if a user frequently asks questions in an anxious state, future answers will use a more friendly and reassuring tone.
[0830] The post-processed answer is sent from the server to the terminal and displayed to the user, who can review the answer and obtain the appropriate legal information for their question.
[0831] Specific examples of the present invention are shown below.
[0832] Example 1: Contract verification and emotion recognition
[0833] The user types into the terminal, "What effect do certain provisions in Article 10 of this contract have in the event of cancellation or termination?"
[0834] The question is sent to the server, where natural language processing is used to tokenize it, remove stop words, and tag parts of speech.
[0835] Based on the question, the generative AI model generated the answer: "Article 10 contains specific provisions regarding the cancellation or termination of the contract, which usually stipulates the grounds for termination and the resulting obligations and compensation."
[0836] If the emotion engine recognizes emotions from the user's text and determines that the user is feeling anxious, it will adjust the tone of the response to something like, "Don't worry. Article 10 clearly sets out guidelines for cancellation or termination of the contract."
[0837] The answer is formatted and sent back to the terminal for the user to confirm.
[0838] Example 2: Claiming unpaid overtime and emotional history
[0839] The user types into the terminal, "If an employee wants to claim unpaid overtime, how many years back can they claim?"
[0840] The question is sent to the server, where natural language processing is performed to tokenize it, remove stop words, and tag parts of speech.
[0841] The generative AI model responded to the question by saying, "You can usually claim unpaid overtime wages for up to five years. However, this may vary depending on the situation."
[0842] If the emotion engine recognizes the emotion from the user's text and determines from past emotional history that the user wants more information, it will adjust the tone of the response to something like, "Don't worry. You can usually claim unpaid overtime for up to five years, but we recommend consulting a legal professional about your specific situation."
[0843] The answer is formatted and sent back to the terminal for the user to confirm.
[0844] In this way, by combining the emotion engine, the present invention can provide legal information that takes into account the user's emotional state, further improving the efficiency of corporate legal departments. In addition, the system's 24-hour response capability enables timely and flexible legal support.
[0845] The processing flow will be explained below.
[0846] Step 1:
[0847] The user types a legal question into the terminal, for example, "What are the terms of contract termination?"
[0848] Step 2:
[0849] The device sends the entered question to the server, where the data is encoded into the appropriate format.
[0850] Step 3:
[0851] The server checks the received question and begins preprocessing. First, it tokenizes the input text, which splits the sentence into words.
[0852] Step 4:
[0853] As part of the preprocessing, the server removes stop words, which are common words such as "no" and "wa" that are not necessary for content analysis.
[0854] Step 5:
[0855] The server tags the tokens with part-of-speech tags, which means that each word is tagged as a noun, verb, adjective, etc.
[0856] Step 6:
[0857] After completing preprocessing, the server inputs the question into the generative AI model, which uses training data from the Six Codes and the latest legal cases to generate an appropriate answer to the question.
[0858] Step 7:
[0859] The server receives the output from the generative AI model and generates a preliminary answer, which includes basic legal explanations.
[0860] Step 8:
[0861] The server uses an emotion engine to recognize emotions from the text of the question entered by the user. For example, it can recognize that the user is feeling "anxiety" or "doubt" based on the words and context in the sentence.
[0862] Step 9:
[0863] The server adjusts the tone of the generated response based on the perceived sentiment, for example adding friendly phrases like "Don't worry" or "We'll provide more information."
[0864] Step 10:
[0865] The server uses an emotion engine to record the user's emotion history, which is then saved as data to improve the quality of answers in the future.
[0866] Step 11:
[0867] The server then sends the post-processed response to the terminal, properly formatting the data before sending it.
[0868] Step 12:
[0869] The terminal displays the answer received from the server to the user, who can review the answer and obtain the appropriate legal information for their question.
[0870] For example, if a user asks, "Please tell me about the conditions for contract termination," the device will display a response such as, "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Don't worry. Specifically, you are required to clearly state the reason and procedure for contract termination." This allows users to receive legally appropriate information, including emotional care.
[0871] Example 2
[0872] 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."
[0873] Conventional legal chatbot systems provide answers without considering the user's emotional state, making it difficult for users to obtain answers that are relatable to them. Furthermore, the system's inability to provide an appropriate response tone based on the user's emotional state led to problems with reduced user satisfaction. Furthermore, the accuracy of preprocessing and answer generation was insufficient, resulting in the inability to provide appropriate legal information quickly.
[0874] 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.
[0875] In this invention, the server includes means for accepting legal input data from a user, means for preprocessing the accepted input data, tokenizing the text, and removing stop words, means for inputting the preprocessed data into a generative AI model to generate legal results, means for processing the generated results with an emotion engine and adjusting the tone of the results based on the user's emotional state, means for post-processing and formatting the final adjusted results before transmitting them to a terminal, and means for the terminal to display the formatted results. This makes it possible to quickly and accurately provide user-friendly legal information that takes the user's emotions into consideration.
[0876] "User" means any person or entity that utilizes the System to enter legal questions and obtain answers.
[0877] A "terminal" refers to an information processing device such as a personal computer, smartphone, or tablet that is used by a user to access the system, input questions, and display answers.
[0878] The "server" is a computer system that receives questions sent by users, performs preprocessing, generates answers using a generative AI model, adjusts the tone using an emotion engine, performs postprocessing, and finally sends the answers to the terminal.
[0879] "Input Data" means the legal question in text form that the user types into the terminal.
[0880] "Preprocessing" refers to the initial data processing step that the server performs on input data, specifically processing that includes tokenization and removal of stop words.
[0881] "Tokenization" is the process of dividing input data into words and phrases.
[0882] "Stop word removal" is the process of removing common meaningless words from a sentence.
[0883] "Part-of-speech tagging" refers to the process of assigning a part of speech, such as a noun, verb, or adjective, to each token.
[0884] A "generative AI model" is an artificial intelligence model that generates legally relevant results based on input data. The model is trained on legal documents and recent legal cases.
[0885] An "emotion engine" is a system component that recognizes emotions from user input data and adjusts the tone of the generated response.
[0886] "Results" are legally based answers generated by a generative AI model and tone-adjusted by an emotion engine.
[0887] "Post-processing" refers to the process of formatting the generated results so that they are suitable for presentation to a user.
[0888] "Display" means providing the final answer visually to the user at the terminal.
[0889] The present invention is a legal chatbot system that combines a generative AI model and an emotion engine. The system aims to enable users to input legal questions and receive prompt and appropriate answers based on those questions. A specific embodiment of the system is described in detail below.
[0890] A user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, the user inputs a question such as, "Please tell me about the conditions for contract termination."
[0891] The question is then sent from the device to the server, which preprocesses the received question. This preprocessing includes tokenizing the question text, removing stop words, and tagging it with part-of-speech tags. Tokenization splits the text into words and phrases, stop word removal removes meaningless words, and part-of-speech tagging assigns each word a part of speech.
[0892] Once preprocessing is complete, the question is fed into a generative AI model, which generates an answer based on the appropriate law. For example, the question "What are the conditions for terminating a contract?" will generate the answer "The conditions for terminating a contract are determined by the specific clauses in the contract and the law."
[0893] The present invention further incorporates an emotion engine. The emotion engine recognizes emotions from the user's input text and adjusts the tone of the generated answer based on the recognized emotion. This adjustment allows the answer to be provided taking into consideration the user's emotional state. For example, if the emotion engine determines that the user is feeling "anxious" while inputting a question, it adjusts the tone of the answer to "Don't worry. The terms of contract cancellation are clearly defined, so please check the details."
[0894] The emotion engine also records the user's emotional history for each question, which can be used to improve the quality of future answers. For example, if a user frequently asks questions in an anxious state, future answers will use a more friendly and reassuring tone.
[0895] The post-processed answer is sent from the server to the terminal and displayed to the user, who can review the answer and obtain the appropriate legal information for their question.
[0896] Below are some examples and prompts:
[0897] Example 1: Contract verification and emotion recognition
[0898] The user types into their device, "How do the specific provisions in Article 10 of this contract affect cancellation or termination?" The question is sent to the server, where natural language processing is used to tokenize, remove stop words, and tag parts of speech. A generative AI model generates a response based on the question: "Article 10 contains specific provisions regarding cancellation or termination of the contract, which typically outline the grounds for termination and the associated obligations and compensation." If the emotion engine recognizes emotions from the user's text and determines that the user is anxious, it adjusts the tone of the response to something like, "Don't worry. Article 10 clearly outlines guidelines for cancellation or termination." The response is formatted and sent back to the device for the user to confirm.
[0899] Example 2: Claiming unpaid overtime and emotional history
[0900] The user types into the device, "If an employee wants to claim unpaid overtime, how many years back can they claim?" The question is sent to the server, where natural language processing is used to tokenize it, remove stop words, and tag parts of speech. The generative AI model generates an answer to the question: "Unpaid overtime can usually be claimed for up to five years. However, this may vary depending on the situation." The emotion engine recognizes emotions from the user's text and, if it determines from past emotion history that the user wants more information, adjusts the tone of the answer to something like, "Don't worry. Unpaid overtime can usually be claimed for up to five years, but we recommend consulting a legal professional about your specific situation." The answer is formatted and sent back to the device for the user to confirm.
[0901] In this way, by combining the emotion engine, the present invention can provide legal information that takes into account the user's emotional state, improving the efficiency of legal departments. In addition, the system's 24-hour response capability enables timely and flexible legal support.
[0902] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0903] Step 1:
[0904] The user creates the input data.
[0905] The user accesses the legal chatbot using a device and inputs a legal question. For example, the user might input, "Please tell me about the conditions for contract termination." The input data is temporarily stored on the device.
[0906] Step 2:
[0907] The terminal sends the input data to the server.
[0908] The terminal sends the question entered by the user to the server as an HTTP request. The input data is sent to the server in text format. The output of this step is the text data received by the server.
[0909] Step 3:
[0910] The server pre-processes the query.
[0911] The server performs preprocessing on the received text data. Specifically, it first tokenizes the text and splits it into words and phrases. Then it removes stop words and eliminates meaningless words. Finally, it performs part-of-speech tagging, assigning each word a part of speech, such as noun, verb, or adjective. The output of the preprocessing is text data that has been tokenized, stop words removed, and part-of-speech tagged.
[0912] Step 4:
[0913] The server generates an answer using a generative AI model.
[0914] The server inputs the preprocessed text data into a generative AI model to generate an answer based on the appropriate law. The generative AI model is trained based on legal codes and the latest legal cases. For example, in response to the question, "What are the conditions for terminating a contract?", the generated answer is, "The conditions for terminating a contract are determined based on specific clauses and laws set out in the contract." The generated answer text is the output of this step.
[0915] Step 5:
[0916] The server uses an emotion engine to adjust the tone of the response.
[0917] The server passes the generated response text along with the input data to the emotion engine to analyze the user's emotions. For example, if the emotion engine recognizes "anxiety" from the user's input text, it adjusts the tone of the response to something more friendly, such as "Don't worry. The terms of contract cancellation are clearly specified, so please check the details." The tone-adjusted response text is the output of this step.
[0918] Step 6:
[0919] The server post-processes the response and sends it to the terminal.
[0920] The server post-processes and formats the tone-adjusted answer text. The post-processed answer text is converted into HTML or JSON format and sent to the device as an HTTP response. The post-processed answer text is the output of this step.
[0921] Step 7:
[0922] The user checks the answer through the terminal.
[0923] The terminal displays the answer received from the server to the user, who can review the answer on the terminal screen and obtain legal information for their question. The output of this step is the final answer that the user reviews.
[0924] (Application example 2)
[0925] 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."
[0926] Current legal chatbot systems provide highly accurate answers to user questions, but the answers do not take into account the user's emotional state, resulting in a poor user experience. Furthermore, when providing legal advice related to security, users often ask questions while feeling anxious or nervous, and special consideration is required for these emotions. Under these circumstances, it becomes difficult for users to receive appropriate legal advice.
[0927] The identification process by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for recognizing emotions from the user's input text using an emotion engine and adjusting the tone of the generated answer based on the recognized emotion, means for tagging the question text with parts of speech as part of preprocessing, and means for the generation AI model to be a model trained based on a collection of statutes and the latest legal cases. This allows for the generation of answers that take the user's emotional state into consideration, improving the user experience.
[0928] "Means for users to input legal questions" refers to any interface that allows users to input legal questions using a terminal.
[0929] "A means of receiving an input question and tokenizing the text and removing stop words as part of preprocessing" refers to a system or algorithm that breaks down (tokenizes) the text entered by the user into smaller pieces and removes words (stop words) that are not necessary for generating an answer.
[0930] "Means of inputting preprocessed questions into a generative AI model and generating legally based answers" refers to an AI model and its implementation method for generating appropriate answers based on laws, regulations, and case studies, using preprocessed questions.
[0931] "Means for recognizing emotions from user input text and adjusting the tone of the generated response based on the recognized emotions" refers to an engine or algorithm that analyzes emotions from user input and modifies the tone or expression of the response based on the results of that analysis.
[0932] "Means for post-processing, formatting and transmitting the generated response to the device" refers to a system or algorithm that organizes the generated text data, converts it into a displayable format and transmits it to the user's device.
[0933] "Means for the terminal to display the formatted answer" refers to an interface or application function on the user's terminal for visually displaying the received answer.
[0934] An "emotion engine" refers to software or hardware functionality that analyzes and recognizes a user's emotions from input text and adjusts responses based on the results.
[0935] "Statutes and Current Legal Cases" refers to an information resource that compiles the laws and regulations in force in a jurisdiction, as well as the latest legal precedents and cases.
[0936] This invention combines a legal chatbot system that utilizes a generative AI model with an emotion engine, and details a specific embodiment that allows users to input legal questions and receive quick and appropriate answers based on those questions.
[0937] System configuration
[0938] The system mainly consists of the following components:
[0939] 1. User device: The device through which the user enters the question, including a smartphone or computer.
[0940] 2. Server: The central location that processes questions, generates AI, analyzes sentiment, adjusts the tone of the answers, and sends them.
[0941] Program processing
[0942] Hardware and Software Configuration
[0943] Natural language processing libraries: spaCy and NLTK for tokenizing question text, removing stop words, and tagging parts of speech.
[0944] Generative AI model: Uses OpenAI's API to generate answers to questions.
[0945] Sentiment Analysis Engine: Analyzes sentiment from user input text using sentiment analysis tools such as VADER and TextBlob.
[0946] Answer generation and tone adjustment: Proprietary algorithms for adjusting the tone of answers based on sentiment analysis.
[0947] Operating Procedure
[0948] 1. A user accesses the legal chatbot using a device:
[0949] Users use a smartphone or computer interface to enter a legal question, such as "Is it illegal for police to enter my house without a search warrant?"
[0950] 2. The server receives the query and preprocesses it:
[0951] The entered question is sent to the server, where it is tokenized, stopwords are removed, and parts of speech are tagged as preprocessing steps for natural language processing.
[0952] 3. The generative AI model generates an answer based on the question:
[0953] Once preprocessed, the question is fed into a generative AI model that generates an answer based on the appropriate law, leveraging OpenAI's API.
[0954] 4. Sentiment analysis and tone adjustment:
[0955] The emotion engine recognizes emotions from the user's input text and adjusts the tone of the generated response. For example, if the user is feeling anxious, the tone of the response will be adjusted to "Don't worry."
[0956] 5. Post-processing and sending of responses:
[0957] The generated answer is formatted and sent from the server to the user's device.
[0958] 6. The terminal will display the formatted answer:
[0959] The answer is sent back to the user's terminal and displayed visually.
[0960] Examples and prompts
[0961] Examples:
[0962] A user asks, "Is it illegal for police to enter my home without a search warrant?"
[0963] The server receives and processes the query.
[0964] The emotion engine recognizes that the user is feeling anxious and adjusts the tone to say, "Don't worry."
[0965] The answer that appears on the user's device is, "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergencies."
[0966] Example prompt sentence:
[0967] Enter: Is it illegal for police to enter my home without a search warrant?
[0968] Emotion: fear
[0969] Generated Answer: Searching a home without a search warrant is generally illegal, but exceptions may apply in emergency situations.
[0970] Adjusted answer: Don't worry. Searching a home without a search warrant is generally illegal, but exceptions may apply in emergency situations.
[0971] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0972] Step 1:
[0973] A user accesses the legal chatbot using a device and inputs a legal question in the form of natural language text, such as "Is it illegal for the police to enter my home without a search warrant?"
[0974] Step 2:
[0975] The server receives the input question. This input text is tokenized using a natural language processing (NLP) library (e.g., spaCy or NLTK) and stop words are removed. The input text is split into words, such as "search warrant," "house," "police," and "illegal," and unnecessary words are removed.
[0976] Step 3:
[0977] The server performs part-of-speech tagging on the preprocessed question text. An NLP library is used to assign part-of-speech tags (e.g., noun, verb, etc.) to each token. This results in tokens being tagged as "search warrant / noun," "house / noun," "police / noun," and "illegal / adjective."
[0978] Step 4:
[0979] The server inputs the preprocessed question into a generative AI model (e.g., OpenAI's API) to generate an appropriate legal answer. Based on the tokenized and tagged question, the generative AI model generates the answer, "In principle, searches without a search warrant are illegal, but exceptions may apply in emergency situations."
[0980] Step 5:
[0981] The server analyzes the generated answer using an emotion engine (e.g., VADER or TextBlob) to determine the user's emotional state from the input text and recognizes that the user is feeling anxious. Based on this emotion, the tone of the answer is adjusted. For example, the answer is adjusted by adding "Don't worry." The adjusted answer generated is "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergency situations."
[0982] Step 6:
[0983] The server then post-processes and formats the tailored response before sending it to the device, which includes grammar checking and text formatting.
[0984] Step 7:
[0985] The device receives and displays the formatted response. The user can see the formatted response on the device screen: "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergency situations."
[0986] 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.
[0987] 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.
[0988] 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.
[0989] [Fourth embodiment]
[0990] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[0991] 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.
[0992] 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).
[0993] 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.
[0994] 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.
[0995] 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).
[0996] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0997] 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.
[0998] 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.
[0999] 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.
[1000] 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.
[1001] 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.
[1002] 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."
[1003] The present invention relates to a legal chatbot system that utilizes a generative AI model, and details a specific embodiment that allows users to input legal questions and receive prompt and appropriate answers.
[1004] First, a user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, a user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[1005] The question is then sent from the device to the server, which preprocesses it by tokenizing the question text into words, removing common words (stop words), and tagging each word with a part-of-speech tag.
[1006] Once preprocessing is complete, the question is input into a generative AI model. The generative AI model is trained based on the Roppo Zensho and the latest legal cases, and generates an appropriate answer to the input question. The generated answer is then sent to post-processing, where it is formatted by removing unnecessary line breaks and checking for technical terminology.
[1007] After post-processing is complete, the answer is sent from the server to the terminal and displayed to the user. For example, in response to a question entered by a user such as "Please tell me about Article 15 of the Labor Contract Act," the following answer is generated and displayed on the terminal: "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, the reason for terminating the contract and the procedure for doing so must be clearly stated."
[1008] This system allows users to quickly obtain appropriate legal information. It also reduces the burden on corporate legal departments, allowing them to respond 24 hours a day. Furthermore, the increased collection and analysis of legal cases improves risk management for each employee.
[1009] Specific examples of the present invention are shown below.
[1010] Example 1: Checking the contract
[1011] The user types into the terminal, "What effect do certain provisions in Article 10 of this contract have in the event of cancellation or termination?"
[1012] The question is sent to the server, where natural language processing is used to tokenize and remove stop words.
[1013] Based on the question, the generative AI model generated the answer: "Article 10 contains specific provisions regarding the cancellation or termination of the contract, and stipulates the grounds for termination and the associated obligations and compensation."
[1014] The answer is formatted and sent back to the terminal for the user to confirm.
[1015] Example 2: Claiming unpaid overtime
[1016] The user types into the terminal, "If an employee wants to claim unpaid overtime, how many years back can they claim?"
[1017] The question is sent to the server, where it is tokenized, stopword removed, and tagged with part-of-speech using natural language processing.
[1018] The generative AI model responded to the question by saying, "You can usually claim unpaid overtime wages for up to five years. However, this may vary depending on the situation."
[1019] The answer is formatted and sent back to the terminal for the user to confirm.
[1020] In this way, the present invention provides fast and accurate answers to legal questions, improving the efficiency of corporate legal departments. In addition, the system's 24-hour response time allows for timely legal support.
[1021] The processing flow will be explained below.
[1022] Step 1:
[1023] The user types a legal question into the terminal, for example, "Please tell me about Article 15 of the Labor Contract Act."
[1024] Step 2:
[1025] The device sends the entered question to the server, where the data is encoded into the appropriate format.
[1026] Step 3:
[1027] The server checks the received question and begins preprocessing. First, it tokenizes the input text, which splits the sentence into words.
[1028] Step 4:
[1029] As part of the preprocessing, the server removes stop words, which are common words such as "no" and "wa" that are not necessary for content analysis.
[1030] Step 5:
[1031] The server tags the tokens with part-of-speech tags, which means that each word is tagged as a noun, verb, adjective, etc.
[1032] Step 6:
[1033] After completing preprocessing, the server inputs the question into the generative AI model, which uses training data from the Six Codes and the latest legal cases to generate an appropriate answer to the question.
[1034] Step 7:
[1035] The server receives the output from the generative AI model and begins post-processing the answer, specifically removing unnecessary line breaks and checking for terminology.
[1036] Step 8:
[1037] The server then sends the post-processed response to the terminal, properly formatting the data before sending it.
[1038] Step 9:
[1039] The terminal displays the answer received from the server to the user, who can review the answer and obtain the appropriate legal information for their question.
[1040] For example, if a user asks a question about the Labor Contract Act, the device will display an answer such as, "Article 15 of the Labor Contract Act stipulates the conditions for terminating an employee's contract. Specifically, the reason for terminating the contract and the procedure for doing so must be clearly stated."
[1041] Example 1
[1042] 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."
[1043] Currently, legal inquiries require a lot of resources, making it difficult to provide a fast and accurate response. Furthermore, it is difficult to provide 24-hour support, which reduces user convenience. Furthermore, the quality of answers to questions is often inconsistent, resulting in a lack of trust for users.
[1044] 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.
[1045] In this invention, the server includes means for receiving a legal question from a user, tokenizing the text and removing stop words as preprocessing, inputting the preprocessed question into a generative AI model to generate a legally based answer, and post-processing the generated answer to remove unnecessary line breaks and spaces, check for terminology, format it, and send it to a terminal, thereby enabling the provision of prompt and appropriate legal advice.
[1046] "User" means any person or entity that enters a legal question into the system.
[1047] "Terminal" refers to an information processing device through which a user inputs questions and uses the system.
[1048] "Question" refers to a textual inquiry entered by a user seeking legal information.
[1049] "Preprocessing" refers to a series of processes that tokenize the input question, remove stop words, and tag parts of speech.
[1050] "Tokenization" refers to the process of dividing input text into words and phrases.
[1051] "Stop words" are common words that have little importance in semantic analysis and search results.
[1052] "Part-of-speech tagging" refers to the process of assigning part-of-speech information (e.g., noun, verb, adjective, etc.) to each tokenized word.
[1053] A "generative AI model" refers to an artificial intelligence model that is trained based on existing legal documents and the latest legal cases.
[1054] "Answer" refers to the law-based response generated by a generative AI model in response to a user's question.
[1055] "Post-processing" refers to a series of processes that remove unnecessary line breaks and spaces, check for terminology, and format the generated answers.
[1056] The present invention relates to a legal chatbot system that utilizes a generative AI model, and a specific embodiment is described below that allows users to input legal questions and receive quick and appropriate answers.
[1057] First, the user accesses the legal chatbot using a device such as a PC or smartphone. The device provides an interface for inputting legal questions. For example, the user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[1058] The question is then sent from the device to the server, which preprocesses the received question. This preprocessing includes tokenizing the question text into words, removing common words (stop words), and tagging each word with a part-of-speech tag. This preprocessing is performed using natural language processing techniques.
[1059] After preprocessing, the question is input into a generative AI model. This generative AI model is trained based on laws and regulations and the latest legal cases, and generates an appropriate answer to the input question. For example, GPT-3 is used as a generative AI model.
[1060] The generated answers are post-processed on the server, which includes formatting tasks such as removing unnecessary line breaks and whitespace, checking for terminology, etc. After post-processing is complete, the answers are sent from the server to the device and displayed to the user.
[1061] As a concrete example, let's consider the case where a user types in "Please tell me about Article 15 of the Labor Contract Act." In response to this question, the generative AI model generates the answer "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, it is required that the reason for contract termination and the procedure for it be clearly stated," and this answer is displayed on the device.
[1062] Furthermore, as another specific example, it can also handle the case where a user inputs, "If an employee wants to claim unpaid overtime wages, how many years back can they claim?" In response to this question, the generative AI model generates the answer, "Unpaid overtime wages can usually be claimed for up to five years. However, this may vary depending on the situation," and displays it on the terminal.
[1063] In this way, the present invention provides fast and accurate answers to legal questions, improving the efficiency of corporate legal departments. In addition, the system's 24-hour response time allows for timely legal support.
[1064] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1065] Step 1:
[1066] The user accesses the legal chatbot on a device and enters a question.
[1067] Specific operation: A user accesses the chatbot interface using a computer or smartphone. The user inputs a legal question. For example, the user inputs a question such as, "Please tell me about Article 15 of the Labor Contract Act."
[1068] Input: Legal Question (Text)
[1069] Output: The question text entered
[1070] Step 2:
[1071] The terminal sends a question to the server.
[1072] What happens: The device captures the entered question and sends an HTTP request to the server, which includes the question text entered by the user.
[1073] Input: The entered question text
[1074] Output: Question text sent to the server
[1075] Step 3:
[1076] The server pre-processes the query.
[1077] Specific operation: The server first tokenizes the received question. For example, "Please tell me about Article 15 of the Labor Contract Act" is divided into words such as "Labor Contract Act," "Article 15," "about," "tell me," and "please." Next, stop words (e.g., "about," "please") are removed, and only important words are extracted. The remaining words are then tagged with part-of-speech tags. For example, the resulting format would be "Labor Contract Act / NOUN," "Article 15 / NOUN," and "teach me / VERB."
[1078] Input: Question text sent to the server
[1079] Output: Preprocessed question text (tokenized, stopword-removed, part-of-speech-tagged)
[1080] Step 4:
[1081] The server inputs the preprocessed question into a generative AI model to generate an answer.
[1082] Specific operation: The server inputs the preprocessed question text into a generative AI model. The generative AI model (e.g., GPT-3) is trained based on laws and regulations and the latest legal cases, and generates an appropriate answer to the input question. For example, it generates the answer, "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Specifically, the reason for termination of the contract and the procedure for doing so must be clearly stated."
[1083] Input: Preprocessed question text
[1084] Output: Generated answer text
[1085] Step 5:
[1086] The server post-processes the generated answer.
[1087] What it does: The server post-processes the answers obtained from the generative AI model, removing unnecessary line breaks and whitespace, and formatting the answers. It also checks for terminology and adds supplementary explanations as needed.
[1088] Input: Generated answer text
[1089] Output: Post-processed answer text
[1090] Step 6:
[1091] The server sends the post-processed answer to the terminal for display to the user.
[1092] Specific operation: The server sends the post-processed answer to the terminal as an HTTP response. The terminal displays the received answer to the user. The user confirms the answer on the terminal. For example, the answer displayed might be "Article 15 of the Labor Contract Act states..."
[1093] Input: Post-processed answer text
[1094] Output: The answer text that is displayed to the user
[1095] (Application example 1)
[1096] 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."
[1097] In security operations, there are many situations where security guards on the scene need fast and accurate legal advice. However, conventional legal chatbot systems have difficulty immediately providing appropriate responses tailored to specific situations. In addition, systems incorporating voice input and speech recognition functions using smartphones or robots have not been fully developed. In these circumstances, there is a need for a means for security guards to quickly obtain legal advice on the scene.
[1098] 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.
[1099] In this invention, the server includes means for a user to input a legal question, means for receiving the input question and tokenizing the text to remove common words as part of preprocessing, means for inputting the preprocessed question into a generative AI model to generate a legal answer, means for post-processing and formatting the generated answer before sending it to a terminal, means for the terminal to display the formatted answer, and means with voice input and speech recognition capabilities for providing rapid legal advice in security-related situations, thereby enabling security guards to obtain rapid legal advice on the scene.
[1100] A "user" is a person who utilizes the system to enter a legal question.
[1101] "Legal questions" refer to questions or inquiries related to the interpretation or application of laws and regulations, or specific legal issues.
[1102] "Input means" refers to a method or device for a user to input a question into a terminal, and includes a keyboard, a touch panel, voice input, and the like.
[1103] "Tokenization" is the process of breaking down the text of a question into smaller units to make it easier to process.
[1104] The "means for removing common words" is a processing method for removing words with little meaning (stop words) from the question text.
[1105] A "generative AI model" is an artificial intelligence model that uses machine learning to generate appropriate answers from legal knowledge and case studies.
[1106] A "legally based answer" is a legally based response provided by a generative AI model to a user's question.
[1107] "Post-processing" refers to formatting and removing unnecessary information from the generated answers before displaying them to the user.
[1108] A "terminal" is a device that a user uses to enter questions and receive answers.
[1109] "Display means" refers to a method or device for displaying the answer results on a terminal, and includes screen display, audio output, etc.
[1110] A "security-related situation" is an event that a security guard faces in the field that involves legal issues.
[1111] "Fast legal advice" means prompt and appropriate legal advice or guidance on a legal matter.
[1112] "Voice input and speech recognition" refers to technology that allows users to input questions by voice and convert them into text.
[1113] This invention provides a system that utilizes generative AI models to enable security guards to obtain fast and accurate legal advice on the spot. The system is mainly composed of three elements: a server, a terminal, and a user.
[1114] First, users input legal questions using devices such as smartphones or robots. This input method includes voice input and speech recognition, so users can input questions by voice. The voice input is converted into text using a speech recognition API such as Google Cloud Speech-to-Text.
[1115] The device then sends the entered question to the server, which then preprocesses the received question. Preprocessing includes tokenization and removal of common words (stop words). For example, if a user enters the question "What legal action will be taken in case of trespassing?", this text will be tokenized and important words such as "trespassing," "legal action," and "taken" will be extracted.
[1116] After preprocessing, the question is input into a generative AI model stored on the server. This generative AI model is trained based on laws and regulations and the latest legal cases, and generates an appropriate legal answer. For example, it might generate an answer such as, "Trespassing is a violation of the criminal law. Violators may be subject to fines or imprisonment."
[1117] The generated answers are then formatted through post-processing, which includes removing unnecessary line breaks and checking for terminology, before finally being sent to the device.
[1118] The terminal displays the formatted answer to the user. The display means includes a screen display and an audio output, so the user can immediately check the answer.
[1119] Specific examples
[1120] Consider a security guard using a smartphone to type a question. The question is asked via voice input, and the text is "What legal action will be taken in the case of trespassing?" This question is sent to a server for pre-processing. A generative AI model then generates an answer, which, after post-processing, is finally displayed on the smartphone: "Trespassing is a violation of criminal law. Violators may be subject to fines or imprisonment."
[1121] Prompt Sentence Examples
[1122] User: What legal action is taken in case of trespass?
[1123] AI: Trespassing is a criminal offense. Violators can be fined or imprisoned.
[1124] In this way, the system improves on-site efficiency in security-related operations by providing real-time legal advice.
[1125] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1126] Step 1:
[1127] A user inputs a legal question using a smartphone or robotic device. The input method also includes a voice input function. When the user inputs a question by voice, the voice is converted into text using a speech recognition API (for example, Google Cloud Speech-to-Text). The input data is the user's question text.
[1128] Step 2:
[1129] The terminal sends the entered question to the server, and the data sent is the user's question text.
[1130] Step 3:
[1131] The server pre-processes the received question text, which includes:
[1132] 1. Tokenization: Divide the text into words. The input is the user's question text, and the output is a list of tokenized words.
[1133] 2. Stop word removal: remove common words (stop words) from the list. The input is a list of tokenized words, and the output is a list containing only important words.
[1134] Example: Input "What legal action will be taken in case of trespassing?" → Tokenized output "Trespassing", "In that case", "How", "Legal action", "Take?"
[1135] Step 4:
[1136] The preprocessed question text is input to the generative AI model. The server sends a prompt to the generative AI model based on the results of the preprocessing, and generates an appropriate legal answer. The input is the preprocessed question text, and the output is the generated legal answer text.
[1137] Example: Prompt: "What legal action can be taken in the case of trespass?" → Generated answer: "Trespassing is against the criminal law. Violators can be fined or imprisoned."
[1138] Step 5:
[1139] The server post-processes the generated answer text, which includes:
[1140] 1. Formatting: Remove unnecessary line breaks and check for technical terms. The input is the generated answer text, and the output is the formatted answer text.
[1141] Example: Before: "Trespassing is a violation of the criminal code. Violators may be subject to fines or imprisonment." → After: "Trespassing is a violation of the criminal code. Violators may be subject to fines or imprisonment."
[1142] Step 6:
[1143] The server sends the post-processed answer text to the terminal. The data sent is the formatted answer text.
[1144] Step 7:
[1145] The terminal displays the formatted answer to the user. The display means may include a screen display or an audio output, so that the user can immediately check the answer. The displayed data is the formatted answer text.
[1146] 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.
[1147] This invention combines a legal chatbot system that utilizes a generative AI model with an emotion engine, and details a specific embodiment that allows users to input legal questions and receive quick and appropriate answers based on those questions.
[1148] First, a user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, the user might input a question such as, "Please tell me about the conditions for contract termination."
[1149] The question is then sent from the device to the server, which preprocesses the received question, including tokenizing the question text, removing stop words, and tagging parts of speech.
[1150] After preprocessing, the question is fed into a generative AI model, which generates an appropriate legally based answer. However, the present invention also incorporates an emotion engine, which recognizes emotions from the user's input text and adjusts the tone of the generated answer based on the recognized emotions. This adjustment allows the answer to be provided while taking into account the user's emotional state.
[1151] The emotion engine also records the user's emotional history for each question, which can be used to improve the quality of future answers. For example, if a user frequently asks questions in an anxious state, future answers will use a more friendly and reassuring tone.
[1152] The post-processed answer is sent from the server to the terminal and displayed to the user, who can review the answer and obtain the appropriate legal information for their question.
[1153] Specific examples of the present invention are shown below.
[1154] Example 1: Contract verification and emotion recognition
[1155] The user types into the terminal, "What effect do certain provisions in Article 10 of this contract have in the event of cancellation or termination?"
[1156] The question is sent to the server, where natural language processing is used to tokenize it, remove stop words, and tag parts of speech.
[1157] Based on the question, the generative AI model generated the answer: "Article 10 contains specific provisions regarding the cancellation or termination of the contract, which usually stipulates the grounds for termination and the resulting obligations and compensation."
[1158] If the emotion engine recognizes emotions from the user's text and determines that the user is feeling anxious, it will adjust the tone of the response to something like, "Don't worry. Article 10 clearly sets out guidelines for cancellation or termination of the contract."
[1159] The answer is formatted and sent back to the terminal for the user to confirm.
[1160] Example 2: Claiming unpaid overtime and emotional history
[1161] The user types into the terminal, "If an employee wants to claim unpaid overtime, how many years back can they claim?"
[1162] The question is sent to the server, where natural language processing is performed to tokenize it, remove stop words, and tag parts of speech.
[1163] The generative AI model responded to the question by saying, "You can usually claim unpaid overtime wages for up to five years. However, this may vary depending on the situation."
[1164] If the emotion engine recognizes the emotion from the user's text and determines from past emotional history that the user wants more information, it will adjust the tone of the response to something like, "Don't worry. You can usually claim unpaid overtime for up to five years, but we recommend consulting a legal professional about your specific situation."
[1165] The answer is formatted and sent back to the terminal for the user to confirm.
[1166] In this way, by combining the emotion engine, the present invention can provide legal information that takes into account the user's emotional state, further improving the efficiency of corporate legal departments. In addition, the system's 24-hour response capability enables timely and flexible legal support.
[1167] The processing flow will be explained below.
[1168] Step 1:
[1169] The user types a legal question into the terminal, for example, "What are the terms of contract termination?"
[1170] Step 2:
[1171] The device sends the entered question to the server, where the data is encoded into the appropriate format.
[1172] Step 3:
[1173] The server checks the received question and begins preprocessing. First, it tokenizes the input text, which splits the sentence into words.
[1174] Step 4:
[1175] As part of the preprocessing, the server removes stop words, which are common words such as "no" and "wa" that are not necessary for content analysis.
[1176] Step 5:
[1177] The server tags the tokens with part-of-speech tags, which means that each word is tagged as a noun, verb, adjective, etc.
[1178] Step 6:
[1179] After completing preprocessing, the server inputs the question into the generative AI model, which uses training data from the Six Codes and the latest legal cases to generate an appropriate answer to the question.
[1180] Step 7:
[1181] The server receives the output from the generative AI model and generates a preliminary answer, which includes basic legal explanations.
[1182] Step 8:
[1183] The server uses an emotion engine to recognize emotions from the text of the question entered by the user. For example, it can recognize that the user is feeling "anxiety" or "doubt" based on the words and context in the sentence.
[1184] Step 9:
[1185] The server adjusts the tone of the generated response based on the perceived sentiment, for example adding friendly phrases like "Don't worry" or "We'll provide more information."
[1186] Step 10:
[1187] The server uses an emotion engine to record the user's emotion history, which is then saved as data to improve the quality of answers in the future.
[1188] Step 11:
[1189] The server then sends the post-processed response to the terminal, properly formatting the data before sending it.
[1190] Step 12:
[1191] The terminal displays the answer received from the server to the user, who can review the answer and obtain the appropriate legal information for their question.
[1192] For example, if a user asks, "Please tell me about the conditions for contract termination," the device will display a response such as, "Article 15 of the Labor Contract Act stipulates the conditions for terminating a worker's contract. Don't worry. Specifically, you are required to clearly state the reason and procedure for contract termination." This allows users to receive legally appropriate information, including emotional care.
[1193] Example 2
[1194] 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."
[1195] Conventional legal chatbot systems provide answers without considering the user's emotional state, making it difficult for users to obtain answers that are relatable to them. Furthermore, the system's inability to provide an appropriate response tone based on the user's emotional state led to problems with reduced user satisfaction. Furthermore, the accuracy of preprocessing and answer generation was insufficient, resulting in the inability to provide appropriate legal information quickly.
[1196] 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.
[1197] In this invention, the server includes means for accepting legal input data from a user, means for preprocessing the accepted input data, tokenizing the text, and removing stop words, means for inputting the preprocessed data into a generative AI model to generate legal results, means for processing the generated results with an emotion engine and adjusting the tone of the results based on the user's emotional state, means for post-processing and formatting the final adjusted results before transmitting them to a terminal, and means for the terminal to display the formatted results. This makes it possible to quickly and accurately provide user-friendly legal information that takes the user's emotions into consideration.
[1198] "User" means any person or entity that utilizes the System to enter legal questions and obtain answers.
[1199] A "terminal" refers to an information processing device such as a personal computer, smartphone, or tablet that is used by a user to access the system, input questions, and display answers.
[1200] The "server" is a computer system that receives questions sent by users, performs preprocessing, generates answers using a generative AI model, adjusts the tone using an emotion engine, performs postprocessing, and finally sends the answers to the terminal.
[1201] "Input Data" means the legal question in text form that the user types into the terminal.
[1202] "Preprocessing" refers to the initial data processing step that the server performs on input data, specifically processing that includes tokenization and removal of stop words.
[1203] "Tokenization" is the process of dividing input data into words and phrases.
[1204] "Stop word removal" is the process of removing common meaningless words from a sentence.
[1205] "Part-of-speech tagging" refers to the process of assigning a part of speech, such as a noun, verb, or adjective, to each token.
[1206] A "generative AI model" is an artificial intelligence model that generates legally relevant results based on input data. The model is trained on legal documents and recent legal cases.
[1207] An "emotion engine" is a system component that recognizes emotions from user input data and adjusts the tone of the generated response.
[1208] "Results" are legally based answers generated by a generative AI model and tone-adjusted by an emotion engine.
[1209] "Post-processing" refers to the process of formatting the generated results so that they are suitable for presentation to a user.
[1210] "Display" means providing the final answer visually to the user at the terminal.
[1211] The present invention is a legal chatbot system that combines a generative AI model and an emotion engine. The system aims to enable users to input legal questions and receive prompt and appropriate answers based on those questions. A specific embodiment of the system is described in detail below.
[1212] A user accesses the legal chatbot using a device (e.g., a PC or smartphone). The device provides an interface for inputting legal questions. For example, the user inputs a question such as, "Please tell me about the conditions for contract termination."
[1213] The question is then sent from the device to the server, which preprocesses the received question. This preprocessing includes tokenizing the question text, removing stop words, and tagging it with part-of-speech tags. Tokenization splits the text into words and phrases, stop word removal removes meaningless words, and part-of-speech tagging assigns each word a part of speech.
[1214] Once preprocessing is complete, the question is fed into a generative AI model, which generates an answer based on the appropriate law. For example, the question "What are the conditions for terminating a contract?" will generate the answer "The conditions for terminating a contract are determined by the specific clauses in the contract and the law."
[1215] The present invention further incorporates an emotion engine. The emotion engine recognizes emotions from the user's input text and adjusts the tone of the generated answer based on the recognized emotion. This adjustment allows the answer to be provided taking into consideration the user's emotional state. For example, if the emotion engine determines that the user is feeling "anxious" while inputting a question, it adjusts the tone of the answer to "Don't worry. The terms of contract cancellation are clearly defined, so please check the details."
[1216] The emotion engine also records the user's emotional history for each question, which can be used to improve the quality of future answers. For example, if a user frequently asks questions in an anxious state, future answers will use a more friendly and reassuring tone.
[1217] The post-processed answer is sent from the server to the terminal and displayed to the user, who can review the answer and obtain the appropriate legal information for their question.
[1218] Below are some examples and prompts:
[1219] Example 1: Contract verification and emotion recognition
[1220] The user types into their device, "How do the specific provisions in Article 10 of this contract affect cancellation or termination?" The question is sent to the server, where natural language processing is used to tokenize, remove stop words, and tag parts of speech. A generative AI model generates a response based on the question: "Article 10 contains specific provisions regarding cancellation or termination of the contract, which typically outline the grounds for termination and the associated obligations and compensation." If the emotion engine recognizes emotions from the user's text and determines that the user is anxious, it adjusts the tone of the response to something like, "Don't worry. Article 10 clearly outlines guidelines for cancellation or termination." The response is formatted and sent back to the device for the user to confirm.
[1221] Example 2: Claiming unpaid overtime and emotional history
[1222] The user types into the device, "If an employee wants to claim unpaid overtime, how many years back can they claim?" The question is sent to the server, where natural language processing is used to tokenize it, remove stop words, and tag parts of speech. The generative AI model generates an answer to the question: "Unpaid overtime can usually be claimed for up to five years. However, this may vary depending on the situation." The emotion engine recognizes emotions from the user's text and, if it determines from past emotion history that the user wants more information, adjusts the tone of the answer to something like, "Don't worry. Unpaid overtime can usually be claimed for up to five years, but we recommend consulting a legal professional about your specific situation." The answer is formatted and sent back to the device for the user to confirm.
[1223] In this way, by combining the emotion engine, the present invention can provide legal information that takes into account the user's emotional state, improving the efficiency of legal departments. In addition, the system's 24-hour response capability enables timely and flexible legal support.
[1224] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1225] Step 1:
[1226] The user creates the input data.
[1227] The user accesses the legal chatbot using a device and inputs a legal question. For example, the user might input, "Please tell me about the conditions for contract termination." The input data is temporarily stored on the device.
[1228] Step 2:
[1229] The terminal sends the input data to the server.
[1230] The terminal sends the question entered by the user to the server as an HTTP request. The input data is sent to the server in text format. The output of this step is the text data received by the server.
[1231] Step 3:
[1232] The server pre-processes the query.
[1233] The server performs preprocessing on the received text data. Specifically, it first tokenizes the text and splits it into words and phrases. Then it removes stop words and eliminates meaningless words. Finally, it performs part-of-speech tagging, assigning each word a part of speech, such as noun, verb, or adjective. The output of the preprocessing is text data that has been tokenized, stop words removed, and part-of-speech tagged.
[1234] Step 4:
[1235] The server generates an answer using a generative AI model.
[1236] The server inputs the preprocessed text data into a generative AI model to generate an answer based on the appropriate law. The generative AI model is trained based on legal codes and the latest legal cases. For example, in response to the question, "What are the conditions for terminating a contract?", the generated answer is, "The conditions for terminating a contract are determined based on specific clauses and laws set out in the contract." The generated answer text is the output of this step.
[1237] Step 5:
[1238] The server uses an emotion engine to adjust the tone of the response.
[1239] The server passes the generated response text along with the input data to the emotion engine to analyze the user's emotions. For example, if the emotion engine recognizes "anxiety" from the user's input text, it adjusts the tone of the response to something more friendly, such as "Don't worry. The terms of contract cancellation are clearly specified, so please check the details." The tone-adjusted response text is the output of this step.
[1240] Step 6:
[1241] The server post-processes the response and sends it to the terminal.
[1242] The server post-processes and formats the tone-adjusted answer text. The post-processed answer text is converted into HTML or JSON format and sent to the device as an HTTP response. The post-processed answer text is the output of this step.
[1243] Step 7:
[1244] The user checks the answer through the terminal.
[1245] The terminal displays the answer received from the server to the user, who can review the answer on the terminal screen and obtain legal information for their question. The output of this step is the final answer that the user reviews.
[1246] (Application example 2)
[1247] 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."
[1248] Current legal chatbot systems provide highly accurate answers to user questions, but the answers do not take into account the user's emotional state, resulting in a poor user experience. Furthermore, when providing legal advice related to security, users often ask questions while feeling anxious or nervous, and special consideration is required for these emotions. Under these circumstances, it becomes difficult for users to receive appropriate legal advice.
[1249] The identification process by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for recognizing emotions from the user's input text using an emotion engine and adjusting the tone of the generated answer based on the recognized emotion, means for tagging the question text with parts of speech as part of preprocessing, and means for the generation AI model to be a model trained based on a collection of statutes and the latest legal cases. This allows for the generation of answers that take the user's emotional state into consideration, improving the user experience.
[1250] "Means for users to input legal questions" refers to any interface that allows users to input legal questions using a terminal.
[1251] "A means of receiving an input question and tokenizing the text and removing stop words as part of preprocessing" refers to a system or algorithm that breaks down (tokenizes) the text entered by the user into smaller pieces and removes words (stop words) that are not necessary for generating an answer.
[1252] "Means of inputting preprocessed questions into a generative AI model and generating legally based answers" refers to an AI model and its implementation method for generating appropriate answers based on laws, regulations, and case studies, using preprocessed questions.
[1253] "Means for recognizing emotions from user input text and adjusting the tone of the generated response based on the recognized emotions" refers to an engine or algorithm that analyzes emotions from user input and modifies the tone or expression of the response based on the results of that analysis.
[1254] "Means for post-processing, formatting and transmitting the generated response to the device" refers to a system or algorithm that organizes the generated text data, converts it into a displayable format and transmits it to the user's device.
[1255] "Means for the terminal to display the formatted answer" refers to an interface or application function on the user's terminal for visually displaying the received answer.
[1256] An "emotion engine" refers to software or hardware functionality that analyzes and recognizes a user's emotions from input text and adjusts responses based on the results.
[1257] "Statutes and Current Legal Cases" refers to an information resource that compiles the laws and regulations in force in a jurisdiction, as well as the latest legal precedents and cases.
[1258] This invention combines a legal chatbot system that utilizes a generative AI model with an emotion engine, and details a specific embodiment that allows users to input legal questions and receive quick and appropriate answers based on those questions.
[1259] System configuration
[1260] The system mainly consists of the following components:
[1261] 1. User device: The device through which the user enters the question, including a smartphone or computer.
[1262] 2. Server: The central location that processes questions, generates AI, analyzes sentiment, adjusts the tone of the answers, and sends them.
[1263] Program processing
[1264] Hardware and Software Configuration
[1265] Natural language processing libraries: spaCy and NLTK for tokenizing question text, removing stop words, and tagging parts of speech.
[1266] Generative AI model: Uses OpenAI's API to generate answers to questions.
[1267] Sentiment Analysis Engine: Analyzes sentiment from user input text using sentiment analysis tools such as VADER and TextBlob.
[1268] Answer generation and tone adjustment: Proprietary algorithms for adjusting the tone of answers based on sentiment analysis.
[1269] Operating Procedure
[1270] 1. A user accesses the legal chatbot using a device:
[1271] Users use a smartphone or computer interface to enter a legal question, such as "Is it illegal for police to enter my house without a search warrant?"
[1272] 2. The server receives the query and preprocesses it:
[1273] The entered question is sent to the server, where it is tokenized, stopwords are removed, and parts of speech are tagged as preprocessing steps for natural language processing.
[1274] 3. The generative AI model generates an answer based on the question:
[1275] Once preprocessed, the question is fed into a generative AI model that generates an answer based on the appropriate law, leveraging OpenAI's API.
[1276] 4. Sentiment analysis and tone adjustment:
[1277] The emotion engine recognizes emotions from the user's input text and adjusts the tone of the generated response. For example, if the user is feeling anxious, the tone of the response will be adjusted to "Don't worry."
[1278] 5. Post-processing and sending of responses:
[1279] The generated answer is formatted and sent from the server to the user's device.
[1280] 6. The terminal will display the formatted answer:
[1281] The answer is sent back to the user's terminal and displayed visually.
[1282] Examples and prompts
[1283] Examples:
[1284] A user asks, "Is it illegal for police to enter my home without a search warrant?"
[1285] The server receives and processes the query.
[1286] The emotion engine recognizes that the user is feeling anxious and adjusts the tone to say, "Don't worry."
[1287] The answer that appears on the user's device is, "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergencies."
[1288] Example prompt sentence:
[1289] Enter: Is it illegal for police to enter my home without a search warrant?
[1290] Emotion: fear
[1291] Generated Answer: Searching a home without a search warrant is generally illegal, but exceptions may apply in emergency situations.
[1292] Adjusted answer: Don't worry. Searching a home without a search warrant is generally illegal, but exceptions may apply in emergency situations.
[1293] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1294] Step 1:
[1295] A user accesses the legal chatbot using a device and inputs a legal question in the form of natural language text, such as "Is it illegal for the police to enter my home without a search warrant?"
[1296] Step 2:
[1297] The server receives the input question. This input text is tokenized using a natural language processing (NLP) library (e.g., spaCy or NLTK) and stop words are removed. The input text is split into words, such as "search warrant," "house," "police," and "illegal," and unnecessary words are removed.
[1298] Step 3:
[1299] The server performs part-of-speech tagging on the preprocessed question text. An NLP library is used to assign part-of-speech tags (e.g., noun, verb, etc.) to each token. This results in tokens being tagged as "search warrant / noun," "house / noun," "police / noun," and "illegal / adjective."
[1300] Step 4:
[1301] The server inputs the preprocessed question into a generative AI model (e.g., OpenAI's API) to generate an appropriate legal answer. Based on the tokenized and tagged question, the generative AI model generates the answer, "In principle, searches without a search warrant are illegal, but exceptions may apply in emergency situations."
[1302] Step 5:
[1303] The server analyzes the generated answer using an emotion engine (e.g., VADER or TextBlob) to determine the user's emotional state from the input text and recognizes that the user is feeling anxious. Based on this emotion, the tone of the answer is adjusted. For example, the answer is adjusted by adding "Don't worry." The adjusted answer generated is "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergency situations."
[1304] Step 6:
[1305] The server then post-processes and formats the tailored response before sending it to the device, which includes grammar checking and text formatting.
[1306] Step 7:
[1307] The device receives and displays the formatted response. The user can see the formatted response on the device screen: "Don't worry. Searches without a search warrant are generally illegal, but exceptions may apply in emergency situations."
[1308] 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.
[1309] 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.
[1310] 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.
[1311] 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.
[1312] FIG. 9 illustrates an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and behaviors arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.
[1313] 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.
[1314] 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).
[1315] 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.
[1316] 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."
[1317] 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.
[1318] 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).
[1319] 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.
[1320] 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.
[1321] 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.
[1322] 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.
[1323] 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.
[1324] 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.
[1325] 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.
[1326] 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.
[1327] 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.
[1328] 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.
[1329] The following is further disclosed regarding the above embodiment.
[1330] (Claim 1)
[1331] a means for a user to input a legal question;
[1332] a means for receiving an input question and tokenizing the text and removing stop words as part of preprocessing;
[1333] a means for inputting the preprocessed questions into a generative AI model to generate legally based answers;
[1334] means for post-processing and formatting the generated answers before transmitting them to the terminal;
[1335] a means for the terminal to display the formatted response;
[1336] A system including:
[1337] (Claim 2)
[1338] 10. The system of claim 1, further comprising means for tagging the question text with parts of speech as part of the preprocessing.
[1339] (Claim 3)
[1340] The system of claim 1, wherein the generative AI model is a model trained based on the Six Laws Collection and the latest legal cases.
[1341] "Example 1"
[1342] (Claim 1)
[1343] a means for a user to input a legal question;
[1344] a means for receiving an input question and tokenizing the text and removing stop words as part of preprocessing;
[1345] a means for inputting the preprocessed questions into a generative AI model to generate legally based answers;
[1346] A means for post-processing the generated answers to remove unnecessary line breaks and spaces, check for terminology, format them, and send them to the terminal;
[1347] a means for the terminal to display the formatted response;
[1348] A system including:
[1349] (Claim 2)
[1350] 10. The system of claim 1, further comprising means for tagging the question text with parts of speech as part of the preprocessing.
[1351] (Claim 3)
[1352] The system of claim 1, wherein the generative AI model is a model trained based on laws and regulations and the latest legal cases.
[1353] "Application Example 1"
[1354] (Claim 1)
[1355] a means for a user to input a legal question;
[1356] A means of receiving an input question and tokenizing the text to remove common words as part of preprocessing;
[1357] a means for inputting the preprocessed questions into a generative AI model to generate legally based answers;
[1358] means for post-processing and formatting the generated answers before transmitting them to the terminal;
[1359] a means for the terminal to display the formatted response;
[1360] means for providing prompt legal advice in security-related situations, with voice input and speech recognition capabilities;
[1361] A system including:
[1362] (Claim 2)
[1363] 10. The system of claim 1, further comprising means for tagging the question text with parts of speech as part of the preprocessing.
[1364] (Claim 3)
[1365] The system of claim 1, wherein the generative AI model is a model trained based on laws and regulations and the latest legal cases.
[1366] "Example 2: Combining Emotion Engines"
[1367] (Claim 1)
[1368] means for accepting legal input data from a user;
[1369] means for preprocessing the received input data to tokenize the text and remove stop words;
[1370] a means for inputting the pre-processed data into a generative AI model to generate a law-based outcome; and
[1371] means for processing the generated results with an emotion engine and adjusting the tone of the results based on the user's emotional state;
[1372] means for post-processing and formatting the final adjusted result and transmitting it to the terminal;
[1373] means for the terminal to display the formatted results;
[1374] A system including:
[1375] (Claim 2)
[1376] 10. The system of claim 1, further comprising means for tagging the input data with parts of speech as part of the preprocessing.
[1377] (Claim 3)
[1378] 2. The system of claim 1, wherein the generative AI model is a model trained on legal codes and recent legal cases.
[1379] "Application example 2 when combining emotion engines"
[1380] (Claim 1)
[1381] a means for a user to input a legal question;
[1382] a means for receiving an input question and tokenizing the text and removing stop words as part of preprocessing;
[1383] a means for inputting the preprocessed questions into a generative AI model to generate legally based answers;
[1384] means for recognizing sentiment from the user's input text and adjusting the tone of the generated response based on the recognized sentiment;
[1385] means for post-processing and formatting the generated answers before transmitting them to the terminal;
[1386] a means for the terminal to display the formatted response;
[1387] A system including:
[1388] (Claim 2)
[1389] 10. The system of claim 1, further comprising means for tagging the question text with parts of speech as part of the preprocessing.
[1390] (Claim 3)
[1391] 2. The system of claim 1, wherein the generative AI model is a model trained based on a collection of statutes and the latest legal cases. [Explanation of symbols]
[1392] 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 a user to input a legal question; a means for receiving an input question and tokenizing the text and removing stop words as part of preprocessing; a means for inputting the preprocessed questions into a generative AI model to generate legally based answers; means for post-processing and formatting the generated answers before transmitting them to the terminal; a means for the terminal to display the formatted response; A system including:
2. 10. The system of claim 1, further comprising means for tagging the question text with parts of speech as part of the preprocessing.
3. The system of claim 1, wherein the generative AI model is a model trained based on the Six Codes of Law and the latest legal cases.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A