Training sample generation method, training method and information evaluation method and device
By generating training samples and constructing an evaluation model using a large language model, the problems of low efficiency and poor stability in the evaluation of content generated by deep learning models are solved, achieving efficient and accurate evaluation results and improving the robustness and interpretability of the evaluation model.
Patent Information
- Application Number
- CN202411124799.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-15
AI Technical Summary
In existing technologies, evaluation methods for content generated by deep learning models cannot effectively assess the quality of the generated content, especially in multi-dimensional and multi-domain applications where they suffer from low evaluation efficiency, insufficient accuracy, and poor stability.
By generating training samples, a large language model is used to determine evaluation information, construct training samples for the evaluation model, and automatically label the training samples by combining predetermined prompts and original information to achieve flexible evaluation criteria. Furthermore, the stability and accuracy of the evaluation model are improved by screening training samples through the consistency of evaluation information from multiple models.
It achieves efficient and accurate evaluation of content generated by deep learning models, solves the problems of low evaluation efficiency and poor stability, and improves the robustness and interpretability of the evaluation model.
Smart Images

Figure CN118964998A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to technical fields such as deep learning, natural language processing and large models, and especially to a method for generating training samples, a method for training evaluation models and an information evaluation method, device, equipment, medium and program product. Background Art
[0002] With the development of computer technology and network technology, deep learning models are being used more and more widely, and deep learning models have made breakthrough progress in various fields. Among them, AI generated content (AIGC) is an important direction of deep learning.
[0003] With the rapid development of Large Language Models (LLM), text content generated based on LLM is becoming more and more abundant. For example, summary content can be generated for audio, video, and documents to help users improve the efficiency of obtaining information. However, how to efficiently evaluate the content generated by LLM has always been a bottleneck restricting the rapid development of LLM-based applications. Summary of the invention
[0004] The present disclosure aims to provide a method for generating training samples, a method for training an evaluation model, and an information evaluation method, device, equipment, medium, and program product, in order to improve the evaluation efficiency and evaluation accuracy of generated content.
[0005] According to a first aspect of the present disclosure, a method for generating training samples is provided, comprising: obtaining target information pairs, each target information pair comprising generated information generated based on original information and reference information of the generated information; determining evaluation information corresponding to each target information pair using a large language model based on the original information, each target information pair and predetermined prompt information; the evaluation information indicating a relative evaluation result of the generated information and the reference information and an evaluation reason corresponding to the relative evaluation result; and generating a training sample for the evaluation model based on the original information, each target information pair, the predetermined prompt information and the evaluation information.
[0006] According to a second aspect of the present disclosure, a method for training an evaluation model is provided, comprising: obtaining training samples, where the training samples are generated using the method for generating training samples provided by the first aspect of the present disclosure; and training the evaluation model based on the training samples.
[0007] According to the third aspect of the present disclosure, there is provided an information evaluation method, comprising: obtaining generated information generated by two information generation models based on original information to obtain a generated information pair; and based on the original information, the generated information pair and predetermined prompt information, using an evaluation model to determine the evaluation information for the generated information pair, wherein the evaluation model is trained using the training method for the evaluation model provided by the second aspect of the present disclosure.
[0008] According to a fourth aspect of the present disclosure, a device for generating training samples is provided, comprising: an information pair acquisition module, used to acquire target information pairs, each target information pair comprising generated information generated based on original information and reference information of the generated information; an evaluation information determination module, used to determine the evaluation information corresponding to each target information pair using a large language model based on the original information, each target information pair and predetermined prompt information; the evaluation information indicates a relative evaluation result of the generated information and the reference information and an evaluation reason corresponding to the relative evaluation result; and a sample generation module, used to generate a training sample for the evaluation model based on the original information, each target information pair, predetermined prompt information and the evaluation information.
[0009] According to the fifth aspect of the present disclosure, a training device for an evaluation model is provided, comprising: a sample acquisition module, used to acquire training samples, where the training samples are generated by the training sample generation device provided by the fourth aspect of the present disclosure; and a model training module, used to train the evaluation model based on the training samples.
[0010] According to the sixth aspect of the present disclosure, there is provided an information evaluation device, comprising: an information pair acquisition module, used to acquire generated information generated by two information generation models based on original information to obtain a generated information pair; and an information evaluation module, used to determine the evaluation information for the generated information pair based on the original information, the generated information pair and predetermined prompt information by using an evaluation model, wherein the evaluation model is trained by using the training device for the evaluation model provided by the fifth aspect of the present disclosure.
[0011] According to the seventh aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so as to enable the at least one processor to execute at least one of the following methods provided by the present disclosure: a method for generating training samples, a method for training an evaluation model, and a method for information evaluation.
[0012] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute at least one of the following methods provided by the present disclosure: a method for generating training samples, a method for training an evaluation model, and a method for information evaluation.
[0013] According to a ninth aspect of the present disclosure, there is provided a computer program product, comprising a computer program / instruction, wherein the computer program / instruction is stored on at least one of a readable storage medium and an electronic device, and wherein the computer program / instruction, when executed by a processor, implements at least one of the following methods provided in the present disclosure: a method for generating training samples, a method for training an evaluation model, and a method for information evaluation.
[0014] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0016] Figure 1 It is a schematic diagram of application scenarios of a method for generating training samples, a method for training an evaluation model, and an information evaluation method and device according to an embodiment of the present disclosure;
[0017] Figure 2 is a flowchart of a method for generating training samples according to an embodiment of the present disclosure;
[0018] Figure 3 is a schematic diagram of the principle of obtaining target information pairs according to an embodiment of the present disclosure;
[0019] Figure 4 is a schematic diagram of an implementation principle of using a large language model to determine evaluation information according to an embodiment of the present disclosure;
[0020] Figure 5 is a schematic diagram of the principle of determining the consistency index value according to an embodiment of the present invention;
[0021] Figure 6 is a flowchart of a training method for an evaluation model according to an embodiment of the present disclosure;
[0022] Figure 7 is a flowchart of an information evaluation method according to an embodiment of the present disclosure;
[0023] Figure 8 is a structural block diagram of a device for generating training samples according to an embodiment of the present disclosure;
[0024] Fig. 9 is a structural block diagram of a training device for an evaluation model according to an embodiment of the present disclosure;
[0025] Fig.10 is a structural block diagram of an information evaluation device according to an embodiment of the present disclosure; and
[0026] Fig.11 It is a block diagram of an electronic device used to implement the training sample generation method, the evaluation model training method and / or the information evaluation method of the embodiments of the present disclosure. DETAILED DESCRIPTION
[0027] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0028] With the rapid development of large language models, text content generated based on LLM is becoming more and more abundant. For example, summary content can be generated for audio, video or documents to help users quickly filter information and improve information acquisition efficiency. However, the inability to efficiently evaluate the quality of LLM-generated content has always been a key bottleneck restricting the rapid development of LLM-based applications.
[0029] In the related art, methods for evaluating the quality of generated content in the field of natural language processing mainly include statistical-based automated evaluation methods and manual evaluation methods.
[0030] Among them, the statistical-based automatic evaluation method is achieved by comparing the similarity of the target generated content and the model generated content in character fragments. The similarity can be reflected by evaluation indicators such as BLEU (Bilingual Evaluation Understudy) and recall-oriented Understudy for Gisting Evaluation (such as ROUGE-N, GPUGE-L, etc.). The implementation principle of this method is simple and the complexity is low, but this method can only consider the similarity between the target generated content and the model generated content at the fragment level, and it is impossible to design flexible evaluation criteria. For example, it is impossible to evaluate whether there are factual errors in the model-generated content or whether key points are omitted. Whether the logic between the key points is reasonable, whether the knowledge granularity of the content is reasonable, etc.
[0031] Among them, although the manual evaluation method can flexibly customize the evaluation criteria according to the specific goal of generating content, it has the problem of low evaluation efficiency. For example, if the length of the content to be evaluated reaches tens of thousands or even hundreds of thousands, it is basically impossible to evaluate whether key points are missed. In addition, due to the limited knowledge of the evaluators, the manual evaluation method often cannot achieve multi-dimensional evaluation in diverse fields, such as whether there are factual errors in the content generated by the model, and the correctness of the logic before and after the content expression.
[0032] In order to solve the above problems, a general large model can also be used to evaluate the model-generated content. However, the evaluation based on the general large model has the problem of insufficient stability. For example, if the general large model evaluates the same model-generated content twice, the evaluation results may be different.
[0033] Based on this, the present disclosure provides a method for generating training samples, a method for training an evaluation model, and an information evaluation method, device, equipment, medium, and program product. Figure 1 The application scenarios of the method and device provided by the present disclosure are described.
[0034] Figure 1 It is a schematic diagram of application scenarios of the training sample generation method, the evaluation model training method and the information evaluation method and device according to the embodiments of the present disclosure.
[0035] like Figure 1 As shown, the application scenario 100 of this embodiment may include an electronic device 110, which may be various electronic devices with processing functions and interactive functions, including but not limited to smart phones, tablet computers, portable computers, desktop computers, servers, etc.
[0036] For example, various client applications or applets for providing AIGC functions may be installed or run in the electronic device 110. For example, the electronic device 110 may process the input information 101 based on the installed client application or the running applet to generate generated content for the input information 101. The input information 101 may include one or more of audio, video, image, and text. The generated content may be, for example, a summary content describing the input information 101, or a reply content to the input information 101, etc., which is not limited in the present disclosure.
[0037] In one embodiment, the electronic device 110 may process the input information 101 by, for example, invoking the information generation model maintained by the background management server to obtain generated content. After obtaining the generated content, the electronic device 110 may, for example, use the evaluation model 102 to evaluate the generated content to obtain evaluation information 103.
[0038] like Figure 1 As shown, the application scenario 100 may also include a server 120. The electronic device 110 may be connected to the server 120 through a network. For example, the server 120 may be a background management server that provides support for the operation of a client application or applet installed or run on the electronic device. The server 120 may also be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server 120 may also be a server of a distributed system, or a server combined with a blockchain.
[0039] The server 120 may, for example, generate training samples based on the sample data in the database 130 to train the evaluation model 102. For example, the server 120 may first use the information generation model to process the input information included in the sample data to generate corresponding model generation content. Subsequently, the server 120 may process the model generation content, the input information included in the sample data, and the target generation content included in the sample data by calling the large language model 104 to generate an evaluation result that can be used as a label. Subsequently, the server may use the model generation content and the sample data to train the base model with the evaluation result as a guide, thereby obtaining the evaluation model 102.
[0040] Among them, the information generation model that generates the model content and the large language model that generates the evaluation results can be the same model or different models, and the present disclosure does not limit this.
[0041] In one embodiment, the electronic device 110 may also send the input information 101 to the server 120, and the server 120 may process the input information 101 using the information generation model to obtain generated content. The server 120 may also process the generated content using the evaluation model 102 to obtain evaluation information 103.
[0042] It should be noted that the training sample generation method and / or the evaluation model training method provided in the present disclosure can be executed by the server 120, or by other servers that are communicatively connected to the server 120. Accordingly, the training sample generation device and / or the evaluation model training device provided in the present disclosure can be set in the server 120, or in other servers that are communicatively connected to the server 120. The information evaluation method provided in the present disclosure can be executed by the electronic device 110, or by the server 120. Accordingly, the information evaluation device provided in the present disclosure can be set in the electronic device 110, or in the server 120.
[0043] It should be understood that Figure 1 The number and type of the electronic device 110, the server 120 and the database 130 in the embodiment are only illustrative. According to the implementation requirements, there can be any number and type of electronic devices 110, servers 120 and databases 130.
[0044] The following will be combined Figure 2~Figure 5 The method for generating training samples provided in the present disclosure is described in detail.
[0045] Figure 2 It is a flowchart of a method for generating training samples according to an embodiment of the present disclosure.
[0046] like Figure 2 As shown, the training sample generation method 200 of this embodiment may include operations S210 to S230.
[0047] In operation S210, target information pairs are acquired, each of which includes generated information generated based on original information and reference information of the generated information.
[0048] In one embodiment, the original information and the reference information may constitute sample data in a public database. In this embodiment, an information generation model may be used to process the original information in the sample data to obtain generated information.
[0049] In one embodiment, the reference information may be generated information generated by an online information generation model based on the original information. The generated information may be generated information generated by an offline optimized information generation model based on the original information.
[0050] For example, the original information may include video, audio, picture or text, and the reference information may be a summary of the original information. Alternatively, the original information may include an inquiry text and any one of the video, audio, picture or text, and the reference information may be a reply text corresponding to the inquiry text.
[0051] The information generation model may be, for example, a model fine-tuned based on a pre-trained large model for performing corresponding generation tasks. The pre-trained large model may be any generative pre-trained model such as the Wenxinyiyan model, and the present disclosure does not limit this.
[0052] In operation S220, based on the original information, each target information pair, and predetermined prompt information, the large language model is used to determine evaluation information corresponding to each target information pair.
[0053] According to an embodiment of the present disclosure, the predetermined prompt information (prompt) may, for example, at least describe the evaluation task and the evaluation criteria. For example, the evaluation task may be described as "Please act as a fair referee, based on the provided video subtitles and the summaries generated by the two artificial intelligence assistants based on the subtitles, evaluate and determine which artificial intelligence assistant has a higher quality summary", wherein the video subtitles are the original information, and the summaries generated by the two artificial intelligence assistants based on the subtitles constitute a target information pair. The evaluation criteria may be described as "evaluating based on whether the content of the summary is closely centered around the theme of the video", "evaluating based on whether the summary covers the main content of the video", and / or "evaluating based on whether the sentences in the summary are fluent, free of typos, and the content is of moderate length", etc. It is understandable that the above description of the evaluation task and the evaluation criteria are only used as examples to facilitate the understanding of the present disclosure. According to the actual tasks that need to be performed by the large language model, the above description of the evaluation task and the evaluation criteria can be adaptively adjusted, and the present disclosure does not limit this.
[0054] In this embodiment, the predetermined prompt information and the generated information and reference information in the original information and target information pair can be combined according to a predetermined format and input into the large language model, and the large language model performs an evaluation task on the generated information and the reference information based on the evaluation criteria described in the predetermined prompt information, and outputs the evaluation information. The evaluation information may at least include a relative evaluation result of the generated information and the reference information. For example, the relative evaluation result may indicate which of the generated information and the reference information has a higher quality, or which has a lower quality, etc. For example, the relative evaluation result may be described as "the quality of the generated information is higher", "the summary quality of the artificial intelligence assistant A is higher", "the quality of the two is equivalent", etc.
[0055] In one embodiment, the evaluation information may further include an evaluation reason corresponding to the relative evaluation result. For example, the evaluation reason may be described as "Assistant A not only covers..., but also mentions..., while Assistant B also mentions..., but is slightly insufficient in...", etc., which is not limited in the present disclosure. Since the evaluation information also includes the evaluation reason, the interpretability and readability of the evaluation result may be improved.
[0056] In one embodiment, in addition to describing the evaluation task and evaluation criteria, the predetermined prompt information may also describe the evaluation process. For example, the evaluation process may be described as "#Process, first read the video subtitles to ensure a comprehensive understanding of its content. Next, compare the summaries generated by the two artificial intelligence assistants to ensure a clear understanding of the content of both; finally, perform a quality assessment on the two summaries according to the following criteria". It is understandable that the above description of the evaluation process is only used as an example to facilitate the understanding of the present disclosure. According to the actual tasks that need to be performed by the large language model, the above description of the evaluation process can be adaptively adjusted, and the present disclosure does not limit this.
[0057] In one embodiment, in addition to describing the evaluation task and evaluation criteria, the predetermined prompt information may also describe the requirements for the evaluation process. For example, the requirements for the evaluation process may be described as "#Requirements: impartiality, avoiding bias, and ensuring the objectivity and fairness of the evaluation process" and / or "item-by-item evaluation: for each criterion, the two summaries are compared and evaluated one by one". It is understandable that the above description of the requirements for the evaluation process is only used as an example to facilitate understanding of the present disclosure. According to the actual tasks to be performed by the large language model, the above description of the requirements for the evaluation process can be adaptively adjusted, and the present disclosure does not limit this.
[0058] In one embodiment, in addition to describing the evaluation task and evaluation criteria, the predetermined prompt information may also describe the output format. For example, the output format may be described as "Please output the final decision in the following format: "[[A]]" indicates that the summary quality of artificial intelligence assistant A is higher, "[[B]]" indicates that the summary quality of artificial intelligence assistant B is higher, "[[C]]" indicates that the summary quality of the two artificial intelligence assistants is equivalent", etc. It can be understood that the above description of the output format is only used as an example to facilitate the understanding of the present disclosure. According to the actual tasks that need to be performed by the large language model, the above description of the output format can be adaptively adjusted, and the present disclosure does not limit this.
[0059] It is understandable that the above-mentioned predetermined prompt information can be manually preset according to actual needs and input into the device for executing the method for generating training samples, and the present disclosure does not limit this.
[0060] In operation S230, a training sample for an evaluation model is generated based on the original information, each target information pair, predetermined prompt information, and evaluation information.
[0061] According to an embodiment of the present disclosure, the predetermined prompt information and the generated information and reference information in the original information and target information pair can be combined according to a predetermined format to obtain the content input into the evaluation model in the training sample, and the evaluation information is used as label information in the training sample. The label information can be used as guidance information to guide the training of the evaluation model.
[0062] Among them, the predetermined format can be reflected by a predetermined template. The predetermined template can be "#video subtitles: .... #summary generated by artificial intelligence assistant A: .... #summary generated by artificial intelligence assistant B: .... #prompt...". This embodiment can fill in the original information into "#video subtitles:...", fill in the generated information into "#summary generated by artificial intelligence assistant A:...", fill in the reference information into "#summary generated by artificial intelligence assistant B:...", and fill in the predetermined prompt information into "#prompt...", so as to obtain the content input into the evaluation model in the training sample, that is, the input information. This embodiment can form the label information in the training sample in the form of <reason, result> pairs in the relative evaluation results and evaluation reasons in the evaluation information.
[0063] The disclosed embodiment constructs the training samples of the evaluation model based on the evaluation information output by the large language model, which can realize the automatic labeling of the training samples without the need for manual labeling, thereby improving the generation efficiency of the training samples and reducing the generation cost of the training samples. And by constructing the training samples with the help of the large language model and the predetermined prompt information input into the large language model, the effect of manually and flexibly defining the evaluation criteria can be achieved. In this way, when evaluating the information based on the evaluation model obtained through training, both the effect of automated evaluation and the effect of flexible evaluation similar to manual evaluation can be achieved. It not only solves the problems of low evaluation efficiency and low evaluation accuracy caused by insufficient knowledge reserve of the evaluator in the manual evaluation method in the related art, but also solves the problem of poor evaluation stability in the evaluation using a general large language model.
[0064] Figure 3 It is a schematic diagram of the principle of obtaining target information pairs according to an embodiment of the present disclosure.
[0065] In one embodiment, a target information pair can be screened out from multiple information pairs based on the segment-level similarity between the generated information and the reference information in the information pair, so as to improve the effectiveness of the generated training samples to a certain extent, reduce the generation of invalid samples, and thereby improve the training efficiency and training accuracy of the evaluation model.
[0066] For example, in one embodiment, sample data may be first obtained in batches from a public data set. Then, the information generation model is used to process the original information in each sample data obtained to obtain generated information corresponding to the original information. Finally, the generated information and the reference information corresponding to the original information in each sample data form an information pair. In this way, batches of information pairs may be obtained.
[0067] For example, Figure 3As shown, in an embodiment 300, original information 301 can be obtained in batches from a public data set 310. Subsequently, two different information generation models are used to process the original information 301 to generate generated information corresponding to the original information 301. For example, the generated information generated by the first information generation model 320 can be used as the reference information 302 in the information pair, and the generated information generated by the second information generation model 330 can be used as the generated information 303 in the information pair. Then the reference information 302 and the generated information 303 generated based on the same original information 301 can constitute an information pair 304.
[0068] After obtaining the information pairs 304, the embodiment can determine the similarity index value 305 between the generated information and the reference information in each information pair. Subsequently, the information pairs whose similarity index value 305 is greater than or equal to the index threshold can be screened out from the information pairs 304 as target information pairs 306.
[0069] For example, the similarity index value 305 between the generated information and the reference information in each information pair may be represented by the value of any one of the following indicators: BLEU-N indicator, ROUGE-N indicator, and ROUGE-L indicator.
[0070] Among them, the BLEU-N indicator is a statistical evaluation indicator, which is mainly used to measure the proportion of n-gram phrases with different n values in the generated information and the reference information. The higher the proportion of co-occurring phrases, the closer the generated information is to the reference information. The calculation process of the BLEU-N indicator does not consider the order of phrases. For example, the value of the BLEU-N indicator can be calculated using the following formula (1). Among them, BP is the length penalty factor, p n is the n-gram hit rate after correcting the recall rate. n is the weight corresponding to the n-gram, and the value of N can be set according to actual needs, for example, it can be set to 4, etc., and the present disclosure does not limit this.
[0071] Formula (1)
[0072] Among them, the ROUGE-N index also measures the phrase consistency between the generated information and the reference information by dividing the generated information and the reference information into different n-gram phrases and examining how many n-gram phrases in the reference information are recalled in the generated information. The value of the ROUGE-N index can be expressed by the following formula (2). n-gram Indicates the n-gram phrase included in the generated information, O n-gramIndicates the n-gram phrase included in the reference information. The value of n can be set according to actual needs, for example, it can be set to 4, etc., and this disclosure does not limit this.
[0073] Formula (2)
[0074] The calculation process of the ROUGE-L indicator is as follows: first, the longest common subsequence length between the generated information and the reference information is calculated, and the proportion of the longest common subsequence length in the two is calculated respectively. For example, the proportion of the longest common subsequence length in the generated information can be expressed as O ks , the proportion of the longest common subsequence length in the reference information can be expressed as P ks , then the value of the ROUGE-L index can be expressed by the following formula (3). It is a super parameter.
[0075] Formula (3)
[0076] In one embodiment, at least two similarity indices may be set. Then, when determining the similarity index value between the generated information and the reference information in each information pair, the index values of the at least two similarity indices may be calculated respectively to obtain at least two index values. Accordingly, a threshold value is set in advance for the at least two index values in a one-to-one correspondence. This embodiment may first determine, for each information pair, whether each of the at least two index values obtained is greater than or equal to the corresponding threshold value, and determine that each information pair is a target information pair when at least two index values are greater than or equal to the corresponding threshold value. In this way, the similarity at the fragment level between the generated information and the reply information may be determined from multiple dimensions, and information pairs consisting of generated information and reply information that are similar in multiple dimensions may be screened out. This is beneficial to improving the quality of the target information pairs obtained by screening, and therefore is beneficial to further improving the training efficiency and training accuracy of the evaluation model.
[0077] Among them, the threshold corresponding to the BLEU-N indicator can be 0.25, the threshold corresponding to the ROUGE-N indicator can be 0.3, and the threshold corresponding to the ROUGE-L indicator can be 0.4. This embodiment can also calculate the values of the BLEU-N indicator, the ROUGE-N indicator, and the ROUGE-L indicator in sequence, and after calculating the value of the corresponding indicator, the value is compared with the corresponding threshold, and only when the value is greater than or equal to the corresponding threshold, the subsequent values of other indicators are calculated. In this way, the amount of calculation can be reduced to a certain extent. It can be understood that the above-mentioned calculation order and the thresholds corresponding to the indicators are only used as examples to facilitate the understanding of the present disclosure. This embodiment can specifically determine the calculation order of multiple indicators according to the order of the thresholds corresponding to the indicators from small to large, and the present disclosure does not limit this.
[0078] Figure 4 It is a schematic diagram of an implementation principle of determining evaluation information using a large language model according to an embodiment of the present disclosure.
[0079] According to the embodiments of the present disclosure, multiple groups of evaluation information can be generated for a single information pair, and when the consistency of the multiple groups of evaluation information meets the requirements, training samples can be generated based on the single information pair. In this way, the effectiveness of the generated training samples can be improved, which is conducive to improving the stability of the evaluation model obtained through training.
[0080] Accordingly, the aforementioned evaluation information may include multiple groups of sub-evaluation information (ie, multiple groups of evaluation information), and each group of sub-evaluation information includes a quality evaluation result and a corresponding evaluation reason.
[0081] In this embodiment, when the quality assessment results of multiple groups of sub-assessment information generated for a single piece of information are consistent, the operation of generating training samples based on the original information, each target information pair, predetermined prompt information and assessment information can be performed.
[0082] In one embodiment, at least two different models may be set to generate evaluation information, and the evaluation information generated by each model may be used as a group of evaluation information. For example, the at least two different models may be large language models of different types, or models of different versions of the same large language model, which is not limited in the present disclosure. By setting at least two different models to generate evaluation information, and considering the consistency of the evaluation information, and regenerating training samples when the evaluation information is consistent, the robustness of the training samples can be improved, and thus it is beneficial to improve the robustness of the evaluation model obtained by training.
[0083] In one embodiment, another version of the input information can be obtained by exchanging the positions of the generated information and the reference information in the input information of the large language model. In this embodiment, the two versions of the input information can be input into the large language model respectively, and the evaluation information obtained by the large language model based on one input information can be used as a set of evaluation information. In this way, the stability of the generated training samples can be made not to be disturbed by the order of appearance of the generated information and the reference information therein, and the stability of the evaluation model obtained by training can be made not to be disturbed by the order of appearance of the generated information and the reference information in the input information, which is conducive to improving the stability of the evaluation model obtained by training.
[0084] like Figure 4As shown, in an embodiment 400, different large language models can be used as general referee models to perform an evaluation task once each to obtain at least two groups of sub-evaluation information, or the same large language model can be used to perform multiple evaluation tasks to obtain at least two groups of sub-evaluation information. For example, in this embodiment, two different large language models can be selected, for example, a large language model GPT 410 and ERNIE Bot 420 can be selected as referee models. In this embodiment, first input information 404 for a large language model can be obtained based on original information 401, each target information pair 402, and predetermined prompt information 403. Subsequently, the first input information 404 is respectively input into the large language model GPT 410 and ERNIE Bot 420 to obtain a group of sub-evaluation information output by GPT 410 (e.g., evaluation information E-1 406) and a group of sub-evaluation information output by ERNIE Bot 420 (e.g., evaluation information E-2 407). After obtaining the first input information 404, the embodiment 400 can also interchange the position of the generated information and the position of the reference information in the first input information 404 to obtain the second input information 405 for the large language model. Subsequently, the second input information 405 is respectively input into the large language model GPT 410 and ERNIEBot 420 to obtain a set of sub-evaluation information (e.g., evaluation information E-3 408) output by GPT 410 and a set of sub-evaluation information (e.g., evaluation information E-4 409) output by ERNIE Bot420. In this way, a total of four sets of sub-evaluation information can be obtained. It can be understood that the above-mentioned large language model GPT 410 and ERNIE Bot 420 are only used as examples to facilitate the understanding of the present disclosure. The present disclosure can also select any open source large language model for this, and the present disclosure does not limit this.
[0085] In this embodiment, the four groups of sub-assessment information can be combined in pairs to obtain multiple sub-assessment information pairs. Then, the consistency of the two sub-assessment information in each sub-assessment information pair is evaluated as the consistency corresponding to each sub-assessment information pair. Finally, the consistency corresponding to the multiple sub-assessment information pairs is summarized to obtain multiple groups of assessment information consistency.
[0086] Figure 5 It is a schematic diagram of the principle of determining the consistency index value according to an embodiment of the present disclosure.
[0087] In one embodiment, the consistency index value of at least two groups of sub-evaluation information can be determined based on multiple evaluation information corresponding to multiple target information pairs. That is, all sub-evaluation information corresponding to multiple target information pairs are comprehensively considered to determine the consistency of the evaluation. In this way, the influence of the quality of information in a single target information pair on the consistency result of the evaluation can be reduced, which is conducive to improving the accuracy of the determined evaluation consistency, and thus helps to improve the stability of the generated training samples and the accuracy of the evaluation model obtained based on the training sample training. This embodiment can perform the operation of generating training samples based on the original information, each target information pair, predetermined prompt information and evaluation information when the consistency index value is greater than or equal to the index threshold. Among them, the index threshold can be, for example, a value set according to actual needs such as 0.4, and the present disclosure does not limit this.
[0088] For example, this embodiment may first determine the consistency index values of multiple groups of sub-evaluation information corresponding to each target information pair, and then use the average value of the consistency index values determined based on multiple target information pairs as the final determined consistency index value.
[0089] For example, Figure 5 As shown, in embodiment 500, for different target information pairs, the principle of generating at least two groups of sub-assessment information is the same, and the number of groups of generated sub-assessment information is also the same. This embodiment 500 can compare the two groups of sub-assessment information generated for each target information pair using two principles, and count the comparison results of the two groups of sub-assessment information obtained for multiple target information pairs, and obtain an index value for evaluating the consistency between the two groups of sub-assessment information based on the comparison results. In this way, for each two groups of sub-assessment information in the at least two groups of sub-assessment information, an index value can be obtained, and a total of multiple index values can be obtained. Subsequently, this embodiment can determine the consistency index value of at least two groups of sub-assessment information based on the multiple index values. For example, the average value of the multiple index values can be used as the consistency index value, or the median or mode of the multiple index values can be used as the consistency index value, which is not limited in the present disclosure.
[0090] For example, at least two groups of sub-evaluation information may include a group of evaluation information a501 obtained based on evaluation principle A, a group of evaluation information b502 obtained based on evaluation principle B, and a group of evaluation information c503 obtained based on evaluation principle C. Then, for each of the M target information pairs, a group of evaluation information a, a group of evaluation information b, and a group of evaluation information c may be obtained. This embodiment 500 may summarize the evaluation information a and the evaluation information b of multiple target information pairs, and regard the evaluation results (e.g., [A], [B], or [C]) included in the evaluation information a as the actual category, and regard the evaluation results (e.g., [A], [B], or [C]) included in the evaluation information b as the predicted category, to obtain the statistical results shown in Table 1 below. Among them, the evaluation result [A] indicates that the summary generated by the artificial intelligence assistant A has a high quality, the evaluation result [B] indicates that the summary generated by the artificial intelligence assistant B has a high quality, and the evaluation result [C] indicates that the summaries generated by the two artificial intelligence assistants have comparable quality. In Table 1, the number 239 filled in the cell where the actual category A and the predicted category A meet represents the number of information pairs in which the evaluation results included in the evaluation information a and the evaluation results included in the evaluation information b are both A among multiple target information pairs.
[0091] Table 1
[0092]
[0093] This embodiment can construct a confusion matrix based on the statistical results of Table 1 above, and calculate the value of the kappa coefficient based on the constructed confusion matrix. This embodiment 500 can use the value of the kappa coefficient as an indicator value 504 indicating the consistency between the evaluation information a 501 and the evaluation information b 502.
[0094] It can be understood that the above principle of determining the index value 504 indicating the consistency between the evaluation information a and the evaluation information b is only used as an example to facilitate understanding of the present disclosure, and the present disclosure does not limit this.
[0095] Based on similar principles, this embodiment can obtain an index value 505 indicating the consistency between evaluation information b 502 and evaluation information c 503, and an index value 506 indicating the consistency between evaluation information a 501 and evaluation information c 503. Finally, this embodiment 500 can use the average of all obtained index values 504-506 as the final determined consistency index value 507.
[0096] According to an embodiment of the present disclosure, when the reference information may be generated information generated by an online information generation model based on original information, and the generated information may be generated information generated by an offline optimized information generation model based on original information, if the consistency index value is greater than or equal to the corresponding index threshold, the embodiment may also calculate the GSB (Good Same Bad) index of the reference information and the generated information based on the evaluation information. If the quality of the generated information is determined to be higher based on the GSB index, the online information generation model may be replaced with the offline optimized information generation model.
[0097] In one embodiment, the evaluation information may include evaluation results and evaluation reasons corresponding to each dimension of at least two evaluation dimensions. The at least two evaluation dimensions may include two or more dimensions of relevance dimension, correctness dimension, comprehensiveness dimension, validity dimension, logic dimension, sentence expression dimension, etc. Among them, the relevance dimension is used to evaluate whether the information is closely related to the theme of the original information, etc. The correctness dimension is used to evaluate whether the information is accurate and has no factual errors, etc. The comprehensiveness dimension is used to evaluate whether the information covers the main content of the original information, without missing content, etc. The validity dimension is used to evaluate whether the information has high information density, no voids or irrelevant content, etc. The logic dimension is used to evaluate whether the information is clear and logically coherent, etc. The sentence expression dimension is used to evaluate whether the sentence of the information is smooth, without typos, without Chinese and English, and the content length is moderate. It can be understood that when the evaluation information includes at least two groups of sub-evaluation information, each group of sub-evaluation information can include evaluation results and evaluation reasons corresponding to each dimension of at least two evaluation dimensions.
[0098] In one embodiment, the evaluation information may include, in addition to the evaluation results and evaluation reasons corresponding to each dimension of the at least two evaluation dimensions, an overall evaluation result corresponding to the at least two evaluation dimensions. When determining the consistency index value as described above, the overall evaluation result may be considered. In one embodiment, the evaluation information may also include an overall evaluation reason corresponding to the overall evaluation result, etc., which is not limited in the present disclosure.
[0099] The disclosed embodiment can achieve the evaluation of at least two evaluation dimensions of information by reasonably setting the information describing the evaluation criteria in the predetermined prompt information. In this way, the final evaluation result can be made more interpretable and also help to improve the accuracy of the final evaluation result. When obtaining the training sample, this embodiment can splice the evaluation information of at least two dimensions by dimension, and finally splice the overall evaluation result to obtain label information.
[0100] In one embodiment, when it is determined that the consistency of at least two groups of sub-evaluation information does not meet the predetermined requirements, specifically when the consistency index value is less than the corresponding index threshold, the execution subject of the training sample generation method can, for example, also prompt the evaluator to adjust the predetermined prompt information to make the predetermined prompt information more robust, which is conducive to improving the consistency of at least two groups of sub-evaluation information. After receiving the prompt information, the evaluator can operate the execution subject of the training sample generation method to make the execution subject generate an adjustment instruction, and the adjustment instruction can include the adjusted prompt information. After receiving the adjustment instruction, the execution subject of the training sample generation method can update the predetermined prompt information to the adjusted prompt information. Subsequently, the execution subject can redetermine the evaluation information based on the updated predetermined prompt information, the original information and the target information pair. And the consistency evaluation is performed on the redetermined evaluation information. The execution subject can cyclically perform the operation of this embodiment until the consistency of the redetermined at least two groups of sub-evaluation information meets the predetermined requirements. After meeting the predetermined requirements, the execution subject can generate training samples for the evaluation model based on the original information, each target information pair, the predetermined prompt information and the evaluation information.
[0101] In one embodiment, when generating a training sample, an initial sample can be obtained based on the original information, each target information pair, predetermined prompt information and evaluation information. The principle of obtaining the initial sample is similar to the principle of obtaining the training sample described above, and will not be repeated here. Subsequently, the execution subject of the method for generating the training sample can show the initial sample to the evaluator. The evaluator verifies the evaluation results and evaluation reasons in the initial sample, and pre-processes the initial sample according to the verification results, such as screening and / or correcting the initial sample. Specifically, the evaluator can operate the execution subject of the method for generating the training sample so that the execution subject generates a pre-processing instruction, and the execution subject can respond to the generation or receipt of the pre-processing instruction, pre-process the initial sample, such as correcting the evaluation reasons or evaluation results, screening the initial sample, etc., and use the sample obtained after the pre-processing as the training sample of the evaluation model. This embodiment can improve the accuracy of the training sample finally obtained by pre-processing the initial sample.
[0102] In one embodiment, when generating label information based on the evaluation information, the evaluation information can be formatted through a script, for example, to extract the <cause, result> pairs corresponding to each evaluation dimension and the overall <cause, result> pairs corresponding to at least two evaluation dimensions. Subsequently, these <cause, result> pairs are sequentially spliced.
[0103] Based on the method for generating training samples provided in the present disclosure, the present disclosure also provides a method for training an evaluation model. Figure 6 The method is described in detail.
[0104] Figure 6 It is a flowchart of a training method for an evaluation model according to an embodiment of the present disclosure.
[0105] like Figure 6 As shown, the training method 600 of the evaluation model of this embodiment may include operations S610 to S620.
[0106] In operation S610, a training sample is obtained. The training sample obtained in operation S610 may be a training sample generated by the method for generating a training sample provided by the present disclosure, which will not be described in detail herein.
[0107] In operation S620, an evaluation model is trained based on the training samples.
[0108] According to an embodiment of the present disclosure, the input information in the training sample can be input into the evaluation model to obtain the evaluation information generated by the evaluation model. Subsequently, the embodiment can compare the evaluation information generated by the evaluation model with the label information in the training sample to train the evaluation model with the goal of minimizing the difference between the two.
[0109] According to the embodiments of the present disclosure, the base model of the evaluation model can be a pre-trained general large language model, a model with fewer parameters obtained by training based on the general large language model, or a large language model with less than 10 billion parameters, which is not limited by the present disclosure. By selecting a model with fewer parameters, the efficiency of evaluation reasoning can be improved.
[0110] By training the evaluation model based on training samples, the obtained evaluation model can be made into a dedicated evaluation model. Compared with adopting a general large language model, the evaluation stability of the dedicated evaluation model is stronger.
[0111] Based on the training method of the evaluation model provided in the present disclosure, the present disclosure also provides an information evaluation method, which will be combined with Figure 7 The method is described in detail.
[0112] Figure 7 It is a flowchart of the information evaluation method according to an embodiment of the present disclosure.
[0113] like Figure 7 The information evaluation method 700 of the illustrated embodiment may include operations S710 to S720.
[0114] In operation S710, generated information generated by two information generation models based on original information is obtained to obtain a generated information pair.
[0115] According to an embodiment of the present disclosure, the two information generation models may be an online information generation model and an offline optimized information generation model. In this embodiment, the information generated by the online information generation model based on the original information may be used as generated information, and the information generated by the offline optimized information generation model based on the original information may be used as reference information. The generated information and the reference information may constitute a generated information pair.
[0116] In operation S720, based on the original information, the generated information pair, and the predetermined prompt information, an evaluation model is used to determine evaluation information for the generated information pair.
[0117] This embodiment can form input information of the evaluation model based on the original information, the generated information pair and the predetermined prompt information. The composition principle of the input information is similar to the principle of obtaining the input information in the training sample mentioned above, and will not be repeated here. Subsequently, this embodiment can input the input information into the evaluation model, and the evaluation model performs the evaluation task based on the input information and generates evaluation information for the generated information pair. The evaluation information is similar to the evaluation information obtained in the above operation S220, and will not be repeated here.
[0118] Based on the training sample generation method provided in the present disclosure, the present disclosure also provides a training sample generation device. Figure 8 The device is described in detail.
[0119] Figure 8 It is a structural block diagram of a device for generating training samples according to an embodiment of the present disclosure.
[0120] like Figure 8 As shown, the training sample generation device 800 of this embodiment may include a first information pair acquisition module 810 , an evaluation information determination module 820 and a sample generation module 830 .
[0121] The first information pair acquisition module 810 is used to acquire target information pairs. Each target information pair includes generated information generated based on original information and reference information of the generated information. In one embodiment, the first information pair acquisition module 810 can be used to perform the operation S210 described above, which will not be repeated here.
[0122] The evaluation information determination module 820 is used to determine the evaluation information corresponding to each target information pair using a large language model based on the original information, each target information pair and the predetermined prompt information. The evaluation information indicates the relative evaluation result of the generated information and the reference information and the evaluation reason corresponding to the relative evaluation result. In one embodiment, the evaluation information determination module 820 can be used to perform the operation S220 described above, which will not be repeated here.
[0123] The sample generation module 830 is used to generate training samples for the evaluation model based on the original information, each target information pair, the predetermined prompt information and the evaluation information. In one embodiment, the sample generation module 830 can be used to perform the operation S230 described above, which will not be described in detail here.
[0124] According to an embodiment of the present disclosure, the evaluation information includes at least two groups of sub-evaluation information; each group of sub-evaluation information includes a quality evaluation result and an evaluation reason. The above-mentioned sample generation module 830 may include a consistency determination submodule and a sample generation submodule. The consistency determination submodule is used to determine the consistency index value of at least two groups of sub-evaluation information based on multiple evaluation information corresponding to multiple target information pairs, and the consistency index value is used to indicate the consistency of at least two groups of sub-evaluation information. The sample generation submodule is used to generate a training sample based on the original information, each target information pair, predetermined prompt information and evaluation information in response to the consistency index value being greater than or equal to the first index threshold.
[0125] According to an embodiment of the present disclosure, at least two groups of sub-assessment information include more than two groups of sub-assessment information. The above-mentioned consistency determination submodule may include a first determination unit and a second determination unit. The first determination unit is used to determine, for each two groups of sub-assessment information in the more than two groups of sub-assessment information, an index value indicating the consistency between each two groups of sub-assessment information to obtain multiple index values. The second determination unit is used to determine the consistency index value of at least two groups of sub-assessment information based on the multiple sub-index values.
[0126] According to an embodiment of the present disclosure, the evaluation information includes at least two groups of sub-evaluation information; each group of sub-evaluation information includes a quality evaluation result and an evaluation reason. The above-mentioned evaluation information determination module 820 may include a first input determination submodule, a second input determination submodule and an evaluation information determination submodule. The first input determination submodule is used to obtain the first input information for the large language model based on the original information, each target information pair and the predetermined prompt information. The second input determination submodule is used to interchange the position of the generated information in the first input information with the position of the reference information to obtain the second input information for the large language model. The evaluation information determination submodule is used to adopt the large language model to obtain two groups of sub-evaluation information corresponding to the first input information and the second input information respectively based on the first input information and the second input information.
[0127] According to an embodiment of the present disclosure, the evaluation information includes at least two groups of sub-evaluation information; each group of sub-evaluation information includes a quality evaluation result and an evaluation reason; and the large language model includes at least two different models. The evaluation information determination module 820 can be specifically used to determine a group of sub-evaluation information corresponding to the target information pair based on the original information, each target information pair and the predetermined prompt information, using each model in the at least two different models.
[0128] According to an embodiment of the present disclosure, the first information pair acquisition module 810 may include an acquisition submodule, a similarity determination submodule and a screening submodule. The acquisition submodule is used to acquire multiple information pairs, each of which includes generated information and reference information. The similarity determination submodule is used to determine the similarity index value between the generated information and the reference information in each information pair. The screening submodule is used to screen the information pairs whose similarity index value is greater than or equal to the second index threshold from the information pairs to obtain the target information pairs.
[0129] According to an embodiment of the present disclosure, the similarity index value includes at least two index values corresponding to at least two similarity indexes; the second index threshold value includes at least two threshold values corresponding to at least two index values, respectively. The above-mentioned screening submodule can be specifically used to screen information pairs whose at least two index values are both greater than or equal to the corresponding threshold values from the information pairs to obtain the target information pairs.
[0130] According to an embodiment of the present disclosure, the training sample generation device 800 may further include an information update module, which is used to update the predetermined prompt information to the adjusted prompt information in response to receiving an adjustment instruction including the adjusted prompt information; the adjusted prompt information is received when the consistency index value is less than the first index threshold. The evaluation information determination module 820 may also be used to re-determine the evaluation information corresponding to each target information pair using a large language model based on the original information, each target information pair and the updated predetermined prompt information.
[0131] According to an embodiment of the present disclosure, the above-mentioned evaluation information includes an evaluation result and an evaluation reason corresponding to each dimension of at least two evaluation dimensions, and an overall evaluation result corresponding to the at least two evaluation dimensions.
[0132] According to an embodiment of the present disclosure, the sample generation module 830 may include a sample generation submodule and a preprocessing submodule. The sample generation submodule is used to obtain an initial sample based on the original information, each target information pair, predetermined prompt information and evaluation information. The preprocessing submodule is used to preprocess the initial sample in response to receiving a preprocessing instruction for the initial sample to obtain a training sample. The preprocessing of the initial sample includes at least one of the following: screening processing and correction processing.
[0133] Based on the training method of the evaluation model provided in the present disclosure, the present disclosure also provides a training device for the evaluation model. Fig. 9 The device is described in detail.
[0134] Fig. 9 It is a structural block diagram of a training device for an evaluation model according to an embodiment of the present disclosure.
[0135] like Fig. 9As shown, the training device 900 for the evaluation model of this embodiment may include a sample acquisition module 910 and a model training module 920 .
[0136] The sample acquisition module 910 is used to acquire training samples, and the training samples are generated by the training sample generation device described above. In one embodiment, the sample acquisition module 910 can be used to perform the operation S610 described above, which will not be described in detail here.
[0137] The model training module 920 is used to train the evaluation model based on the training samples. In one embodiment, the model training module 920 can be used to perform the operation S620 described above, which will not be described in detail here.
[0138] Based on the information evaluation method provided by the present disclosure, the present disclosure also provides an information evaluation device. Fig.10 The device is described in detail.
[0139] Fig.10 is a structural block diagram of an information evaluation device according to an embodiment of the present disclosure.
[0140] like Fig.10 As shown, the information evaluation device 1000 of this embodiment may include a second information pair acquisition module 1010 and an information evaluation module 1020 .
[0141] The second information pair acquisition module 1010 is used to acquire generated information generated by two information generation models based on original information to obtain a generated information pair. In one embodiment, the second information pair acquisition module 1010 can be used to perform the operation S710 described above, which will not be described in detail here.
[0142] The information evaluation module 1020 is used to determine the evaluation information for the generated information pair based on the original information, the generated information pair and the predetermined prompt information using the evaluation model. The evaluation model is obtained by training the training device 900 using the evaluation model described above. In one embodiment, the information evaluation module 1020 can be used to perform the operation S720 described above, which will not be repeated here.
[0143] It should be noted that the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good morals. In the technical solution of this disclosure, the user's authorization or consent is obtained before obtaining or collecting user personal information.
[0144] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0145] Fig.11 A schematic block diagram of an example electronic device 1100 that can be used to implement a method for generating training samples, a method for training an evaluation model, and / or an information evaluation method of an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0146] like Fig.11 As shown, the device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 to a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0147] A number of components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 1107, such as various types of displays, speakers, etc.; a storage unit 1108, such as a disk, an optical disk, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0148] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 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, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1101 performs the various methods and processes described above, such as at least one of the training sample generation method, the evaluation model training method, and the information evaluation method. For example, in some embodiments, at least one of the training sample generation method, the evaluation model training method, and the information evaluation method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of at least one of the training sample generation method, the evaluation model training method, and the information evaluation method described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform at least one of the training sample generation method, the evaluation model training method, and the information evaluation method by any other appropriate means (e.g., by means of firmware).
[0149] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit 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 implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0150] The program code for implementing the method 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 device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0151] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. 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, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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), 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 foregoing.
[0152] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0153] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, 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), and the Internet.
[0154] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. Among them, the server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0155] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0156] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for generating a training sample, comprising: Acquire target information pairs, each of the target information pairs comprising generated information generated based on original information and reference information of the generated information; Based on the original information, each of the target information pairs and the predetermined prompt information, a large language model is used to determine evaluation information corresponding to each of the target information pairs; the evaluation information indicates a relative evaluation result of the generated information and the reference information and an evaluation reason corresponding to the relative evaluation result; as well as Based on the original information, each of the target information pairs, the predetermined prompt information and the evaluation information, a training sample for an evaluation model is generated.
2. The method according to claim 1, wherein: The evaluation information includes at least two groups of sub-evaluation information; each group of sub-evaluation information includes the quality evaluation result and the evaluation reason; the generating of training samples for the evaluation model based on the original information, each of the target information pairs, the predetermined prompt information and the evaluation information includes: Determining, based on a plurality of evaluation information corresponding to a plurality of target information pairs, a consistency index value of the at least two groups of sub-evaluation information, the consistency index value being used to indicate consistency of the at least two groups of sub-evaluation information; and In response to the consistency index value being greater than or equal to a first index threshold, the training sample is generated based on the original information, each of the target information pairs, the predetermined prompt information and the evaluation information.
3. The method according to claim 2, wherein: The at least two groups of sub-assessment information include more than two groups of sub-assessment information; and determining the consistency index value of the at least two groups of sub-assessment information includes: For each two groups of sub-assessment information among the two or more groups of sub-assessment information, determining an index value indicating consistency between the each two groups of sub-assessment information to obtain a plurality of index values; and Based on the multiple sub-index values, consistency index values of the at least two groups of sub-evaluation information are determined.
4. The method according to claim 1, wherein: The evaluation information includes at least two groups of sub-evaluation information; each group of sub-evaluation information includes the quality evaluation result and the evaluation reason; the evaluation information corresponding to each target information pair is determined by using a large language model based on the original information, each target information pair and predetermined prompt information, including: Based on the original information, each of the target information pairs and the predetermined prompt information, obtaining first input information for the large language model; Interchanging the position of the generated information and the position of the reference information in the first input information to obtain second input information for the large language model; and The large language model is used to obtain two groups of sub-evaluation information corresponding to the first input information and the second input information respectively based on the first input information and the second input information.
5. The method according to claim 1, wherein: The evaluation information includes at least two groups of sub-evaluation information; each group of sub-evaluation information includes the quality evaluation result and the evaluation reason; the large language model includes at least two different models; the use of the large language model to determine the evaluation information corresponding to each target information pair based on the original information, each target information pair and the predetermined prompt information includes: Based on the original information, each of the target information pairs and predetermined prompt information, each of the at least two different models is used to determine a set of sub-evaluation information corresponding to the target information pair.
6. The method according to claim 1, wherein: The target information acquisition pair includes: Acquire a plurality of information pairs, each information pair comprising the generated information and the reference information; Determining a similarity index value between the generated information and the reference information in each information pair; and Information pairs whose similarity index values are greater than or equal to a second index threshold are selected from the information pairs to obtain the target information pairs.
7. The method according to claim 6, wherein: The similarity index value includes at least two index values corresponding to at least two similarity indexes; the second index threshold value includes at least two threshold values corresponding to the at least two index values respectively; Selecting information pairs whose similarity index values are greater than or equal to the second index threshold from the information pairs, and obtaining the target information pairs includes: Information pairs whose at least two indicator values are both greater than or equal to corresponding thresholds are selected from the information pairs to obtain the target information pairs.
8. The method according to claim 2, further comprising: In response to receiving an adjustment instruction including adjusted prompt information, updating the predetermined prompt information to the adjusted prompt information; The adjusted prompt information is received when the consistency index value is less than the first index threshold; as well as Based on the original information, each of the target information pairs and the updated predetermined prompt information, the large language model is used to re-determine the evaluation information corresponding to each of the target information pairs.
9. The method according to claim 1, wherein: The evaluation information includes an evaluation result and an evaluation reason corresponding to each dimension of at least two evaluation dimensions, and an overall evaluation result corresponding to the at least two evaluation dimensions.
10. The method according to claim 1, wherein: The step of generating a training sample for an evaluation model based on the original information, each of the target information pairs, the predetermined prompt information, and the evaluation information includes: Obtaining an initial sample based on the original information, each of the target information pairs, the predetermined prompt information, and the evaluation information; and In response to receiving a preprocessing instruction for the initial sample, preprocessing the initial sample to obtain the training sample, The preprocessing of the initial sample includes at least one of the following: screening processing and correction processing.
11. A training method for an evaluation model, comprising: Obtaining a training sample, wherein the training sample is generated by the method according to any one of claims 1 to 10; as well as The evaluation model is trained based on the training samples.
12. An information evaluation method comprising: Obtain generated information generated by two information generation models based on original information to obtain a generated information pair; as well as Based on the original information, the generated information pair and the predetermined prompt information, an evaluation model is used to determine evaluation information for the generated information pair. Wherein, the evaluation model is trained using the method described in claim 11.
13. A training sample generation device, comprising: An information pair acquisition module, used for acquiring target information pairs, each of which includes generated information generated based on original information and reference information of the generated information; An evaluation information determination module, configured to determine evaluation information corresponding to each of the target information pairs using a large language model based on the original information, each of the target information pairs and predetermined prompt information; the evaluation information indicating a relative evaluation result of the generated information and the reference information and an evaluation reason corresponding to the relative evaluation result; as well as A sample generation module is used to generate training samples for an evaluation model based on the original information, each of the target information pairs, the predetermined prompt information and the evaluation information.
14. The device according to claim 13, wherein: The evaluation information includes at least two groups of sub-evaluation information; each group of sub-evaluation information includes the quality evaluation result and the evaluation reason; The sample generation module comprises: A consistency determination submodule, used to determine a consistency index value of the at least two groups of sub-evaluation information based on a plurality of evaluation information corresponding to a plurality of target information pairs, wherein the consistency index value is used to indicate the consistency of the at least two groups of sub-evaluation information; as well as The sample generation submodule is used to generate the training sample based on the original information, each of the target information pairs, the predetermined prompt information and the evaluation information in response to the consistency index value being greater than or equal to the first index threshold.
15. The device according to claim 14, wherein: The at least two groups of sub-assessment information include more than two groups of sub-assessment information; the consistency determination submodule includes: A first determining unit is configured to determine, for each two groups of sub-evaluation information among the two or more groups of sub-evaluation information, an index value indicating consistency between the each two groups of sub-evaluation information to obtain a plurality of index values; and The second determining unit is used to determine the consistency index value of the at least two groups of sub-evaluation information based on the multiple sub-index values.
16. The device according to claim 13, wherein: The evaluation information includes at least two groups of sub-evaluation information; each group of sub-evaluation information includes the quality evaluation result and the evaluation reason; the evaluation information determination module includes: A first input determination submodule, configured to obtain first input information for the large language model based on the original information, each of the target information pairs and the predetermined prompt information; A second input determination submodule, configured to interchange a position of the generated information with a position of the reference information in the first input information to obtain second input information for the large language model; and The evaluation information determination submodule is used to use the large language model to obtain two groups of sub-evaluation information corresponding to the first input information and the second input information respectively based on the first input information and the second input information.
17. The device according to claim 13, wherein: The evaluation information includes at least two groups of sub-evaluation information; each group of sub-evaluation information includes the quality evaluation result and the evaluation reason; the large language model includes at least two different models; the evaluation information determination module is used to: Based on the original information, each of the target information pairs and predetermined prompt information, each of the at least two different models is used to determine a set of sub-evaluation information corresponding to the target information pair.
18. The device according to claim 13, wherein: The information pair acquisition module includes: An acquisition submodule, used for acquiring a plurality of information pairs, each information pair including the generation information and the reference information; a similarity determination submodule, configured to determine a similarity index value between the generated information and the reference information in each information pair; and The screening submodule is used to screen the information pairs whose similarity index values are greater than or equal to the second index threshold from the information pairs to obtain the target information pairs.
19. The device according to claim 18, wherein: The similarity index value includes at least two index values corresponding to at least two similarity indexes; the second index threshold value includes at least two threshold values corresponding to the at least two index values respectively; the screening submodule is used for: Information pairs whose at least two indicator values are both greater than or equal to corresponding thresholds are selected from the information pairs to obtain the target information pairs.
20. The apparatus of claim 14, further comprising: an information updating module, configured to update the predetermined prompt information to the adjusted prompt information in response to receiving an adjustment instruction including the adjusted prompt information; The adjusted prompt information is received when the consistency index value is less than the first index threshold; as well as The evaluation information determination module is further used to re-determine the evaluation information corresponding to each of the target information pairs using the large language model based on the original information, each of the target information pairs and the updated predetermined prompt information.
21. The device according to claim 13, wherein: The evaluation information includes an evaluation result and an evaluation reason corresponding to each dimension of at least two evaluation dimensions, and an overall evaluation result corresponding to the at least two evaluation dimensions.
22. The device according to claim 13, wherein: The sample generation module comprises: a sample generation submodule, configured to obtain an initial sample based on the original information, each of the target information pairs, the predetermined prompt information and the evaluation information; and a preprocessing submodule, configured to, in response to receiving a preprocessing instruction for the initial sample, preprocess the initial sample to obtain the training sample, The preprocessing of the initial sample includes at least one of the following: screening processing and correction processing.
23. A training device for an evaluation model, comprising: A sample acquisition module, used to acquire training samples, wherein the training samples are generated by the device according to any one of claims 13 to 22; as well as The model training module is used to train the evaluation model based on the training samples.
24. An information evaluation device, comprising: An information pair acquisition module is used to acquire generated information generated by two information generation models based on original information to obtain a generated information pair; as well as an information evaluation module, configured to determine evaluation information for the generated information pair using an evaluation model based on the original information, the generated information pair and predetermined prompt information, Wherein, the evaluation model is trained using the device described in claim 23.
25. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of claims 1 to 12.
26. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 12.
27. A computer program product, comprising a computer program / instruction, wherein the computer program / instruction is stored on at least one of a readable storage medium and an electronic device, and when the computer program / instruction is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
Citation Information
Cited By
Data generation method, model training method and data processing method
CN120561595A
Data generation method, model training method, and data processing method
CN120561595B
Script generation model optimization method and device, equipment and storage medium
CN121280832A
An optimization method, apparatus, device, and storage medium for a script generation model.
CN121280832B
