Information processing method, information processing apparatus, non-transitory computer-readable storage medium, information processing system, and
The method addresses the inefficiencies in generating prompts by personalizing the database with user responses, reducing processing time and load while ensuring accurate responses from the large-scale language model.
Patent Information
- Application Number
- JP2024129852
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2026-02-19
AI Technical Summary
Existing methods for generating prompts for large-scale language models require referencing past dialogue history and filtering results, leading to increased processing time and load.
An information processing method that extracts additional data from a database and generates prompts based on user input, updating the database with user responses to create a personalized model for efficient prompt generation.
Prevents increased processing time and load by personalizing the database with user history, ensuring accurate and timely responses from the large-scale language model.
Smart Images

Figure 2026027722000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a technique for generating prompts for input into Large Language Models (LLMs). [Background technology]
[0002] Large-scale language models, which are natural language processing models trained using large amounts of text data, are known. Large-scale language models take sentences called prompts as input and output sentences. Such large-scale language models are applied to systems that perform question-and-answering, for example, and output answers when a question (prompt) is input.
[0003] One technique for improving the accuracy of answers provided by large-scale language models is to generate prompts by adding information to questions (see, for example, Patent Document 1). Patent Document 1 discloses a sentence generation method for generating prompts to be input to large-scale language models by adding reference information to an input question. In this sentence generation method, the reference information is obtained from a sentence database prepared separately from the large-scale language model, depending on the characteristics of the input question. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent No. 7325152 Summary of the Invention [Problem to be solved by the invention]
[0005] Patent Document 1 discloses that the information held in a sentence database for extracting reference information includes a user's past dialogue history with a large-scale language model. With this configuration, a prompt generated by adding reference information to a question sentence can be used as a prompt that prompts the large-scale language model to provide an answer sentence that is appropriate for the user.
[0006] However, if a prompt is generated that allows a user to provide an appropriate answer to a large-scale language model by including past dialogue history in a sentence database, the past dialogue history must be referenced every time a question is input by the user. Furthermore, when generating a prompt with reference information added to a question, it is necessary to filter the results extracted from the sentence database according to the past dialogue history. This raises concerns that it may take a long time to generate a prompt with reference information added to a question, or that the processing load for generating each prompt may increase.
[0007] In view of the above, an object of the present invention is to provide a technique suitable for generating prompts that allow a user to provide an appropriate response to a large-scale language model. [Means for solving the problem]
[0008] An exemplary information processing method of the present invention is a method for generating prompts to be input into a large-scale language model. The information processing method extracts additional data from a database prepared for reference information retrieval in response to a user's input, and generates the prompt based on the user's input and the additional data. In the information processing method, responses made by the user in response to responses from the large-scale language model to the input of the prompt are collected as history information, and the database is updated using the history information. [Effects of the Invention]
[0009] In an exemplary information processing method of the present invention, the database itself is updated using history information that collects responses made by users in response to answers from a large-scale language model. This allows the database itself to be personalized for each user. As a result, prompts that allow the large-scale language model to provide responses appropriate for the user can be generated using reference information extracted from the database, without having to refer to history information each time a prompt is generated. In other words, it is possible to prevent an increase in the time required to generate prompts that allow the user to provide responses appropriate for the user and an increase in the processing load when generating each prompt. [Brief explanation of the drawings]
[0010] [Figure 1] Block diagram showing an overview of the information processing system [Figure 2] A simplified diagram of the resulting vector space from the embedding. [Figure 3] A block diagram showing the general configuration of an interactive device. [Figure 4] 1 is a flowchart showing an example of a method for collecting a dialogue history executed by a dialogue device (information processing device); [Figure 5] FIG. 10 is a diagram showing an example of a history information table. [Figure 6] 1 is a flowchart showing an example of a vector database update method executed by an interactive device (information processing device). [Figure 7] A flowchart illustrating a process for generating a compensation model. [Figure 8] Schematic diagram showing the reward model generation image [Figure 9] 1 is a flowchart illustrating a process for updating an embedding model. [Figure 10] A flowchart illustrating a process for updating a vector database. [Figure 11] A diagram explaining the updated vector database [Figure 12]FIG. 10 is a block diagram showing an overview of an information processing system according to a modified example. [Figure 13] FIG. 10 is a block diagram showing the configuration of an interactive device included in an information processing system according to a modified example. [Figure 14] FIG. 10 is a block diagram showing the configuration of a server included in an information processing system according to a modified example. DETAILED DESCRIPTION OF THE INVENTION
[0011] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings. In this specification, information processing refers to processing executed by a device.
[0012] <1. Information Processing System> Fig. 1 is a block diagram showing an overview of an information processing system 100 according to an embodiment of the present invention. As shown in Fig. 1, the information processing system 100 includes a server 1 and an interaction device 2. The server 1 and the interaction device 2 are each provided so as to be connectable to a communication network (not shown) such as the Internet or a telephone line network. The server 1 and the interaction device 2 are capable of communicating with each other via the communication network.
[0013] Specifically, the server 1 is a cloud server. As shown in FIG. 1, the server 1 includes a large-scale language model (LLM) 1a. The large-scale language model 1a is software that performs natural language processing according to a model trained using a large amount of text data. The large-scale language model 1a receives prompts such as command sentences and question sentences from the dialogue device 2, and responds to the input prompts by generating answer sentences or the like to the dialogue device 2.
[0014] The dialogue device 2 has a function of extracting commands, questions, etc. from the user U1 by voice recognition and executing processing according to the commands, etc. from the user U1 in cooperation with the large-scale language model 1a. In this embodiment, the dialogue device 2 is an in-vehicle device mounted on a vehicle such as an automobile. The dialogue device 2 is included in, for example, an in-vehicle navigation device.
[0015] The dialogue device 2 includes a dialogue processing unit 2a, an embedding model 2b, and a vector database (vector DB) 2c.
[0016] The dialogue processing unit 2a has some of the functions of the dialogue device 2. The dialogue processing unit 2a performs, for example, dialogue processing with the user U1 and processing for generating prompts to be input to the large-scale language model 1a.
[0017] Embedding model 2b is a learning model that uses machine learning, and is software that embeds data (text data) such as words and sentences. Embedding refers to the mathematical representation of data that encapsulates the meaning of words and sentences, and more specifically, refers to converting data such as words and sentences into a vector representation. A vector is an array of real values, such as [0.50, -0.10, 0.25, 0.55,...]. For example, a vector containing 100 values is called a "100-dimensional" vector.
[0018] In a vector space obtained by embedding various data, vectors with highly related meanings are placed close to each other. Figure 2 is a simplified schematic diagram of the vector space obtained as a result of embedding. In Figure 2, the vector space is two-dimensional for ease of understanding, but in reality, the vector space has a very large dimension. In the example shown in Figure 2, the sentences "I want to watch baseball" and "I want to watch soccer," which are semantically related in terms of watching sports, are placed close to each other in the vector space. On the other hand, the sentence "I want to walk my dog," which is less semantically related to watching sports, is placed far from "I want to watch baseball" and "I want to watch soccer" in the vector space.
[0019] The vector database 2c is a database that collects data converted into a vector representation format by the embedding model 2b. The vector database 2c includes, for example, vector data and original data linked to the vector data. The original data is data before being converted into vectors, such as text data.
[0020] As will be described later, the vector database 2c is a collection of organized data that may be used as useful information when generating prompts to be input to the large-scale language model 1a. More specifically, the vector database 2c is a collection of data used for similarity search (vector search). Vector search is a search method that calculates similarity by comparing vector data converted into vector representations to find related (similar) information. For example, vector data whose positions in vector space are within a predetermined range are treated as related information.
[0021] Here, we will explain the flow of information processing in which a response is made to user U1 using a large-scale language model 1a in response to a question, command, etc. input by user U1 in the information processing system 100 shown in Fig. 1. Note that the information processing shown in Fig. 1 is realized by arithmetic processing using a computer (computer processing).
[0022] First, as a preliminary step, the processes indicated by symbols (a1) and (a2) in FIG. 1 are executed. The process indicated by symbol (a1) is a process of inputting knowledge data D1 into the embedding model 2b. The process indicated by symbol (a2) is a process in which the embedding model 2b, to which the data has been input, vectorizes the data and generates the vector database 2c. These processes result in the vector database 2c for vector search described above. As described above, each vector data stored in the vector database 2c is stored in the vector database 2c in a state linked (as a set) with the original data before vector conversion.
[0023] The knowledge data D1 is data that may be used as useful information when generating a prompt. For example, when the large-scale language model 1a is made to answer a question input by a user U1, the knowledge data D1 is data that provides the prompt with information (reference information) that serves as a reference for the answer. A plurality of pieces of knowledge data D1 are input to the embedding model 2b, and each of the plurality of pieces of knowledge data D1 is vectorized and stored in the vector database 2c.
[0024] Assuming that the above advance preparations have been completed, user U1 makes an input to the dialogue device 2 (process (b1)). The input from user U1 is, for example, a command or question using voice input. However, user U1's input may be something other than voice input, such as character input using character keys. A specific example of the input content from user U1 is, for example, "I want to go to a convenience store (an abbreviation for convenience store)."
[0025] When a user U1 makes an input to the dialogue device 2, for example, the dialogue processing unit 2a converts the input voice (voice data) of the user U1 into sentence data (text data). The sentence data obtained by this conversion (hereinafter, for convenience of explanation, referred to as a question) is input to the embedding model 2b (process (b2)). The embedding model 2b converts the question into a vector and outputs the vector data of the question (process (b3)).
[0026] Next, the dialogue processing unit 2a performs a vector search using the vector data of the question sentence and the vector database 2c (process (b4)). By the vector search, data having a meaning highly relevant to the question sentence is extracted from the vector database 2c as additional data (process (b5)). The additional data may be singular or plural. The extracted additional data is extracted as text data, since it will be used as text data rather than vector data thereafter. The text data is the original data linked to the vector data described above.
[0027] In this example, the question sentence is vectorized. However, it is also possible to extract words from the question sentence by morphological analysis and extract additional data by utilizing the semantic relationships of the words. In this case, the extracted additional data is word data linked to vector data. In this case, the vector database 2c is a collection of vector data in which word data is converted into a vector representation format.
[0028] The dialogue processing unit 2a generates a prompt based on the question entered by the user U1 and the extracted additional data, and inputs the generated prompt to the large-scale language model 1a (process (b6)). The generated prompt may simply be a list of the question and the additional data (text data), or may be a prompt that has been processed, such as by modifying the question in accordance with the additional data. Furthermore, if there is a limit on the number of characters in the prompt, an adjustment process may be performed to accommodate the limit.
[0029] When a prompt is input, the large-scale language model 1a generates an answer sentence according to the content of the input prompt and outputs it to the dialogue device 2 (process (b7)). The answer sentence generated by the large-scale language model 1a is derived by adding additional data to the question sentence of the user U1. Upon receiving the answer sentence, the dialogue device 2 outputs the obtained answer sentence to the user U1, for example, by using voice or a screen display.
[0030] As can be seen from the above explanation, the information processing method (prompt generation method) of this embodiment for generating a prompt to be input to the large-scale language model 1a performs the following: In response to an input from user U1, the information processing method extracts additional data from a database prepared for searching for reference information, and generates a prompt based on the input from user U1 and the additional data.
[0031] In this embodiment, the database prepared for the reference information search is a vector database 2c in which each piece of data is converted into a vector according to its characteristics and collected. However, this is merely an example. The search for reference information may be configured to perform a keyword search instead of a vector search. In this case, the data prepared for the reference information search does not need to be vector-converted vector data. In other words, the database prepared for the reference information search may be a database in which word data or sentence data is stored in its original format (text data format). However, using a vector search enables searches that capture semantic similarities with higher accuracy than using a keyword search. In consideration of this, it is preferable that the database prepared for the reference information search be a vector database.
[0032] <2. Interactive device> Next, a description will be given of the configuration of the dialogue device 2 included in the information processing system 100. In this embodiment, the dialogue device 2 includes an information processing device 20 (see FIG. 3 described later) that generates prompts to be input to the large-scale language model 1a. The information processing device 20 includes the dialogue processing unit 2a, the embedding model 2b, and the vector database 2c described above.
[0033] Fig. 3 is a block diagram showing a schematic configuration of a dialogue device 2 according to an embodiment of the present invention. Note that Fig. 3 shows components necessary for explaining the features of the dialogue device 2 according to the embodiment, and a description of general components is omitted. As shown in Fig. 3, the dialogue device 2 includes a controller 21 and a memory 22. The dialogue device 2 further includes a communication unit 23, a microphone 24, and a speaker 25. Note that the information processing device 20 included in the dialogue device 2 is configured by the controller 21, the memory 22, and the communication unit 23.
[0034] The controller 21 is configured to include an arithmetic circuit that performs arithmetic processing. More specifically, the controller 21 is equipped with a processor that performs arithmetic processing and the like. The processor is configured to include, for example, a CPU (Central Processing Unit). The controller 21 may be configured with one processor or multiple processors. When configured with multiple processors, the processors only need to be connected to each other so that they can communicate with each other.
[0035] The memory 22 is configured to include volatile memory and nonvolatile memory. The volatile memory is specifically RAM (Random Access Memory). The nonvolatile memory is specifically ROM (Read Only Memory). The nonvolatile memory may also include flash memory, a hard disk drive, or the like. The nonvolatile memory stores computer-readable programs (computer programs) and data.
[0036] In this embodiment, the memory 22 stores model information 221 of the above-mentioned embedding model 2b (see FIG. 1) and a vector database 2c (see FIG. 1) that collects vector data obtained by vector-converting the knowledge data D1. The model information 221 includes the structure and parameters of the embedding model 2b, as well as code instructions for executing the embedding model 2b.
[0037] The communication unit 23 is configured as a communication interface having an interface circuit for connecting to a communication network (not shown) such as the Internet. The microphone 24 is provided as a means for inputting the voice of the user U1 to the dialogue device 2. The speaker 25 is provided as a means for outputting a response or the like from the large-scale language model 1a to the user U1 by voice. The dialogue device 2 may also include a display device with a touch panel that functions as a means for inputting commands or the like from the user U1 and a means for outputting a response from the large-scale language model 1a.
[0038] In detail, the functions of the controller 21 include a dialogue unit 211, an embedding unit 212, a search unit 213, a prompt generation unit 214, a history information collection unit 215, and an update unit 216. The functions of the controller 21 are realized by a processor executing arithmetic processing in accordance with a program stored in the memory 22. The program that realizes the functions of the controller 21 may be composed of a single program or multiple programs.
[0039] The program stored in memory 22 may be provided by, for example, a computer-readable nonvolatile recording medium. The nonvolatile recording medium may be, for example, the nonvolatile memory described above, an optical recording medium (for example, an optical disk), a magneto-optical recording medium (for example, a magneto-optical disk), a USB memory, or an SD card. As another example, the program stored in memory 22 may be provided from a program providing server via a communication line such as the Internet (provided by so-called download).
[0040] In the present embodiment, the functions of the controller 21 are realized by an arithmetic circuit (processor) executing arithmetic processing according to a program, i.e., by software, but this is merely an example and the functions may be realized by other methods. At least some of the functions of the controller 21 may be realized using, for example, an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array). That is, at least some of the functions of the controller 21 may be realized by hardware using a dedicated IC or the like. At least some of the functions of the controller 21 may also be realized by a combination of software and hardware.
[0041] Furthermore, each of the functional units 211 to 216 is a conceptual component. A function executed by one component may be distributed among multiple components. Furthermore, the functions of multiple components may be integrated into one component.
[0042] The dialogue unit 211 accepts inputs such as commands and questions from the user U1. Specifically, the dialogue unit 211 acquires speech uttered by the user U1 as speech data via the microphone 24 and converts the acquired speech data into text data using a known speech recognition technique. The speech recognition may be performed using, for example, an AI model for speech recognition.
[0043] The dialogue unit 211 also acquires an answer sentence (text data) from the large-scale language model 1a. The dialogue unit 211 converts the acquired answer sentence into voice data using a known voice synthesis technology (voice reading technology), and outputs the voice data to the user U1 via the speaker 25. The generation of voice using the voice synthesis technology may be performed using, for example, an AI model for voice generation.
[0044] The embedding unit 212 executes the embedding process using the above-described embedding model 2b (see FIG. 1). As described above, the embedding process is a process of vector-converting data input to the embedding model 2b. That is, the controller 21 executes the embedding process of converting data into vectors. The embedding process can also be executed by a device provided outside the dialogue device 2, but in the configuration of this embodiment, the dialogue device 2 can execute the embedding process. The embedding unit 212 executes, for example, the embedding process of knowledge data D1 (see FIG. 1) and the embedding process of a question sentence entered by the user U1.
[0045] The knowledge data D1 may be input to the embedding model 2b by being input to the dialogue device 2, for example, from a non-volatile recording medium or by downloading. The knowledge data D1 vector-converted by the embedding model 2b is stored in the vector database 2c as a set of the original data before conversion and the vector data after vector conversion. Furthermore, a question or the like input by the user U1 is converted into text data by the dialogue unit 211, and then input to the embedding model 2b and vector-converted.
[0046] The search unit 213 extracts additional data from a database prepared for searching for reference information in response to an input from the user U1. The database prepared for searching for reference information is stored in the memory 22, and in this embodiment is the vector database 2c. In detail, the search unit 213 performs the vector search described above. The search unit 213 extracts additional data using data obtained by vector-converting the question, etc. input by the user U1 using the embedding model 2b, and the vector database 2c, which collects and converts each of the multiple pieces of knowledge data D1 into vector data. The search unit 213 extracts, as additional data, vector data that is semantically similar (related) to the vector data obtained by vector-converting the question, etc., of the user U1 using the embedding model 2b. The number of additional data may be single or multiple. Also, there may be no additional data.
[0047] The prompt generation unit 214 generates a prompt to be input to the large-scale language model 1a based on the user's input and the additional data. Specifically, the prompt generation unit 214 handles the additional data in the form of text data, not in the form of vector data. The prompt generation unit 214 generates a prompt based on text data such as a question input by the user U1 and the extracted additional data (text data). As described above, the prompt is, for example, a list of the user's question and the additional data, or a list of the question modified using the additional data.
[0048] The prompt generated by the prompt generation unit 214 is input to the large-scale language model 1a. The large-scale language model 1a generates an answer sentence in response to the prompt and transmits the generated answer sentence to the dialogue device 2. The dialogue device 2 processes the answer sentence in the dialogue unit 211, and performs, for example, audio output of the answer sentence using the speaker 25, or display of the answer sentence using a display device (not shown). The user U1 who receives the answer sentence responds appropriately to it.
[0049] The history information collection unit 215 collects, as history information, responses made by the user U1 in response to responses from the large-scale language model 1a in response to input of a prompt. In detail, the history information collection unit 215 collects, as a dialogue history, a series of information from the input of a question or the like by the user U1 to the response of the user U1 to the response from the large-scale language model 1a. The dialogue history is collected to make the vector database 2c a personalized database suitable for the user U1. The dialogue history may be collected for all dialogues that the user U1 has with the dialogue device 2, or may be collected for only a specific part of the dialogues. A specific example of a method for collecting a dialogue history will be described later.
[0050] The update unit 216 updates the database using the collected history information. In other words, the collected history information is used to update the database. In detail, the update unit 216 updates the vector database 2c using the dialogue history collected by the history information collection unit 215. The update of the vector database 2c by the update unit 216 may be performed, for example, periodically (every month, etc.), or may be performed every time a predetermined number of dialogue histories (100 items, etc.) are accumulated. Furthermore, the update of the vector database 2c by the update unit 216 may be performed in response to a command from the user U1. A specific example of a method for updating the vector database 2c will be described later.
[0051] In this embodiment, the vector database 2c itself is updated using history information (dialogue history) that collects responses made by the user U1 in response to answers from the large-scale language model 1a. This allows the vector database 2c itself to be a personalized database suited to each user U1. As a result, prompts that cause the large-scale language model 1a to provide answers suited to the user U1 can be generated using reference information extracted from the vector database 2c, without having to refer to the dialogue history each time a prompt is generated. In other words, it is possible to prevent an increase in the time required to generate prompts that cause the user to provide answers suited to the user and an increase in the processing load when generating each prompt.
[0052] Furthermore, according to the configuration of this embodiment, since the prompt is generated using additional data extracted from the personalized vector database 2c, it is possible to reduce the likelihood of the large-scale language model 1a providing an answer that the user does not want. As a result, it is possible to reduce the likelihood that the user of the dialogue device 2 will feel annoyed. For example, it is possible to reduce the likelihood that a route that the user does not want to take will be suggested every time when the user requests route suggestions, or that a store that the user does not want to go to will be suggested when the user requests suggestions for nearby convenience stores.
[0053] Furthermore, according to the configuration of this embodiment, since prompts are generated using additional data extracted from the personalized vector database 2c, even if user U1 asks an ambiguous question or command, it is expected that a suitable answer will be provided to user U1. For example, if user U1 simply says, "I want to go home," it is expected that a suggestion of a route to his / her home that prioritizes toll roads will be provided. Furthermore, if user U1 simply says, "Play some music," it is expected that music from user U1's favorite album will be automatically played.
[0054] <3. Collection of history information> In the information processing method of this embodiment, responses made by the user U1 in response to responses from the large-scale language model 1a in response to input prompts are collected as history information. In this embodiment, as described above, the history information is collected as a dialogue history. A specific example of a method for collecting a dialogue history will be described below.
[0055] 4 is a flowchart showing an example of a method for collecting dialogue history executed by the dialogue device 2 (information processing device 20). The flowchart shows the technical content of a computer program that causes a computer to realize the method for collecting history information (corresponding to part of the information processing method executed by the information processing device 20).
[0056] The process shown in FIG. 4 can be executed when the power of the dialogue device 2 is turned on and the dialogue device 2 transitions to a state in which it can dialogue with the user U1. The process shown in FIG. 4 may be executed every time a dialogue with the user U1 is performed, but is preferably executed only in specific cases. The specific case may be, for example, every certain number of dialogues, such as every 10 dialogues. The specific case may be, for example, when the vehicle equipped with the dialogue device 2 is stopped and the user has permitted collection of the dialogue history. The case in which the vehicle is stopped may be before starting or after finishing driving the vehicle.
[0057] In step S1, the controller 21 (dialogue unit 211) acquires an input sentence from the user U1. The input sentence here is text data of a question or command issued by the user U1. In this embodiment, the controller 21 acquires the input sentence from the user U1 by converting voice data such as a question issued by the user U1 into text data. The input sentence from the user U1 is temporarily stored in a RAM or the like provided in the memory 22. Once the input sentence from the user U1 has been acquired, the process proceeds to the next step S2.
[0058] In step S2, the controller 21 (embedding unit 212) performs an embedding process on the acquired input sentence of user U1. As a result, vector data of the input sentence of user U1 is obtained. The acquired vector data of the input sentence is temporarily stored in a RAM or the like provided in the memory 22. When the embedding process of the input sentence of user U1 is completed, the process proceeds to the next step S3.
[0059] In step S3, the controller 21 (search unit 213) extracts multiple pieces of additional data similar to the input sentence of user U1 from the vector database 2c by vector search. That is, when collecting history information (dialogue history), multiple pieces of additional data are extracted from the database. By configuring the large-scale language model 1a to extract multiple pieces of additional data, it becomes easier to generate prompts that generate multiple answers. A predetermined number of pieces of additional data are extracted in descending order of semantic similarity with the input sentence of user U1. The predetermined number may be determined arbitrarily, for example, five pieces. Once the multiple pieces of additional data have been extracted from the vector database 2c, the process proceeds to the next step S4.
[0060] In step S4, the controller 21 (prompt generation unit 214) generates a prompt so that the large-scale language model (LLM) 1a generates multiple answers. That is, when historical information (dialogue history) is collected, the prompt is generated so that multiple answers can be obtained from the large-scale language model 1a. With this configuration, multiple answers can be presented to the user U1, allowing the user U1 to select a preferred answer from the multiple answers. The prompt generated in step S4 may, for example, list an input sentence (question sentence) provided by the user and multiple additional data, along with a prompt such as "Please output five possible answers to the above question." Note that the command sentence portion of the prompt, such as "Please output five possible answers to the above question," can be generated by selecting an appropriate template from a group of pre-prepared (stored) templates according to the content of the question. More specifically, the prompt may be configured as follows, for example: "I want to go to the nearest convenience store. Please provide a possible answer to this question. Reference information: Go to store A. Go to store B. Go to store C. ..." Once the generation of the prompt is complete, the process proceeds to the next step S5.
[0061] The large-scale language model 1a receives the prompt generated in step S4 and generates a response to the prompt. The large-scale language model 1a outputs the generated responses to the dialogue device 2.
[0062] In step S5, the controller 21 (dialogue unit 211) acquires multiple answers from the large-scale language model 1a and presents the multiple answers from the large-scale language model 1a to the user U1. Furthermore, when presenting the multiple answers to the user U1, the controller 21 (dialogue unit 211) requests the user U1 to select one of the multiple answers. The presentation of the multiple answers and the request for selection may be configured to be given by voice via the speaker 25, for example. As another example, the presentation of the multiple answers and the request for selection may be given using a display device (not shown) with a touch panel function. As yet another example, one of the presentation of the multiple answers and the request for selection may be given by voice, and the other may be given using a display device. Once the presentation of the multiple answers and the request for selection have been completed, the process proceeds to the next step S6.
[0063] When the interactive device 2 presents a plurality of answers and requests the user U1 to select one, the user U1 selects an answer that suits his or her preference from the plurality of answers.
[0064] In step S6, the controller 21 (history information collection unit 215) acquires the selection results of the user U1 for the multiple answers, and stores the dialogue history including the selection results in the memory 22. The selection results of the user U1 for the multiple answers are acquired, for example, by voice input or input using a touch panel. The dialogue history is stored in the memory 22, for example, as a history information table 222 as shown in FIG. 5. When the generation or update of the history information table 222 is completed, the dialogue history collection method shown in FIG. 4 is completed.
[0065] Fig. 5 is a diagram showing an example of the history information table 222. As shown in Fig. 5, the information items held by the history information table 222 include a history number, an input sentence, vector information, an LLM answer, and a selection result. The registered information for each item in the history information table 222 is updated each time collection of a dialogue history is completed. Note that information registered in the history information table 222 that has been stored for a certain period of time may be deleted as appropriate.
[0066] The "History Number" item stores a number as identification information that identifies information collected sequentially as a dialogue history. The "History Number" functions as the primary key of the history information table 222. A data record is generated for each history number. The information corresponding to each history number, namely, "Input Sentence," "Vector Information," "LLM Response," and "Selection Result," is stored in the data record.
[0067] The item "input sentence" stores text data such as a question entered by the user U1. The item "vector information" stores vector data obtained by vector-converting the input sentence using the embedding model 2b. The item "LLM answer" stores the answer result of the large-scale language model 1a to a prompt generated to allow multiple answers. The item "selection result" stores the selection result of the user U1 from the multiple answers presented by the large-scale language model 1a. The history information table 222 configured in this way is used when the update unit 216 updates the vector database 2c.
[0068] 4, in order to obtain multiple answers from the large-scale language model 1a, the prompts input to the large-scale language model 1a are configured to generate multiple answers from the large-scale language model 1a, but this is merely an example. It is also possible to obtain multiple answers by inputting the prompts to multiple large-scale language models 1a without particularly configuring the prompts in this way.
[0069] In the example shown in FIG. 4, the user U1 is requested to select one of multiple answers generated by the large-scale language model 1a, but this is merely an example. For example, after multiple answers are presented to the user U1, the behavior of the user U1 may be tracked to automatically obtain which answer the user U1 selected. For example, after multiple convenience stores are presented to the user U1, the behavior of the user U1 or the movement of the vehicle in which the user U1 is riding may be tracked using a GPS (Global Positioning System). Then, information on which store the user U1 visited may be obtained from the tracking results, and the selection result of the user U1 may be automatically obtained from the information.
[0070] <4. Database Update> In the information processing method of this embodiment, a database is updated using history information. In this embodiment, as described above, the history information is a dialogue history, and the database to be updated is the vector database 2c. A specific example of a method for updating the vector database 2c will be described below.
[0071] [4-1. Overview] 6 is a flowchart showing an example of a method for updating the vector database 2c executed by the interactive device 2 (information processing device 20). The flowchart shows the technical content of a computer program that causes a computer to realize the database updating method (corresponding to a part of the information processing method executed by the information processing device 20).
[0072] The process shown in Fig. 6 can be executed when the power of the dialogue device 2 is turned on and the state transitions to a state where the update process for the vector database 2c can be performed. In addition, the process shown in Fig. 6 is executed, for example, when a certain period (e.g., one month) has passed since the previous update process, at a specific predetermined time (e.g., when driving ends), or when a predetermined number of dialogue histories (e.g., 100) have been accumulated since the previous update process.
[0073] In step S10, the controller 21 (update unit 216) generates a reward model. The reward model is a model that can evaluate "what kind of additional data (data to be added to the prompt) is desirable for user U1." The reward model is a learning model obtained by machine learning, for example. However, in some cases, the reward model may be a table or a relational expression that indicates the relationship between data and reward. A specific example of a method for generating a reward model will be described later. Once the reward model is generated, the process proceeds to step S20.
[0074] In step S20, the controller 21 (updating unit 216) updates the embedding model 2b using the generated reward model. The embedding model 2b can be updated using so-called reinforcement learning. A specific example of a method for updating the embedding model 2b will be described later. Once the embedding model 2b has been updated, the process proceeds to step S30.
[0075] In step S30, the controller 21 (updating unit 216) updates the vector database 2c using the embedding model 2b updated in step S20. A specific example of the process of updating the vector database 2c will be described later.
[0076] As can be seen from the above, in this embodiment, the vector database 2c itself is updated using the dialogue history of user U1. This allows the vector database 2c itself to be a personalized database suited to user U1. As a result, it is possible to generate prompts that cause the large-scale language model 1a to provide answers suited to user U1 using reference information extracted from the vector database 2c, without having to refer to the dialogue history each time a prompt is generated. In other words, it is possible to prevent an increase in the time required to generate prompts that cause the user to provide answers suited to the user and an increase in the processing load when generating each prompt.
[0077] In this embodiment, when updating the vector database 2c, the embedding model 2b is updated to an embedding model suitable for the user based on the dialogue history, and the vector database 2c is updated using the updated embedding model. By generating the personalized embedding model 2b in advance in this way, the vector database 2c can be updated efficiently.
[0078] In this embodiment, the embedding model 2b is updated using a reward model generated based on the dialogue history. By configuring the reward model to be generated, it becomes possible to accurately evaluate the preferences of the user U1 obtained from the dialogue history, and a personalized embedding model 2b can be appropriately obtained.
[0079] [4-2. Generating a Reward Model] 7 is a flowchart illustrating the process of generating a reward model, showing the detailed flow of step S10 in FIG.
[0080] In step S11, the controller 21 (update unit 216) reads dialogue history data from the history information table 222 (see FIG. 5) stored in the memory 22. The dialogue history data is read out by classifying it into dialogue histories in which the contents of the input sentences of the user U1 are similar. Whether the contents of the input sentences belong to the same category can be determined by comparing the vector information of each input sentence. The number of categories may be one or more. If there are multiple categories, the processes of steps S12 and S13 described below are performed for each category. Here, for simplicity of explanation, it is assumed that there is one category. Once the dialogue history data has been read out, the process proceeds to the next step S12.
[0081] In step S12, the controller 21 (update unit 216) ranks the knowledge data to be added to the input sentence of the user U1 based on the read dialogue history data. The ranking is performed so that the more useful the data is to the user U1, the higher the rank it is assigned.
[0082] Specifically, multiple answers (LLM answers in the history information table 222) made by the large-scale language model 1a in response to the input sentence of the user UI are scored according to the selection results of the user U1, and ranking is performed according to the scores. For example, points are assigned according to the number of times the user U1 selected the answers or the high selection rate. Knowledge data corresponding to answers that are selected more frequently or more frequently are determined to be useful data and are assigned high scores, so they are ranked higher. For example, ranking is performed as follows: "knowledge data α > knowledge data β > knowledge data γ = knowledge data δ...". After performing the ranking, the controller 21 (update unit 216) stores the ranking data in the memory 22 as ranking information 223 (see FIG. 8 described later). Once the ranking information 223 is generated, the process proceeds to the next step S13.
[0083] In step S13, the controller 21 (update unit 216) generates a reward model RM by a known method using the previously acquired ranking information 223. Fig. 8 is a schematic diagram showing an image of generating the reward model RM. The reward model RM configured as a machine learning model is generated by, for example, performing the learning process shown in Fig. 8.
[0084] The answer from the large-scale language model 1a is used as training data DA. The training data DA is input to a reward model RM and a labeler LB. The reward model RM outputs a reward based on the training data DA. The labeler LB outputs a correct label (reward as a correct label) that reflects the preferences of the user U1 based on the previously acquired ranking information 223. The loss calculation unit LS calculates the difference (loss) between the reward output by the reward model RM and the labeler LB. The reward model RM updates the parameters so that the calculated loss becomes smaller. The above learning process is repeated a predetermined number of times to generate the reward model RM.
[0085] [4-3. Updating the Embedding Model (Personalization)] 9 is a flowchart illustrating the process of updating the embedding model 2b, showing the detailed flow of step S20 in FIG.
[0086] In step S21, the controller 21 (update unit 216) executes embedding processing using the embedding model 2b for the input sentence extracted from the dialogue history data and the multiple answers of the large-scale language model 1a. When the embedding processing is completed, the process proceeds to the next step S22.
[0087] In step S22, the controller 21 (update unit 216) performs a similarity search (vector search) on the vector DB using the vector data of the input sentence obtained in step S21 and the vector data of the multiple answers. Through this similarity search, knowledge data related (similar) to the input sentence is extracted. The extracted knowledge data corresponds to additional data added to a prompt during a dialogue. Once the knowledge data is extracted through the similarity search, the process proceeds to the next step S23.
[0088] In step S23, the controller 21 (update unit 216) evaluates the knowledge data extracted by the similarity search using the previously obtained reward model RM (see FIG. 8). Specifically, the knowledge data extracted by the similarity search is input to the reward model RM, and a reward is output. Once the reward is calculated, the process proceeds to the next step S24.
[0089] In step S24, the controller 21 (updating unit 216) updates the embedding model 2b in accordance with the acquired reward. Specifically, the acquired reward is used to update the current embedding model 2b to an embedding model 2b that is expected to obtain a higher reward. Note that a series of processes for maximizing such reward may be performed using a known reinforcement learning algorithm such as TRPO (Trust Region Optimization) or PPO (Proximal Policy Optimization). After the embedding model update process is performed, the process proceeds to the next step S25.
[0090] In step S25, the controller 21 (update unit 216) determines whether or not to end the reinforcement learning. For example, the controller 21 determines to end the reinforcement learning when the number of times the processes from step S21 to step S25 have been performed is equal to or greater than a predetermined number. If it is determined to end the reinforcement learning (Yes in step S25), the process shown in FIG. 9 is ended, and an updated embedding model 2b is obtained. The updated embedding model 2b is a personalized embedding model that performs embedding processing suitable for user U1 based on the dialogue history of user U1. If it is determined not to end the reinforcement learning (No in step S25), the process returns to step S21, and the processes from step S21 onwards are repeated.
[0091] [4-4. Vector database update] 10 is a flowchart illustrating the process of updating the vector database 2c, showing the detailed flow of step S30 in FIG.
[0092] In step S31, the controller 21 (update unit 216) reads knowledge data. The knowledge data to be read may be the same as the knowledge data D1 shown in FIG. 1 described above, or may be new knowledge data added thereto. The knowledge data may be stored in the memory 22 or may be input from an external source. When the reading of the knowledge data is completed, the process proceeds to the next step S32.
[0093] In step S32, the controller 21 (updating unit 216) performs embedding processing for each of the read knowledge data using the previously updated embedding model 2b. As a result, vector data for each knowledge data is obtained. When the embedding processing is completed, the process proceeds to the next step S33.
[0094] In step S33, the controller 21 (updating unit 216) performs a process of replacing the vector data already stored in the vector database 2c with the vector data acquired using the updated embedding model 2b, thereby obtaining a personalized vector database 2c.
[0095] FIG. 11 is a diagram for explaining the updated vector database 2c. In FIG. 11, the left diagram is an image diagram of the vector database 2c before the update, and the right diagram is an image diagram of the vector database 2c after the update. The vector database 2c before the update is a database before it has been personalized to a state suitable for user U1. The vector database 2c after the update is a database personalized to a state suitable for user U1. In the example shown in FIG. 11, the input sentence of user U1 is "I want to go to a convenience store." In addition, in FIG. 11, the data present inside the dashed line indicates data similar to the input sentence "I want to go to a convenience store."
[0096] Before the vector database was updated (see the left diagram in FIG. 11), when "I want to go to a convenience store" was input, the dialogue device 2 (information processing device 20) extracted "Store A," "Store B," and "Store C" as additional data through a similarity search. On the other hand, after the vector database was updated (see the right diagram in FIG. 11), when "I want to go to a convenience store" was input, the dialogue device 2 (information processing device 20) extracted only "Store B" and "Store C" as additional data through a similarity search, but did not extract "Store A." This is because, when a similarity search is performed using a vector database 2c personalized using the dialogue history, "Store A" is determined to have low similarity (relevance) to "I want to go to a convenience store."
[0097] The vector database 2c was updated in this way because, based on the dialogue history data, it was found that user U1 never or rarely selected "Store A" when going to a convenience store. When the updated (personalized) vector database 2c is used, "Store A" is not included as reference information in the prompt, so the likelihood that "Store A" will be included in the convenience stores suggested by the large-scale language model 1a is low. In other words, when the personalized vector database 2c is used, user U1 is less likely to be suggested a store that he or she does not want to go to. As a result, it is possible to reduce the annoyance that user U1 feels when the dialogue device 2 always suggests a store that he or she does not want to go to.
[0098] <5. Variations> In the above, the interactive device 2 (information processing device 20) is configured to include the embedding model 2b and the vector database 2c. However, this is merely an example. At least one of the embedding model 2b and the vector database 2c may be located outside the interactive device (information processing device).
[0099] Fig. 12 is a block diagram showing an overview of an information processing system 100A of a modified example. As shown in Fig. 12, the information processing system 100A of the modified example includes an information processing device 20A that generates prompts to be input to a large-scale language model 1a, and a server 3 that includes an embedding model 3a and a vector database 3b. As in the above-described embodiment, the information processing device 20A constitutes a part of the dialogue device 2A. That is, the example shown in Fig. 12 is configured such that both the embedding model 3a and the vector database 3b are located outside the dialogue device 2A (information processing device 20A).
[0100] 12 further includes a server 1 having a large-scale language model 1a having the same configuration as in the above-described embodiment. However, the server 1 may be a separate element from the information processing system 100A.
[0101] Fig. 13 is a block diagram showing the configuration of an interactive device 2A included in an information processing system 100A according to a modified example. Fig. 14 is a block diagram showing the configuration of a server 3 included in an information processing system 100A according to a modified example. Note that Figs. 13 and 14 show components necessary for explaining the features of the device according to the modified example, and descriptions of general components are omitted.
[0102] The dialogue device 2A according to the modified example is similar to the dialogue device 2 according to the above-described embodiment in the following respects. The dialogue device 2A is capable of communicating with external servers 1 and 3 (the variant differs from the above-described embodiment in that there are two servers) using a communication unit 23. The dialogue device 2A is also capable of conversing with a user U1 using a microphone 24 and a speaker 25. The information processing device 20A included in the dialogue device 2A is composed of a controller 21A, a memory 22A, and a communication unit 23.
[0103] The configuration of the controller 21A of the dialogue apparatus 2A according to the modified example is generally similar to that of the embodiment described above. However, in this modified example, the embedding model 3a and the vector database 3b are provided in the server 3, and therefore some functions are different. That is, the controller 21A of the dialogue apparatus 2A according to the modified example does not include the embedding unit 212, the search unit 213, and the update unit 216 described above. The dialogue apparatus 2A also includes a search result acquisition unit 217 instead of the search unit 213. The search result acquisition unit 217 has a function of acquiring the search results performed by the server 3. The dialogue unit 211, the prompt generation unit 214, and the history information collection unit 215 provided in the controller 21A of the dialogue apparatus 2A have the same functions as those in the embodiment described above.
[0104] The server 3 includes a controller 31 and a memory 32 that constitute a computer device. The functions of the controller 31 are realized by a processor executing arithmetic processing in accordance with a program stored in the memory 32. The server 3 further includes a communication unit 33, which enables communication with the interactive device 2A. In other words, the server 3 is provided so as to be able to communicate with the information processing device 20A.
[0105] Specifically, the controller 31 has, as its functional units, an embedding unit 311, a search unit 312, and an update unit 313. The function of the embedding unit 311 is similar to that of the embedding unit 212 provided in the dialogue device 2 (information processing device 20) of the above-mentioned embodiment. That is, the server 3 performs embedding processing. The function of the search unit 312 is similar to that of the search unit 213 provided in the dialogue device 2 (information processing device 20) of the above-mentioned embodiment. That is, the server 3 performs similarity search (vector search). The function of the update unit 313 is similar to that of the update unit 216 provided in the dialogue device 2 (information processing device 20) of the above-mentioned embodiment. That is, the server 3 updates the vector database 3b.
[0106] The memory 32 stores model information 321 for the embedding model 3a, similar to the embodiment described above, and also stores a vector database 3b, similar to the embodiment described above.
[0107] In the information processing system 100A, the information processing device 20A acquires, from the server 3, additional data extracted from the vector database 3b in response to an input from the user U1. In detail, the dialogue unit 211 converts the content of the user U1's utterance into text data, which is transmitted to the server 3 and converted into vector data by the embedding unit 311 of the server 3. Then, the search unit 312 of the server 3 extracts the additional data by a similarity search (vector search) using the vector database 3b, and transmits the additional data to the information processing device 20A. The transmitted data is acquired by the search result acquisition unit 217 of the information processing device 20A, allowing the information processing device 20A to acquire the additional data.
[0108] Furthermore, in the information processing system 100A, the information processing device 20A generates a prompt based on the input of the user U1 and the additional data. The prompt is generated by a prompt generation unit 214 that performs the same processing as in the above-described embodiment. The generated prompt is input to the large-scale language model 1a, and the response of the large-scale language model 1a is acquired and processed by the dialogue unit 211, similar to the above-described embodiment.
[0109] In the information processing system 100A, the information processing device 20A collects, as history information, responses made by the user to responses from the large-scale language model 1a in response to input prompts. The collection is performed by the history information collection unit 215, which performs the same processing as in the above-described embodiment.
[0110] Furthermore, in the information processing system 100A, the server 3 updates the vector database 3b using history information (interaction history) acquired from the information processing device 20A. The vector database 3b is updated by an update unit 313 that performs the same processing as in the above-described embodiment.
[0111] In the information processing system 100A of the modified example, the vector database 3b itself is updated using the dialogue history of the user U1. This allows the vector database 3b itself to be a personalized database suited to the user U1. As a result, it is possible to generate prompts that cause the large-scale language model 1a to provide answers suited to the user U1 using reference information extracted from the vector database 3b, without having to refer to the dialogue history each time a prompt is generated. In other words, it is possible to prevent an increase in the time required to generate prompts that cause the user to provide answers suited to the user and an increase in the processing load when generating each prompt.
[0112] <6. Points to note> Various technical features disclosed in the description of the present invention may be modified in various ways without departing from the spirit of the technical creation. Furthermore, multiple embodiments and modifications disclosed in the description of the present invention may be combined to the extent possible. [Explanation of symbols]
[0113] 1a Large-scale language model 2. Interactive device 2b, 3a Embedding model 2c, 3b... Vector database 3. Server 20, 20A... Information processing equipment 22, 32... memory 100A···Information Processing System RM···Reward Model
Claims
1. 1. A method of information processing for generating prompts for input to a large-scale language model, comprising: Extracting additional data from a database prepared for reference information retrieval in response to user input; generating the prompt based on the user input and the additional data; Collecting, as history information, responses made by the user in response to the responses from the large-scale language model in response to the input of the prompt; The information processing method further comprises updating the database using the history information.
2. When the history information is collected, The information processing method of claim 1 , wherein the prompt is generated to provide multiple answers from the large-scale language model.
3. When the history information is collected, The information processing method according to claim 2 , wherein a plurality of pieces of the additional data are extracted from the database.
4. 4. The information processing method according to claim 1, wherein the database is a vector database in which each piece of data is converted into a vector according to its characteristics and collected.
5. When updating the vector database, updating an embedding model that performs the conversion to the vector to an embedding model that is suitable for the user based on the history information; The information processing method according to claim 4 , further comprising updating the vector database using the updated embedding model.
6. The information processing method according to claim 5 , wherein the embedding model is updated using a reward model generated based on the history information.
7. An information processing program that causes a computer to execute an information processing method for generating prompts to be input to a large-scale language model, the method comprising: The computer Extracting additional data from a database prepared for reference information retrieval in response to user input; generating the prompt based on the user input and the additional data; collecting, as history information, responses made by the user in response to responses from the large-scale language model in response to the input of the prompt; updating the database with the historical information; An information processing program that functions as a means to carry out the above.
8. 1. An information processing device that generates prompts to input into a large-scale language model, comprising: Extracting additional data from a database prepared for reference information retrieval in response to user input; generating the prompt based on the user input and the additional data; Collecting, as history information, responses made by the user in response to the responses from the large-scale language model in response to the input of the prompt; The information processing device, wherein the history information is used to update the database.
9. A controller; a memory for storing a database prepared for searching reference information; Equipped with The controller Extracting additional data from said database in response to user input; generating prompts based on the user's input and the additional data to input to a large-scale language model; Collecting, as history information, responses made by the user in response to the responses from the large-scale language model in response to the input of the prompt; The interactive device updates the database using the historical information.
10. The database is a vector database in which each piece of data is converted into a vector according to its characteristics and collected, The interactive device according to claim 9 , wherein the controller executes an embedding process for performing the conversion to the vector.
11. an information processing device that generates prompts to input into a large-scale language model; a server that is provided to be able to communicate with the information processing device and performs an embedding process to convert data into a vector according to its characteristics; a memory provided in the server for storing a vector database that collects the data converted into vectors; Equipped with The information processing device includes: Obtaining additional data from the server that is extracted from the vector database in response to user input; generating the prompt based on the user input and the additional data; Collecting, as history information, responses made by the user in response to the responses from the large-scale language model in response to the input of the prompt; The server An information processing system that updates the vector database using the history information acquired from the information processing device.
Citation Information
Patent Citations
Text generation device and text generation method
JP7325152B1