Method for improving model performance and related device

By using rich auxiliary task data sets to train the model, generate empirical information to improve the performance of the target task and input it into the model, the problem of lack of labeled data for new tasks is solved, and the model performance is effectively improved.

CN119862973APending Publication Date: 2025-04-22YANGTZE DELTA REGION INST OF TSINGHUA UNIV ZHEJIANG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411953746.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

The lack of labeled data for new tasks makes it difficult to quickly improve the capabilities of large language models on these tasks.

Method used

By obtaining the first training data set for training the model on the auxiliary task, the model is trained to generate a second empirical information for improving the performance of the model on the target task, and inputting it into the model to improve performance.

Benefits of technology

In the absence of traditional target task data, the performance of the model on target tasks is effectively improved, and the goal of quickly improving the ability of large language models is achieved at low cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862973A_ABST
    Figure CN119862973A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for improving the performance of a model, a computer readable medium and electronic equipment, and the method comprises the steps: obtaining a first training data set used for training the capability of the model on an auxiliary task, the first training data set comprises a plurality of samples, each sample comprises a text and annotation data corresponding to the text, and the annotation data is used for training the capability of the model on the auxiliary task; the number of samples in the first training data set is greater than the number of samples in a second training data set for training the capability of the model on the target task; training a predetermined model according to the first training data set to obtain second experience information which is generated by the predetermined model and is used for improving the performance of the model on the target task; and when the target task needs to be executed through the target model, inputting the second experience information into the target model to improve the performance of the target model on the target task. According to the method and the device, the performance of the model on the target task can be improved when the annotation data of the target task is lacked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and more specifically, to a method for improving model performance and related devices. Background Art

[0002] With the rapid development of large language model technology, new tasks that can be accomplished by large language models are constantly emerging.

[0003] However, new tasks often lack labeled data, and new tasks are usually more special and complex tasks with high labeling costs, which makes it difficult to quickly improve the capabilities of large language models on new tasks. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, computer-readable medium, and electronic device for improving model performance, thereby improving the performance of the model on the target task, at least to a certain extent, in the absence of labeled data for the target task.

[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0006] According to one aspect of an embodiment of the present application, a method for improving model performance is provided, the method comprising: obtaining a first training data set for training the model's ability on an auxiliary task, the first training data set comprising multiple samples, each sample comprising text and annotation data corresponding to the text, the number of samples in the first training data set being greater than the number of samples in a second training data set for training the model's ability on a target task; training a predetermined model according to the first training data set to obtain second experience information generated by the predetermined model for improving the model's performance on the target task; when it is necessary to perform the target task through the target model, inputting the second experience information into the target model to improve the performance of the target model on the target task.

[0007] According to one aspect of an embodiment of the present application, a device for improving model performance is provided, the device comprising: a data set acquisition unit, used to acquire a first training data set for training the model's ability on an auxiliary task, the first training data set comprising multiple samples, each sample comprising text and annotation data corresponding to the text, the number of samples in the first training data set being greater than the number of samples in a second training data set for training the model's ability on a target task; a model training unit, used to train a predetermined model according to the first training data set to obtain second experience information generated by the predetermined model for improving the model's performance on the target task; an experience information input unit, used to input the second experience information into the target model when it is necessary to perform the target task through the target model, so as to improve the performance of the target model on the target task.

[0008] In some embodiments of the present application, based on the aforementioned scheme, the model training unit is configured to: train the predetermined model on the auxiliary task according to the first training data set to obtain prediction data corresponding to the text in the sample; train the predetermined model on the target task according to the first training data set and the prediction data to obtain the second experience information generated by the predetermined model for improving the performance of the model on the target task.

[0009] In some embodiments of the present application, based on the aforementioned scheme, the model training unit is configured to: train the predetermined model on the auxiliary task according to the first training data set, and obtain the first prediction data corresponding to the text in the sample and the first experience information generated by the predetermined model for improving the performance of the model on the auxiliary task; the experience information input unit is configured to: when it is necessary to perform the target task through the target model, input the first experience information and the second experience information into the target model.

[0010] In some embodiments of the present application, based on the aforementioned scheme, the experience information input unit is configured as follows: when it is necessary to perform the target task through the target model, construct a target prompt text containing the first experience information, the second experience information and the target input text; input the target prompt text into the target model, so that the target model first performs the auxiliary task according to the first experience information, and then performs the target task according to the execution result of the auxiliary task and the second experience information.

[0011] In some embodiments of the present application, based on the aforementioned scheme, the model training unit is configured to: traverse each sample in the first training data set in turn, and whenever a sample is traversed, construct a first prompt text based on the current first experience information and the text and annotation data in the sample, and input the first prompt text into the predetermined model to obtain the first prediction data corresponding to the sample generated by the predetermined model based on the first prompt text, and the new first experience information generated based on the first prediction data.

[0012] In some embodiments of the present application, based on the aforementioned scheme, the model training unit is configured as follows: in the process of traversing each sample in the first training data set, each time a sample is traversed, after obtaining the first prediction data corresponding to the sample, a target task learning step is executed; the target task learning step includes: constructing a second prompt text based on the current second experience information, the first prediction data corresponding to the sample, and the text and annotation data in the sample, and inputting the second prompt text into the predetermined model to obtain the second prediction data corresponding to the sample generated by the predetermined model according to the second prompt text, and new second experience information generated according to the second prediction data.

[0013] In some embodiments of the present application, based on the aforementioned scheme, the target task learning step is executed iteratively; after the target task learning step is executed for the first time, the current second experience information used for each execution of the target task learning step is the new second experience information generated when the target task learning step was executed last time.

[0014] In some embodiments of the present application, based on the aforementioned scheme, the model training unit includes a step-ending execution module; after obtaining the new second experience information generated according to the second prediction data, the step-ending execution module is used to: determine the indicator value corresponding to at least one of the following indicators for the second prediction data corresponding to the sample: the similarity between the second prediction data corresponding to the sample and the text in the sample, the readability of the second prediction data corresponding to the sample, and the compression rate of the second prediction data corresponding to the sample, and the compression rate is used to control the length of the generated second prediction data; if the indicator value corresponding to the at least one indicator meets the predetermined conditions, the execution of the target task learning step is terminated.

[0015] In some embodiments of the present application, based on the aforementioned scheme, the labeled data is a labeled question-answer pair, the question-answer pair includes a question and an answer for answering the question, the auxiliary task is a question-answering task, and the target task is a summary task.

[0016] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for improving model performance as described in the above embodiment is implemented.

[0017] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for improving model performance as described in the above embodiments.

[0018] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes computer instructions, wherein the computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for improving model performance as described in the above embodiments.

[0019] In the technical solutions provided in some embodiments of the present application, a first training data set including multiple samples is obtained, the first training data set is a data set for training the ability of the model on auxiliary tasks, each sample includes text and annotation data corresponding to the text; then, a predetermined model is trained based on the first training data set to obtain second experience information generated by the predetermined model for improving the performance of the model on the target task, wherein the target task is a task that ultimately needs to improve the performance of the model, and finally, the second experience information is input into the target model to improve the performance of the target model on the target task when the target task is performed by the target model. Since the number of samples in the first training data set is greater than the number of samples in the second training data set for training the ability of the model on the target task, the solution of the embodiment of the present application uses a data set with a richer number of samples for training the ability of the model on auxiliary tasks for the first time to train the ability of the predetermined model on the target task, and in the absence of traditional data for training the ability of the model on the target task, the performance of the model on the target task is improved, and the ability of the large language model on the target task or new task can be quickly improved in a low-cost manner.

[0020] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0022] Figure 1 A flow chart showing a method for improving model performance according to an embodiment of the present application is shown;

[0023] Figure 2 An embodiment according to the present application is shown. Figure 1 A flowchart of the details of step 120 in the embodiment;

[0024] Figure 3 An embodiment according to the present application is shown. Figure 2 A flowchart of the details of step 121 and step 130 in the embodiment;

[0025] Figure 4 A flowchart showing target task learning steps according to an embodiment of the present application is shown;

[0026] Figure 5 An embodiment according to the present application is shown. Figure 3 A flowchart of the details of step 130' in the embodiment;

[0027] Figure 6 A block diagram of a device for improving model performance according to an embodiment of the present application is shown;

[0028] Figure 7 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0029] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0030] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0031] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0032] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0033] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0034] Automatic text summarization technology has been developed for decades since the 1950s, and has evolved from early rule-based methods to modern technologies based on deep learning. The following is a detailed introduction to the main development stages and key technologies in this field.

[0035] 1. Early methods (1950s-1990s)

[0036] Early automatic text summarization methods were mainly based on rule and statistical techniques, focusing on how to extract key information from text.

[0037] 2. Deep Learning Era (after 2000)

[0038] After entering the 21st century, with the rise of deep learning technology, the field of automatic text summarization has ushered in rapid development. New methods get rid of excessive reliance on rules and focus on how to extract deep semantics from text through data and models.

[0039] 3. Large models for summary generation

[0040] In recent years, the rapid development of large language models (LLMs) has significantly improved the quality and efficiency of summary generation. Among them, GPT (Generative Pre-trained Transformer), LLaMA (Large Language Model MetaAI) and Claude have performed well in text summarization tasks due to their powerful language understanding and generation capabilities.

[0041] Texts with more than 1,000 words are usually considered long texts. The inventors of this application found that existing large models may still lose some important information when facing long texts. Long text summarization can be classified as a more general task, which faces two key problems:

[0042] 1. Solve the problem of insufficient data: There is a lack of sufficiently diverse open source datasets for long text summarization tasks to post-train or fine-tune LLMs, which may be because the task is relatively new and special, or the annotation cost is high. Therefore, it is necessary to design a solution that can utilize related tasks with rich data.

[0043] 2. Meeting high context requirements: Task output requires high context consistency and rich semantic information, but existing prompt engineering technologies are difficult to deeply mine context and cannot well capture the semantic rules between different tasks. Therefore, a strategy that can fully mine context semantics is needed.

[0044] To this end, this application first provides a method for improving model performance. This method actually proposes a new zero-shot transfer learning framework for long text summarization that performs iterative training on auxiliary tasks of the target task. This framework can overcome the above-mentioned defects of related technologies and at least achieve the following technical effects:

[0045] 1. Alleviate data shortage.

[0046] The algorithm framework provided in this application introduces auxiliary tasks (such as question-answering tasks, QA) to effectively utilize its rich open source datasets and alleviate the bottleneck of insufficient data for the target task.

[0047] 2. Meet the high demand for context.

[0048] The algorithm framework provided in this application emphasizes the semantic or structural similarity between auxiliary tasks and target tasks, ensuring that the model can capture the contextual details and consistency required by the target task. Auxiliary tasks contain rich entity and relationship information, providing a good migration foundation for the target task.

[0049] 3. Optimize the model by generating experience.

[0050] The algorithm framework provided in this application adopts an iterative optimization method, which utilizes the ability of the new generation of large language models in understanding complex semantics, so that the model can automatically summarize useful rules (referred to as "experience" in this application) from auxiliary tasks, thereby improving the performance of the model.

[0051] 4. Expand advantages.

[0052] (1) The fine-tuned LLM can efficiently perform long text summarization tasks in a zero-shot manner.

[0053] (2) This framework also provides a reference for transfer learning of other tasks and can be expanded to more complex scenarios.

[0054] In summary, the algorithm framework provided in the embodiments of the present application effectively solves the data and context problems of long text summary tasks by combining rich data of auxiliary tasks with semantic similarity design, and provides new ideas for zero-sample learning.

[0055] It is easy to understand that the method for improving model performance provided in the embodiment of the present application is generally executed by the server, and accordingly, the device for improving model performance is generally set in the server. However, in other embodiments of the present application, the terminal device may also have similar functions as the server, so as to execute the solution for improving model performance provided in the embodiment of the present application.

[0056] Therefore, the embodiments of the present application can be applied to a terminal or a server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.

[0057] The implementation details of the technical solution of the embodiment of the present application are described in detail below:

[0058] Figure 1The flowchart of the method for improving model performance according to an embodiment of the present application is shown. The method for improving model performance can be executed by various devices with processing and computing functions. Specifically, it can be executed by a target device, such as a user terminal or a cloud server. The user terminal includes but is not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, smart watches, etc. Please refer to Figure 1 As shown, the method for improving model performance includes at least the following steps:

[0059] In step 110, a first training data set is obtained for training the model's ability on an auxiliary task, the first training data set includes multiple samples, each sample includes text and labeled data corresponding to the text, and the number of samples in the first training data set is greater than the number of samples in the second training data set for training the model's ability on a target task.

[0060] Auxiliary tasks and target tasks are different tasks. Auxiliary tasks and target tasks may have certain similarities in structure or semantics. Auxiliary tasks and target tasks are both tasks in the field of natural language processing. For example, the target task can be a summary task, specifically a long text summary task, which is a task of generating summaries for texts with more than 1,000 words; the auxiliary task can be a question answering (QA) task. Auxiliary tasks and target tasks can be tasks with the same features, for example, long text summary tasks and question answering tasks both include reading comprehension of the original text. Therefore, auxiliary tasks can have a corresponding relationship with the target task, that is, auxiliary tasks can be auxiliary tasks of the target task. Therefore, tasks such as machine translation, text classification, and keyword extraction can also be used as auxiliary tasks for the target task of long text summary task.

[0061] Compared with the auxiliary task, the target task is often a more novel task. Below, taking the target task as a long text summary task and the auxiliary task as a question-answering task as an example, the scheme of the embodiment of the present application is described in detail.

[0062] The first training data set may be a training data set for a question-answering task; the second training data set may be a training data set for a long text summarization task. The number of samples in the first training data set is usually much larger than the number of samples in the second training data set. The number of samples in the second training data set may even be 0, that is, the second training data set is empty, that is, the second training data set may not exist.

[0063] In one embodiment of the present application, the annotated data is an annotated question-answer pair, the question-answer pair includes a question and an answer for answering the question, the auxiliary task is a question-answering task, and the target task is a summary task.

[0064] Specifically, each sample in the first training data set may include a text and a number of labeled question-answer pairs corresponding to the text. The text may be a long text such as an article containing more than 1000 characters.

[0065] Each question-answer pair can be generated based on the corresponding text. The information corresponding to the question and answer in a question-answer pair can both exist in the text corresponding to the question-answer pair; of course, in a question-answer pair, only one of the question and the answer can exist in the text corresponding to the question-answer pair. A sample can include multiple question-answer pairs corresponding to the text, for example, a sample can include 5-15 question-answer pairs. The number of annotated question-answer pairs contained in different samples can be different.

[0066] The first training data set may be an open source data set. The first training data set may include n samples. For the i-th sample in the first training data set, it may include text D i and according to text D i Generated several annotated question-answer pairs i Therefore, the first training data set may include a text set D = {D1, D2, ..., D n} and the labeled data set QA={QA1,QA2,…,QA n}.

[0067] Please continue to see Figure 1 In step 120, the predetermined model is trained according to the first training data set to obtain second experience information generated by the predetermined model for improving the performance of the model on the target task.

[0068] In the embodiment of the present application, the first training data set is used to train the ability of the predetermined model on the target task. Different from the traditional model training method, the training of the predetermined model according to the first training data set in the present application is achieved by generating experience information, and the model parameters are not updated. The second experience information can be the summary generation experience Exp Sum .

[0069] Figure 2 An embodiment according to the present application is shown. Figure 1 Flow chart of details of step 120 in the embodiment. Figure 2 As shown, training a predetermined model according to a first training data set to obtain second experience information generated by the predetermined model for improving the performance of the model on a target task may specifically include the following steps:

[0070] In step 121, a predetermined model is trained on an auxiliary task according to a first training data set to obtain prediction data corresponding to the text in the sample.

[0071] In an embodiment of the present application, when the ability of a predetermined model on an auxiliary task is trained based on a first training data set, prediction data generated by the predetermined model based on the text in the sample will be obtained. When the predetermined model is trained on a target task, the prediction data can be used as input to the model to improve the training effect on the target task.

[0072] In the embodiment of the present application, the predetermined model may be a large language model (LLM), also referred to as a large model, which may be multimodal.

[0073] The predetermined model may be any large language model with more than 1 billion parameters. The number of parameters of the predetermined model may be hundreds of billions of parameters, that is, the number of parameters may reach more than 100 billion.

[0074] Figure 3 An embodiment according to the present application is shown Figure 2 Flow chart of details of step 121 and step 130 in the embodiment. Figure 3 As shown, training a predetermined model on an auxiliary task according to the first training data set to obtain prediction data corresponding to the text in the sample may specifically include the following steps:

[0075] In step 121 ′, the predetermined model is trained on the auxiliary task according to the first training data set to obtain first prediction data corresponding to the text in the sample and first experience information generated by the predetermined model for improving the performance of the model on the auxiliary task.

[0076] In the embodiment of the present application, when the predetermined model is trained on the auxiliary task according to the first training data set, the predetermined model will not only generate the first prediction data, but also generate the first experience information. The first experience information can be the question-answer generation experience Exp QA .

[0077] In one embodiment of the present application, a predetermined model is trained on an auxiliary task based on a first training data set to obtain first prediction data corresponding to the text in the sample and first experience information generated by the predetermined model for improving the performance of the model on the auxiliary task, which may include the following steps: traversing each sample in the first training data set in turn, and whenever a sample is traversed, constructing a first prompt text based on the current first experience information and the text and annotation data in the sample, and inputting the first prompt text into the predetermined model to obtain first prediction data corresponding to the sample generated by the predetermined model based on the first prompt text, and new first experience information generated based on the first prediction data.

[0078] In the embodiment of the present application, the predetermined model is sequentially learned on the auxiliary task based on each sample in the first training data set, and each time a sample is traversed, the first prompt text needs to be constructed based on the current first experience information. The first prompt text may include the current first experience information and the text and annotation data in the sample, and may also include instructions for generating first prediction data and new first experience information based on this information, and the instructions may include information such as task requirements and output format.

[0079] When the predetermined model is trained on the auxiliary task according to the first training data set, the first experience information Exp QA Initialization of the first experience information Exp QA Initialized to NULL, each time training is performed based on a sample, the first experience information Exp QA Perform an update.

[0080] Specifically, the predetermined model M can be based on the first prompt text P QA Generate the first prediction data and the new first experience information. The predetermined model M can use the current first experience information Exp QA Generate D i The corresponding question-answer pair QA′ i , the question and answer pair QA′ i This is the first prediction data. i Multiple question-answer pairs may be included, for example, it may include 15-25 question-answer pairs.

[0081] The predetermined model can first generate the first prediction data QA′ i , and according to the first prediction data QA′ i QA with the annotation data of the corresponding text i Compare and summarize several rules, and then update Exp QA .

[0082] First prompt text P QA This may include:

[0083] You are a helpful text assistant who excels at learning new experiences. To get started, please assist with the following tasks:

[0084] Based on the input text, the provided question-answer pairs, and the experience in generating question-answer pairs, generate questions and corresponding answers that reflect all the topics and key points of the input article. The format of the generated question-answer pairs should match the format of the provided question pairs.

[0085] During the question-answer generation process, update the learning experience for generating better question-answer pairs by comparing the generated questions with the original question pairs generated based on the original text or other methods. Please consider all the key points required to create high-quality question-answer pairs and ensure that the learning experience is generalizable. Do not include detailed examples, but provide detailed rules as much as possible. The total word count should not exceed 600 words.

[0086] The output is in the following format:

[0087] {

[0088] "Generated_QA_pairs":{

[0089] "1":"Question":"xxxx","Answer":"xxxx",

[0090] "2":"Question":"xxxx","Answer":"xxxx"

[0091] },

[0092] "QA_generation_experience":"Answer point by point, write each one in a line"

[0093] }.

[0094] In the first prompt text P QA In the content, the input text is the text in the sample, the provided question and answer pair is the labeled data corresponding to the text in the sample, and the question and answer pair generation experience is the current first experience information.

[0095] Please continue to see Figure 2 and Figure 3 In step 122, the predetermined model is trained on the target task according to the first training data set and the prediction data to obtain second experience information generated by the predetermined model for improving the performance of the model on the target task.

[0096] In one embodiment of the present application, a predetermined model is trained on a target task based on a first training data set and prediction data to obtain second experience information generated by the predetermined model for improving the performance of the model on the target task. Specifically, the following steps may be included: in the process of traversing each sample in the first training data set, each time a sample is traversed, after obtaining the first prediction data corresponding to the sample, a target task learning step is executed.

[0097] The target task learning step can be executed iteratively. When traversing each sample, it is necessary to train the predetermined model on the target task by executing the target task learning step. After obtaining the first prediction data corresponding to the sample, the target task learning step can be executed based on the first prediction data. If the number of executions of the target task learning step reaches K times, the execution of the target task learning step can also be terminated. K can be 3 or other numbers, and the specific value of K can be determined by experiments.

[0098] Figure 4 A flowchart of target task learning steps according to an embodiment of the present application is shown.

[0099] See also Figure 4 As shown, the target task learning step may specifically include the following steps:

[0100] In step 410, a second prompt text is constructed based on the current second experience information, the first prediction data corresponding to the sample, and the text and annotation data in the sample, and the second prompt text is input into a predetermined model to obtain second prediction data corresponding to the sample generated by the predetermined model based on the second prompt text, and new second experience information generated based on the second prediction data.

[0101] The second prediction data may be prediction data generated by a predetermined model when executing a target task, for example, may be a summary generated based on text in a sample.

[0102] When the predetermined model is trained on the target task according to the first training data set and the prediction data, the second experience information Exp Sum Initialization of the second experience information Exp Sum Initialized to NULL, each time the target task learning step is executed, the second experience information Exp Sum Perform an update.

[0103] In one embodiment of the present application, after the target task learning step is executed for the first time, the current second experience information used as the basis for each execution of the target task learning step is the new second experience information generated when the target task learning step was executed last time.

[0104] After each execution of step 410, the newly obtained second experience information can be used as the current second experience information for the next execution of the target task learning step.

[0105] It is easy to understand that although in the embodiment of the present application, the first experience information Exp QA and the second experience information Exp SumThe updating is achieved by training the predetermined model, but in other embodiments of the present application, the first experience information Exp QA and the second experience information Exp Sum The update can also be achieved by training two different models separately.

[0106] Second prompt text P Sum It may include the current second experience information, the first prediction data corresponding to the sample, and the text and annotation data in the sample, and may also include instructions for generating the second prediction data and new second experience information based on this information, and the instructions may include information such as task requirements and output format; in addition, the second prompt text P Sum It can also include the latest first experience information Exp QA Of course, the second prompt text P Sum The data may not include the annotation data corresponding to the text or the first prediction data corresponding to the sample.

[0107] Specifically, the predetermined model M can be based on the second prompt text P sum Generate the second prediction data and new second experience information Exp Sum For the i-th sample, the predetermined model M can use the current second experience information Exp Sum , based on question-answer pair QA′ i , QA i Generate text D i Summary Here, k represents the summary produced by the k-th execution of the target task learning step.

[0108] Second prompt text P Sum This may include:

[0109] You are a helpful text assistant, please assist with the following tasks:

[0110] 1. Based on the input text, the provided questions, the generated question-answer pairs, and the summary generation experience, generate a summary corresponding to the original text, which can reflect all the topics and key points of the input article and has an appropriate length.

[0111] 2. Update the summary generation experience by first using the provided questions, then using the generated summary and all provided questions (both generated and original), and finally combining what was learned from the question-answer generation experience to come up with ways to improve the summary.

[0112] The goals of generating summaries are:

[0113] The generated summary should have higher ROUGE and BLEU scores than the directly generated summary. The summary should include key terms, phrases, and sentences that are close to the original text to ensure high precision and high recall. Maximize the overlap with the reference summary by closely following the wording, sentence structure, and style of the original text. Make sure the summary is concise and comprehensive, avoiding unnecessary details or deviations from the topic. At the same time, ensure the fluency of the summary.

[0114] Please consider all the key points needed to create a good summary that makes the learning experience universal (e.g. avoid leaving out story details, keep sentences coherent, and list some suggestions for improving accuracy and fluency). In addition, list other rules that may be important and be as detailed as possible.

[0115] You can also consider ways to ensure better quality summaries, such as voting mechanisms.

[0116] Please answer each point in one line, and the total word count should not exceed 600 words.

[0117] {

[0118] "Summary":"One line of text",

[0119] "Summary_generation_experience":"Answer point by point, one line at a time"

[0120] }.

[0121] In the second prompt text P Sum In the above content, the input text is the text in the sample, the provided question is the annotated data in the sample (the annotated question-answer pair or the question in the annotated question-answer pair), and the generated question-answer pair is the first prediction data corresponding to the sample, that is, the question-answer pair generated according to the text in the sample; the directly generated summary is a summary directly generated by a predetermined model based on the input text, and the reference summary can be the original text, that is, the original input text.

[0122] Second prompt text P Sum The predetermined model can be instructed to generate the second prediction data and the new second experience information Exp through multiple iterations. Sum .

[0123] In the above method of updating summary generation experience, the specific meaning can be: generate summaries through question-guided generation, first generate preliminary summaries using the provided questions, and then expand the question set based on the generated summaries to cover more content; then analyze the question-answering generation experience, identify shortcomings in the summary and optimize the strategy, improve the model's ability to extract key information and language expression, and gradually improve the quality and effect of the summary.

[0124] In the second prompt text PSum In , the voting mechanism can be to require the model to generate summaries multiple times and select the best summary from the multiple summaries generated.

[0125] Please continue to see Figure 4 As shown, after obtaining the new second experience information generated according to the second prediction data, the target task learning step may further include:

[0126] In step 420, an indicator value corresponding to at least one of the following indicators is determined for the second prediction data corresponding to the sample: similarity between the second prediction data corresponding to the sample and the text in the sample, readability of the second prediction data corresponding to the sample, and compression rate of the second prediction data corresponding to the sample, where the compression rate is used to control the length of the generated second prediction data.

[0127] The indicator values ​​corresponding to all the above indicators can be determined for the second prediction data corresponding to the sample.

[0128] Cosine similarity can be calculated using and D i The similarity S i .

[0129] Readability R can be calculated using the following formula:

[0130]

[0131] Among them, TW is the total number of words in the text, TSE is the total number of sentences, and TSY is the total number of syllables. TW / TSE calculates the average sentence length. Longer sentences reduce readability, so the corresponding value is subtracted from the score. TSY / TW calculates the average number of syllables per word. More syllables will also reduce the score because longer words tend to make the text more difficult to read.

[0132] The compression ratio C is used to control the length of the generated summary. The compression ratio C can be calculated using the following formula:

[0133]

[0134] Among them, length(Text) is the length of the text in the sample, and length(Summary) is the length of the second prediction data (generated summary) corresponding to the sample.

[0135] In step 430, it is determined whether the indicator value corresponding to each indicator satisfies a predetermined condition.

[0136] If the indicator values ​​corresponding to each indicator meet the predetermined conditions, the execution of the target task learning step is terminated.

[0137] The predetermined condition can be S i >S and Ri >R and C i <C, where S i , R i , C i respectively represent the similarity, readability, and compression ratio generated for sample i.

[0138] In step 440, it ends.

[0139] End the execution of the target task learning step.

[0140] For the news dataset, the final Q&A generation experience Exp QA is as follows:

[0141] 1. Ensure that each question targets an independent key point or theme in the original text.

[0142] 2. The question should be specific and clear to lead to a detailed answer that reflects the core information.

[0143] 3. Avoid using broad or vague questions to prevent ambiguous answers.

[0144] 4. Compare the generated questions with the original questions to ensure that all key aspects are covered and the questions are clear and concise.

[0145] 5. The answer should be directly supported by the text and avoid including speculative or inferential information. This method can ensure the comprehensiveness and accuracy of the Q&A pairs.

[0146] For the news dataset, the final summary generation experience Exp Sum is as follows:

[0147] 1. Ensure that all key points are included, such as the formation, evolution, and current situation of Boko Haram, as well as different views on security issues.

[0148] 2. Maintain the wording and sentence structure of the original text to ensure precision and recall.

[0149] 3. Avoid unnecessary details and focus on the core information to keep it concise.

[0150] 4. Ensure that the summary is logically fluent and the language is smooth.

[0151] 5. Use specific terms and phrases in the text to maximize the overlap with the reference summary.

[0152] 6. Consider using a voting system to select the best summary from multiple drafts.

[0153] 7. Verify that the summary accurately reflects the content of the original text and avoid including speculative information.

[0154] 8. Target different key points or topics in each question to ensure comprehensive coverage.

[0155] 9. Compare the generated questions with the original questions to ensure that all key aspects are covered.

[0156] 10. Make sure answers are directly based on textual support and avoid speculative or inferred information.

[0157] For the prose dataset, the final question-answer generation experience Exp QA As shown below:

[0158] The following is the translation:

[0159] 1. Make sure each question addresses a unique key point or detail and avoid repetition. Cover all important events, people, and details to achieve comprehensive coverage.

[0160] 2. Questions should be clear and specific, avoid ambiguity, and ensure that they can be answered directly from the text.

[0161] 3. Include a combination of factual, inferential, and interpretive questions to stimulate different levels of understanding.

[0162] 4. Review the text several times to ensure that no key points are missed and the questions flow logically.

[0163] 5. Pay attention to characters’ motivations, actions, and their consequences to generate deeper questions.

[0164] 6. Consider the context and sequence of events and create questions that reflect the progression of the narrative.

[0165] 7. Make sure your answers are concise and come directly from the text to ensure accuracy.

[0166] 8. Compare the generated questions with existing questions, identify gaps or duplications, and optimize accordingly.

[0167] 9. The goal is to create questions that encourage critical thinking and deeper interaction with the text.

[0168] For the prose dataset, the final summary generation experience Exp Sum As shown below:

[0169] 1. Make sure to cover all the key points and characters in the text and avoid missing important details; use details to enhance emotional impact, such as incorporating symbolic details.

[0170] 2. Maintain the original order of events and accurately reflect the narrative flow.

[0171] 3. Use language and phrases that closely match the original text to improve precision and recall.

[0172] 4. Keep the summary concise yet comprehensive, avoiding unnecessary details while ensuring that all important events are included.

[0173] 5. Pay attention to fluency and ensure that the summary is logical and easy to read. Keep the logical connection between events to maintain coherence.

[0174] 6. Review and optimize abstracts multiple times to maximize overlap with reference abstracts.

[0175] 7. Pay attention to the connection between sentences and maintain the coherence of the summary.

[0176] 8. Include key terms and phrases to ensure high precision and recall.

[0177] 9. Emphasize themes and symbolism: Not only narrate the plot, but also highlight the underlying themes or symbolic meanings.

[0178] 10. Closely follow the wording, sentence structure and style of the original text.

[0179] 11. Highlight the emotional tone and theme of the original text. This can add depth to the summary and convey an underlying message or moral. It is important not only to narrate the events but also to capture the emotions and thoughts that these events evoke.

[0180] 12. Make sure not to omit any important details that contribute to the moral or lesson of the story. These details are often key to understanding the overall message of the text and should be retained to maintain the integrity of the original story.

[0181] 13. Consider using a voting method to select the best summary from multiple versions, such as generating three versions and selecting the best one.

[0182] Please continue to see Figure 1 In step 130, when the target task needs to be performed by the target model, the second experience information is input into the target model to improve the performance of the target model on the target task.

[0183] Before executing the target task through the target model, the target model may be trained using the second training data set to preliminarily improve the performance of the target model on the target task; then, the target task may continue to be executed through the target model.

[0184] The target model and the predetermined model mentioned above may be the same model or different models. The target model may be a model whose performance on the target task is weaker than that of the predetermined model.

[0185] The model in the embodiments of the present application can be any large language model such as GPT-4o with sufficient parameter capacity and "emergence ability".

[0186] Executing the target task through the target model may be a process of testing the target model or a process of simply using the target model. The target model may better execute the target task based on the input second experience information.

[0187] The purpose of the test in this application is to verify the effectiveness and feasibility of the summary generation method. By evaluating whether the generated summary can accurately answer the provided questions, cover the key information of the text, and whether the optimization strategy improves the quality of the summary, the test aims to find deficiencies and improve the generation process, so as to ultimately achieve the generation of high-quality summaries.

[0188] When it is necessary to generate a summary for the target text using the target model, prompt information including the target text and the second experience information may be input into the target model so that the target model can generate a summary of the target text based on the second experience information.

[0189] Please continue to see Figure 3 As shown, when it is necessary to perform the target task through the target model, the second experience information is input into the target model, which may specifically include the following steps:

[0190] In step 130 ′, when the target task needs to be performed by the target model, the first experience information and the second experience information are input into the target model.

[0191] A prompt text for inputting into the target model may be constructed according to the first experience information and the second experience information to prompt the target model to perform the target task.

[0192] In an embodiment of the present application, a question-answering test data set and a summary test data set may be set to respectively test the capabilities of the model using the second experience information in question-answering and summary generation.

[0193] The test dataset can include multiple samples, each of which contains a text D j , LLM needs to generate a summary Sum for the text j ′.

[0194] For the summary test dataset, during the test, LLM first uses the Exp learned during the training process. QA Generate auxiliary question-answer pairs and compare them with the updated Exp Sum Produce a final summary together.

[0195] The question-answering test dataset may also include multiple texts. The texts in the question-answering test dataset and the summary test dataset may be different. For the question-answering test dataset, this application designs a more challenging LLM text generation strategy QG to replace the text understanding strategy that predicts the answer to the question from the given QA dataset during the training process, so that LLM can be better adapted to the summary task. This algorithm can even run the QA dataset during the test process, generate a summary for its own text based on its QA pairs, and use appropriate indicators for effectiveness evaluation.

[0196] Figure 5 An embodiment according to the present application is shown. Figure 3 Flow chart of details of step 130' in the embodiment. Figure 5 As shown, when it is necessary to perform a target task through a target model, the first experience information and the second experience information are input into the target model, which may specifically include the following steps:

[0197] In step 131 ′, when it is necessary to perform a target task through the target model, a target prompt text including the first experience information, the second experience information and the target input text is constructed.

[0198] The target input text is the text for which a summary is to be generated, for example, the text in a summary test data set used to test summary generation performance. The text in the summary test data set may be different from the text in the first training data set.

[0199] In step 132 ′, the target prompt text is input into the target model so that the target model first performs the auxiliary task according to the first experience information, and then performs the target task according to the execution result of the auxiliary task and the second experience information.

[0200] The target prompt text can be used to instruct the model to first generate a target question-answer pair corresponding to the target input text based on the first experience information, and then generate a summary corresponding to the target input text based on the target question-answer pair and the second experience information.

[0201] The target model may first generate a target question-answer pair corresponding to the target input text based on the first experience information, and then generate a summary corresponding to the target input text based on the target question-answer pair and the second experience information.

[0202] Specifically, the execution result of the auxiliary task can be a generated question-answer pair, and the target model can generate a corresponding summary for the target input text based on the generated question-answer pair and the second experience information (summary generation experience). The samples in the summary test data set can also include question-answer pairs or questions annotated for the text, and the question-answer pairs or questions annotated for the text can be added to the target prompt text so that the target model can better perform the target task.

[0203] When using the summary test dataset for model testing, the constructed prompt text can include the following:

[0204] You are a helpful text assistant, please assist with the following tasks:

[0205] Based on the input text, and with the help of question-answer generation rules and summary generation rules, follow the steps below to generate a summary:

[0206] 1. First, generate question and answer pairs according to the question and answer generation rules.

[0207] 2. Then, based on the input text, the provided questions, the generated question-answer pairs, and the summary generation experience, a summary of the original text is generated with appropriate length.

[0208] enter:

[0209] -Article: [Article]

[0210] -Summary generation experience

[0211] -QA generation experience

[0212] Output format:

[0213] {

[0214] "Generated_QA_pairs":{

[0215] "1":"Question":"xxxx","Answer":"xxxx",

[0216] "2":"Question":"xxxx","Answer":"xxxx"

[0217] },

[0218] "Summary":"One line of text",

[0219] "Summary_generation_experience":"Answer point by point, one line at a time"

[0220] }.

[0221] In the above prompt text, the question-answer generation rule is the question-answer generation experience, and the summary generation rule is the summary generation experience. In actual application, the output format of the above prompt text may not include the summary generation experience "Summary_generation_experience".

[0222] When using the question-answering test dataset for model testing, the constructed prompt text can include the following:

[0223] You are a helpful text assistant, please assist with the following tasks:

[0224] Based on the input text and the provided question, and with the help of question-answer generation rules and summary generation rules, follow the steps below to generate a summary:

[0225] 1. First, generate question and answer pairs according to the question and answer generation rules.

[0226] 2. Then, based on the input text, the provided questions, the generated question-answer pairs, and the summary generation experience, a summary of the original text is generated with appropriate length.

[0227] enter:

[0228] -Article: [Article]

[0229] -Question Pair with answer:

[0230] -Summary generation experience

[0231] -QA generation experience

[0232] Output format:

[0233] {

[0234] "Generated_QA_pairs":{

[0235] "1":"Question":"xxxx","Answer":"xxxx",

[0236] "2":"Question":"xxxx","Answer":"xxxx"

[0237] },

[0238] "Summary":"One line of text",

[0239] "Summary_generation_experience":"Answer point by point, one line at a time"

[0240] }.

[0241] In practical applications, the algorithm used in this application is used to process long text summarization tasks, using question answering as an auxiliary task, and its effectiveness is verified on the BBC summary, NarraSum, FairytaleQA, and NLQuAD datasets. Compared with the three basic LLMs, the algorithm used in this application improves the ROUGE index by nearly 14%, the BLEU index by 35%, and the Factscore index by 16%, demonstrating its potential in more combinations of auxiliary tasks and target tasks.

[0242] In summary, the method for improving model performance provided in the embodiments of the present application can solve the problem of insufficient data in long text summarization tasks, thereby greatly reducing the probability of a large model losing important information when facing long texts.

[0243] The following describes an apparatus embodiment of the present application, which can be used to execute the method for improving model performance in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the method for improving model performance of the present application.

[0244] Figure 6 A block diagram of a device for improving model performance according to an embodiment of the present application is shown. Figure 6 As shown, according to an embodiment of the present application, a device 600 for improving model performance includes: a data set acquisition unit 610, a model training unit 620, and an experience information input unit 630. The data set acquisition unit 610 is used to acquire a first training data set for training the model's ability on an auxiliary task, the first training data set includes a plurality of samples, each sample includes a text and annotated data corresponding to the text, and the number of samples in the first training data set is greater than the number of samples in the second training data set for training the model's ability on a target task; the model training unit 620 is used to train a predetermined model according to the first training data set to obtain second experience information generated by the predetermined model for improving the model's performance on the target task; the experience information input unit 630 is used to input the second experience information into the target model when the target task needs to be performed by the target model to improve the performance of the target model on the target task.

[0245] In some embodiments of the present application, based on the aforementioned scheme, the model training unit 620 is configured to: train the predetermined model on the auxiliary task according to the first training data set to obtain prediction data corresponding to the text in the sample; train the predetermined model on the target task according to the first training data set and the prediction data to obtain the second experience information generated by the predetermined model for improving the performance of the model on the target task.

[0246] In some embodiments of the present application, based on the aforementioned scheme, the model training unit 620 is configured to: train the predetermined model on the auxiliary task according to the first training data set, and obtain the first prediction data corresponding to the text in the sample and the first experience information generated by the predetermined model for improving the performance of the model on the auxiliary task; the experience information input unit 630 is configured to: when it is necessary to perform the target task through the target model, input the first experience information and the second experience information into the target model.

[0247] In some embodiments of the present application, based on the aforementioned scheme, the experience information input unit 630 is configured as: when it is necessary to perform the target task through the target model, construct a target prompt text containing the first experience information, the second experience information and the target input text; input the target prompt text into the target model, so that the target model first performs the auxiliary task according to the first experience information, and then performs the target task according to the execution result of the auxiliary task and the second experience information.

[0248] In some embodiments of the present application, based on the aforementioned scheme, the model training unit 620 is configured to: traverse each sample in the first training data set in turn, and whenever a sample is traversed, construct a first prompt text based on the current first experience information and the text and annotation data in the sample, and input the first prompt text into the predetermined model to obtain the first prediction data corresponding to the sample generated by the predetermined model based on the first prompt text, and the new first experience information generated based on the first prediction data.

[0249] In some embodiments of the present application, based on the aforementioned scheme, the model training unit 620 is configured as follows: in the process of traversing each sample in the first training data set, each time a sample is traversed, after obtaining the first prediction data corresponding to the sample, a target task learning step is executed; the target task learning step includes: constructing a second prompt text based on the current second experience information, the first prediction data corresponding to the sample, and the text and annotation data in the sample, and inputting the second prompt text into the predetermined model to obtain the second prediction data corresponding to the sample generated by the predetermined model according to the second prompt text, and new second experience information generated according to the second prediction data.

[0250] In some embodiments of the present application, based on the aforementioned scheme, the target task learning step is executed iteratively; after the target task learning step is executed for the first time, the current second experience information used for each execution of the target task learning step is the new second experience information generated when the target task learning step was executed last time.

[0251] In some embodiments of the present application, based on the aforementioned scheme, the model training unit 620 includes a step-ending execution module; after obtaining the new second experience information generated according to the second prediction data, the step-ending execution module is used to: determine the indicator value corresponding to at least one of the following indicators for the second prediction data corresponding to the sample: the similarity between the second prediction data corresponding to the sample and the text in the sample, the readability of the second prediction data corresponding to the sample, and the compression rate of the second prediction data corresponding to the sample, and the compression rate is used to control the length of the generated second prediction data; if the indicator value corresponding to the at least one indicator meets the predetermined condition, the execution of the target task learning step is terminated.

[0252] In some embodiments of the present application, based on the aforementioned scheme, the labeled data is a labeled question-answer pair, the question-answer pair includes a question and an answer for answering the question, the auxiliary task is a question-answering task, and the target task is a summary task.

[0253] Figure 7 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.

[0254] It should be noted that Figure 7 The computer system 700 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0255] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 to the random access memory (RAM) 703, such as executing the method described in the above embodiment. In the RAM 703, various programs and data required for system operation are also stored. The CPU 701, ROM 702 and RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0256] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.

[0257] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 709, and / or installed from a removable medium 711. When the computer program is executed by a central processing unit (CPU) 701, various functions defined in the system of the present application are executed.

[0258] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with 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), a flash memory, an 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. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0259] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0260] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0261] As one aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0262] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0263] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0264] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0265] The data collection and processing plan in this application must be implemented in strict accordance with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the personal information subject (or have the legal basis stipulated by the laws and regulations of relevant countries), and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0266] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for improving model performance, characterized in that: The method comprises: Acquire a first training data set for training the model's ability on an auxiliary task, the first training data set comprising a plurality of samples, each sample comprising a text and annotated data corresponding to the text, and the number of samples in the first training data set is greater than the number of samples in a second training data set for training the model's ability on a target task; Training a predetermined model according to the first training data set to obtain second experience information generated by the predetermined model for improving the performance of the model on the target task; When the target task needs to be performed through the target model, the second experience information is input into the target model to improve the performance of the target model on the target task.

2. The method for improving model performance according to claim 1, characterized in that: The step of training a predetermined model according to the first training data set to obtain second experience information generated by the predetermined model for improving the performance of the model on the target task includes: Training a predetermined model on the auxiliary task according to the first training data set to obtain prediction data corresponding to the text in the sample; The predetermined model is trained on the target task according to the first training data set and the prediction data to obtain second experience information generated by the predetermined model for improving the performance of the model on the target task.

3. The method for improving model performance according to claim 2, characterized in that: The step of training a predetermined model on the auxiliary task according to the first training data set to obtain prediction data corresponding to the text in the sample includes: Training a predetermined model on the auxiliary task according to the first training data set to obtain first prediction data corresponding to the text in the sample and first experience information generated by the predetermined model for improving the performance of the model on the auxiliary task; When the target task needs to be performed through the target model, inputting the second experience information into the target model includes: When the target task needs to be performed through the target model, the first experience information and the second experience information are input into the target model.

4. The method for improving model performance according to claim 3, characterized in that: When the target task needs to be performed through the target model, inputting the first experience information and the second experience information into the target model includes: When the target task needs to be performed through the target model, constructing a target prompt text including the first experience information, the second experience information and the target input text; The target prompt text is input into the target model so that the target model first performs the auxiliary task according to the first experience information, and then performs the target task according to the execution result of the auxiliary task and the second experience information.

5. The method for improving model performance according to claim 4, characterized in that: The step of training a predetermined model on the auxiliary task according to the first training data set to obtain first prediction data corresponding to the text in the sample and first experience information generated by the predetermined model for improving the performance of the model on the auxiliary task includes: Each sample in the first training data set is traversed in turn. Whenever a sample is traversed, a first prompt text is constructed according to the current first experience information and the text and annotation data in the sample, and the first prompt text is input into the predetermined model to obtain the first prediction data corresponding to the sample generated by the predetermined model according to the first prompt text, and new first experience information generated according to the first prediction data.

6. The method for improving model performance according to claim 5, characterized in that: The step of training the predetermined model on the target task according to the first training data set and the prediction data to obtain second experience information generated by the predetermined model for improving the performance of the model on the target task includes: In the process of traversing each sample in the first training data set, each time a sample is traversed, after obtaining first prediction data corresponding to the sample, a target task learning step is performed; The target task learning step includes: A second prompt text is constructed according to the current second experience information, the first prediction data corresponding to the sample, and the text and annotation data in the sample, and the second prompt text is input into the predetermined model to obtain the second prediction data corresponding to the sample generated by the predetermined model according to the second prompt text, and new second experience information generated according to the second prediction data.

7. The method for improving model performance according to claim 6, characterized in that: The target task learning step is executed iteratively; after the target task learning step is executed for the first time, the current second experience information used as the basis for each execution of the target task learning step is the new second experience information generated when the target task learning step was executed last time.

8. The method for improving model performance according to claim 7, characterized in that: After obtaining the new second experience information generated according to the second prediction data, the target task learning step further includes: Determining an indicator value corresponding to at least one of the following indicators for the second prediction data corresponding to the sample: similarity between the second prediction data corresponding to the sample and text in the sample, readability of the second prediction data corresponding to the sample, and compression rate of the second prediction data corresponding to the sample, wherein the compression rate is used to control the length of the generated second prediction data; If the indicator values ​​corresponding to the various indicators meet the predetermined conditions, the execution of the target task learning step is terminated.

9. The method for improving model performance according to any one of claims 1 to 8, characterized in that: The labeled data is a labeled question-answer pair, wherein the question-answer pair includes a question and an answer for answering the question, the auxiliary task is a question-answering task, and the target task is a summary task.

10. A device for improving model performance, characterized in that: The device comprises: A data set acquisition unit, configured to acquire a first training data set for training the model's ability on an auxiliary task, wherein the first training data set includes a plurality of samples, each sample includes a text and annotated data corresponding to the text, and the number of samples in the first training data set is greater than the number of samples in a second training data set for training the model's ability on a target task; A model training unit, configured to train a predetermined model according to the first training data set to obtain second experience information generated by the predetermined model for improving the performance of the model on the target task; An experience information input unit is used to input the second experience information into the target model when the target task needs to be performed through the target model, so as to improve the performance of the target model on the target task.