Systems, Computer Devices and Methods
The system addresses the issue of incomplete user queries in natural language processing by adding necessary information to generate prompts for large language models, resulting in more accurate and relevant answers.
Patent Information
- Application Number
- JP2024071943
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2025-05-07
- Estimated Expiration
- 2044-04-25
AI Technical Summary
Existing natural language processing systems using large language models often fail to provide appropriate answers due to missing information in user queries, leading to inaccurate or irrelevant responses.
A system that determines whether a user query contains predetermined information and, if not, adds the necessary information to generate a prompt for the language model, thereby improving answer accuracy and relevance.
The system enhances answer accuracy by ensuring that prompts are complete and relevant, leading to more effective natural language processing and improved user experience.
Smart Images

Figure 0007672024000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a system, a computer device and a method. [Background technology]
[0002] In recent years, systems have been provided that use large-scale language models (LLMs) to perform natural language processing tasks such as question answering, text summarization, and text generation. An LLM is a natural language processing model trained using a large amount of text data. When using an LLM in a question answering system, text is input into the LLM, and the LLM outputs an answer. The text input into the LLM is called a prompt. By using an LLM, users can easily obtain answers. However, depending on the content of the prompt, the LLM may not provide an appropriate answer.
[0003] For example, Patent Document 1 discloses an information processing device that enables answers to questions to be made with improved accuracy. The information processing device described in Patent Document 1 includes a processing unit that selects a database corresponding to an input question from among a plurality of databases each storing different types of data, based on the content of the question, generates a prompt to be input to a language model, based on the selected database and the question, and generates an answer based on the prompt and the language model. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent No. 7441366 Summary of the Invention [Problem to be solved by the invention]
[0005] The present invention can solve, for example, any one of the following problems.
[0006] A first object of the present invention is to provide a system that generates a prompt by adding specified information when the specified information is not included in an input question. A second object of the present invention is to provide a system that can identify appropriate advertising information. A third object of the present invention is to provide a system that can provide an answer with improved accuracy. A fourth object of the present invention is to provide a system that can provide new suggestions to a user. A fifth object of the present invention is to provide a system that can determine whether an answer is appropriate as an answer to an input question. [Means for solving the problem]
[0007] The object of the present invention is to [1] A system including at least one computer device, the system including: a determination means for determining whether a question input from a user terminal includes predetermined information; and a first generation means for, when it is determined that the input question does not include the predetermined information, adding the predetermined information to the question and generating a prompt to be input to the language model; [2] The system according to [1], wherein the determination means determines whether the input question contains predetermined information by comparing the input question with a standard question phrase; [3] The system according to [1] or [2], wherein the input question is a request for a recommended action, and the predetermined information is information regarding a purpose to be achieved or a feeling to be obtained by performing the recommended action, or information regarding a situation or condition when the recommended action is performed; [4] The system according to [3], further comprising: a request means for requesting a user terminal to input information regarding the purpose or the emotion, or the situation or the condition, when the determination means determines that the input question does not include, as predetermined information, information regarding the purpose or the emotion, or information regarding the situation or the condition; and a first generation means for generating a prompt to be input to the language model based on the question and the acquired information regarding the purpose or the emotion, or the situation or the condition, input from the user terminal; [5] A method executed in at least one computer device, the method comprising: a determination step of determining whether or not a question input from a user terminal includes predetermined information; and a first generation step of, when it is determined that the input question does not include the predetermined information, adding the predetermined information to the question and generating a prompt for input to the language model; [6] A computer device comprising: a determination means for determining whether or not a question input from a user terminal contains predetermined information; and a first generation means for, when it is determined that the input question does not contain the predetermined information, adding the predetermined information to the question and generating a prompt to be input to the language model; [7] A system including at least one computer device, the system including an acquisition means for acquiring, from a database in which advertising information related to advertisements is stored, advertising information similar to an answer acquired by inputting a prompt into a language model; [8] The system according to [7], wherein the acquisition means acquires a plurality of pieces of advertising information, and the system includes a selection means for selecting, from the acquired plurality of pieces of advertising information, one or more pieces of advertising information that are similar to a prompt or a question input from a user terminal to generate a prompt; [9] The system according to [8] or [9], further comprising: a calculation execution means for executing a vector calculation on an answer obtained by inputting a prompt into a language model; and an acquisition means for acquiring advertising information, the advertising information being such that a value obtained by executing the vector calculation on the advertising information is close to a value obtained by the vector calculation from the answer;
[10] A system including at least one computer device, the system including an acquisition means for acquiring, from a database in which advertising information related to advertisements is stored, advertising information similar to a prompt or a question input from a user terminal to generate a prompt for input to a language model;
[11] The system according to
[10] , wherein the acquisition means acquires a plurality of pieces of advertising information, and the system further comprises a selection means for selecting, from the acquired plurality of pieces of advertising information, one or more pieces of advertising information that are similar to an answer acquired by inputting the prompt into a language model;
[12] The system according to
[10] or
[11] , further comprising: a calculation execution means for executing a vector calculation on a question input from a user terminal to generate a prompt, or information on the question; and an acquisition means for acquiring advertising information, the advertising information being such that a value obtained by executing the vector calculation on the advertising information is approximate to a value obtained by the vector calculation from the question or information on the question;
[13] A method, executed on at least one computer device, comprising: acquiring, from a database in which advertising information relating to an advertisement is stored, advertising information similar to an answer acquired by inputting a prompt into a language model;
[14] A method executed on at least one computer device, comprising: acquiring, from a database in which advertising information relating to advertisements is stored, advertising information similar to a prompt or a question input from a user terminal for generating a prompt for input into a language model;
[15] A computer device comprising: an acquisition means for acquiring, from a database in which advertising information relating to advertisements is stored, a plurality of pieces of advertising information similar to an answer acquired by inputting a prompt into a language model;
[16] A computer device comprising: an acquisition means for acquiring, from a database in which advertising information relating to advertisements is stored, a plurality of pieces of advertising information similar to a prompt for input to a language model or a question input from a user terminal to generate a prompt;
[17] A system having at least one computer device, the system comprising: an answer acquisition means for acquiring an answer from a language model based on a prompt; an acquisition means for acquiring or generating information about a facility or area from a database that stores information about the facility or area when the prompt to be input to the language model includes facility preference information requesting a recommendation of a facility or area; and an answer editing means for editing the answer acquired from the language model based on the information acquired or generated by the acquisition means;
[18] A system having at least one computer device, comprising: an answer acquisition means for acquiring an answer from a language model based on a prompt; an acquisition means for acquiring or generating information on a facility or area corresponding to the answer from a database storing information on the facility or area when the answer acquired from the language model includes information on the facility or area; and an answer editing means for editing the answer acquired from the language model based on the information acquired or generated by the acquisition means;
[19] The system according to
[17] or
[18] , further comprising: an operation execution means for executing a vector operation on a prompt or an answer obtained by inputting the prompt into a language model; and an acquisition means for acquiring information on a facility or area, the information on the facility or area being such that a value obtained by executing the vector operation on the information on the facility or area is close to a value obtained by the vector operation from the prompt or the answer;
[20] A method executed on at least one computer device, the method comprising: an answer acquisition step of acquiring an answer from a language model based on a prompt; an acquisition step of acquiring or generating information about a facility or area from a database that stores information about the facility or area when the prompt to be input to the language model includes facility preference information requesting a recommendation of a facility or area; and an answer editing step of editing the answer acquired from the language model based on the information acquired or generated in the acquisition step;
[21] A method executed on at least one computer device, comprising: an answer acquisition step of acquiring an answer from a language model based on a prompt; an acquisition step of acquiring or generating information on a facility or area corresponding to the answer from a database that stores information on the facility or area when the answer acquired from the language model includes information on the facility or area; and an answer editing step of editing the answer acquired from the language model based on the information acquired or generated in the acquisition step;
[22] A computer device comprising: an answer acquisition means for acquiring an answer from a language model based on a prompt; an acquisition means for acquiring or generating information related to a facility or area from a database that stores information related to the facility or area when the prompt to be input to the language model includes facility preference information requesting a recommendation of a facility or area; and an answer editing means for editing the answer acquired from the language model based on the information acquired or generated by the acquisition means;
[23] A computer device comprising: an answer acquisition means for acquiring an answer from a language model based on a prompt; an acquisition means for acquiring or generating information on a facility or area corresponding to the answer from a database that stores information on the facility or area when the answer acquired from the language model includes information on the facility or area; and an answer editing means for editing the answer acquired from the language model based on the information acquired or generated by the acquisition means;
[24] A system having at least one computer device, comprising: an answer acquisition means for acquiring an answer from a language model based on a prompt; a proposal generation means for generating proposal information corresponding to the answer when the answer acquired from the language model includes action information that triggers generation of proposal information suggesting an action of a user; and an answer editing means for editing the answer acquired from the language model based on the proposal information generated by the proposal generation means;
[25] A method executed in at least one computer device, comprising: an answer obtaining step of obtaining an answer from a language model based on a prompt; a proposal generating step of generating proposal information corresponding to the answer when the answer obtained from the language model includes action information that triggers generation of proposal information suggesting an action of a user; and an answer editing step of editing the answer obtained from the language model based on the proposal information generated in the proposal generating step;
[26] A computer device comprising: an answer acquisition means for acquiring an answer from a language model based on a prompt; a proposal generation means for generating proposal information corresponding to the answer when the answer acquired from the language model includes action information that triggers generation of proposal information suggesting an action to be taken by a user; and an answer editing means for editing the answer acquired from the language model based on the proposal information generated by the proposal generation means;
[27] A system including at least one computer device, the system including a determination means for determining whether an answer obtained by inputting a prompt into a language model is appropriate as an answer to a question corresponding to the prompt, based on an example prompt and an example answer corresponding to the example prompt;
[28] The system according to
[26] , wherein the determination means determines that the answer is appropriate as an answer to the question corresponding to the prompt when the prompt includes facility preference information requesting a recommendation of a facility or area and the answer includes information about a facility or area;
[29] The system according to
[27] or
[28] , further comprising an operation execution means for executing vector operations on the prompt and the answer obtained by inputting the prompt into a language model, and the determination means determines that the answer is appropriate as an answer to the question corresponding to the prompt when a value obtained by vector operation of the prompt is approximated to a value obtained by vector operation of the answer, or when a value obtained by vector operation of an example answer corresponding to the example prompt is approximate to a value obtained by vector operation of the answer;
[30] A method executed on at least one computer device, comprising a determining step of determining whether an answer obtained by inputting a prompt into a language model is appropriate as an answer to a question corresponding to the prompt, based on an example prompt and an example answer corresponding to the example prompt;
[31] A computer device including a determination means for determining whether an answer obtained by inputting a prompt into a language model is appropriate as an answer to a question corresponding to the prompt, based on an example prompt and an example answer corresponding to the example prompt; This can be solved by: Effect of the Invention
[0008] According to the present invention, it is possible to provide a system that generates a prompt by adding specified information when specified information is not included in an input question. According to the present invention, it is possible to provide a system that can identify appropriate advertising information. According to the present invention, it is possible to provide a system that can provide an answer with improved accuracy. According to the present invention, it is possible to provide a system that can provide new suggestions to a user. According to the present invention, it is possible to provide a system that can determine whether an answer is appropriate as an answer to an input question. [Brief description of the drawings]
[0009] [Figure 1] 1 is a block diagram showing a configuration of a system according to an embodiment of the present invention; [Diagram 2] 2 is a block diagram showing a hardware configuration of a user terminal according to an embodiment of the present invention; FIG. [Diagram 3] FIG. 2 is a block diagram showing a hardware configuration of a server device according to an embodiment of the present invention. [Figure 4] FIG. 11 is a flowchart showing an output process according to the embodiment of the present invention. [Diagram 5] FIG. 11 is a flowchart showing a question completion process according to an embodiment of the present invention. [Figure 6] FIG. 11 is a flowchart showing a confirmation information output process according to the embodiment of the present invention. [Figure 7] FIG. 11 is a flowchart showing a response acquisition process according to an embodiment of the present invention. [Figure 8] FIG. 11 is a flowchart showing an answer determination process according to an embodiment of the present invention. [Figure 9] FIG. 11 is a flowchart showing an answer complementing process according to an embodiment of the present invention. [Figure 10] FIG. 11 is a flowchart showing an advertisement specification process according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] The following describes an embodiment of the present invention, but the present invention is not limited to the following embodiment, as long as it does not go against the spirit of the present invention. The order of each process constituting the flowchart described below is random as long as there is no contradiction or inconsistency in the process content, and it is also possible to omit a part of each process constituting the flowchart or add a new process to each process constituting the flowchart, as long as there is no contradiction or inconsistency in the process content. In addition, the device that executes each process constituting the flowchart can be changed to another device, as long as it does not go against the spirit of the present invention. In that case, the process content can be changed so that there is no contradiction or inconsistency in the process content.
[0011] The system of the present invention is a system that provides information to a user that supports the user's actions. In this embodiment, the user's actions are actions performed by the user for a specific purpose, and the user's actions may involve movement or may not involve movement. The purpose of the actions is not particularly limited, but may include, for example, travel, business trips, going out, sightseeing, exercise, walking, shopping, resting, and evacuation. Furthermore, the information that supports the user's actions may be information that corresponds to the purpose of the user's actions, information about means for achieving the purpose of the user's actions, or information derived from the purpose of the user's actions.
[0012] [System configuration] FIG. 1 is a block diagram showing a configuration of an information processing system according to an embodiment of the present invention. The system 10 includes at least one computer device. The system 10 includes, for example, a user terminal 1 and a server device 2. The system 10 may include a language model server 3 and an administrator terminal 4. The user terminal 1, the server device 2, the language model server 3, and the administrator terminal 4 are communicably connected to each other via a communication network 5. In the system 10, any of the user terminal 1, the server device 2, and the language model server 3 can function as an information processing device. When any of the devices functions as an information processing device, transmission and reception of information is performed between the user terminal 1, the server device 2, and the language model server 3 as necessary.
[0013] The system 10 may include a plurality of user terminals 1, a plurality of server devices 2, and a plurality of administrator terminals 4. The server device 2 may function in a distributed manner across a plurality of computer devices. For example, instead of the server device 2, a distributed ledger technology such as a blockchain may be used.
[0014] [User device] The user terminal 1 is operated by a user of the system 10. The user operates the user terminal 1 to input a predetermined question to the system 10. The user terminal 1 is not particularly limited, but examples of the user terminal 1 include a conventional mobile phone, a tablet terminal, a smartphone, a notebook computer, a desktop computer, and the like.
[0015] 2 is a block diagram showing a hardware configuration of a user terminal according to an embodiment of the present invention. The user terminal 1 includes a control unit 11, a RAM 12, a storage unit 13, an input unit 14, a display unit 15, and a communication interface 16, which are connected to each other via a bus. The user terminal 1 may also include a GPS receiving unit.
[0016] The control unit 11 is composed of a CPU and a ROM. The control unit 11 executes programs stored in the storage unit 13 and controls the user terminal 1. The RAM 12 is a work area for the control unit 11. The storage unit 13 is a storage area for saving programs and data. In other words, the storage unit 13 functions as a recording medium that stores programs. The control unit 11 performs arithmetic processing based on the programs and data read from the RAM 12 and the data inputted by the input unit 14.
[0017] The display unit 15 has a display screen. The control unit 11 outputs a video signal for displaying an image on the display screen according to the result of the arithmetic processing. Here, the display screen of the display unit 15 may be a touch panel equipped with a touch sensor. In this case, the touch panel functions as the input unit 14. The GPS receiver receives a GPS signal and identifies the position of the user terminal 1. The communication interface 16 can be connected to the communication network 5 wirelessly or via a wire, and can transmit and receive data to and from other computer devices via the communication network 5. The data received via the communication interface 16 is loaded into the RAM 12, and the control unit 11 performs arithmetic processing.
[0018] [Server device] 3 is a block diagram showing a hardware configuration of a server device according to an embodiment of the present invention. The server device 2 includes at least a control unit 21, a RAM 22, a storage unit 23, and a communication interface 24, which are connected to each other via an internal bus.
[0019] The control unit 21 is composed of a CPU and a ROM, and executes programs stored in the storage unit 23 to control the server device 2. The control unit 21 also has an internal timer that measures time. The RAM 22 is the work area of the control unit 21. The storage unit 23 is a storage area for saving programs and data. In other words, the storage unit 23 functions as a recording medium that stores programs. The control unit 21 reads out the programs and data from the RAM 22, and performs program execution processing based on information received from the user terminal 1, etc.
[0020] The server device 2 generates a prompt to be input to the language model server 3 based on the question input from the user terminal 1. The server device 2 edits the answer based on the answer output from the language model server 3. The server device 2 also acquires advertisement information related to the advertisement based on the answer output from the language model server 3. The server device 2 stores various databases (DB) for executing these processes in the storage unit 23. The contents of each process and the various DBs will be described later.
[0021] [Language model server] The language model server 3 is a computer device in which a language model for processing natural language is stored. The hardware configuration of the language model server 3 may be appropriately adapted from the description of the hardware configuration of the server device 2. In this embodiment, the language model used is the LLM, but a language model other than the LLM may be used as long as it can process natural language.
[0022] The server device 2 may store a language model. When a language model is stored in the server device 2, the system 10 may not include the language model server 3. Alternatively, a small-scale language model smaller in scale than the LLM may be stored in the server device 2, and the LLM may be stored in the language model server 3. The small-scale language model is a natural language processing model trained based on less data than the LLM.
[0023] [Administrator terminal] The administrator terminal 4 is operated by an administrator who manages the system 10. The administrator terminal 4 is not particularly limited, but examples thereof include conventional mobile phones, tablet terminals, smartphones, notebook computers, and desktop computers. The hardware configuration of the administrator terminal 4 can be appropriately adapted from the description of the hardware configuration of the user terminal 1.
[0024] In this embodiment, the program may be stored in a recording medium such as a CD-ROM. In this case, the program stored in the recording medium may be installed in the user terminal 1 or the server device 2 to execute the predetermined function. Alternatively, the program may be distributed from a computer device outside the system. In this case, the program distributed from a computer device outside the system may be installed in the user terminal 1 or the server device 2 to execute the predetermined function.
[0025] [Output processing] The output process of the system 10 according to the present embodiment will be described. Fig. 4 is a diagram showing a flowchart of the output process according to the embodiment of the present invention. Details of each process included in the flowchart will be described later.
[0026] First, the user logs in to the system 10 by accessing the server device 2 from the user terminal 1 via a web browser. Alternatively, the user may log in to the system 10 by starting an application program (hereinafter, referred to as a dedicated app) downloaded to the user terminal 1 and accessing the server device 2. When logging in to the system 10, the user may be required to input pre-registered user identification information (also referred to as a user ID) or an email address, and a password.
[0027] When a user logs in to the system 10, the user inputs a question by operating the user terminal 1. The server device 2 accepts input of question information related to the question (step S100).
[0028] A question is input in natural language (text). Question information is text information related to a sentence, and includes letters, symbols, or numbers. A user can input a question using a keyboard, a mouse, a touch panel, a voice input device, or the like. The content of the question is not particularly limited, but the question may be, for example, a request for a recommended action. For example, the question may be, "I would like to know where I can spend time before leaving," or "An earthquake occurred while I was out. What should I do?"
[0029] Next, the server device 2 generates one or more partial prompts from the question information (step S120). The partial prompts are generated by breaking down the question information. A known method can be used for the process of generating the partial prompts. For example, the partial prompts may be generated such that one matter is included in one sentence. The partial prompts can be considered to be part of a question.
[0030] Each partial prompt may be used as a prompt. In this embodiment, a prompt is text information to be input to a language model. The system 10 may collect a plurality of partial prompts and input them as one prompt to the language model. An answer is obtained by inputting the prompt to the language model.
[0031] For example, if the sentence "Please tell me recommended places in Tokyo before I board the Shinkansen at 11 o'clock," is input as question information, in step S120, the server device 2 generates a partial prompt "I will board the Shinkansen at 11 o'clock," and a partial prompt "Please tell me recommended places in Tokyo."
[0032] Next, the server device 2 determines whether or not the question input from the user terminal 1 in step S100 includes predetermined information. If the question does not include the predetermined information and there is missing information (also called missing elements), a question completion process is executed to complete the missing elements and generate a partial prompt (step S140). In step S140, a partial prompt may be generated regardless of whether or not there are missing elements. In step S140, at least one partial prompt is generated.
[0033] For example, in step S140, the partial prompt "What places would you recommend in Tokyo?" is changed to "What places would you recommend in Tokyo for sightseeing?" Also, in step S140, partial prompts such as "The questioner is currently in Shibuya," "The questioner is male," and "The questioner's hobby is visiting museums" are generated.
[0034] When a partial prompt in which missing elements are complemented is generated in step S140, the server device 2 generates a prompt for input to the language model (step S160). In the system 10, a plurality of partial prompts are generated before the process of step S160. In step S160, the server device 2 generates one prompt by combining the plurality of partial prompts generated in steps S120, S146, S148, and / or S149. In other words, when it is determined that the input question does not contain predetermined information, the system 10 can add the predetermined information to the question and generate a prompt for input to the language model.
[0035] For example, if partial prompts such as "I will be taking the Shinkansen at Shinagawa Station at 11 o'clock," "Can you recommend some places in Tokyo for sightseeing?", "The questioner is a man," and "The questioner's hobby is visiting museums" are generated, the following prompts are generated in step S160. "What are some recommended places to visit in Tokyo? Please use the information below as a reference when answering. I'm going to board the Shinkansen at Shinagawa Station at 11:00. The questioner is currently in Shibuya. The questioner is male. His hobby is visiting museums.
[0036] Next, an answer acquisition process is executed to acquire an answer based on the prompt generated in step S160 (step S180). For example, when step S180 is executed for the above prompt, the following answer is obtained: The facility information included in the answer is information about an actually existing facility. "We will introduce some recommended sightseeing spots in Tokyo. Before boarding the Shinkansen from Shinagawa Station, you can enjoy places that are close to Shibuya and suit your tastes. A Art Museum: It has a wide range of exhibits from modern art to contemporary art. Museum B: Located in Ueno, this is a wonderful museum where you can experience Japanese history and culture. C Museum: A museum where you can learn about Tokyo's history and culture from the Edo period to the present day. I chose these museums to coincide with my hobby of visiting museums."
[0037] Next, an answer determination process is executed (step S200) to determine whether the answer acquired in step S180 is appropriate as an answer to the question corresponding to the prompt generated in step S160. If the answer is appropriate, an answer complement process is executed (step S220) to complement the answer acquired in step S180.
[0038] For example, the above answer is determined to be appropriate for the question "Please tell me some recommended places in Tokyo until I can catch the Shinkansen at 11 o'clock." Furthermore, when the answer is complemented in step S220, the following sentence is obtained. "We will introduce some recommended sightseeing spots in Tokyo. Before boarding the Shinkansen from Shinagawa Station, you can enjoy places that are close to Shibuya and suit your tastes. A Art Museum: It has a wide range of exhibits from modern art to contemporary art. From Shibuya, it takes about 20 minutes by train, and about 30 minutes to Shinagawa. The total travel time is 1 hour. For transfer information, please see the following website. https…. Would you like to schedule Museum A from 10:00 to 11:00? Museum B: A wonderful museum where you can experience Japanese history and culture. From Shibuya, it takes about 25 minutes by train, and about 45 minutes to Shinagawa. The required time is 45 minutes. For transfer information, please see the following website. https....However, X station seems to be crowded. B Museum reservation tickets can be obtained from https: / / www.bmuseum.jp / . I chose these museums to coincide with my hobby of visiting museums. I also took into consideration the travel time from Shibuya to Shinagawa, so you can enjoy both sightseeing and travel. In addition, "Would you like to schedule Museum A from 10:00 to 11:00?" and "You can obtain reservation tickets for Museum B from the following website: https...." correspond to the action suggestion information described below.
[0039] In addition, an advertisement identification process is executed to identify advertisement information based on the question information entered in step S100 or the prompt generated in step S160, and / or the answer acquired in step S180 or the answer complemented in step S220 (step S240).
[0040] For example, in response to the question "What are some recommended places in Tokyo where I can go before boarding the Shinkansen at 11 o'clock?", the following advertisement specification is specified for the answer supplemented in step S220. "D Coffee Shop: It has a relaxed and comfortable atmosphere. For more information, please visit: https...." "F Memorial Park: You can see buildings that recreate the streets of the Edo period. Opening hours are 9:00-16:00. For details, please see the following website: https...."
[0041] The answer complemented in step S220 and the advertising information identified in step S240 are output to the user terminal 1 (step S260). The output process is completed by the above steps S100 to S260.
[0042] In step S260, the display mode in which the answer and the advertisement information are output on the user terminal 1 is not particularly limited. For example, the answer is output in a chat format. The answer may be displayed as one response or as multiple responses. When multiple responses are displayed, for example, the answer generated based on the answer output from the language model, facility information about the facility or area information about the area, proposal information about the proposal, and advertisement information may each be displayed in a different speech bubble.
[0043] [Question completion processing] The question completion process in step S140 will now be described with reference to Fig. 5, which is a flowchart showing the question completion process according to the embodiment of the present invention.
[0044] First, the server device 2 determines whether or not the question input from the user terminal 1 includes predetermined information (step S141). If the question does not include the predetermined information, when the question is input as a prompt to the language model, a desired answer cannot be obtained, or there is a high possibility that the desired answer cannot be obtained. In this embodiment, the predetermined information that is not included in the question is also referred to as a missing element. That is, in step S141, the server device 2 determines whether or not there is a missing element in the question information.
[0045] Here, the "predetermined information" is information required to answer or appropriately answer a question input from the user terminal 1. The "predetermined information" includes at least "command information" related to commands, and may further include "context information" related to context. The "predetermined information" may also include location information related to the user's location. The "predetermined information" may be a specified word or a specified phrase.
[0046] An instruction specifies whether a question requires a "when," "where," "who," "what," "why," or "how" answer. Instruction information specifies whether a question requires a "when," "where," "who," "what," "why," or "how" answer.
[0047] Context information is information necessary to obtain an appropriate answer from a question, and is information about the user's purpose for obtaining an appropriate answer, the purpose the user wants to achieve by obtaining the answer, the feelings the user wants to have by obtaining the answer, or the circumstances or conditions that are prerequisites for obtaining an appropriate answer. If the question requests an answer about an action to be recommended to the user, the context information is information about the purpose to be achieved or the feelings to be obtained by performing the recommended action, or the circumstances or conditions when performing the recommended action. Context information may also be information about time or location.
[0048] Purpose has the same meaning as the purpose of the above action, for example, sightseeing, exercise, walking, etc. Emotion is the user's subjective feeling, for example, excitement, nervousness, surprise, happiness, etc. Circumstances are how many people are going out, what kind of users' attributes are (for example, whether there are elderly people or young children), weather, temperature, etc. Conditions are, for example, what means of transportation will be used, where the departure and arrival points are, time constraints, cost constraints, etc.
[0049] In step S141, the server device 2 compares the input question with a standard phrase for a question to determine whether or not the input question contains predetermined information. More specifically, the server device 2 compares the question information received in step S100 or the partial prompt generated in step S120 with the standard phrases stored in the prompt definition DB to determine whether or not the input question contains predetermined information.
[0050] The prompt definition DB stores a fixed phrase in which predetermined information is defined as a prompt or partial prompt. In addition, the fixed phrase is associated with whether the predetermined information is command information, context information, or position information.
[0051] For example, the process of step S141 will be described in the case where only "Todaiji Temple" or only "What is Todaiji Temple?" is input as the question in step S100.
[0052] The server device 2 identifies a fixed phrase from the prompt definition DB. For example, the server device 2 identifies fixed phrases such as "How do I get to XX?", "Please tell me how many minutes it takes to get to XX", "Where is XX?", "What is XX?", "Who built XX?", etc. Note that XX corresponds to a word representing a place, location, facility, or region. The server device 2 compares the identified fixed phrase with the question information or partial prompt.
[0053] If the input question is "Todaiji Temple", the server device 2 determines that the predetermined information is not included. If the input question is "What is Todaiji Temple?", the server device 2 determines that the predetermined information is included.
[0054] The method of determining whether or not the predetermined information is included is not particularly limited. For example, the server device 2 may determine whether or not the predetermined information is included based on the similarity between the question information or the partial prompt and the fixed phrase. The similarity can be calculated, for example, by using a vector calculation described later. If the similarity is equal to or greater than a predetermined threshold or within a predetermined threshold range, the server device 2 can determine that the predetermined information is included. The server device 2 may also perform the vector calculation after excluding a predetermined word such as a proper noun from the question information or the partial prompt. If the absolute value of the difference between a value obtained by the vector calculation of the question information or the partial prompt and a value obtained by the vector calculation of the fixed phrase is within a predetermined threshold range, the server device 2 can determine that the question information or the partial prompt is similar to the fixed phrase. If the question information or the partial prompt is not similar to any fixed phrase, the server device 2 may determine that the predetermined information is not included.
[0055] Also, for example, the server device 2 may determine whether or not the question information or the partial prompt includes a predetermined phrase determined for each fixed phrase, thereby determining whether or not the predetermined information is included. For example, if the fixed phrase is information such as "How do I get to XX?", the server device 2 may determine whether or not the question information or the partial prompt includes a phrase such as "how to get there", "how to get there", or "directions".
[0056] In step S141, if the predetermined information is not included, the server device 2 identifies the content of the predetermined information based on the content associated with the predetermined information. For example, by comparing each of the partial prompts generated in step S120 with the fixed phrase, if the predetermined information corresponding to the command information is not included in any of the partial prompts, the server device 2 can determine that the question information does not include command information and that the predetermined information (missing element) is command information. Also, for example, by comparing the question information with the fixed phrase, if the question information does not include the predetermined information corresponding to the command information, the server device 2 can determine that the question information does not include command information and that the predetermined information (missing element) is command information.
[0057] For example, the determination of whether or not the question information contains context information may be performed as follows. The server device 2 identifies a fixed phrase associated with the context information from the prompt definition DB. For example, the server device 2 identifies, as fixed phrases, "What are some recommended places for sightseeing?", "Where can I buy souvenirs?", "I'm looking for a place to kill time?", "Where can I go for a walk?", etc. If the input question is "What are some tourist spots?", the server device 2 determines that the context information is included and further specifies that the purpose is sightseeing. If the input question is "What are some recommended places in Tokyo?", the server device 2 determines that the context information is not included and further specifies that information regarding the purpose is insufficient.
[0058] In step S141, the server device 2 may determine whether the question information or the partial prompt includes a word that indicates a place, a position, a facility, or a region. If the question information or the partial prompt includes such information, in step S141, the server device 2 may compare the question information or the partial prompt with a template that includes a place, a position, a facility, or a region.
[0059] If it is determined in step S141 that a missing element is present (YES in step S141), the server device 2 determines whether the missing element is command information (step S142).
[0060] If the missing element is command information (YES in step S142), the server device 2 outputs error information (step S143). This is because if the command information is not included in the question information, no answer will be obtained even if the question information is input to the LLM as a prompt. The error information may include instruction information that instructs the user who input the question to input a specific question. The error information is output to the display screen of the user terminal 1. When a question is input to the user terminal 1, the processing from step S100 is executed again.
[0061] If the missing element is not command information (NO in step S142), the server device 2 judges whether the missing element is context information (step S144). If the missing element is context information (YES in step S144), the server device 2 acquires the missing context information from the history DB, the attribute information DB, and / or the behavior information DB (step S145), and generates a partial prompt related to the context information (step S146). The process of step S145 is a process of acquiring the predetermined information that is determined not to be included from the history DB that stores the predetermined information, when it is determined that the input question does not include the predetermined information.
[0062] The history DB stores information acquired in the system 10. The information acquired in the system 10 is, for example, question information, partial prompts, prompts, and / or answers. The partial prompts stored in the history DB are, for example, partial prompts generated in steps S120, S146, S148, and / or S149. The prompts stored in the history DB are, for example, prompts generated in S160. The answers are answers acquired in steps S183 or S185, answers edited in step S193, answers supplemented in S220, and / or answers output in S260. The information in the history DB may be stored in association with a user who asked a question. In the history DB, the question information, partial prompts, prompts, and / or answers may be stored in association with each other.
[0063] For example, when partial prompts such as "I'm taking the 11 o'clock Shinkansen" and "Please tell me some recommended places in Tokyo" are generated from the question information, the question does not include the departure date and time of the Shinkansen, the station where the Shinkansen will be taken, the user's current location, the purpose for which the user wishes to receive a place recommendation, etc. Therefore, these pieces of information are identified as missing context information.
[0064] In step S145, if the missing element is location information related to the current location, the server device 2 acquires the location information of the user terminal 1. The location information of the user terminal 1 may be acquired by using a GPS function of the user terminal 1. In this case, in step S146, a partial prompt related to the user's current location is generated.
[0065] The method of acquiring the context information in step S145 is not particularly limited, but for example, the server device 2 may compare the information included in the history DB with the question information or the partial prompt, and acquire the context information included in the information having a high similarity. The similarity can be calculated, for example, by using a vector calculation described later. Alternatively, the server device 2 may determine whether or not a predetermined wording is included in the question information or the partial prompt, and acquire the context information associated with the predetermined wording.
[0066] The process of step S146 is a process of generating a partial prompt based on the predetermined information acquired in step S145 and the question. In step S146, if there are multiple missing elements of the context information, a partial prompt is generated for each of the missing elements of the context information.
[0067] If the missing element is context information (YES in step S144), a confirmation information output process may be executed to request the user terminal to input the context information (step S147). Through the process of step S147, the server device 2 may generate a partial prompt regarding the context information in step S146 based on the context information input by the user. Through the process of step S146, a prompt can be generated in step S160 based on the acquired context information and the question.
[0068] After the process of step S146, or if it is determined in step S141 that no missing elements exist (NO in step S141), the server device 2 refers to the attribute information DB and generates a partial prompt related to the user attribute information (step S148).
[0069] User attribute information is information about the attributes of a user. In the system 10, user attribute information of users who use the system 10 is registered in advance in the attribute information DB of the server device 2. Examples of user attributes include gender, age, occupation, hobbies, preferences, health status, family structure, etc. User attribute information is information set for each user.
[0070] For example, in step S148, partial prompts such as "The questioner is a 30-year-old man" and "The questioner's hobby is visiting museums" may be generated.
[0071] After the process of step S148, the server device 2 refers to the behavior information DB and generates a partial prompt related to the behavior information (step S149).
[0072] The behavioral information is information related to the behavioral history of a user acquired by the system 10. The behavioral information is stored in the behavioral information DB of the server device 2. For example, the behavioral information includes information such as question information, response information of the user to the answer or advertisement information input by the user, and behavioral history information of the user. Response information is, for example, information related to whether or not the URL of the suggested information included in the answer was selected. User behavioral history information is, for example, information related to the user's Internet browsing history and search history. The behavioral information is information stored for each user.
[0073] For example, in step S149, partial prompts such as "The questioner was browsing the homepage of Museum A three days ago," or "When facilities α, β, and γ were suggested to the questioner, the URL of facility β was selected," may be generated.
[0074] The question completion process is completed by the processes of steps S141 to S149. The processes of steps S144 to S147, S148, and S149 may be executed in a reverse order. The process of step S147 may be omitted.
[0075] Note that, before the process of step S148, it may be determined whether or not user attribute information is included in the question information or the partial prompt, and if user attribute information is not included, the process of step S148 may be executed.Similarly, before the process of step S149, it may be determined whether or not behavior information is included in the question information or the partial prompt, and if behavior information is not included, the process of step S149 may be executed.
[0076] In step S141, the determination as to whether or not there is a missing element may be performed for each content of the missing element. For example, the server device 2 may first determine whether or not there is a missing element corresponding to the command information in the question information or the partial prompt, and then determine the missing element corresponding to the context information, and the missing element corresponding to the user's location information, in that order. In addition, the determination as to whether or not there is a missing element corresponding to the context information may be performed according to the importance of the context information. For example, the importance of context information related to a purpose may be set higher than that of context information related to an emotion.
[0077] It is not necessary to generate partial prompts for all of the context information determined to be insufficient in step S146. For example, partial prompts for context information may be generated from context information with high importance according to the importance of the context information. The importance of the context information may be preset or may change according to the question.
[0078] The partial prompt generation process in steps S146, S148, and / or S149 may utilize a language model (e.g., the language model server 3). To generate the prompt in step S160, the server device 2 may cause the language model to extract predetermined features according to the user's history. To extract the predetermined features, the server device 2 may request an answer from the language model two or more times.
[0079] For example, if the question information or partial prompt does not include predetermined information (e.g., context information related to a facility or area) (YES in step S144), the server device 2 identifies facility information or area information proposed to a user who has previously input a question from the history DB. Then, the server device 2 requests the language model to extract predetermined features from the identified facility information or area information. The server device 2 can generate a partial prompt based on the features extracted from the language model. The predetermined features are features identified according to the user, for example, the user's preferred area or type of facility.
[0080] For example, in order to request the language model to extract features, the server device 2 may generate a prompt such as "In the past, X Art Museum, Y Museum, and Z Archives have been suggested to the questioner. In order to suggest a new facility to the questioner, please extract features of the facility preferred by the questioner," and input the generated prompt to the language model. Then, the server device 2 may treat the answer obtained from the language model as a partial prompt.
[0081] In addition, the process of extracting specified features may be performed when, as a result of comparing the template with the question information or partial prompt in step S141, the question information or partial prompt does not contain a specified phrase, and when specified information corresponding to the phrase can be identified from the user's past history.
[0082] [Confirmation information output process] Next, the confirmation information output process in step S147 will be described with reference to Fig. 6, which is a flowchart showing the confirmation information output process according to the embodiment of the present invention.
[0083] First, the server device 2 generates confirmation information (step S11). The confirmation information is information for requesting the user to input context information corresponding to the missing element. The server device 2 transmits the confirmation information to the user terminal 1 (step S12). The user terminal 1 receives the confirmation information (step S13). The processes of steps S11 to S13 are processes for requesting the user terminal 1 to input information regarding the purpose, emotion, or situation or condition when it is determined that the input question does not include information regarding the purpose, emotion, or situation or condition as predetermined information.
[0084] In step S13, confirmation information is output at the user terminal 1. In response to the output confirmation information, the user inputs the context information intended by the user to the user terminal 1 (step S14).
[0085] For example, if the question information is "Please tell me recommended places in Tokyo", confirmation information may be output as "Are you looking for recommended places in Tokyo for sightseeing purposes?" or "For what purpose are you looking for recommended places in Tokyo?". The user terminal 1 may display options that the user can select as confirmation information. The user can input context information by selecting an option.
[0086] The context information input in step S14 is transmitted from the user terminal 1 to the server device 2 (step S15) and received by the server device 2 (step S16). The context information received in step S16 is used to generate a partial prompt in step S146. In this way, the server device 2 obtains information relating to the purpose or emotion, or the situation or condition, from the input from the user terminal. The confirmation information output process is completed by the processes of steps S11 to S16.
[0087] [Answer acquisition process] Next, the answer acquisition process in step S180 will be described below. Fig. 7 is a diagram showing a flowchart of the answer acquisition process according to the embodiment of the present invention.
[0088] First, the server device 2 determines whether or not the prompt generated in step S160 includes facility preference information (step S181).
[0089] The facility preference information is information requesting recommendations for facilities or regions. A facility is a place where one can stay for a specified amount of time, and may be an artificially created location such as a building or a park, or a natural object such as a mountain or the sea. A facility may also be a concrete facility that actually exists. A region is a place that has a specified area. A region may be, for example, a city, ward, town, village, prefecture, country, etc.
[0090] The process of step S181 will be described. For example, the server device 2 can determine whether facility preference information is present in the prompt by determining whether the prompt includes a predetermined wording. The predetermined wording is, for example, a wording related to recommendation and a wording related to a facility or area. Examples of the wording related to recommendation include words such as "recommended," "recommended," and "looking for." Examples of the wording related to an area or facility include words corresponding to information related to a facility, area, or location.
[0091] Also, for example, the server device 2 can determine whether or not facility preference information is present in the prompt by determining the similarity between the prompt and the fixed phrase. The fixed phrase is stored in the server device 2. The fixed phrase is a prompt or a partial prompt for a facility or area recommendation. The fixed phrase is, for example, a fixed question such as "I'm looking for XX" or "Where would you recommend?" The server device 2 can perform a vector operation on the stored fixed phrase and the prompt to calculate the similarity. If the similarity is equal to or greater than a predetermined value, the server device 2 can determine that facility preference information is present in the prompt. Alternatively, the server device 2 may compare the value obtained from the calculated vector operation between the fixed phrase and the prompt, and if it is within a predetermined range, determine that facility preference information is present in the prompt.
[0092] If the prompt to be input to the language model does not include the desired facility information (NO in step S181), the server device 2 inputs the prompt to the language model (step S183). In step S183, the server device 2 transmits the prompt to the language model server 3. The language model server 3 inputs the prompt to the language model and outputs an answer. When the answer is transmitted from the language model server 3 to the server device 2, the server device 2 acquires the answer from the language model based on the prompt (step S183).
[0093] If the prompt to be input to the language model includes the desired facility information (YES in step S181), the server device 2 inputs the prompt to the language model (step S184) and acquires an answer (step S185). The processes of steps S184 and S185 are similar to those of steps S182 and S183. Furthermore, the server device 2 refers to the specialized information DB based on the desired facility information and acquires facility information or area information with a high degree of similarity (step S191). The server device 2 generates facility proposal information based on the facility information or area information acquired in step S191 (step S192). The processes of steps S191 and S192 are processes of acquiring or generating information related to facilities or areas (also referred to as facility proposal information) from the specialized information DB.
[0094] Here, the specialized information DB is a database that stores information about facilities or areas. The specialized information DB is stored in the storage unit 23 of the server device 2. The specialized information DB is set by operating the administrator terminal 4. The specialized information DB may be linked to a predetermined search engine and may update the information in the database at predetermined intervals (for example, once a week).
[0095] The facility proposal information is information related to a facility or area proposed to the user, and is information acquired or generated in the answer acquisition process. The facility proposal information includes, for example, facility information, area information, etc. The facility proposal information may be information related to the facility or area added to predetermined information.
[0096] Facility information is information about a facility. Facility information includes, for example, information about the name of the facility, the location of the facility, the classification of the facility, the facility's usage fee, the business hours of the facility, the characteristics of the facility, etc. Area information is information about an area. Area information includes, for example, the name of the area, the location of the area, tourist attractions in the area, facility information about facilities in the area, etc.
[0097] The process of acquiring information with a high degree of similarity by the server device 2 in step S191 will be described below. Information with a high degree of similarity to the prompt can be acquired by using a known method.
[0098] For example, the server device 2 performs vector calculation on the prompt generated in step S160 to vectorize the prompt. Also, the facility information or area information stored in the specialized information DB is vectorized by performing vector calculation. The server device 2 uses the vectorized prompt and the vectorized information in the specialized information DB to obtain information that provides a value that is similar to the value obtained from the vectorized prompt. In other words, when the values obtained from the vectorized sentence are similar between text A and text B, text A and text B are determined to have a high similarity. Information that has a high similarity may be information in which the vectorized values are similar.
[0099] In the present embodiment, "approximate" means, for example, that the absolute value of the difference between the values is equal to or smaller than a predetermined threshold value (or is less than the predetermined threshold value). The predetermined threshold value can be set appropriately.
[0100] Here, the text B that approximates the value obtained by vectorization may be one in which the difference between the value obtained by vector operation of text A and the value obtained by vector operation of text B is less than or equal to a predetermined value, or it may be one in which the top three (not limited to three, any value will do) of multiple texts B that are closest to the value obtained by vector operation of text A are identified.
[0101] Alternatively, the server device 2 may calculate the similarity using the vectorized prompt and the vectorized information in the specialized information DB. The similarity may be, for example, a cosine similarity. If the calculated similarity for a given piece of information is greater than a given threshold, the information can be considered to have a high similarity to the prompt.
[0102] The server device 2 can calculate a vector of a sentence from the question information, the prompt, the partial prompt, and / or the answer input from the user terminal 1. For example, the small-scale language model provided in the server device 2 can convert a sentence into a numerical vector. Converting a sentence into a numerical vector is also called vectorization. The method of executing vector calculation of a sentence is not particularly limited, and other known techniques may be applied. For example, words may be extracted from a sentence by morphological analysis, and the meanings of the words and the relationships between the words may be vectorized.
[0103] After the process of step S192, the server device 2 edits the answer acquired from the language model based on the facility proposal information generated in step S192 (step S193). Editing the answer based on the predetermined information is a concept that includes any of adding the predetermined information to the answer, deleting a part of the answer and replacing it with the predetermined information, and generating a new sentence based on the answer and the predetermined information.
[0104] The process of editing the answer in step S193 and S230 described later may be performed by the server device 2, or may utilize a language model (for example, the language model server 3). For example, when editing the answer in step S193 by the server device 2, it is possible to add predetermined information to the answer acquired from the language model server 3 in step S185, or to delete a part of the information included in the answer and add the predetermined information. For example, when editing the answer by using a language model in step S193, the server device 2 can request the language model to create a sentence including the predetermined information based on the answer acquired from the language model server 3 in step S185. The predetermined information may be the information acquired in step S191, or may be the information generated in step S192.
[0105] For example, in step S193, the server device 2 determines whether or not the answer includes location information. Location information is information related to a location, and includes facility information and / or area information. If the answer includes location information, the server device 2 deletes the location information of the answer. In addition, the server device 2 adds the facility proposal information generated in step S192 to the answer. This allows the server device 2 to edit the answer based on the generated facility proposal information.
[0106] The processes of steps S181, S191, S192, and S193 may be executed as follows. For example, the processes of steps S182 and S183 are executed before step S181 is executed. After the answer is acquired in step S183, the server device 2 determines whether the answer acquired from the language model includes facility information or area information (step S181'). If the answer includes facility information or area information, the server device 2 acquires information on the facility or area corresponding to the answer from the specialized information DB (step S191'). Next, the server device 2 generates facility proposal information based on the acquired facility information or area information (step S192'). Based on the information generated in step S192', the server device 2 edits the answer acquired from the language model (step S193').
[0107] The facility information or area information corresponding to the answer in step S191' may be facility information or area information that is highly similar to the answer. The facility information or area information that is highly similar to the answer can be acquired in the same manner as acquiring facility information or area information that is highly similar to the prompt. In this case, the server device 2 executes vector calculation on the answer.
[0108] The processes of steps S192 and S192' may be omitted. In this case, the facility information or area information acquired in steps S191 and S191' becomes facility suggestion information. That is, in steps S193 and S193', the answer acquired from the language model can be edited based on the facility information or area information acquired in steps S191 and S191'.
[0109] [Answer Judgment Process] Next, a description will be given of the answer determination process in step S. Fig. 8 is a diagram showing a flowchart of the answer determination process according to the embodiment of the present invention.
[0110] First, the server device 2 judges whether the answer acquired in step S183 or step S193 is appropriate (step S201). If the answer is appropriate (YES in step S201), the answer judgment process ends. If the answer is not appropriate (NO in step S201), answer error information is generated (step S202) and output (step S203). The answer error information output in step S203 is transmitted to and output from the user terminal 1. With the processes of steps S201 to S203, the answer judgment process ends.
[0111] The answer error information is information indicating that the answer acquired from the language model is not appropriate as an answer to the prompt or the question corresponding to the prompt. For example, as the answer error information, the user terminal 1 outputs information such as "We were unable to obtain the information you were looking for. Please enter your question again." When a question is entered into the user terminal 1, the process from step S100 is executed again.
[0112] In step S201, the server device 2 determines whether the answer obtained by inputting the prompt into the language model is appropriate as an answer to the question corresponding to the prompt by referring to an answer definition DB in which prompt examples and answer examples corresponding to the prompt examples are stored.
[0113] The answer definition DB is stored in the storage unit 23. The answer definition DB may store, for example, a prompt example and information required as an answer example to the prompt example in association with each other, or may store a prompt example and an answer example to the prompt example in association with each other.
[0114] For example, in the answer definition DB, information about a facility or area is stored as an example answer to a prompt example that includes facility preference information in association with the prompt example. The server device 2 can refer to the answer definition DB and, when an answer to a prompt that includes facility preference information includes information about a facility or area, determine that the answer is appropriate as an answer to the question corresponding to the prompt.
[0115] Alternatively, the server device 2 may identify a prompt example that is highly similar to the prompt, and determine whether or not the answer is appropriate based on the similarity between the example answer corresponding to the prompt example and the output answer. For example, the server device 2 may determine that an answer is appropriate as an answer to a question corresponding to the prompt example when a value obtained by vector operation of an answer example corresponding to a prompt example is approximate to a value obtained by vector operation of the answer.
[0116] In this case, the server device 2 performs vector calculations on the prompt and the answer acquired by inputting the prompt into the language model.
[0117] In addition, the determination of whether the value obtained by vector computing an answer example corresponding to a prompt example that results in a value approximating the value obtained by vector computing the prompt is approximate to the value obtained by vector computing the answer can be performed not only by determining whether the value obtained by vector computing an answer example corresponding to a prompt example that results in a value approximating the value obtained by vector computing the prompt is approximate to the value obtained by vector computing the answer, but also by determining whether the value obtained by vector computing an answer example corresponding to a prompt example that results in a value approximating the value obtained by vector computing the answer is approximate to the value obtained by vector computing the prompt.
[0118] [Answer completion processing] Next, the answer complementing process in step S220 will be described with reference to Fig. 9, which is a flowchart showing the answer complementing process according to the embodiment of the present invention.
[0119] First, the server device 2 determines whether the answer acquired in step S183 or the answer edited in step S193 includes location information (step S221). If the answer includes location information (YES in step S221), the server device 2 calculates the staying time for each location based on the location information (step S222).
[0120] The staying time is an approximate time that a user stays in a predetermined place such as a facility or an area. The staying time may be included in the facility information or area information stored in the specialized information DB. The server device 2 specifies the staying time by acquiring facility information or area information corresponding to the facility or area corresponding to the location information included in the response from the specialized information DB. Alternatively, if the staying time is not included in the facility information or area information, the server device 2 may calculate a predetermined time (e.g., 30 minutes) as the staying time.
[0121] Next, the server device 2 calculates the travel time based on the location information (step S223).
[0122] The travel time is an estimated time required to travel from a predetermined location to another predetermined location. In this embodiment, the travel time may be an estimated time required to travel from a departure point to a destination point via a location corresponding to the location information. The server device 2 stores a traffic information DB for calculating the travel time. The traffic information DB includes map information, information on public transportation timetables, road congestion conditions, delay information, past congestion conditions, etc. The traffic information DB may be updated with real-time conditions.
[0123] Next, the server device 2 calculates the consumed time based on the stay time calculated in step S222 and the movement time calculated in step S223 (step S224). The consumed time is the sum of the stay time and the movement time.
[0124] When the consumed time is calculated, the server device 2 generates travel proposal information (step S225). The travel proposal information is information in which the stay time, travel time, and / or consumed time are added to the location information included in the answer. The travel proposal information may include information on the means of transportation, transfers, and / or congestion. The travel proposal information is output to the user terminal 1 as an answer. The travel proposal information is included in the answer.
[0125] Next, the server device 2 judges whether or not the question input in step S100 includes disposable time (step S226). Disposable time is the time during which a user can act. For example, in the case of a question of "Please tell me where I can kill time between 10:00 and 16:00", the disposable time is six hours from 10:00 to 16:00.
[0126] If the question input in step S100 includes disposable time (YES in step S226), the server device 2 extracts travel proposal information that satisfies a predetermined condition (step S227). The predetermined condition is, for example, that the consumption time calculated in step S224 is shorter than the disposable time included in the question.
[0127] The processes of steps S221 to S227 are executed similarly when the answer includes one piece of location information and when the answer includes two or more pieces of location information. For example, when the answer includes three pieces of location information, facility α, facility β, and facility γ, the processes of steps S221 to S227 are executed as follows. First, the server device 2 calculates the stay time at facility α, facility β, or facility γ to be 0.5 hours, 1 hour, and 2 hours, respectively. Next, the travel time from the departure point to the arrival point via facility α, facility β, or facility γ to be 2 hours, 1 hour, and 1 hour, respectively. Then, the server device 2 calculates the time spent at facility α, facility β, or facility γ to be 2.5 hours, 2 hours, and 3 hours, respectively.
[0128] Then, if the disposable time included in the question is two hours, in step S227, the server device 2 extracts the facilities α and β as travel proposal information.
[0129] The stay time, travel time, and consumption time may be calculated for one location or for multiple locations. For example, when the answer includes three location information of facility α, facility β, and facility γ as location information, the server device 2 may specify the order of facility α, facility β, and facility γ in terms of distance from the departure point. Alternatively, the server device 2 may specify two facilities from facility α, facility β, and facility γ, and specify the order of distance from the departure point. Next, the server device 2 may calculate the travel time from the departure point to the arrival point according to the specified order. The server device 2 can calculate each consumption time by adding the travel time and the stay time.
[0130] Returning to the description of the flowchart, if the answer does not include location information (NO in step S221), if the question input in step S100 does not include disposable time (NO in step S226), or after extracting the travel proposal information in step S227, the server device 2 determines whether or not the answer includes action information (step S228). If the answer includes action information (YES in step S228), the server device 2 refers to the action proposal information associated with the action information and generates action proposal information corresponding to the answer (step S229).
[0131] The action information is information that triggers the generation of action suggestion information that suggests a user's behavior. The server device 2 stores the action information and the action suggestion information in association with each other. For example, the action suggestion information that suggests the user to register a schedule may be stored in association with the action information that is time and location information, and the action suggestion information that provides the URL of a site where detailed information on the facility or area can be viewed may be stored in association with the action information that is facility information or area information. The action information is, for example, a predetermined character string, a predetermined sentence, and / or a predetermined sentence type. The action information may be set in association with the facility information or area information. For example, the action information that the facility corresponding to the facility information is a facility that requires a reservation can be associated with the facility information in advance.
[0132] In addition, the presence of action information in an answer includes both cases where action information is present in the text included in the answer, and cases where action information is associated with facility information or area information included in the answer or travel suggestion information.
[0133] The determination of whether or not action information is present in the answer in step S228 can be performed as follows. For example, the server device 2 may determine that the action information is present when a word corresponding to the action information is present in the answer. Alternatively, the server device 2 may determine that the action information is present in the answer when the answer and the action information are similar. The determination of similarity can be made based on a value obtained by performing the above-mentioned vector calculation.
[0134] If the answer does not include action information (NO in step S228), or after generating the action proposal information in step S229, the server device 2 edits the answer based on the movement proposal information and / or the action proposal information (step S230). The answer complementation process is completed by the above processes in steps S221 to S230.
[0135] Editing the answer based on the predetermined information has the same meaning as that explained in step S193. For example, in step S230, the server device 2 may add movement suggestion information of the location included in the answer so as to correspond to the location information. Also, for example, in step S230, the server device 2 may add action suggestion information generated from the action information to the answer in association with a sentence including the action information.
[0136] In step S229, the sentence is stored in the server device 2 as action suggestion information, and the server device 2 may acquire action suggestion information corresponding to the action information, instead of generating the action suggestion information.
[0137] The order of the processes in steps S222 and S223 may be reversed. If the results of both steps S221 and S228 are NO, the process in step S230 may be omitted.
[0138] [Advertisement specific processing] Next, the advertisement identification process in step S240 will be described with reference to Fig. 10, which is a flowchart showing the advertisement identification process according to the embodiment of the present invention.
[0139] First, the server device 2 acquires, from the advertisement information DB, advertisement information similar to the answer acquired by inputting the prompt into the language model (step S241). In step S241, a plurality of advertisement information may be acquired. Next, the server device 2 selects, from the acquired plurality of advertisement information, one or more advertisement information similar to the prompt or the question input from the user terminal to generate the prompt (step S242). The advertisement information selected in step S242 is output together with the answer information in step S260. The system 10 may output an advertisement corresponding to the advertisement information acquired from the advertisement information DB as it is, or may output an advertisement with the advertisement information edited.
[0140] Here, the advertisement information DB is a database in which advertisement information related to advertisements is stored. The advertisement information includes, for example, facility information and area information. The advertisement information may be registered by operating the administrator terminal 4, or may be registered by operating a terminal operated by the advertisement requester. In addition, a usage fee may be incurred by the advertisement requester in response to registering the advertisement information in the advertisement information DB. The advertisement information DB stores information such as customer target, advertiser information, product name, type, features, and advertisement copy for each advertisement. The information in the advertisement information DB may be vector-calculated in advance based on information such as customer target, advertiser information, product name, type, features, and advertisement copy included in the advertisement. Alternatively, the information included in the advertisement information DB may be vector-calculated each time based on information such as advertisement text and images.
[0141] The processes of steps S241 and S242 will be described. In step S241, the server device 2 can acquire advertisement information similar to the answer by using a known method. In step S242, the server device 2 can select advertisement information similar to the prompt or question by using a known method. In steps S241 and S242, the advertisement information being similar to the answer, prompt, or question means that the advertisement information is highly similar to the answer, prompt, or question. In addition, the answer used in step S141 may be the answer acquired in step S180 or the answer complemented in step S220, and the prompt or question used in step S142 may be the prompt generated in step S160, a partial prompt, or question information input in step S100.
[0142] For example, in steps S241 and S242, the same technique as in step S191 can be used. The server device 2 performs vector calculations on the prompt generated in step S160, the partial prompt generated, or the question and answer input in step S100, to vectorize the prompt, the partial prompt, or the question and answer. In addition, the advertisement information stored in the advertisement information DB is vectorized by performing vector calculations. In step S241, the server device 2 uses the vectorized answer and the vectorized advertisement information in the advertisement information DB to obtain advertisement information that provides a value that is close to the value obtained from the vectorized answer.
[0143] Then, in step S242, the server device 2 uses the vectorized prompt, the vectorized partial prompt, or the question, and the vectorized advertisement information acquired in step S241 to extract advertisement information from which a value similar to a value obtained from the vectorized prompt, the partial prompt, or the question can be obtained. The generated prompt or the generated partial prompt is included in the information on the input question. The extraction method is not particularly limited, and for example, the server device 2 may extract advertisement information from which a value most similar to a value obtained from the vectorized prompt, the partial prompt, or the question can be obtained, or may rank the advertisement information from which a value similar to a value obtained from the vectorized prompt, the partial prompt, or the question can be obtained, and a predetermined number of advertisement information from the top positions (e.g., three items) can be extracted.
[0144] Alternatively, the server device 2 may calculate the similarity using the vectorized answer, prompt, partial prompt, or question and the vectorized advertisement information in the advertisement information DB. In step S241, advertisement information whose calculated similarity is greater than a predetermined threshold is obtained, and in step S242, a predetermined number of advertisement information items are extracted in order from the advertisement information with the closest similarity.
[0145] Note that steps S241 and S242 may be executed as follows. For example, in step S241, the server device 2 may acquire, from the advertisement information DB, advertisement information similar to a prompt for inputting to the language model or a question input from the user terminal to generate a prompt. Also, in step S242, the server device 2 may select, from the acquired plurality of pieces of advertisement information, one or more pieces of advertisement information similar to an answer acquired by inputting the prompt to the language model.
[0146] In the above advertisement identification process, a plurality of pieces of advertisement information similar to the answer acquired by inputting a prompt into a language model are selected, and then a prompt for inputting into the language model or advertisement information similar to a question input from a user terminal to generate a prompt is selected, or a plurality of pieces of advertisement information similar to a prompt for inputting into a language model or a question input from a user terminal to generate a prompt is selected, and then advertisement information similar to the answer acquired by inputting the prompt into a language model is selected, but one or more pieces of advertisement information similar to the answer may be acquired and used as an advertisement, or one or more pieces of advertisement information similar to the prompt or question may be acquired and used as an advertisement. In other words, the process of step S242 may be omitted.
[0147] As long as the output process includes steps S100, S160, and S260, the other steps may be omitted as appropriate. For example, the processes of steps S120, S140, S200, S220, and / or S240 may be omitted. When the process of step S120 is omitted, the server device 2 executes the processes of steps S140 and after for the question information accepted in step S100.
[0148] In the above, the information on which vector calculations are performed to calculate the similarity with various information may be stored in advance in association with the values on which the vector calculations were performed in various DBs in which the information is stored (e.g., prompt definition DB, history DB, attribute information DB, behavioral information DB, specialized information DB, answer definition DB, advertisement information DB, etc.).
[0149] In this way, the system includes a determination unit that determines whether a question input from a user terminal includes predetermined information required as a prompt for input to a language model, and a first generation unit that, when it is determined that the input question does not include the predetermined information, adds the predetermined information to the question and generates a prompt for input to the language model. Even if the question does not include the predetermined information, a prompt with the predetermined information added can be generated. In addition, the amount of information in the prompt increases because the predetermined information is added. Therefore, when the prompt is input to the LLM, a more suitable answer is output as an answer to the question.
[0150] Furthermore, in this manner, the input question requests a recommended action, and the specified information is a purpose to be achieved or an emotion to be obtained by performing the recommended action, or information regarding the situation or conditions when the recommended action is performed, and the system comprises a request means for requesting input of the purpose or the emotion, or information regarding the situation or the conditions, to the user terminal when the determination means determines that the input question does not include the purpose or the emotion, or information regarding the situation or the conditions, as the specified information, and the first generation means generates a prompt to be input to the language model based on the purpose or the emotion, or information regarding the situation or the conditions obtained by input from the user terminal, and the question, thereby generating a prompt that is in line with the user's intention.
[0151] In this way, the system includes an acquisition means for acquiring advertising information similar to an answer acquired by inputting a prompt into a language model from a database in which advertising information related to advertisements is stored, or an acquisition means for acquiring advertising information similar to a prompt for input into a language model or a question input from a user terminal to generate a prompt from a database in which advertising information related to advertisements is stored, thereby making it possible to identify advertising information more suitable for the user who input the question. Furthermore, the acquisition means acquires a plurality of pieces of advertising information, and the system includes a selection means for selecting, from the plurality of acquired advertising information, one or more pieces of advertising information similar to an answer acquired by inputting the prompt into a language model, or a selection means for selecting, from the plurality of acquired advertising information, one or more pieces of advertising information similar to a prompt or a question input from a user terminal to generate a prompt, thereby making it possible to identify advertising information more suitable for the user who input the question.
[0152] In addition, in this way, the system is provided with an answer acquisition means for acquiring an answer from a language model based on a prompt, an acquisition means for acquiring or generating information about a facility or area from a database that stores information about the facility or area when the prompt to be input to the language model includes facility request information requesting a recommendation of a facility or area, and an answer editing means for editing the answer acquired from the language model based on the information acquired or generated by the acquisition means, thereby making it possible to propose information about an actually existing facility or area while using the language model. Similarly, the system is provided with an answer acquisition means for acquiring an answer from a language model based on a prompt, and an acquisition means for acquiring or generating information about a facility or area corresponding to the answer from a database that stores information about the facility or area when the answer acquired from the language model includes facility information about the facility or area, and an answer editing means for editing the answer acquired from the language model based on the information acquired or generated by the acquisition means, thereby making it possible to propose information about an actually existing facility or area while using the language model.
[0153] In this way, the system is equipped with an answer acquisition means for acquiring an answer from a language model based on a prompt, a proposal generation means for generating proposal information corresponding to the answer when the answer acquired from the language model includes action information for encouraging the user to take action, and an answer editing means for editing the answer acquired from the language model based on the proposal information generated by the proposal generation means, thereby making it possible to make suggestions related to the answer to the user.
[0154] In addition, in this way, the system is equipped with a judgment means for judging whether an answer obtained by inputting a prompt into a language model based on an example prompt and an example answer corresponding to the example prompt is appropriate as an answer to a question corresponding to the prompt, thereby making it possible to provide the user with an appropriate answer as an answer to the question.
[0155] 1 User terminal 2 Server device 3 Language model server 4 Administrator terminal 5 Communication network 10 System 11 control section 12 RAM 13 storage section 14 input section 15 Display unit 16 Communication interface 21 control unit 22 RAM 23 storage unit 24 communication interface
Claims
1. A system comprising at least one computing device, A determination means for determining whether or not a question input from a user terminal contains predetermined information; a first generating means for generating a prompt for inputting the predetermined information to the question into the language model when it is determined that the input question does not include the predetermined information; Equipped with The question entered is a request for a recommended action, A system in which the specified information is information regarding the purpose to be achieved or the emotion to be obtained by performing the recommended action, or information regarding the situation or conditions when performing the recommended action.
2. 2. The system according to claim 1, wherein the determining means determines whether the input question contains the predetermined information by comparing the input question with a standard phrase for a question.
3. a requesting means for requesting the user terminal to input information regarding the purpose or the emotion, or the situation or the condition, when the determining means determines that the input question does not include information regarding the purpose or the emotion, or the situation or the condition, as the predetermined information. Equipped with 3. The system according to claim 1, wherein the first generation means generates a prompt for input to the language model based on information regarding the purpose or the emotion, or the situation or the condition, acquired by input from a user terminal, and the question.
4. A method executed on at least one computing device, comprising: a determination step of determining whether or not a question input from a user terminal includes predetermined information; a first generation step of adding the predetermined information to the question and generating a prompt for inputting the question to the language model when it is determined that the input question does not include the predetermined information; having The question entered is a request for a recommended action, A method in which the predetermined information is information regarding a purpose to be achieved or an emotion to be obtained by performing the recommended behavior, or information regarding a situation or condition when performing the recommended behavior.
5. A determination means for determining whether a question input from a user terminal includes predetermined information; a first generating means for generating a prompt for inputting the predetermined information to the question into the language model when it is determined that the input question does not include the predetermined information; Equipped with The question entered is a request for a recommended action, A computer device in which the predetermined information is information regarding a purpose to be achieved or an emotion to be obtained by performing the recommended action, or information regarding a situation or condition when the recommended action is performed.
Citation Information
Patent Citations
Multi-modal sensor fusion for content identification in applications of human-machine interfaces
JP2023035870A
Information processing device, information processing method, and computer program
JP7441366B1