Value identification data enhancement method based on large language model
By using large language models in the human value recognition task to generate text data related to Schwartz value theory and train the BERT model, the problems of data scarcity and model deviation are solved, and the performance and generalization ability of the model are improved.
Patent Information
- Application Number
- CN202510012856.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has problems such as scarcity of data, expensive data annotation costs, insufficient data diversity and coverage, social and ethical bias of the model, and insufficient generalization capabilities in the human value identification task.
Using a value recognition data enhancement method based on a large language model, text data corresponding to Schwartz value theory is generated through role-playing prompts and chain thinking prompts, and the generated text data is evaluated through a large language model, combining existing data Set trains the BERT model.
Improve the performance of the model in the human value recognition task, reduce data annotation cost, enhance data diversity and coverage capabilities, reduce social and ethical bias of the model, and improve the cross-cultural and cross-field generalization of the model ability.
Smart Images

Figure CN119415962A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to a value recognition data enhancement method based on a large language model. Background Art
[0002] Identification of human values plays an important role in psychology and sociology, and is particularly widely used in cross-cultural research and social behavior analysis. As the cornerstone of psychology, Schwartz's theory of basic human values provides a framework for understanding and analyzing the motivations of human behavior. By analyzing basic human values, researchers can better explain the behavior of individuals and groups. However, with the rapid development of artificial intelligence (AI) technology, how to make AI systems understand and respect human values has become a new challenge.
[0003] In the field of natural language processing (NLP), especially in artificial intelligence applications, human value recognition has become a promising research direction. Large language models (LLMs), such as GPT-3 and GPT-4, have demonstrated their strong ability to process complex language structures and understand human values. By analyzing the value orientation in text, AI systems can better make automated moral judgments and behavior predictions in a variety of social situations.
[0004] At present, the existing technology still has some obvious shortcomings and challenges:
[0005] 1. Data scarcity and expensive data annotation costs: In tasks involving human values, the performance of existing models is highly dependent on high-quality, well-annotated datasets. Although there are some dedicated datasets (such as ValueEval and ValueNet), the cost of annotating these data is extremely high, especially in cross-cultural and multilingual contexts. The complexity and diversity of data annotation increase the difficulty of obtaining high-quality training data. Manually annotating data is not only time-consuming and labor-intensive, but also prone to human bias.
[0006] 2. Insufficient data diversity and coverage: Although many current data augmentation methods (such as synonym replacement, random insertion, deletion, and back translation) can increase the amount of data to a certain extent, they often fail to maintain the semantic integrity of the text. These traditional methods have difficulty in handling complex social situations and multi-level human values when generating diverse data.
[0007] 3. Social and ethical biases of the model: Large language models are susceptible to the social bias inherent in the training data when dealing with tasks related to human values, causing the content they generate to be biased towards a specific culture or value system. For example, studies have shown that the GPT model has a bias against specific social groups when dealing with content involving ethics. This bias affects the universality of the model in multiple cultures and contexts, making it difficult to truly achieve "value neutrality" or "cross-cultural adaptability."
[0008] 4. Insufficient generalization ability of the model: Although pre-trained language models perform well in specific fields, their generalization ability in open fields is still obviously insufficient. Existing models are often difficult to fully adapt between different fields, especially cross-cultural and cross-domain datasets. Summary of the invention
[0009] In order to solve the above technical problems, the present invention proposes a value recognition data enhancement method based on a large language model to solve the problems existing in the above-mentioned prior art.
[0010] To achieve the above object, the present invention provides a value recognition data enhancement method based on a large language model, comprising:
[0011] Using the large language model, text data corresponding to Schwartz's value theory is generated through role-playing prompts and chain thinking prompts;
[0012] Use a large language model to evaluate the quality of the generated text data to obtain high-quality text data;
[0013] Combining the high-quality text data with an existing data set to obtain a new training set;
[0014] Train the BERT model based on the new training set;
[0015] Use the test set to test the generalization ability of the trained BERT model and output the value recognition results.
[0016] Preferably, the process of generating text data corresponding to Schwartz's value theory includes:
[0017] Set up role-playing prompts, where the prompts are based on the background information of Schwartz's value theory;
[0018] Set up a chain thinking prompt process to generate a series of intermediate reasoning steps, each of which corresponds to the Schwartz value theory system;
[0019] Inject role-playing prompts into a large language model to generate text data related to Schwartz's value theory.
[0020] Preferably, the background information of the Schwartz value theory is:
[0021] ;
[0022] in, represents the first corresponding values;
[0023] Generate a series of intermediate reasoning steps, the mathematical formula is:
[0024] ;
[0025] in, Indicates The reasoning output of the step, is the inference function of the large language model, and T is other template prompt words;
[0026] The text data satisfies the multi-step reasoning chain under the role-playing prompt:
[0027] ;
[0028] in, To generate the final text output.
[0029] Preferably, the process of injecting role-playing prompt information into the large language model includes:
[0030] Randomly extract samples from the basic value dataset as the Incontext Learning dataset;
[0031] Based on the Incontext Learning dataset, context learning is performed through large language models (LLMs) to generate text data related to Schwartz's value theory.
[0032] Preferably, the basic value data set is expressed as:
[0033] ;
[0034] in, Represented as the base values dataset, Represents text data, express The corresponding label, n is the number of samples in the basic value dataset;
[0035] From the basic dataset A random sample is selected to construct , the formula is:
[0036] ;
[0037] in, For the i-th round, randomly select the basic data set The dataset for Incontext Learning is constructed by sampling from , where N is the number of samples in the new dataset.
[0038] Preferably, the process of generating text data related to Schwartz's theory of value:
[0039] Generate new extended dataset , the formula is:
[0040] ;
[0041] Among them, LLMs generate and input samples Multiple extension samples with consistent semantics , forming an enhanced dataset ;
[0042] For each input sample LLMs generation New samples :
[0043] ;
[0044] Among them, the generated samples are different from the original samples Keep semantics consistent, and each Both The labels correspond;
[0045] Afterwards, the generated Submit it to LLMs for quality assessment and screen out data that meets the requirements:
[0046]
[0047] Combine several newly generated datasets:
[0048] ;
[0049] in, It is the union of the data sets corresponding to Schwartz value theory generated after n rounds of data augmentation.
[0050] Preferably, the process of performing quality assessment on the generated text data includes:
[0051] Use a large language model to evaluate the quality of the generated text data to obtain high-quality text data;
[0052] The text data is screened based on the evaluation results to ensure label accuracy and semantic consistency of the text data.
[0053] Preferably, the new training set is:
[0054] ;
[0055] in, For the new training set, Represented as the base values dataset, It is the union of the data sets corresponding to Schwartz value theory generated after n rounds of data augmentation.
[0056] Preferably, the process of training the BERT model includes:
[0057] Split the new training set into word fragments and embed them into the input layer of the BERT model to obtain the initial embedding layer;
[0058] Extracting features from the initial embedding layer through a multi-layer Transformer encoder to obtain a context-aware representation of the text;
[0059] Based on the context-aware representation of the text, a special [CLS] tag is used to represent the aggregate information of the entire sentence, and the aggregate information of the entire sentence is converted into a [CLS] vector;
[0060] The [CLS] vector is input into the fully connected layer of the BERT model and mapped to the probability distribution of each value category through the softmax function, and the probability of the value label is output.
[0061] The present invention also provides a computer storage medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the method for enhancing value recognition data based on a large language model is implemented.
[0062] Compared with the prior art, the present invention has the following advantages and technical effects:
[0063] The present invention provides a value recognition data enhancement method based on a large language model. Firstly, the large language model is used to generate text data corresponding to Schwartz's value theory through role-playing prompts and chain thinking prompts; secondly, the large language model is used to perform quality assessment on the generated text data to obtain high-quality text data; then, the high-quality text data is combined with an existing data set to obtain a new training set; further, a BERT model is trained based on the new training set; finally, a test set is used to test the generalization ability of the trained BERT model, and a value recognition result is output.
[0064] This paper combines techniques such as few-sample learning, role-playing prompts, and chain thinking prompts to generate high-quality synthetic data, solving the technical problems of data scarcity and expensive data annotation costs in the prior art. It uses Schwartz value theory as a theoretical support for the value framework for generation and evaluation, ensuring that the generated data can be closely integrated with specific human values, thereby improving the performance of the model in the task of identifying human values. This paper combines the generated data with existing data sets to train and optimize the BERT model, ultimately improving the human value recognition ability of the pre-trained language model (BERT) in a cross-cultural context. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0066] Figure 1 This is a flow chart of data generation and evaluation based on Schwartz value theory according to an embodiment of the present invention;
[0067] Figure 2 A two-step process diagram of data generation and evaluation using a large language model (such as GPT) according to an embodiment of the present invention;
[0068] Figure 3 A diagram showing a process of training a BERT model according to an embodiment of the present invention by combining an original training set with newly generated data;
[0069] Figure 4 It is a schematic diagram of the training results of the BERT model on valueeval according to an embodiment of the present invention;
[0070] Figure 5 This is a schematic diagram of the training results of the BERT model on ValueNet according to an embodiment of the present invention. DETAILED DESCRIPTION
[0071] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0072] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0073] Embodiment 1
[0074] This embodiment provides a value recognition method based on a large language model and data enhancement technology, including:
[0075] S1. Using the large language model, we generate text data corresponding to Schwartz's value theory through role-playing prompts and chain thinking prompts;
[0076] Furthermore, the process of generating text data corresponding to Schwartz's value theory includes:
[0077] S101, define role-playing prompt information, wherein the prompt information is based on background information of Schwartz's value theory;
[0078] Specifically, the Schwartz value theory is used as background information for role-playing prompts to further enhance the model's reasoning ability. Suppose there is a set of background information related to the Schwartz value theory , the background information includes each value label Corresponding to the descriptive text definition. This set of background information can be expressed as:
[0079] (1)
[0080] in, represents the first corresponding values; such as "self-orientation", "universalism", etc., which can be represented by vectorization and embedded into the model as input.
[0081] S102, define the chain thinking prompt process, generate a series of intermediate reasoning steps, each step of reasoning corresponds to the Schwartz value theory system;
[0082] Specifically, in order to allow the model to gradually develop the logical reasoning path during the reasoning process, a chain thinking prompt process is defined. Assume that the input text is , the model generates a series of intermediate reasoning steps based on the text , each step of reasoning is related to the background information of Schwartz's value theory system Correspondingly, its mathematical expression is as follows:
[0083] (2)
[0084] in, Indicates The reasoning output of the step, is the inference function of the GPT model, and T is the other template prompt words. Each step of reasoning depends not only on the current input text , also refer to the previous reasoning steps , while combining background information By injecting role-playing prompt information, the model can better deduce synthetic text related to Schwartz's value theory.
[0085] After completing all the inference steps, the model will generate the final text output ,This text is related to Schwartz's value theory and satisfies the multi-step reasoning chain under the role-playing prompt:
[0086] (3)
[0087] The final generated text It embodies the core values of Schwartz's theory and conforms to the logical reasoning path under role-playing prompts.
[0088] S103, injecting role-playing prompt information into the large language model to generate text data related to Schwartz's value theory.
[0089] Furthermore, the process of injecting role-playing prompt information into the large language model includes:
[0090] S1031. Randomly extract samples from the basic value dataset as the Incontext Learning dataset;
[0091] Specifically, it can be expressed as:
[0092] ; (4)
[0093] in, Represented as basic value datasets (ValueEval, ValueNet and other related datasets), Represents text data, express The corresponding label, n is the number of samples in the basic value dataset.
[0094] We can randomly extract some samples from the basic dataset as Incontext Learning data, and also include new unseen samples. A random sample is selected to construct , defined as:
[0095] ; (5)
[0096] in, For the i-th round, randomly select the basic data set The dataset for Incontext Learning (ICL) constructed by sampling in , N is the number of samples in the new dataset.
[0097] In this embodiment, we first use an existing training set (this patent uses the valueEval and valuenet datasets), which contains text data with specific values that have been annotated. The system will randomly select a small number of text-label pairs from them, which will be used for the generation task based on Incontext Learning.
[0098] S1032. Based on the Incontext Learning data, context learning is performed through a large language model to generate text data related to Schwartz's value theory.
[0099] Specifically, make sure After that, generate new extended data , whose samples are similar to the original IncontextLearning samples Keep semantic consistency but have superficial diversity. LLMs are used to generate these samples, the formula is:
[0100] (6)
[0101] Among them, LLMs generate and input samples Multiple extension samples with consistent semantics , forming an enhanced data set .
[0102] For each input sample LLMs generation New samples :
[0103] (7)
[0104] Among them, the generated samples are different from the original samples Keep semantics consistent, and each Both The labels correspond;
[0105] Afterwards, the generated Submit it to LLMs for quality assessment and screen out data that meets the requirements:
[0106] (8)
[0107] Combine several newly generated datasets:
[0108] (9)
[0109] in, It is the union of the data sets corresponding to Schwartz value theory generated after n rounds of data augmentation.
[0110] In this example, several new text-label pairs are generated through large language models (LLMs) combined with the framework of Schwartz's value theory. The ten core values in Schwartz's theory (such as self-direction, achievement, universalism, etc.) will serve as a guide for the generation task to ensure that the generated data is closely related to human values.
[0111] S2. Use a large language model to evaluate the quality of the generated text data to obtain high-quality text data;
[0112] Furthermore, the process of quality assessment of the generated text data includes:
[0113] S201, using a large language model to perform quality assessment on the generated text data to obtain high-quality text data;
[0114] S202: Screen the text data based on the evaluation result to ensure label accuracy and semantic consistency of the text data.
[0115] In this embodiment, as with the generation of LLMs, the framework of Schwartz's value theory needs to be injected before evaluation. Then the generated data is evaluated. The quality of the generated text is evaluated through the LLMs model, mainly checking its consistency with the Schwartz value label and semantic relevance.
[0116] In this embodiment, the evaluation process includes a judgment node. Data that passes the evaluation will be considered to be of high quality and can continue to be used for model training; data that fails the evaluation will be discarded and will no longer be used for subsequent training.
[0117] S3, combining the high-quality text data with the existing data set to obtain a new training set;
[0118] Specifically, when training the Bert model, in order to improve the training effect, the enhanced few-shot dataset is used. With the basic data set Combined to form the final training data set:
[0119] (10)
[0120] in, For the new training set, Represented as the basic value dataset, The union of the datasets corresponding to Schwartz's value theory generated after n rounds of data enhancement. Contains basic data and enhanced data to provide more samples for training downstream tasks.
[0121] In this embodiment, the data that passes the evaluation is formally added to the original training set to enrich the diversity of the data set. Through this continuous enhancement method, the scale and quality of the training set are improved.
[0122] S4. Train the BERT model based on the new training set;
[0123] Furthermore, the process of training the BERT model includes:
[0124] S401, dividing the new training set into word fragments and embedding them into the input layer of the BERT model to obtain an initial embedding layer;
[0125] Specifically, the Bert model classifies the value of the input text. Assume that the input text is , whose length is L words. We express it as:
[0126] (11)
[0127] in, Indicates word.
[0128] The input text is segmented into word fragments (tokens) by the BERT model’s tokenizer and embedded into the BERT’s input layer.
[0129] BERT’s embedding layer transforms each input word fragment Converted to a vector representation. Assuming BERT uses a word embedding matrix, the embedding representation of each word fragment is:
[0130] (12)
[0131] The embedding representation for the entire text is:
[0132] (13)
[0133] in, is the initial embedding matrix of the text.
[0134] S402, extracting features from the initial embedding layer through a multi-layer Transformer encoder to obtain a context-aware representation of the text;
[0135] Specifically, the initial embedding matrix is passed to the model layer of the BERT model for feature extraction. The BERT model consists of multiple layers of Transformer encoders. Each layer performs self-attention calculation on the input embedding matrix and outputs feature representation. For the lth Transformer layer, the feature representation is updated as:
[0136] (14)
[0137] After multiple layers of Transformer feature extraction, we finally get the context-aware representation of the text. , where L is the number of BERT layers.
[0138] S403, context-aware representation based on text, using a special [CLS] tag to represent aggregate information of the entire sentence;
[0139] Specifically, in the classification task, the BERT model uses a special [CLS] tag to represent the aggregate information of the entire sentence. The last layer of this tag outputs is used as input for the classification task:
[0140] (15)
[0141] This [CLS] vector represents the global information of the entire sentence and will be used as the input of the classifier.
[0142] S404. Input the [CLS] vector into the fully connected layer of the BERT model, map it to the probability distribution of each value category through the softmax function, and output the probability of the value label.
[0143] Specifically, the output of the fully connected layer is:
[0144] (16)
[0145] in, is the weight matrix, is the bias term.
[0146] The output probability of the classifier is calculated by the softmax function and is expressed as:
[0147] (17)
[0148] in, The model predicts The probability of categories (value labels), is the total number of categories (i.e. the number of different value labels).
[0149] In addition, in order to train the BERT model for value classification tasks, this patent uses the cross entropy loss function to measure the difference between the probability distribution predicted by the model and the true label. The loss function is defined as:
[0150] (18)
[0151] in, Is a real label, is the probability predicted by the model.
[0152] The trained BERT model is based on the input text , the corresponding value classification results can be output. The final classification label is:
[0153] (19)
[0154] S5. Use the test set to test the generalization ability of the trained BERT model and output the value recognition results.
[0155] like Figure 1 As shown in the figure, the complete process of data generation and evaluation is performed through large language models (LLMs), and the Schwartz human value theory framework is combined to enhance the model's generation ability. In this process, both the generation LLMs and the evaluation LLM use the Schwartz value theory as the theoretical support for the value framework for generation and evaluation, ensuring that the generated data can be closely integrated with specific human values, thereby improving the model's performance in human value recognition tasks.
[0156] like Figure 2 As shown, a two-step process of data generation and evaluation is performed through a large language model (such as GPT). In step 1 of data generation, as Figure 2 The left half of the figure shows a large language model (marked as "G") used to generate text samples related to human values. The different shapes on the left side of the text represent different value labels corresponding to the text. These samples are based on a small amount of existing annotated data, and the model generates different text fragments covering a variety of values, including social cooperation, health protection, and public policy. For example:
[0157] "We should ban human cloning, it will only cause huge problems." Expresses the value of social security.
[0158] “Health care should be universally accessible and free at the point of use.” expresses a value of fraternity-concern.
[0159] By injecting Schwartz's value theory, the model can generate high-quality text that is more in line with human values.
[0160] In step 2 of data evaluation, if Figure 2 In the right half of the figure, after generating text, the evaluation model (marked as "D") screens the generated text to evaluate whether the text is consistent with the value label it generates. Text samples that pass the evaluation will be marked with a check, indicating that their semantics and labels match well, and they will be added to the training set for subsequent BERT model training; text that does not meet the requirements will be marked with a cross, indicating that their semantics and labels do not match well, and they will be discarded.
[0161] like Figure 3 As shown in Figure 1, the BERT model is trained by combining the original training set and the newly generated data. Figure 3 The left side of the figure shows two original training sets, which are the initial publicly available value recognition related data. They contain annotated text-label pairs to help the model learn text features and corresponding value labels.
[0162] Based on the existing original training set, a new dataset generated by LLMs is added. The newly generated dataset provides more samples for the training set, increases the diversity of the data, and expands the learning ability of the model.
[0163] Next, the BERT model is trained using these two types of data (the original training set and the newly generated dataset). As a powerful language model, BERT can more accurately understand text and learn different classifications of human values through the combination of these two data sources.
[0164] Finally, based on the training results, the BERT model can classify the values of the input text. The right side of the figure shows the different categories of classification results, which means that the model can predict multiple different value labels based on the input text.
[0165] Figure 4 , Figure 5 The final experimental results of this patent on two data sets, valueeval and valuenet, are shown. It can be seen that compared with other methods of changing models and data enhancement methods, this patent has achieved significant improvements.
[0166] In this patent, f1score is used to evaluate model performance: F1 Score is one of the indicators used to evaluate the performance of classification models, and is particularly suitable for unbalanced data sets. It combines the calculation of precision and recall to provide a better measure of the overall performance of the classification model. For multi-classification problems, we can calculate the F1 Score for each label, and then calculate the macro F1 to evaluate the overall performance.
[0167] Embodiment 2
[0168] The present invention also provides a computer storage medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the method for enhancing value recognition data based on a large language model described in Example 1 is implemented.
[0169] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A data enhancement method for value recognition based on a large language model, characterized in that: The following steps are involved: Using the large language model, text data corresponding to Schwartz's value theory is generated through role-playing prompts and chain thinking prompts; Use a large language model to evaluate the quality of the generated text data to obtain high-quality text data; Combining the high-quality text data with an existing data set to obtain a new training set; Train the BERT model based on the new training set; Use the test set to test the generalization ability of the trained BERT model and output the value recognition results.
2. The method for enhancing value recognition data based on a large language model according to claim 1, characterized in that: The process of generating text data corresponding to Schwartz's value theory includes: Set up role-playing prompts, where the prompts are based on the background information of Schwartz's value theory; Set up a chain thinking prompt process to generate a series of intermediate reasoning steps, each of which corresponds to the Schwartz value theory system; Inject role-playing prompts into a large language model to generate text data related to Schwartz's value theory.
3. The method for enhancing value recognition data based on a large language model according to claim 2, characterized in that: The background information of Schwartz's value theory is: ; in, represents the first corresponding values; Generate a series of intermediate reasoning steps, the mathematical formula is: ; in, Indicates The reasoning output of the step, is the inference function of the large language model, and T is other template prompt words; The text data satisfies the multi-step reasoning chain under the role-playing prompt: ; in, To generate the final text output.
4. The method for enhancing value recognition data based on a large language model according to claim 2, characterized in that: The process of injecting role-playing prompts into the large language model includes: Randomly extract samples from the basic value dataset as the Incontext Learning dataset; Based on the Incontext Learning dataset, context learning is performed through a large language model to generate text data related to Schwartz's value theory.
5. The method for enhancing value recognition data based on a large language model according to claim 4, characterized in that: The base values dataset is represented as: ; in, Represented as the base values dataset, Represents text data, express The corresponding label, n is the number of samples in the basic value dataset; From the basic data set A random sample is selected to construct , the formula is: ; in, For the i-th round, randomly select the basic data set The dataset for Incontext Learning is constructed by sampling from , where N is the number of samples in the new dataset.
6. The method for enhancing value recognition data based on a large language model according to claim 4, characterized in that: The process of generating text data related to Schwartz's theory of value: Generate new extended dataset , the formula is: ; Among them, LLMs generate and input samples Multiple extension samples with consistent semantics , forming an enhanced dataset ; For each input sample LLMs generation New samples : ; Among them, the generated samples are different from the original samples Keep semantics consistent, and each Both The labels correspond; Afterwards, the generated Submit it to LLMs for quality assessment and screen out data that meets the requirements: Combine several newly generated datasets: ; in, It is the union of the data sets corresponding to Schwartz value theory generated after n rounds of data augmentation.
7. The method for enhancing value recognition data based on a large language model according to claim 1, characterized in that: The process of quality assessment of the generated text data includes: Use a large language model to evaluate the quality of the generated text data to obtain high-quality text data; The text data is screened based on the evaluation results to ensure label accuracy and semantic consistency of the text data.
8. The method for enhancing value recognition data based on a large language model according to claim 4, characterized in that: The new training set is: ; in, For the new training set, Represented as the basic value dataset, It is the union of the data sets corresponding to Schwartz value theory generated after n rounds of data augmentation.
9. The method for enhancing value recognition data based on a large language model according to claim 1, characterized in that: The process of training the BERT model includes: Split the new training set into word fragments and embed them into the input layer of the BERT model to obtain the initial embedding layer; Extracting features from the initial embedding layer through a multi-layer Transformer encoder to obtain a context-aware representation of the text; Based on the context-aware representation of the text, a special [CLS] tag is used to represent the aggregate information of the entire sentence, and the aggregate information of the entire sentence is converted into a [CLS] vector; The [CLS] vector is input into the fully connected layer of the BERT model and mapped to the probability distribution of each value category through the softmax function, and the probability of the value label is output.
10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are executed by the processor, the value recognition data enhancement method based on a large language model as described in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Financial text data classification method and device, terminal equipment and medium
CN116662552A
Text processing method for building natural human value system based on large language model
CN117829157A
Customer service dialogue abstract generation method based on large model and readable storage medium
CN117874219A
Poem data enhancement method based on large language model
CN118035698A
Answer generation method and device, storage medium and electronic equipment
CN118069801A
Cited By
Training data enhancement system and method based on large language model
CN120316500A
Large model value alignment reinforcement method in educational scene
CN120671819A