Method, device, apparatus, and medium for generating instruction data
Structural decomposition of natural language-based reference instructions improves the command following ability of large models by generating complex and diverse training data, addressing the limitations of existing instruction data methods.
Patent Information
- Application Number
- JP2024103999
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-30
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-26
- Estimated Expiration
- 2044-06-27
AI Technical Summary
Existing methods for training large models lack directionality and diversity in instruction data, leading to suboptimal command following abilities.
Perform structural decomposition on natural language-based reference instructions to generate multiple reference slots and sample slots, using preset rules to create complex and diverse training data for large models.
Enhances the flexibility and effectiveness of instruction training data generation, improving the command following ability of large models by providing more complex and diverse directional instructions.
Smart Images

Figure 2024129086000001
Abstract
Description
[Technical field]
[0001] The present disclosure relates to the technical field of artificial intelligence, in particular to technical fields such as natural language processing, and specifically to a method for generating instruction data for a large model, an apparatus for generating instruction data for a large model, an electronic device, a computer-readable storage medium, and a computer program product. [Background technology]
[0002] Artificial intelligence is a field that studies how computers can imitate some human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, etc., while AI software technologies mainly include natural language processing technology, computer vision technology, voice recognition technology, machine learning, big data processing technology, knowledge graph technology, and other aspects.
[0003] The approaches described in this section are not necessarily approaches that have been previously conceived or adopted. Unless otherwise noted, it should not be believed that any approach described in this section is prior art by virtue of its inclusion in this section. Similarly, unless otherwise noted, the subject matter referred to in this section should not be believed as an admission of any prior art. Summary of the Invention
[0004] The present disclosure provides a method for generating instruction data for large models, an apparatus for generating instruction data for large models, an electronic device, a computer readable storage medium and a computer program product.
[0005] According to one aspect of the present disclosure, a method for generating instruction data for a large model executed on a computer is provided, the method including: obtaining a reference instruction based on a natural language, where the reference instruction can instruct the large model to generate answer data satisfying a plurality of first requests corresponding to a plurality of first request types; obtaining a structured decomposition result for the reference instruction to obtain a plurality of reference slots corresponding to the plurality of first request types and a plurality of reference slot values corresponding to the plurality of first requests; determining a plurality of sample slots and a plurality of sample slot values corresponding to the plurality of sample slots based on the plurality of reference slots, the plurality of reference slot values and a predetermined rule; and generating a sample instruction based on the natural language based on the plurality of sample slots and the plurality of sample slot values, where the sample instruction can instruct the large model to generate answer data satisfying a plurality of second requests corresponding to the plurality of sample slot values.
[0006] According to another aspect of the present disclosure, an apparatus for generating instruction data for a large model is provided, the apparatus including: a first acquisition unit configured to acquire a reference instruction based on a natural language, the reference instruction being capable of instructing the large model to generate answer data satisfying a plurality of first requests corresponding to a plurality of first request types; a second acquisition unit configured to acquire a structured decomposition result for the reference instruction to obtain a plurality of reference slots corresponding to the plurality of first request types and a plurality of reference slot values corresponding to the plurality of first requests; a determination unit configured to determine a plurality of sample slots and a plurality of sample slot values corresponding to the plurality of sample slots based on the plurality of reference slots, the plurality of reference slot values and a predetermined rule; and a generation unit configured to generate sample instructions based on the natural language based on the plurality of sample slots and the plurality of sample slot values, the sample instruction being capable of instructing the large model to generate answer data satisfying a plurality of second requests corresponding to the plurality of sample slot values.
[0007] According to another aspect of the present disclosure, there is provided an electronic device including at least one processor and a memory communicatively coupled to the at least one processor, where the memory stores instructions executable by the at least one processor, which instructions, when executed by the at least one processor, enable the at least one processor to perform the method described above.
[0008] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium having computer instructions stored thereon, where the computer instructions are used to cause a computer to perform the above-described method.
[0009] According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above method.
[0010] According to one or more embodiments of the present disclosure, the present disclosure performs structured decomposition on a reference command based on natural language to obtain a plurality of reference slots corresponding to a request type and a plurality of reference slot values corresponding to specific requests of each request type, and further determines a plurality of sample slots and a plurality of sample slot values for generating sample commands based on the plurality of reference slots, the plurality of reference slot values and a predetermined rule, and finally obtains a sample command based on natural language, thereby improving the flexibility of the process of generating command training data, and providing more complex, diverse, directional and directional command training data for the generative large model, and effectively improving the command following ability of the large model.
[0011] It should be understood that the subject matter described in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to limit the scope of the disclosure. Other features of the disclosure will be readily apparent from the following specification. [Brief description of the drawings]
[0012] The drawings illustratively illustrate the examples and constitute a part of the specification and, together with the textual description of the specification, are used to explain exemplary embodiments of the examples. The illustrated examples are for purposes of illustration and not for limiting the scope of the claims. In all the drawings, the same reference numerals refer to similar, but not necessarily identical, elements. [Figure 1] 1 is a schematic diagram of an example system capable of implementing various methods described herein, according to embodiments of the present disclosure. [Diagram 2] 1 is a flowchart of a method for generating instruction data for a large model according to an embodiment of the present disclosure. [Diagram 3] 1 is a flow chart for determining a number of sample slots and a number of sample slot values corresponding to the number of sample slots, according to an embodiment of the present disclosure. [Figure 4] 1 is a flowchart of a method for generating instruction data for a large model according to an embodiment of the present disclosure. [Diagram 5] FIG. 2 is a structural block diagram of an apparatus for generating instruction data for a large model according to an embodiment of the present disclosure. [Figure 6] FIG. 1 is a structural block diagram of an example electronic device that can be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, exemplary embodiments of the present disclosure will be described in conjunction with the drawings. In order to facilitate understanding, various details of the embodiments of the present disclosure are included therein, but they should be regarded as merely exemplary. Therefore, it should be recognized by those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the following description omits the description of known functions and structures.
[0014] In this disclosure, unless otherwise specified, the terms "first," "second," and the like, used to describe various elements are not intended to limit the location, timing, or importance of these elements. Such terms are used only to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, or in some cases, may refer to different instances based on the contextual description.
[0015] The terms used in the description of various examples of the present disclosure are intended only to describe specific examples and are not intended to be limiting. Unless otherwise clearly indicated by the context, an element may be one or more, unless the number of elements is specifically limited. In addition, the term "and / or" used in the present disclosure covers any one of the listed items and all possible combinations.
[0016] In related art, to train the command-following ability of a large model, one can generally only rely on manually written command data, but such command data lacks directionality and orientation.
[0017] In order to solve the above problems, the present disclosure performs structured decomposition on reference commands based on natural language to obtain multiple reference slots corresponding to request types and multiple reference slot values corresponding to specific requests of each request type, and then determines multiple sample slots and multiple sample slot values for generating sample commands based on the multiple reference slots, multiple reference slot values and preset rules, and finally obtains sample commands based on natural language, thereby improving the flexibility of the process of generating command training data, and providing more complex, diverse, directional and directional command training data for the generative large model, and effectively improving the command following ability of the large model.
[0018] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings.
[0019] 1 illustrates a schematic diagram of an example system 100 in which various methods and apparatus described herein may be implemented, according to an embodiment of the present disclosure. With reference to FIG. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0020] In an embodiment of the present disclosure, the server 120 may be operable to execute one or more services or software applications for the method of generating instruction data for a large model according to the present disclosure. In one exemplary embodiment, the large model may be deployed on the server.
[0021] In some embodiments, server 120 may further provide other services or software applications, which may include non-virtualized and virtualized environments. In some embodiments, these services may be provided as web-based or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and / or 106 in a Software as a Service (SaaS) model.
[0022] In the arrangement shown in Figure 1, the server 120 may include one or more assemblies that implement the functions performed by the server 120. These assemblies may include software assemblies, hardware assemblies, or a combination thereof that may be executed by one or more processors. Users operating the client devices 101, 102, 103, 104, 105, and / or 106 may utilize the services provided by these assemblies by, in turn, utilizing one or more client applications to interact with the server 120. It should be understood that a variety of different system configurations are possible and may differ from system 100. As such, Figure 1 is an example of a system for implementing various methods described herein and is not intended to be limiting.
[0023] A user may generate answer data in the large model using client devices 101, 102, 103, 104, 105 and / or 106. The client devices may provide an interface to a user of the client device through which the client device may interact. The client devices may also output information to the user via the interface, such as an answer generated by the large model in response to user input, to the user. Although only six client devices are shown in FIG. 1, one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0024] The client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computing devices, such as portable handheld devices, general purpose computers (e.g., personal computers or laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices, etc. These computing devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-based operating systems, Linux or Linux-based operating systems (e.g., GOOGLE Chrome OS), etc., and may include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android, etc. Portable handheld devices may include cellular phones, smartphones, tablet PCs, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (e.g., smart glasses) and other devices. Gaming systems may include various handheld gaming devices, Internet-enabled gaming devices, etc. The client devices may run a variety of different applications, such as various Internet-related applications, communication applications (eg, email applications), Short Message Service (SMS) applications, and may use a variety of communication protocols.
[0025] Network 110 may be any type of network known to those skilled in the art that may use any one of a number of available protocols (including, but not limited to, TCP / IP, SNA, IPX, etc.) to support data communications. By way of example, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token loop, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0026] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframes, server clusters, or any other suitable arrangement and / or combination. Server 120 may also include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain virtual storage devices for the server). In various embodiments, server 120 may execute one or more services or software applications that provide the functionality described below.
[0027] The computing units in server 120 may run one or more operating systems, including any of the operating systems listed above, as well as any commercially available server operating system. Server 120 may further run any one of a variety of additional server applications and / or mid-tier applications, including an HTTP server, an FTP server, a CGI server, a JAVA server, a database server, etc.
[0028] In some embodiments, server 120 may include one or more applications for integrating with analytics data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 may further include one or more applications for displaying data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.
[0029] In some embodiments, the server 120 may be a server of a distributed system or a server incorporating blockchain. The server 120 may be a cloud server, or a smart cloud computing server or a smart cloud host equipped with artificial intelligence technology. The cloud server is a host product in the cloud computing service system, which solves the deficiencies of traditional physical host and virtual private server (VPS) services, such as high management difficulty and low business scalability.
[0030] System 100 may further include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of databases 130 may be used to store information for audio and video files. Databases 130 may be located in a variety of locations. For example, a database used by server 120 may be local to server 120 or may be separate from server 120 and in communication with server 120 over a network or dedicated connection. Databases 130 may be of various types. In some embodiments, a database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data from the database and from the database in response to instructions.
[0031] In some embodiments, one or more of databases 130 may also be used by an application to store data for the application. The databases used by the application may be different types of databases, such as a key-value repository, an object repository, or a general-purpose repository supported by a file system.
[0032] The system 100 of FIG. 1 can be configured and operated in a variety of ways to accommodate the various methods and apparatus described in accordance with this disclosure.
[0033] According to one aspect of the present disclosure, a method for generating instruction data for a large model executed by a computer is provided. As shown in Fig. 2, the method for generating instruction data for a large model includes: obtaining a reference instruction based on a natural language, in which the reference instruction can instruct the large model to generate answer data satisfying a plurality of first requests corresponding to a plurality of first request types; obtaining a structural decomposition result for the reference instruction to obtain a plurality of reference slots corresponding to a plurality of first request types and a plurality of reference slot values corresponding to a plurality of first requests; determining a plurality of sample slots and a plurality of sample slot values corresponding to the plurality of sample slots according to the plurality of reference slots, the plurality of reference slot values and a predetermined rule; and generating a sample instruction based on the natural language according to the plurality of sample slots and the plurality of sample slot values, in which the sample instruction can instruct the large model to generate answer data satisfying a plurality of second requests corresponding to the plurality of sample slot values.
[0034] Thus, by performing structured decomposition on the reference command based on natural language, multiple reference slots corresponding to the request type and multiple reference slot values corresponding to the specific requests of each request type are obtained, and then multiple sample slots and multiple sample slot values for generating sample commands are determined based on the multiple reference slots, multiple reference slot values and predetermined rules, and finally sample commands based on natural language are obtained, thereby improving the flexibility of the process of generating command training data, and providing more complex, diverse, directional and directional command training data for the generative large model, and effectively improving the command following ability of the large model.
[0035] In the present disclosure, the large model is a generative large model based on deep learning. The large model has end-to-end features and can directly generate answer data based on command data input by a user. In other words, the large model itself has a generating function. In some embodiments, the large model may be a large language model based on deep learning. Large language models generally have billions or even hundreds of billions of parameters, and they are generally trained on large-scale text data or other modal data. The large language model may be used in various natural language processing tasks, such as text generation, language translation, and question answering systems.
[0036] The large model may adopt, for example, an N-layer Transformer network structure having an encoder and a decoder, or a Unified pre-trained Language Model (UniLM) network structure. As can be understood, the large model may also be other neural network models based on the Transformer network structure, and is not limited thereto. Both the input and output of the large model are composed of tokens. Each token may correspond to a character, a word, or a special code. The large model may be trained using a pre-training task, and fine-tuned using instruction data and corresponding ground truth answer data to have the above generation function.
[0037] In some embodiments, in step S201, training instructions may be obtained from a training set, or true target instructions may be obtained from an online user log, and these instructions are reference instructions. In one exemplary embodiment, an example of the reference instruction may be "Please write a prose about alcohol in 100 characters or less without the character "sake" appearing in the entire sentence." The reference instruction relates to a total of five first request types, namely, "task to be performed by the large model," "genre of content to be generated," "subject of content to be generated," "number of characters in content to be generated," and "requirements for content to be generated," and for these five first request types, there are a total of five first requests, namely, "task to create text," "genre is prose," "subject is sake," "number of characters is 100 characters or less," and "no character "sake" appearing in the entire sentence." The reference instruction may instruct the large model to generate answer data that satisfies a plurality of first requests corresponding to a plurality of first request types.
[0038] As can be seen from the above example, a "request type" may be understood as what conditions, such as the genre or subject of the content to be generated, should be satisfied in the process of generating answer data using the large model. A "request" corresponding to a "request type" is used to explain what specific conditions should be satisfied to generate answer data for that request type. For example, the large model should generate prose for the request type "genre of content to be generated," or generate content related to alcohol for the request type "subject of content to be generated."
[0039] In some embodiments, in step S202, a structural decomposition result for the defect reference command may be obtained to obtain a plurality of reference slots corresponding to a plurality of first request types and a plurality of reference slot values corresponding to a plurality of first requests. In one exemplary embodiment, a structural decomposition may be performed for the above example reference command to obtain five reference slots, namely, "task", "genre", "subject", "word count" and "content request", corresponding to the above five first request types, and five reference slot values, namely, "text creation", "prose", "alcohol", "<100 characters" and "do not allow the character "alcohol" to appear", corresponding to the above five first requests.
[0040] It should be noted that the first request type and the first request may be understood as abstract concepts about conditions that the large model must satisfy to generate answer data, while the reference slot and the reference slot value are concrete, deterministic, and structured representations obtained by decomposing the abstract concepts. In some embodiments, the reference slots may be selected from a plurality of predefined slots, and the candidate slot values may be selected from a plurality of predefined slot values.
[0041] In some embodiments, the structured decomposition result for the reference instruction may be, for example, obtained by processing the reference instruction using a natural language instruction decomposition model. The natural language instruction decomposition model may be a classification model, which realizes selecting a plurality of reference slots corresponding to the reference instruction in a plurality of pre-defined slots, and selecting a plurality of reference slot values corresponding to the reference instruction in a plurality of pre-defined slot values. The natural language instruction decomposition model may be a generative model (which may be a model different from the large-scale model mentioned above), and directly obtains a plurality of reference slots and a plurality of reference slot values corresponding to the reference instruction through a content generation manner.
[0042] Thus, the above steps can obtain a structured decomposition result for the reference instruction, and then perform statistics and analysis on the reference instruction based on the structured decomposition result, and determine which sample slot and which sample slot value should be generated according to the corresponding statistical analysis result. In some embodiments, the sample instruction generation can be performed directly based on the structured decomposition result for the reference instruction.
[0043] According to some embodiments, the preset rule may instruct to directly determine the reference slots as the sample slots, and directly determine the reference slot values as the sample slot values, thereby realizing rewriting of the reference command. In addition, by decomposing the reference command into a structure and rewriting the command based on the decomposition result, it is possible to ensure that each request type and each request in the reference command are reflected in the newly generated sample command, and to ensure that the generated sample command is correct.
[0044] In some embodiments, a plurality of sample slots and a plurality of sample slot values may be input into a natural language instruction generation model to obtain a sample instruction. The natural language instruction generation model may be another large model different from the above-mentioned large model (for example, a language large model also based on deep learning). The model can combine a plurality of sample slot values corresponding to a plurality of sample slots to generate a sample instruction based on natural language. By using a natural language instruction decomposition model to obtain the decomposition result for the reference instruction, and using a natural language instruction generation model to generate a sample instruction, a fully automatic sample instruction generation flow is realized, and no human labor is required during the period, thereby reducing the generation cost of the sample instruction and increasing the generation speed.
[0045] According to some embodiments, the step S204 of generating sample instructions based on natural language according to the plurality of sample slots and the plurality of sample slot values includes using a natural language instruction generation model to generate a plurality of sample instructions with different expressions but the same meaning according to the plurality of sample slots and the plurality of sample slot values. Thus, the above method can automatically generate a large number of sample instructions with different expressions but the same meaning, thereby helping and accelerating the learning of a large model for the corresponding slots and slot values. In addition, since the sample instructions have the same meaning and the sample instructions can correspond to the same ground truth answer data, a large amount of sample data (including sample instructions and corresponding ground truth answer data) can be generated quickly.
[0046] In one exemplary embodiment, based on five sample slots, namely, "Task", "Genre", "Topic", "Number of characters", and "Content request", and five sample slot values, namely, "Text creation", "Prose", "Alcohol", "<100 characters", and "Do not include the character 'alcohol'", a sample instruction of "Write a prose piece, the topic is alcohol, the character 'alcohol' does not appear in the sentence, and the number of characters is within 100 characters" can be generated. In the exemplary embodiment, since the sample slot and the reference slot are the same, and the sample slot value and the reference slot value are the same, the multiple second requests corresponding to the sample instruction are the same as the multiple first requests corresponding to the reference instruction.
[0047] Return to step S203. According to some embodiments, the preset rule may instruct to randomly determine multiple sample slots in multiple reference slots, and randomly determine multiple sample slot values in multiple reference slot values, so that the random determination method can automatically and quickly generate a large number of sample instructions with different meanings, and generate sample instructions with slot combinations or slot value combinations that have not appeared in training data or online log data, thereby improving the generalization performance of large models.
[0048] According to some embodiments, the reference instruction may include a plurality of training instructions obtained from a training set. As shown in Fig. 3, the step S203 of determining a plurality of sample slots and a plurality of sample slot values corresponding to the plurality of sample slots based on a plurality of reference slots, a plurality of reference slot values, and a preset rule may include the step S301 of collecting statistics of a distribution result of a plurality of conventional slots and a plurality of conventional slot values corresponding to the plurality of training instructions, where the plurality of conventional slots include a plurality of reference slots corresponding to each training instruction in the plurality of training instructions, and the plurality of conventional slot values include a plurality of reference slot values corresponding to each training instruction in the plurality of training instructions, and the step S302 of determining a plurality of sample slots and a plurality of sample slot values based on the distribution result and the preset rule.
[0049] This enables the construction and supplementation of sample instruction data in a more directional and systematic manner by performing structured decomposition on the training instructions in the training set, collecting statistics on the distribution of multiple conventional slots and multiple conventional slot values corresponding to multiple training instructions, and determining which sample slots and which sample slot values should be included in the sample instructions to be generated based on the collected distribution results.
[0050] In some embodiments, after decomposing the multiple training instructions, a structured command set can be constructed, which includes all slots (i.e., multiple conventional slots) and all slot values (i.e., multiple conventional slot values) related to the multiple training instructions. The process of randomly determining sample slots / sample slot values described in the above embodiments may be randomly sampling in the command set and combining new sample instructions. After obtaining the command set, the distribution results of multiple conventional slots / conventional slot values, such as the distribution number of each conventional slot / conventional slot value, may be statistically calculated. As can be understood, the distribution result may further include other contents, such as the co-occurrence count introduced below, which is not limited here.
[0051] In some embodiments, the sample instructions included in a training set are always biased (e.g., have a high distribution of a small number of specific slots / slot values or combinations, but a low distribution of other slots / slot values or combinations), and using such a training set to train a large model will affect the quality of the answer data it generates.
[0052] According to some embodiments, the preset rule may instruct to determine the plurality of sample slots according to at least some of the conventional slots with the smallest distribution number among the plurality of conventional slots, and / or the preset rule may instruct to determine the plurality of sample slot values according to at least some of the conventional slot values with the smallest distribution number among the plurality of conventional slot values, thereby analyzing which slot or slot value is seriously missing in the training command according to the distribution result, and determining the slot or slot value with serious missing as the sample slot or sample slot value, thereby realizing directional construction and supplementation of sample command data, and further directional construction of training data corresponding to the defects of the large model, overcoming the problem of bias in the training set, and improving the quality of answer data generated by the large model.
[0053] In some embodiments, the pre-set rules may instruct to determine some sample slots / sample slot values of a plurality of sample slots by the above-mentioned manner, and to determine other sample slots / sample slot values by another manner (e.g., based on co-occurrence relationships or random sampling), or the pre-set rules may instruct to determine all sample slots / sample slot values by the above-mentioned manner.
[0054] In some embodiments, a predetermined number of conventional slots / conventional slot values having the smallest distribution number among a plurality of conventional slots / conventional slot values may be determined as the sample slot / sample slot value, a conventional slot / conventional slot value having a distribution number less than a predetermined value among a plurality of conventional slots / conventional slot values may be determined as the sample slot / sample slot value, or a conventional slot / conventional slot having a serious lack of training data may be determined as the sample slot / sample slot value by other methods, which are not limited here.
[0055] In some embodiments, in step S301, the co-occurrence status of the reference slot values / reference slots included in each of the training instructions may be statistically obtained to obtain a distribution result (e.g., the number of co-occurrences) of the combinations of the conventional slot values / conventional slot combinations. In one exemplary embodiment, the conventional slot combination consisting of two slots, "genre" and "number of characters", has a high number of co-occurrences, and the conventional slot value combination consisting of two slot values, "short essay" and ">800 characters", has a high number of co-occurrences.
[0056] Generally, the fewer the slots / slot values contained in a conventional slot combination / conventional slot value combination, the higher the co-occurrence frequency; however, there is little sample data with a large number of slots / slot values, and as a result, the large model generates poor quality response data when processing user request types or complex commands with many requests.
[0057] According to some embodiments, the pre-defined rules may instruct to determine a plurality of sample slots based on a plurality of conventional slot combinations having the highest number of co-occurrences, the number of the plurality of sample slots being greater than the number of conventional slots included in any one of the plurality of conventional slot combinations, and / or the pre-defined rules may instruct to determine a plurality of sample slot values based on a plurality of conventional slot value combinations having the highest number of co-occurrences, the number of the plurality of sample slot values being greater than the number of conventional slot values included in any one of the plurality of conventional slot value combinations.
[0058] In this way, by collecting statistics on the number of co-occurrences of combinations of conventional slot combinations / conventional slot values, and determining multiple sample slots / sample slot values based on the combinations of multiple conventional slot combinations / conventional slot values that co-occur most frequently, it is possible to rationally construct more abundant and complex sample commands, and effectively improve the tracking ability of large models for complex commands.
[0059] In one exemplary embodiment, a first conventional slot combination consisting of two slots, "genre" and "character count", has a high co-occurrence frequency, a second conventional slot combination consisting of two slots, "task" and "genre", also has a high co-occurrence frequency, but a third conventional slot combination consisting of three slots, "task", "genre", and "character count", has a low co-occurrence frequency. According to the above method, a plurality of sample slots can be determined based on the first conventional slot combination and the second conventional slot combination, for example, the first conventional slot combination and the second conventional slot combination are combined to determine the three slots, "task", "genre", and "character count", as the sample slots. As can be understood, the plurality of sample slots / sample slot values can also be determined based on the combination of the most common conventional slot combinations / conventional slot values by other methods, which are not limited herein.
[0060] In some embodiments, the pre-set rules may instruct to determine some sample slots / sample slot values of a plurality of sample slots by the above-mentioned manner, and to determine other sample slots / sample slot values by another manner (e.g., based on co-occurrence relationships or random sampling), or the pre-set rules may instruct to determine all sample slots / sample slot values by the above-mentioned manner.
[0061] In some embodiments, a predetermined number of conventional slots / conventional slot values having the smallest distribution number among a plurality of conventional slots / conventional slot values may be determined as the sample slot / sample slot value, a conventional slot / conventional slot value having a distribution number less than a predetermined value among a plurality of conventional slots / conventional slot values may be determined as the sample slot / sample slot value, or a conventional slot / conventional slot having a serious lack of training data may be determined as the sample slot / sample slot value by other methods, which are not limited here.
[0062] According to some embodiments, the reference instruction may include a target instruction obtained from an online user log. The plurality of reference slots corresponding to the target instruction may include a target slot, and the plurality of reference slot values corresponding to the target instruction may include a target slot value. The preset rule may direct setting the target slot as a sample slot in response to determining that the plurality of conventional slots do not include the target slot and / or the distribution number of the target slot is less than a first preset value or less than the distribution number of at least some other conventional slots, or the preset rule may set the target slot value as a sample slot value in response to determining that the plurality of conventional slots do not include the target slot value or the distribution number of the target slot value is less than a second preset value or less than the distribution number of at least some other conventional slot values.
[0063] Thus, by decomposing the target command obtained from the online user log, and determining the sample slot / sample slot value according to the number of occurrences of the target slot / target slot value contained therein in the training command, the sample command data can be constructed and supplemented in a more directional manner, and corresponding training data can be constructed in a directional manner for the defects of the large model. In addition, by continuously mining the online log, the defects of the large model can be continuously found, and the corresponding command data can be constructed to supplement the capabilities, ultimately promoting the large model to obtain strong command following capabilities.
[0064] In some embodiments, each reference slot / reference slot value in a plurality of reference slots / reference slot values corresponding to a target instruction may be determined as a target slot / target slot value using the above-mentioned preset rule. It can be understood that those skilled in the art may determine the range of the above-mentioned first preset value, the second preset value, and at least some other conventional slots according to needs, and are not limited here.
[0065] In some embodiments, the pre-set rules may instruct to determine some sample slots / sample slot values of a plurality of sample slots by the above-mentioned manner, and to determine other sample slots / sample slot values by another manner (e.g., based on co-occurrence relationships or random sampling), or the pre-set rules may instruct to determine all sample slots / sample slot values by the above-mentioned manner.
[0066] According to some embodiments, the large model may be a large language model. As shown in Fig. 4, the method for generating instruction data for the large model further includes step S405 of obtaining ground truth answer data corresponding to sample instructions, and step S406 of training the large model using the sample instructions and the ground truth answer data corresponding to the sample instructions. It can be understood that the operations of steps S401 to S404 in Fig. 4 are similar to those of steps S201 to S204 in Fig. 2, and the description is omitted here.
[0067] In this way, by obtaining ground truth answer data corresponding to the sample commands, and using the ground truth answer data and the sample commands to train the large model, more complex, diverse, directional and directed command training data can be provided, and the command tracking ability of the large model can be effectively improved.
[0068] In some embodiments, in step S405, the ground truth answer data may be obtained by a manual annotation method, the ground truth answer data may be obtained by using a model generation method, or the ground truth answer data may be obtained by other methods, which are not limited herein.
[0069] In some embodiments, in step S406, the sample instructions may be input to the large model to obtain predicted answer data output by the large model, and a loss value may be calculated based on the ground truth answer data and the predicted answer data, and parameters of the large model may be adjusted based on the loss value to realize training of the large model. It can be understood that the sample instructions and the corresponding ground truth answer data may also be used to train the large model in other manners, which are not limited herein.
[0070] According to some embodiments, the step S406 of training the large model using the sample instructions and the ground truth answer data corresponding to the sample instructions may include adding the sample instructions and the ground truth answer data corresponding to the sample instructions to a training set to obtain a target training set, and training the large model using the target training set, so that the sample instructions constructed based on the distribution results and the corresponding ground truth answer data are added to the training set, and the training set is used to train the large model, thereby obtaining a large model with balanced and comprehensive capabilities.
[0071] In some embodiments, the command set may be updated based on the updated target training set, and the distribution results of the updated command set are then statistically analyzed to generate new sample commands and sample data, thereby continuously improving the command following ability of the large model.
[0072] As described above, in some embodiments, for multiple sample slots and multiple sample slot values, a natural language instruction generation model may be used to generate multiple sample instructions with different expressions but the same meaning, and only one ground truth answer data may be obtained for each of these sample instructions, and each sample instruction may be combined with the ground truth answer data and added to the training set.
[0073] According to another aspect of the present disclosure, an apparatus for generating instruction data for a large model is provided. As shown in Fig. 5, the apparatus 500 includes: a first acquisition unit 510 configured to acquire a reference instruction based on a natural language, the reference instruction can instruct the large model to generate answer data satisfying a plurality of first requests corresponding to a plurality of first request types; a second acquisition unit 520 configured to acquire a structured decomposition result for the reference instruction to obtain a plurality of reference slots corresponding to a plurality of first request types and a plurality of reference slot values corresponding to a plurality of first requests; a determination unit 530 configured to determine a plurality of sample slots and a plurality of sample slot values corresponding to the plurality of sample slots according to the plurality of reference slots, the plurality of reference slot values and a preset rule; and a generation unit 540 configured to generate a sample instruction based on a natural language according to the plurality of sample slots and the plurality of sample slot values, the sample instruction can instruct the large model to generate answer data satisfying a plurality of second requests corresponding to the plurality of sample slot values.
[0074] As can be understood, the operations of units 510 to 540 in the apparatus 500 are similar to those of steps S201 to S204 in FIG. 2, and the description thereof will be omitted here.
[0075] According to some embodiments, the predefined rules may dictate that the reference slots are directly determined as sample slots and that the reference slot values are directly determined as sample slot values.
[0076] According to some embodiments, the pre-defined rules may dictate randomly determining a number of sample slots among a number of reference slots and randomly determining a number of sample slot values among a number of reference slot values.
[0077] According to some embodiments, the reference instruction may include a plurality of training instructions obtained from a training set. The determination unit may include: a statistics subunit configured to collect distribution results of a plurality of conventional slots and a plurality of conventional slot values corresponding to the plurality of training instructions, where the plurality of conventional slots include a plurality of reference slots corresponding to each training instruction in the plurality of training instructions, and the plurality of conventional slot values include a plurality of reference slot values corresponding to each training instruction in the plurality of training instructions; and a determination subunit configured to determine a plurality of sample slots and a plurality of sample slot values based on the distribution results and a predetermined rule.
[0078] According to some embodiments, the pre-defined rules may dictate determining the plurality of sample slots based on at least some of the conventional slots having the smallest distribution among the plurality of conventional slots, and / or the pre-defined rules may dictate determining the plurality of sample slot values based on at least some of the conventional slot values having the smallest distribution among the plurality of conventional slot values.
[0079] According to some embodiments, the pre-defined rules may instruct to determine a plurality of sample slots based on a plurality of conventional slot combinations having the highest number of co-occurrences, the number of the plurality of sample slots being greater than the number of conventional slots included in any one of the plurality of conventional slot combinations, and / or the pre-defined rules may instruct to determine a plurality of sample slot values based on a plurality of conventional slot value combinations having the highest number of co-occurrences, the number of the plurality of sample slot values being greater than the number of conventional slot values included in any one of the plurality of conventional slot value combinations.
[0080] According to some embodiments, the reference instruction may include a target instruction obtained from an online user log. The plurality of reference slots corresponding to the target instruction includes a target slot, and the plurality of reference slot values corresponding to the target instruction includes a target slot value. The preset rule may direct setting the target slot as a sample slot in response to determining that the plurality of conventional slots does not include the target slot or the distribution number of the target slot is less than a first preset value or less than the distribution number of at least some other conventional slots, and / or the preset rule may direct setting the target slot value as a sample slot value in response to determining that the plurality of conventional slots does not include the target slot value or the distribution number of the target slot value is less than a second preset value or less than the distribution number of at least some other conventional slot values.
[0081] According to some embodiments, the large model may be a large-scale language model based on deep learning. The apparatus 900 may further include a third acquiring unit (not shown) configured to acquire ground truth answer data corresponding to the sample instructions, and a training unit configured to train the large model using the sample instructions and the ground truth answer data corresponding to the sample instructions.
[0082] According to some embodiments, the training unit may include an update subunit configured to add sample instructions and ground truth answer data corresponding to the sample instructions to a training set to obtain a target training set, and a training subunit configured to train a large model using the target training set.
[0083] According to some embodiments, the generation unit may include a generation subunit configured to generate a plurality of sample instructions having different expressions but the same meaning, based on a plurality of sample slots and a plurality of sample slot values, utilizing a natural language instruction generation model.
[0084] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of relevant user personal information shall all comply with the provisions of relevant laws and regulations and shall not violate public order and morals.
[0085] According to embodiments of the present disclosure, an electronic device, a readable storage medium, and a computer program product are further provided.
[0086] Next, referring to FIG. 6, a structural block diagram of an electronic device 600 that can be used as a server or client of the present disclosure will be described, which is an example of a hardware device that can be applied to each aspect of the present disclosure. The electronic device represents various forms of digital electronic computers, such as laptop computers, desktop computers, stages, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, mobile phones, intelligent phones, wearable devices, and other similar computing devices. The components, their connections, and their functions shown herein are merely exemplary and do not limit the implementation of the present disclosure as described and / or claimed herein.
[0087] 6, the electronic device 600 includes a computing unit 601, which can perform various appropriate operations and processes based on a computer program stored in a read-only memory (ROM) 602 or loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may further store various programs and data required for the operation of the electronic device 600. The computing unit 601, the ROM 602 and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0088] A number of components in the electronic device 600 are connected to an I / O interface 605, and include an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 may be any type of device capable of inputting information to the electronic device 600, and the input unit 606 may receive input numeric or character information and generate key signal input for user settings and / or function control of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a track board, a track ball, a control lever, a microphone, and / or a remote control. The output unit 607 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 608 may include, but is not limited to, a magnetic disk, an optical disk. The communication unit 609 enables the electronic device 600 to exchange information / data with other devices via computer networks, e.g., the Internet, and / or various telecommunication networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, e.g., Bluetooth devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0089] The computing unit 601 may be various general-purpose and / or special-purpose processing assemblies having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs each of the methods and processes described above, such as the method of generating instruction data for a large model. For example, in some embodiments, the method of generating instruction data for a large model may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, some or all of the computer program may be loaded and / or installed in the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, it may perform one or more steps of the method of generating instruction data for a large model described above. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the method for generating instruction data for the large model in any other suitable manner (eg, firmware).
[0090] Various embodiments of the systems and techniques described herein above may be implemented in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: embodied in one or more computer programs that may be executed and / or interpreted by a programmable system including at least one programmable processor, which may be a special purpose or general purpose programmable processor, and may receive data and instructions from a storage system, at least one input device, at least one output device, and may transmit data and instructions to the storage system, the at least one input device, and the at least one output device;
[0091] The program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, a special purpose computer or other programmable data processing apparatus, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are performed. The program codes may be entirely executed on a machine, partly executed on a machine, partly executed on a machine and partly executed on a remote machine as a separate software package, or entirely executed on a remote machine or server.
[0092] In the context of this disclosure, a machine-readable medium may be a tangible medium, which may contain or store a program for use in or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples of machine-readable storage media include an electrical connection by one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0093] To provide interaction with a user, the systems and techniques described herein may be implemented in a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball) by which a user may provide input to the computer. Other types of devices may also be provided for providing interaction with a user. For example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and input from the user may be received in any form (including audio input, voice input, tactile input).
[0094] The systems and techniques described herein may be implemented in a computing system including a background component (e.g., a data server), a middleware component (e.g., an application server), a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with embodiments of the systems and techniques described herein), or any combination of such background, middleware, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0095] The computer system may include a client and a server. The client and the server are generally remote from each other and usually interact with each other via a communication network. The client-server relationship is created by running computer programs in the corresponding computers that have a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
[0096] It should be understood that steps may be reordered, added, or removed using the various types of flows shown above. For example, each step described in this disclosure may be performed in parallel, sequentially, or in a different order, and is not limited herein, as long as the technical solution disclosed in this disclosure can achieve the desired results.
[0097] Although the embodiments or examples of the present disclosure have been described with reference to the drawings, it should be understood that the above methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the scope of the claims and their equivalents after grant. Various elements in the embodiments or examples may be omitted or replaced by their equivalent elements. In addition, each step may be performed in a different order from the order described in this disclosure. Furthermore, various elements in the embodiments or examples may be combined in various ways. In essence, with the evolution of technology, many elements described herein may be replaced by equivalent elements appearing later in this disclosure.
Claims
1. 1. A computer implemented method for generating instruction data for a large model, comprising the steps of: obtaining a reference instruction based on natural language, the reference instruction capable of instructing the large model to generate answer data satisfying a plurality of first requests corresponding to a plurality of first request types; obtaining a structural decomposition result for the reference instruction to obtain a plurality of reference slots corresponding to the plurality of first request types and a plurality of reference slot values corresponding to the plurality of first requests; determining a plurality of sample slots and a plurality of sample slot values corresponding to the plurality of sample slots based on the plurality of reference slots, the plurality of reference slot values and a predetermined rule; A method for generating instruction data for a large model, comprising: generating sample instructions based on natural language based on the plurality of sample slots and the plurality of sample slot values, the sample instructions being capable of instructing the large model to generate answer data that satisfies a plurality of second requests corresponding to the plurality of sample slot values.
2. the reference instructions include a plurality of training instructions taken from a training set; Here, determining a plurality of sample slots and a plurality of sample slot values corresponding to the plurality of sample slots based on the plurality of reference slots, the plurality of reference slot values, and a predetermined rule includes: Collect statistics on distribution results of a plurality of conventional slots and a plurality of conventional slot values corresponding to the plurality of training instructions, the plurality of conventional slots including a plurality of reference slots corresponding to each training instruction in the plurality of training instructions, and the plurality of conventional slot values including a plurality of reference slot values corresponding to each training instruction in the plurality of training instructions; The method of claim 1 , further comprising: determining the plurality of sample slots and the plurality of sample slot values based on the distribution result and the preset rule.
3. The predefined rule instructs determining the plurality of sample slots based on at least a portion of the plurality of legacy slots that have a lowest distribution number; and / or The method of claim 2 , wherein the predetermined rule directs determining the plurality of sample slot values based on at least a portion of the plurality of legacy slot values that are least frequently distributed.
4. The predefined rule instructs determining the plurality of sample slots based on a plurality of conventional slot combinations having the highest number of co-occurrences, the number of the plurality of sample slots being greater than the number of conventional slots included in any one of the plurality of conventional slot combinations; and / or 3. The method of claim 2, wherein the predetermined rule instructs determining the plurality of sample slot values based on a combination of a plurality of conventional slot values having a highest number of co-occurrences, and the number of the plurality of sample slot values is greater than the number of conventional slot values included in any one of the combinations of conventional slot values.
5. The reference instruction includes a target instruction obtained from an online user log, the plurality of reference slots corresponding to the target instruction includes a target slot, and the plurality of reference slot values corresponding to the target instruction includes a target slot value; wherein the preset rule indicates, in response to determining that the plurality of conventional slots does not include the target slot, or that the distribution number of the target slot is less than a first preset value or less than the distribution number of at least some other conventional slots, setting the target slot as a sample slot; and / or 3. The method of claim 2, wherein the preset rule instructs setting the target slot value as the sample slot value in response to determining that the plurality of conventional slot values does not include the target slot value or that a distribution count of the target slot value is less than a second preset value or less than a distribution count of at least some other conventional slot values.
6. generating natural language based sample instructions based on the plurality of sample slots and the plurality of sample slot values, 2. The method of claim 1, further comprising: utilizing a natural language instruction generation model to generate a plurality of sample instructions having different expressions but the same meaning based on the plurality of sample slots and the plurality of sample slot values.
7. The method of claim 6 , wherein the predefined rules direct the reference slots to be directly determined as the sample slots and the reference slot values to be directly determined as the sample slot values.
8. The method of claim 1 , wherein the predefined rules instruct randomly determining the sample slots among the reference slots and randomly determining the sample slot values among the reference slot values.
9. The large model is a large-scale language model based on deep learning, and the method further comprises: obtaining ground truth answer data corresponding to the sample instruction; The method of claim 2 , further comprising: training the large model using the sample instructions and ground truth answer data corresponding to the sample instructions.
10. training the large model using the sample instructions and ground truth answer data corresponding to the sample instructions; adding the sample instructions and ground truth answer data corresponding to the sample instructions to a training set to obtain a target training set; and training the large model using the target training set.
11. An apparatus for generating instruction data for a large model, comprising: a first acquisition unit configured to acquire a reference instruction based on a natural language, the reference instruction being capable of instructing a large model to generate answer data satisfying a plurality of first requests corresponding to a plurality of first request types; a second obtaining unit configured to obtain a structured decomposition result for the reference instruction to obtain a plurality of reference slots corresponding to the plurality of first request types and a plurality of reference slot values corresponding to the plurality of first requests; A determination unit configured to determine a plurality of sample slots and a plurality of sample slot values corresponding to the plurality of sample slots according to the plurality of reference slots, the plurality of reference slot values and a preset rule; An apparatus for generating instruction data for a large model, comprising: a generation unit configured to generate sample instructions based on natural language based on the plurality of sample slots and the plurality of sample slot values, the sample instructions being capable of instructing the large model to generate answer data that satisfies a plurality of second requests corresponding to the plurality of sample slot values.
12. the reference instructions include a plurality of training instructions taken from a training set; Wherein, the determination unit: A statistical subunit configured to generate statistics on distribution results of a plurality of conventional slots and a plurality of conventional slot values corresponding to the plurality of training instructions, the plurality of conventional slots including a plurality of reference slots corresponding to each training instruction in the plurality of training instructions, and the plurality of conventional slot values including a plurality of reference slot values corresponding to each training instruction in the plurality of training instructions; The apparatus of claim 11 , further comprising: a determining subunit configured to determine the plurality of sample slots and the plurality of sample slot values based on the distribution result and the preset rule.
13. The predefined rule instructs determining the plurality of sample slots based on at least a portion of the plurality of legacy slots that have a lowest distribution number; and / or The apparatus of claim 12 , wherein the predefined rule directs determining the plurality of sample slot values based on at least a portion of the plurality of legacy slot values that are least frequently distributed.
14. The predefined rule instructs determining the plurality of sample slots based on a plurality of conventional slot combinations having the highest number of co-occurrences, the number of the plurality of sample slots being greater than the number of conventional slots included in any one of the plurality of conventional slot combinations; and / or 13. The apparatus of claim 12, wherein the pre-set rule instructs determining the plurality of sample slot values based on a combination of a plurality of conventional slot values having a highest number of co-occurrences, and the number of the plurality of sample slot values is greater than the number of conventional slot values included in any one of the combinations of the plurality of conventional slot values.
15. The reference instruction includes a target instruction obtained from an online user log, the plurality of reference slots corresponding to the target instruction includes a target slot, and the plurality of reference slot values corresponding to the target instruction includes a target slot value; wherein the preset rule indicates, in response to determining that the plurality of conventional slots does not include the target slot, or that a distribution number of the target slot is less than a first preset value or less than a distribution number of at least some other conventional slots, setting the target slot as a sample slot; or 13. The apparatus of claim 12, wherein the preset rule instructs setting the target slot value as a sample slot value in response to determining that the plurality of conventional slot values does not include the target slot value or that a distribution count of the target slot value is less than a second preset value or less than a distribution count of at least some other conventional slot values.
16. The generating unit comprises: The apparatus of claim 11 , further comprising a generation subunit configured to utilize a natural language instruction generation model to generate a plurality of sample instructions having different expressions but the same meaning based on the plurality of sample slots and the plurality of sample slot values.
17. The apparatus of claim 16 , wherein the predefined rules direct the reference slots to be directly determined as the sample slots and the reference slot values to be directly determined as the sample slot values.
18. The apparatus of claim 11 , wherein the predefined rules instruct randomly determining the sample slots among the reference slots and randomly determining the sample slot values among the reference slot values.
19. The large model is a large-scale language model based on deep learning, and the device: a third acquiring unit configured to acquire ground truth answer data corresponding to the sample instruction; The apparatus of any one of claims 12 to 15, further comprising: a training unit configured to train the large model using the sample instructions and ground truth answer data corresponding to the sample instructions.
20. The training unit includes: an update subunit configured to add the sample instructions and ground truth answer data corresponding to the sample instructions to a training set to obtain a target training set; and a training subunit configured to train the large model utilizing the target training set.
21. An electronic device, comprising: At least one processor; and a memory communicatively coupled to the at least one processor, wherein: The electronic device, characterized in that the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 10.
22. A non-transitory computer readable storage medium having computer instructions stored thereon, the computer instructions being used to cause the computer to perform a method according to any one of claims 1 to 10.
23. A computer program product comprising a computer program, said computer program being adapted to implement the method according to any one of claims 1 to 10 when said computer program is executed by a processor.
Citation Information
Patent Citations
Sentence amplification system and program
JP2021124848A
Cited By
Examination support device, examination support method, and program
JP2026129330A
Examination support device, examination support method, and program
JP2026129333A
Information processing system, information processing method, information processing device, determination method, and determination program
WO2026069644A1
