Device and method
The apparatus and method assist in creating tailored prompts for large-scale language models by using stored templates, automatic generation, and relevance assessment, improving prompt efficiency and accuracy.
Patent Information
- Application Number
- PCT/JP2024/022091
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2025-12-26
AI Technical Summary
Users of large-scale language models face difficulties in creating prompts tailored to their specific tasks, requiring multiple attempts to achieve ideal outputs.
An apparatus and method that includes a memory unit to store templates, a template generation unit to generate templates based on input information, a relevance acquisition unit to assess template relevance, and a template selection unit to choose the most appropriate template for input to the language model.
Facilitates the efficient generation and customization of prompts for large-scale language models, reducing the need for manual adjustments and enhancing prompt accuracy.
Smart Images

Figure JP2024022091_26122025_PF_FP_ABST
Abstract
Description
Apparatus and method
[0001] The present invention relates to an apparatus and method for utilizing a language model.
[0002] Patent Literature 1 describes a text generation device that generates a prompt to be input into a large-scale language model by adding reference information to an input question sentence. This text generation device generates a prompt by adding additional sentences generated based on candidate sentences as reference information to the input question sentence.
[0003] Patent No. 7325152
[0004] Users of large-scale language models must create prompts tailored to individual tasks, making multiple attempts to adjust the model to produce the ideal output. With the technology described in Patent Literature 1, it is difficult to create prompts tailored to the user's task.
[0005] Therefore, an object of the present disclosure is to provide an apparatus and method that can assist a user in creating prompts appropriate for use when using a large-scale language model.
[0006] The device of the present disclosure includes a memory unit that stores a first template that constitutes an input form for a prompt to be input to a first language model; a template generation unit that causes a second language model to generate a second template that constitutes an input form for a prompt to be input to the first language model based on input information; a relevance acquisition unit that acquires the degree of relevance between the first template and the second template; and a template selection unit that selects either the first template or the second template based on the relevance.
[0007] According to the present disclosure, templates can be used to generate appropriate prompts.
[0008] FIG. 1 is a diagram for explaining the templating of prompts according to the present disclosure. FIG. 2 is a diagram illustrating instruction information for causing an LLM to generate a prompt template. FIG. 3 is a transition diagram illustrating receiving a response from an LLM after a template input. FIG. 4 is a diagram illustrating a functional configuration of a template generation device 100 according to the present disclosure. FIG. 5 is a database of stored templates. FIG. 6 is a flowchart illustrating the operation of the template generation device 100 according to the present disclosure. FIG. 7 is a flowchart illustrating the operation of the vector processing unit 103 using similarity. FIG. 8 is a diagram illustrating an example output indicating the similarity between each first template and a second template. FIG. 9 is a flowchart illustrating the operation of the vector processing unit 103 based on task determination according to a modified example. FIG. 10 is a diagram illustrating a score for task determination based on the vector of the second template. FIG. 11 is a diagram illustrating an example hardware configuration of the template generation device 100 according to an embodiment of the present disclosure.
[0009] The present disclosure will be described with reference to the accompanying drawings. Whenever possible, the same parts are designated by the same reference numerals and redundant description will be omitted.
[0010] FIG. 1 is a diagram illustrating the templating of prompts according to the present disclosure. As shown in FIG. 1, a summary template T is generated based on input information N. In FIG. 1, input content information N1 and input numeric information N2 are treated as variables, and a summary template T is generated in which they are replaced with a content portion T1 and a specified number of characters portion T2, respectively. The template name Tn is a name recognized from the input information. In the present disclosure, the input information N contains "Please summarize...," which is recognized as an instruction to summarize.
[0011] The input content information N1 and the input numeric information N2 are portions recognized as subjects, objects, proper nouns, or numbers. The content portion T1 and the specified character number portion T2 are recognized as content because the input content information N1 is a proper noun, and as the specified character number because the input numeric information N2 is a number.
[0012] In the present disclosure, the input information N is a prompt input by a user and is information stored in a storage unit as input history information, but is not limited to history information. The input information N may also be information input in real time.
[0013] 2 is a diagram showing instruction information (template generation instruction prompt) for causing an LLM (Large Language Model) to generate a prompt template. As shown in the figure, this prompt includes an instruction S1, an output rule S2, an output format S3, and a prompt P (corresponding to input information N) that is the target of the template. The instruction S1, output rule S2, and output format S3 are pre-specified information that is automatically read out when a template generation instruction is issued. The target prompt P is information read out from a storage unit and is based on, for example, input history information.
[0014] The instruction S1 includes "Please convert each user input into a prompt template in accordance with the following output rules and output formats." This instruction S1 indicates that the prompt should be converted into a template and that the output rules and output formats should be followed.
[0015] Output rules S2 indicate rules for information output from the LLM, and examples of the present disclosure include "Use {{variable name}} when representing a variable," "Use numbers as variables whenever possible," and "Use subjects and objects as variables whenever possible." Of course, other rules may be included, and it is not necessary to include these rules. Furthermore, rules may be defined in other ways. In addition to subjects and objects, proper nouns may also be used as variables.
[0016] The output format S3 indicates the format of the information output from the LLM. In this disclosure, the JSON format is shown, but other formats are also acceptable. In this disclosure, the title of the template, a description, and the generation of a templated prompt are specified. The prompt P indicates the prompt that is the target of the template.
[0017] In Fig. 3(a), the summary template T shown in Fig. 1 is read and presented to the user (user terminal). The user inputs the content portion T1 and the specified number of characters portion T2 according to the template, thereby generating a prompt according to the template. Fig. 3(b) shows the generated prompt.
[0018] This prompt is input to an LLM (Large Scale Language Model), which generates the content specified by the prompt. Figure 3(c) shows the content generated by the LLM.
[0019] The LLM in the present disclosure is a so-called generative AI model. A generative AI model is a model that can generate content in response to a prompt containing input information, according to the instructions, context, question, and output format indicated in the prompt, and return the content as response information. The prompt can also include input information, in which case the generative AI model generates response information targeted at the input information. The generative AI model may be, for example, an interactive AI model that includes a large language model (LLM) and a user interface (UI) for interacting with a user, enabling text or voice chat with the user. Examples of such generative AI models include ChatGPT, GPT (registered trademark)-3.5, GPT-4V, PaLM2, etc. In this embodiment, the template generation device 100 is capable of providing content provision functions using interactive AI models, which are multiple types of models. These interactive AI models may be stored in template generation device 100, or may be stored in another device connected to template generation device 100 via a network so that information can be exchanged with a user via template generation device 100. Although only one template generation device 100 is shown in the figure, multiple template generation devices 100 may be included.
[0020] In this disclosure, a prompt is information indicating an instruction or question entered by a user in an interactive system such as an interaction with a generative AI model or a command line interface (CLI).
[0021] 4 is a diagram showing the functional configuration of template generation device 100 according to the present disclosure. As shown in the figure, template generation device 100 is configured to be able to communicate with user terminal 200. Template generation device 100 includes an input unit 101, a template generation unit 102 (LLM 102a), a vector processing unit 103, a storage unit 104, a data updating unit 105, a template selection unit 106, and an editing unit 107.
[0022] The input unit 101 is a part that receives input information, which is a request document (prompt) or a request document history (prompt history), from the user terminal 200 or the memory unit 104, and generates and outputs instruction information (template generation instruction prompt) that indicates this input information and a template generation instruction.
[0023] The template generation unit 102 includes an LLM (Large Language Model) 102a. The LLM 102a is a language model that outputs a response to a request document or a request document history. The LLM 102a receives input information (prompts) and instruction information including template generation instructions, and generates a template (second template) that constructs an input form based on the input information. In the present disclosure, the LLM 102a is included in the template generation device 100 (template generation unit 102), but may also be located on an external server. In this case, the template generation unit 102 has the function of generating and outputting prompts that perform request processing to the LLM of the external server and acquiring the response.
[0024] The vector processing unit 103 functions as a score calculation unit and calculates a score indicating the degree of similarity between the template generated by the template generation unit 102 and the template stored in the storage unit 104. In the present disclosure, the template stored in the storage unit 104 is referred to as a first template, and the template generated by the template generation unit 102 is referred to as a second template. Furthermore, the vector of a template is based on the template title, template description, and the template itself. The vector processing unit 103 calculates a similarity score based on the vector. Note that the vector expression is not limited to the above. The vector may be expressed using only the template, or parameters other than those described above may be used.
[0025] The storage unit 104 stores history information of prompts for generating templates, a first template, a second template (selected template), a document vector (for score calculation), and a classifier (for score calculation). The first template is an externally generated template and is registered by an operator of the device. The second template is a template selected based on an evaluation (described later) and is registered.
[0026] Here, the storage of the first and second templates will be described. FIG. 5 shows a database of stored templates. As shown in the figure, the storage unit 104 stores the template title, template description, and template itself in association with each other. This information is data generated by the template generation unit 102 (second template) or data imported from outside by an operator (first template). This first template is a template prepared in advance and is a standard template that serves as a model.
[0027] Data updating unit 105 is a part that updates the document vectors or classifiers stored in storage unit 104. When selecting a second template and storing it in storage unit 104, data updating unit 105 may cause vector processing unit 103 to calculate a vector for the second template and store the second template together with the vector as a first template.
[0028] Furthermore, the data updating unit 105 may update the classifier. Specifically, when data that needs to be classified into a new task is stored in the storage unit 104, the data updating unit 105 assigns a label (task identifier) to the data corresponding to the new task and performs re-learning. As a method for determining a never-before-seen task, the template selecting unit 106 selects a second template when selecting a template, and if the user determines that it is a new task, the editing unit 107 assigns a new label (task identifier) to it and adds it to the storage unit 104.
[0029] The template selection unit 106 is a part that selects a template. If the template selection unit 106 determines that the second template is not similar to the first template, the template selection unit 106 selects the second template as a new first template and stores it in the storage unit 104.
[0030] The editing unit 107 is a part that edits the template selected by the template selection unit 106 or a template specified by an operator. For example, the editing unit 107 accepts changes to variable parts of the template from the user and stores them in the storage unit 104.
[0031] 6 is a flowchart showing the operation of the template generation device 100 of the present disclosure. As shown in the figure, the input unit 101 accepts input information from the user terminal 200 (S101). Then, the template generation unit 102 generates a prompt for the LLM 102a based on the input information and outputs it to the LLM 102a. The LLM 102a inputs the prompt based on the input information and generates a second template that is a response to the prompt. The template generation unit 102 acquires the second template (S102).
[0032] The vector processing unit 103 also acquires a first template stored in the storage unit 104 (S103). The vector processing unit 103 calculates a score indicating the vector similarity between the first template and the second template (S104). The vector similarity between the templates is calculated by converting each template (including the title and content description) into a document vector and then calculating the vector similarity based on the document vectors. The vector similarity may be, for example, cosine similarity.
[0033] The template selection unit 106 makes a determination based on the score and a threshold (S105). If the score is equal to or greater than the threshold, the template selection unit 106 selects the first template (S106). If the score is less than the threshold, the template selection unit 106 selects the second template (S107).
[0034] The editing unit 107 determines whether or not edits to the second template have been accepted by the operator of the template generation device 100 (S108). When edits are made by the operator, the editing unit 107 accepts the edited content and stores the edited second template in the storage unit 104 (S110). Here, the editing unit 107 accepts edits to the second template, but it may also accept edits to the first template. This editing process targets the content portion T1 and the specified number of characters portion T2 shown in FIG. 1 .
[0035] If the selected template has not been edited, template selection unit 106 stores a second template in storage unit 104 (S110). Note that vector processing unit 103 may store the second template, calculate its vector, and store it in storage unit 104 in association with the second template, and store the second template as a first template together with the vector. This makes it possible to use the vector calculated in advance when generating a new template.
[0036] 7 is a flowchart showing the operation of the vector processing unit 103. As shown in the figure, the vector processing unit 103 acquires each element of the title, description, and prompt of each of the first and second templates from the storage unit 104 (see FIG. 5) (S201). Then, the vector processing unit 103 calculates a document vector for each element of the first and second templates (S202).
[0037] The vector processing unit 103 calculates a score indicating the degree of similarity between each of the first templates and the second template for each element (S203). For example, this score is calculated based on the vector similarity (e.g., cosine similarity) for each template. The vector processing unit 103 may calculate the score by adding up the similarities calculated for each element (title, content description, template).
[0038] The vector processing unit 103 then outputs the similarity between each first template and the second template (S204). Fig. 8 shows an example of this output, showing the similarity between each first template and the second template. For example, the similarity between the first template a and the second template is 0.5. Here, the first template includes a template title, a template description, and a templated prompt.
[0039] In step S202, the vector processing unit 103 calculates the vector of the first template. Alternatively, the vector of the first template may be calculated in advance and stored in the storage unit 104.
[0040] In process S203, the vector processing unit 103 calculates the similarity score between the templates for each element, but weighting may be performed on the calculated score. For example, when calculating the score, the vector processing unit 103 may calculate score (template content description) * 0.7 + score (template title) * 0.2 + score (templated prompt) * 0.1, and determine the similarity based on this value.
[0041] In process S104 of FIG. 6 , the vector processing unit 103 calculates the similarity between the templates, but this is not limited to this. Instead of process S104, the second template may be classified into tasks to determine which of the tasks prepared in advance the template belongs to. FIG. 9 is a flowchart showing the operation of the vector processing unit 103 in this modified example. In this disclosure, the vector processing unit 103 functions as a task classifier. Note that processes S101 to S103, S109, and S110 in FIG. 9 are the same as those in FIG. 6 .
[0042] The vector processing unit 103 holds a classifier (learning model) that has previously learned the relationship between learned templates and tasks. The vector processing unit 103 then calculates the vector of a second template (S104a). The vector processing unit 103 (classifier) calculates a score for task determination based on the vector of the second template (S105a).
[0043] An example of the score output is shown in Figure 10. As shown in the figure, the scores output by the classifier differ depending on the task.
[0044] The template selection unit 106 then determines the task of the second template (S105a). If there is a task corresponding to the score (S105b: task present), the template selection unit 106 selects the first template corresponding to the task determined based on the score (S106a). If there is no task corresponding to the score, the template selection unit 106 selects the second template (S107a). The subsequent processes S108 to S110 are the same as those in FIG. 6.
[0045] The storage unit 104 stores a task for each score in advance, and the template selection unit 106 refers to the information stored in the storage unit 104 to select a task according to the score, and selects a first template according to the task.
[0046] In some cases, the first template may not be associated with the score and task output by the classifier. In such cases, a second template is selected. The classifier is trained and updated based on the selected second template, its vector, and the task specified by the operator of template generation device 100.
[0047] Next, the effects of the template generation device 100 of the present disclosure will be described. The template generation device 100 of the present disclosure includes a storage unit 104 that stores a first template that constitutes an input form of a prompt to be input to a first language model. The template generation unit 102 then causes a second language model, the LLM 102a, to generate a second template that constitutes an input form of a prompt to be input to the first language model, based on input information.
[0048] The vector processing unit 103 functions as a degree-of-association acquiring unit and acquires a degree of similarity indicating the degree of association between the first template and the second template. The template selecting unit 106 selects either the first template or the second template based on the degree of association (similarity).
[0049] This allows templates to be generated in a language model such as an LLM and compared with pre-stored templates to generate and select an appropriate template. Prompt engineering is an important element in utilizing an LLM. Generally, to obtain a desired answer from an LLM, it is necessary to utilize the expertise of prompt engineering and make repeated corrections while making multiple attempts. As described above, the present disclosure reduces the cost of creating template-based prompts by automatically generating and expanding prompt templates. In other words, prompts can be efficiently converted into templates, allowing for the development and expansion of a collection of universally usable prompt templates customized for each user, thereby generating a collection of commonly used templates.
[0050] In the present disclosure, the first language model and the second language model may be a common language model, or separate language models may be prepared.
[0051] In the present disclosure, similarity is used as the degree of relevance, but this is not limiting, and information indicating that the same task is being processed may also be used.
[0052] When similarity is used as the degree of association, the vector processing unit 103 acquires the similarity between the first template and the second template. If the similarity satisfies a condition (e.g., the similarity score is equal to or greater than a threshold), the template selection unit 106 selects the first template. If the similarity does not satisfy the condition (e.g., the similarity score is less than a threshold), the template selection unit 106 selects the second template.
[0053] As a result, the first template and a similar second template may be treated as the first template itself. Because the first template is a pre-prepared template, its accuracy is considered high. Therefore, when templates are similar to each other, it is preferable to use the first template, and there is no need to store the second template in the storage unit 104. In other words, templates can be automatically generated from the LLM input history and compared with a pre-prepared collection of prompt templates, allowing for expansion.
[0054] On the other hand, the vector processing unit 103 may acquire classification item information for each of the first template and the second template as the degree of relevance. Here, the classification item information indicates a task or a task category. The task refers to the purpose or function of the template, such as a task for summarization or a task for search. The template selection unit 106 selects either the first template or the second template based on the determined task.
[0055] For example, the vector processing unit 103 uses a classifier to calculate a score for the task of the second template. If the score matches or is close (within a predetermined value) to a score for a predetermined task, the template selection unit 106 selects the first template corresponding to that task. On the other hand, if the score does not match or is not close (within a predetermined value) to the score for the predetermined task, the template selection unit 106 selects the second template.
[0056] This makes it possible to determine the task classified using the classifier, and by using a template according to the task, it is possible to select an appropriate template.
[0057] The template generation unit 102 generates a prompt for causing a second language model (e.g., LLM 102 a) to generate a second template based on the input information, and transmits the generated prompt to the second language model. Specifically, the template generation unit 102 generates a second template, a title of the second template, and a description of the second template based on the input information.
[0058] Furthermore, if the input information includes a number, template generation unit 102 generates a prompt requesting that the number portion be set as a variable. Furthermore, if the input information includes a subject and an object, template generation unit 102 generates a second template in which the subject and object are set as variables.
[0059] This allows a language model, such as a large-scale language model, to generate the second template.
[0060] Furthermore, the template generation device 100 of the present disclosure may further include an editing unit 107 that edits the second template.
[0061] This allows the second template to be a more appropriate template. Generally, a template generated by a language model such as an LLM may differ from one created by a person such as a user or operator. Therefore, it is preferable for the editing unit 107 to adjust the template.
[0062] In other words, if the template generated by the LLM 102a does not meet the user's intentions due to the difficulty of the input information (prompt) or the accuracy of the LLM itself, a similar template can be adopted or the user can correct and adopt it, thereby preventing a decrease in accuracy and reducing the cost of creating the template.
[0063] The template selection unit 106 also stores the second template as a first template in the storage unit. This allows a new first template to be stored and used to generate the next second template. This allows the LLM 102a to expand the number of unregistered templates it has generated, thereby increasing the variety of templates that can be customized by users.
[0064] The device and method of the present disclosure have the following configuration.
[0065] [1] An apparatus comprising: a template generation unit that causes a second language model to generate a second template that constitutes an input form of a prompt to be input to the first language model based on input information; an association degree acquisition unit that acquires a degree of association between a first template that constitutes the input form of a prompt to be input to the first language model and the second template, the first template being stored in a storage unit; and a template selection unit that selects either the first template or the second template based on the degree of association.
[0066] [2] The device described in [1], wherein the relevance degree acquisition unit acquires a similarity between the first template and the second template as the relevance degree, and the template selection unit selects the first template if the similarity degree satisfies a condition, and selects the second template if the similarity degree does not satisfy the condition.
[0067] [3] The device described in [1], wherein the relevance degree acquisition unit acquires classification item information for each of the first template and the second template as the relevance degree, and the template selection unit selects either the first template or the second template based on the classification item information.
[0068] [4] The device according to any one of [1] to [3], wherein the template generation unit generates a prompt for causing the second language model to generate a second template based on input information, and transmits the prompt to the second language model.
[0069] [5] The device according to [4], wherein the template generation unit generates a second template, a title of the second template, and a prompt for generating a description of the second template based on the input information.
[0070] [6] The device according to [5], wherein, when the input information includes a number, the template generation unit generates a prompt requesting that the number portion be set as a variable.
[0071] [7] The device according to any one of [1] to [6], wherein, when the input information includes a subject and an object, the template generation unit generates a second template using the subject and the object as variables.
[0072] [8] The device according to any one of [1] to [7], further comprising an update unit that updates the information stored in the storage unit based on the second template.
[0073] [9] The device according to any one of [1] to [8], wherein the template selection unit stores the second template as the first template in the storage unit.
[0074]
[10] A method comprising: a template generation step of causing a second language model to generate a second template that constitutes an input form of a prompt to be input to a first language model based on input information; a relevance degree acquisition step of acquiring a degree of relevance between a first template that constitutes the input form of a prompt to be input to the first language model and the second template, the first template being stored in a storage unit; and a template selection step of selecting either the first template or the second template based on the relevance degree.
[0075] The block diagrams used to explain the above embodiments show functional blocks. These functional blocks (components) are realized by any combination of hardware and / or software. Furthermore, the method for realizing each functional block is not particularly limited. That is, each functional block may be realized using a single device that is physically or logically coupled, or may be realized using two or more physically or logically separated devices that are connected directly or indirectly (e.g., via wire, wirelessly, etc.) and these multiple devices. The functional block may also be realized by combining the single device or multiple devices with software.
[0076] Functions include, but are not limited to, judgment, determination, assessment, calculation, computation, processing, derivation, investigation, search, confirmation, reception, transmission, output, access, resolution, selection, selection, establishment, comparison, assumption, expectation, consideration, broadcasting, notifying, communicating, forwarding, configuring, reconfiguring, allocating, mapping, and assignment. For example, a functional block (component) that performs transmission is called a transmitting unit or transmitter. As mentioned above, there are no particular limitations on how these functions are implemented.
[0077] For example, template generation device 100 according to an embodiment of the present disclosure may function as a computer that performs processing of the template generation method of the present disclosure. Fig. 11 is a diagram illustrating an example of the hardware configuration of template generation device 100 according to an embodiment of the present disclosure. The above-described template generation device 100 may be physically configured as a computer device including a processor 1001, a memory 1002, a storage 1003, a communication device 1004, an input device 1005, an output device 1006, a bus 1007, and the like.
[0078] In the following description, the term "apparatus" can be interpreted as a circuit, a device, a unit, etc. The hardware configuration of template generation apparatus 100 may be configured to include one or more of the apparatuses shown in the drawings, or may be configured to exclude some of the apparatuses.
[0079] Each function of template generation device 100 is realized by loading specific software (programs) onto hardware such as processor 1001 and memory 1002, causing processor 1001 to perform calculations, control communications via communication device 1004, and control at least one of reading and writing data from memory 1002 and storage 1003.
[0080] The processor 1001, for example, runs an operating system to control the entire computer. The processor 1001 may be configured as a central processing unit (CPU) including an interface with peripheral devices, a control unit, an arithmetic unit, registers, etc. For example, the template generation unit 102, the LLM 102a, the vector processing unit 103, the data update unit 105, the template selection unit 106, and the editing unit 107 may be realized by the processor 1001.
[0081] Furthermore, processor 1001 reads programs (program codes), software modules, data, etc. from at least one of storage 1003 and communication device 1004 into memory 1002 and executes various processes in accordance with these programs. The programs used are those that cause a computer to execute at least some of the operations described in the above-described embodiments. For example, template generation device 100 may be implemented by a control program stored in memory 1002 and running on processor 1001, or similarly implemented for other functional blocks. While the above-described various processes have been described as being executed by one processor 1001, they may also be executed simultaneously or sequentially by two or more processors 1001. Processor 1001 may be implemented by one or more chips. The programs may also be transmitted from a network via a telecommunications line.
[0082] The memory 1002 is a computer-readable recording medium and may be configured, for example, by at least one of a read-only memory (ROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a random access memory (RAM), etc. The memory 1002 may also be referred to as a register, a cache, a main memory (primary storage device), etc. The memory 1002 can store executable programs (program codes), software modules, etc. for implementing a template generation method according to an embodiment of the present disclosure.
[0083] Storage 1003 is a computer-readable recording medium, and may be composed of at least one of, for example, an optical disk such as a CD-ROM (Compact Disc ROM), a hard disk drive, a flexible disk, a magneto-optical disk (e.g., a compact disk, a digital versatile disk, a Blu-ray (registered trademark) disk), a smart card, a flash memory (e.g., a card, a stick, a key drive), a floppy (registered trademark) disk, a magnetic strip, etc. Storage 1003 may also be referred to as an auxiliary storage device. The above-mentioned storage medium may be, for example, a database, a server, or other appropriate medium including at least one of memory 1002 and storage 1003.
[0084] The communication device 1004 is hardware (transmission / reception device) for communicating between computers via at least one of a wired network and a wireless network, and is also referred to as, for example, a network device, a network controller, a network card, or a communication module. The communication device 1004 may be configured to include a high-frequency switch, a duplexer, a filter, a frequency synthesizer, etc. to realize at least one of frequency division duplex (FDD) and time division duplex (TDD). For example, the input unit 101 and the like may be realized by the communication device 1004. The communication device 1004 may be implemented with a transmitter and a receiver that are physically or logically separated.
[0085] The input device 1005 is an input device (e.g., a keyboard, a mouse, a microphone, a switch, a button, a sensor, etc.) that receives input from the outside. The output device 1006 is an output device (e.g., a display, a speaker, an LED lamp, etc.) that outputs to the outside. Note that the input device 1005 and the output device 1006 may be integrated into one device (e.g., a touch panel).
[0086] Furthermore, each device, such as the processor 1001 and the memory 1002, is connected by a bus 1007 for communicating information. The bus 1007 may be configured using a single bus, or may be configured using different buses between each device.
[0087] Template generation device 100 may also be configured to include hardware such as a microprocessor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a field programmable gate array (FPGA), and some or all of the functional blocks may be realized by the hardware. For example, processor 1001 may be implemented using at least one of these pieces of hardware.
[0088] The notification of information is not limited to the aspects / embodiments described in the present disclosure and may be performed using other methods. For example, the notification of information may be performed by physical layer signaling (e.g., Downlink Control Information (DCI) and Uplink Control Information (UCI)), higher layer signaling (e.g., Radio Resource Control (RRC) signaling, Medium Access Control (MAC) signaling, broadcast information (Master Information Block (MIB) and System Information Block (SIB))), other signals, or a combination thereof. Furthermore, the RRC signaling may be referred to as an RRC message, and may be, for example, an RRC Connection Setup message, an RRC Connection Reconfiguration message, or the like.
[0089] The order of the procedures, sequences, flowcharts, etc. of each aspect / embodiment described in this disclosure may be changed unless it is consistent. For example, the methods described in this disclosure present elements of various steps using an example order, and are not limited to the particular order presented.
[0090] Input and output information may be stored in a specific location (for example, memory) or may be managed using a management table. Input and output information may be overwritten, updated, or added to. Output information may be deleted. Input information may be sent to another device.
[0091] The determination may be made based on a value represented by one bit (0 or 1), a Boolean value (true or false), or a numerical comparison (e.g., comparison with a predetermined value).
[0092] The aspects / embodiments described in this disclosure may be used alone, in combination, or switched depending on the implementation. Notification of predetermined information (e.g., notification that "X is true") is not limited to explicit notification, but may be implicit (e.g., not notifying the predetermined information).
[0093] Although the present disclosure has been described in detail above, it is clear to those skilled in the art that the present disclosure is not limited to the embodiments described herein. The present disclosure can be implemented in modified and altered forms without departing from the spirit and scope of the present disclosure as defined by the claims. Therefore, the description of the present disclosure is intended to be illustrative and does not have any limiting meaning on the present disclosure.
[0094] Software shall be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software modules, applications, software applications, software packages, routines, subroutines, objects, executable files, threads of execution, procedures, functions, etc., whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise.
[0095] Software, instructions, information, etc. may also be transmitted or received over a transmission medium. For example, if software is transmitted from a website, server, or other remote source using wired technologies (such as coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL)), and / or wireless technologies (such as infrared, microwave), then these wired and / or wireless technologies are included within the definition of transmission media.
[0096] The information, signals, etc. described in this disclosure may be represented using any of a variety of different technologies. For example, data, instructions, commands, information, signals, bits, symbols, chips, etc. that may be referred to throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or magnetic particles, optical fields or photons, or any combination thereof.
[0097] Note that terms described in this disclosure and terms necessary for understanding this disclosure may be replaced with terms having the same or similar meanings. For example, at least one of a channel and a symbol may be a signal (signaling). Furthermore, a signal may be a message. Furthermore, a component carrier (CC) may be called a carrier frequency, a cell, a frequency carrier, etc.
[0098] Furthermore, the information, parameters, etc. described in the present disclosure may be expressed using absolute values, may be expressed using relative values from a predetermined value, or may be expressed using other corresponding information. For example, a radio resource may be indicated by an index.
[0099] The names used for the above-described parameters are not intended to be limiting in any way. Furthermore, the mathematical expressions using these parameters may differ from those explicitly disclosed in this disclosure. The various channels (e.g., PUCCH, PDCCH, etc.) and information elements may be identified by any suitable names, and therefore the various names assigned to these various channels and information elements are not intended to be limiting in any way.
[0100] In this disclosure, the terms "Mobile Station (MS)," "user terminal," "User Equipment (UE)," "terminal," and the like may be used interchangeably.
[0101] A mobile station may also be referred to by those skilled in the art as a subscriber station, mobile unit, subscriber unit, wireless unit, remote unit, mobile device, wireless device, wireless communication device, remote device, mobile subscriber station, access terminal, mobile terminal, wireless terminal, remote terminal, handset, user agent, mobile client, client, or some other suitable terminology.
[0102] As used in this disclosure, the terms "determining" and "determining" may encompass a wide variety of actions. "Determining" and "determining" may include, for example, judging, calculating, computing, processing, deriving, investigating, looking up, searching, inquiring (e.g., searching in a table, database, or other data structure), ascertaining, and the like. "Determining" and "determining" may also include receiving (e.g., receiving information), transmitting (e.g., sending information), input, output, accessing (e.g., accessing data in memory), and the like. Furthermore, "judgment" and "decision" can include regarding resolving, selecting, choosing, establishing, comparing, etc. as having been "judged" or "decided." In other words, "judgment" and "decision" can include regarding some action as having been "judged" or "decided." Furthermore, "judgment (decision)" can be interpreted as "assuming," "expecting," "considering," etc.
[0103] The terms "connected," "coupled," or any variation thereof, refer to any direct or indirect connection or coupling between two or more elements, and may include the presence of one or more intermediate elements between two elements that are "connected" or "coupled" to each other. The coupling or connection between elements may be physical, logical, or a combination thereof. For example, "connected" may be read as "access." As used in this disclosure, two elements may be considered to be "connected" or "coupled" to each other using one or more wires, cables, and / or printed electrical connections, as well as electromagnetic energy having wavelengths in the radio frequency range, microwave range, and optical (both visible and invisible) range, as some non-limiting and non-exhaustive examples.
[0104] As used in this disclosure, the phrase "based on" does not mean "based only on," unless expressly stated otherwise. In other words, the phrase "based on" means both "based only on" and "based at least on."
[0105] As used in this disclosure, any reference to an element using a designation such as "first," "second," etc. does not generally limit the quantity or order of those elements. These designations may be used in this disclosure as a convenient method of distinguishing between two or more elements. Thus, a reference to a first and a second element does not imply that only two elements may be employed or that the first element must in some way precede the second element.
[0106] When the terms "include," "including," and variations thereof are used in this disclosure, these terms are intended to be inclusive, similar to the term "comprising." Furthermore, when the term "or" is used in this disclosure, it is not intended to be an exclusive or.
[0107] In this disclosure, where articles are added by translation, such as a, an, and the in English, the disclosure may include that the nouns following these articles are in the plural form.
[0108] In the present disclosure, the term "A and B are different" may mean "A and B are different from each other." The term may also mean "A and B are each different from C." Terms such as "separate" and "coupled" may also be interpreted in the same way as "different."
[0109] 100...template generation device, 200...user terminal, 101...input unit, 102...template generation unit, 103...vector processing unit, 104...storage unit, 105...data update unit, 106...template selection unit, 107...editing unit, 102a...LLM.
Claims
1. An apparatus comprising: a template generation unit that causes a second language model to generate a second template that constitutes an input form of a prompt to be input to a first language model based on input information; a relevance acquisition unit that acquires a first template that constitutes the input form of a prompt to be input to the first language model, the first template being stored in a memory unit, and a degree of relevance between the first template and the second template; and a template selection unit that selects either the first template or the second template based on the degree of relevance.
2. The device according to claim 1, wherein the relevance acquisition unit acquires the similarity between the first template and the second template as the relevance, and the template selection unit selects the first template if the similarity satisfies a condition, and selects the second template if the similarity does not satisfy the condition.
3. The device according to claim 1, wherein the relevance acquisition unit acquires classification item information for each of the first template and the second template as the relevance, and the template selection unit selects either the first template or the second template based on the classification item information.
4. The device according to claim 1, wherein the template generation unit generates a prompt for causing the second language model to generate a second template based on input information, and transmits the prompt to the second language model.
5. The device according to claim 4, wherein the template generation unit generates a prompt for generating a second template, a title of the second template, and a description of the second template based on the input information.
6. The device according to claim 5, wherein the template generation unit generates a prompt requesting that the numeric portion be treated as a variable when the input information includes a number.
7. The device according to claim 1, wherein, when the input information includes a subject and an object, the template generation unit generates a second template having the subject and the object as variables.
8. The device according to claim 1, further comprising an update unit that updates the information stored in the storage unit based on the second template.
9. The device according to claim 1, wherein the template selection unit stores the second template as the first template in the storage unit.
10. A method comprising: a template generation step of causing a second language model to generate a second template that constitutes an input form of a prompt to be input to a first language model based on input information; a relevance acquisition step of acquiring the degree of relevance between a first template that constitutes the input form of a prompt to be input to the first language model, stored in a memory unit, and the second template; and a template selection step of selecting either the first template or the second template based on the relevance.
Citation Information
Patent Citations
Fine adjustment method and device of pre-training model, equipment and storage medium
CN117349674A
Prompt word template generation method and device, computer equipment and readable storage medium
CN118194838A
Document automatic creating device and program
JP2018195006A