Processing method and device and electronic equipment

By determining false negative samples in the text vector model and using the large model evaluation results to adjust model parameters, the problem of insufficient consistency between the text vector model and the large model is solved, and the accuracy of the large model inference results is improved.

CN119338000APending Publication Date: 2025-01-21LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411392061.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, there is a lack of consistency between the text vector model and the big model, which affects the accuracy of the big model inference results.

Method used

By obtaining training data, the problem sample, the first answer sample, and multiple second answer samples are processed based on the text vector model processing. Then, based on the large model, the pseudo -negative sample was judged, the results of the judgment were obtained, and the model parameter of the text vector model was adjusted according to the judgment results.

Benefits of technology

Improving the consistency between text vector models and large models, and improving the accuracy of large model reasoning results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338000A_ABST
    Figure CN119338000A_ABST
Patent Text Reader

Abstract

The invention discloses a processing method and device and electronic equipment, and belongs to the technical field of natural language processing and artificial intelligence. The disclosed processing method comprises the steps of obtaining current training data; the training data comprises a question sample, a first answer sample, corresponding to a first label, of the question sample, and a plurality of second answer samples corresponding to a second label; the first label is used for representing that the answer is a positive sample, and the second label is used for representing that the answer is a negative sample; processing the question sample, the first answer sample and the plurality of second answer samples based on a text vector model so as to determine a pseudo negative sample in the plurality of second answer samples according to a processing result; evaluating each pseudo negative sample based on the large model to obtain a first evaluation result corresponding to each pseudo negative sample; the first judgment result is used for representing the possibility that the pseudo negative sample belongs to the positive sample or the negative sample; and adjusting model parameters of the text vector model according to the first judgment result corresponding to the pseudo negative sample.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of natural language processing and artificial intelligence technology, and in particular, relates to a processing method, device and electronic device. Background Art

[0002] The text vector (vector embedding) model has developed with the development of natural language processing, such as from the bag-of-words model to the early deep learning word2vec, glove, and later Bert, Roberta, and in recent years e5, bge, etc.

[0003] With the rise of big models, the lack of internal knowledge they carry and the "illusions" they produce when facing unknown problems have become pain points for users. Retrieval Augmented Generation (RAG) came into being and gradually became the "external brain" of big models and was widely used in practice. Big models rely on vector databases, which in turn rely on text vector models. By using text vector models to convert user questions into vectors, the converted vectors are searched for similarity with the vectors of text blocks in the vector database to recall text blocks. The recalled text blocks are used by the big model to perform contextual reasoning on user questions, and then give knowledge-containing answers to user questions.

[0004] However, there is a lack of consistency between the text vector model in the known technology and the large model, so when the text vector model is used as a part of the large model RAG, it will still affect the accuracy of the large model reasoning result. Summary of the invention

[0005] To this end, this application discloses the following technical solutions:

[0006] A processing method, comprising:

[0007] Obtain current training data; the training data includes a question sample, a first answer sample corresponding to a first label of the question sample, and a plurality of second answer samples corresponding to a second label; the first label is used to characterize the first answer sample as a positive sample, and the second label is used to characterize the second answer sample as a negative sample;

[0008] Processing the question sample, the first answer sample, and the plurality of second answer samples based on a text vector model to determine a pseudo negative sample among the plurality of second answer samples according to the processing result;

[0009] Based on the large model, each of the pseudo-negative samples is judged to obtain a first judgment result corresponding to each of the pseudo-negative samples; the first judgment result corresponding to each of the pseudo-negative samples is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample;

[0010] According to the first evaluation results respectively corresponding to the pseudo negative samples, the model parameters of the text vector model are adjusted.

[0011] Optionally, the processing the question sample, the first answer sample, and the plurality of second answer samples based on the text vector model to determine a pseudo negative sample among the plurality of second answer samples according to the processing result includes:

[0012] Using a text vector model to convert each sample in the training data into a vector, to obtain a question vector for the question sample, a first answer vector for the first answer sample, and second answer vectors corresponding to the plurality of second answer samples respectively;

[0013] According to the question vector, the first answer vector and the second answer vectors of the plurality of second answer samples, judging the correlation similarity between each second answer sample and the question-answer pair formed by the question sample and the first answer sample, and obtaining a correlation similarity judging result corresponding to each second answer sample;

[0014] A second answer sample whose corresponding related similarity judgment result meets the target condition is determined as the pseudo negative sample.

[0015] Optionally, judging, based on the question vector, the first answer vector, and the second answer vectors corresponding to the plurality of second answer samples, the correlation similarity between each second answer sample and a question-answer pair formed by the question sample and the first answer sample includes:

[0016] determining a first similarity between the first answer vector and the question vector;

[0017] Determine a second similarity between a second answer vector corresponding to each second answer sample and the question vector;

[0018] According to the first similarity and the second similarities corresponding to each second answer sample, the relevant similarity between each second answer sample and the question-answer pair formed by the question sample and the first answer sample is determined.

[0019] Optionally, judging each of the pseudo negative samples based on the large model to obtain first judging results corresponding to each of the pseudo negative samples respectively includes:

[0020] Inputting prompt information to the large model, and questioning information to the large model for each pseudo negative sample;

[0021] The question information includes the question sample and the pseudo-negative sample, and the prompt information is used to instruct the large model to judge the possibility that the pseudo-negative sample in the input question information is a positive sample or a negative sample relative to the question sample based on the role ability corresponding to the target role;

[0022] A first judgment result generated by the large model for judging the possibility of each pseudo-negative sample belonging to a positive sample or a negative sample is obtained.

[0023] Optionally, judging each of the pseudo negative samples based on the large model to obtain first judging results corresponding to each of the pseudo negative samples respectively includes:

[0024] Inputting sample information and large-model question information for each pseudo-negative sample into the large model, so that the large model refers to the sample represented by the sample information to judge the possibility that the pseudo-negative sample in the input question information is a positive sample or a negative sample relative to the question sample;

[0025] Among them, the question information includes the question sample and the pseudo-negative sample, the sample information includes question samples and answer samples, the question samples include question sample samples and pseudo-negative sample samples, and the answer samples include possibility judgment results samples of the pseudo-negative sample samples belonging to positive samples or negative samples relative to the question sample samples.

[0026] Optionally, adjusting the model parameters of the text vector model according to the first evaluation results respectively corresponding to the pseudo negative samples includes:

[0027] According to the first loss, adjusting the model parameters of the text vector model;

[0028] The first loss is obtained according to the first judgment results corresponding to each of the pseudo negative samples, the question vector, the first answer vector and the second answer vector corresponding to each of the second answer samples.

[0029] Optionally, the processing method further includes:

[0030] Obtaining a third similarity between the second answer vector corresponding to each pseudo negative sample and the question vector;

[0031] For the current pseudo-negative sample to be judged, the current pseudo-negative sample is judged according to the result of weighted calculation of the third similarity between the second answer vector corresponding to the current pseudo-negative sample and the question vector, and the third similarity between the second answer vector corresponding to each pseudo-negative sample and the question vector, to obtain the second judgment results corresponding to the current pseudo-negative sample, so as to adjust the model parameters of the text vector model according to the second judgment results corresponding to each pseudo-negative sample and the first judgment results;

[0032] The second evaluation result corresponding to each pseudo-negative sample is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample.

[0033] Optionally, adjusting the model parameters of the text vector model according to the second evaluation results and the first evaluation results respectively corresponding to the pseudo negative samples includes:

[0034] According to the second loss, adjusting the model parameters of the text vector model;

[0035] The second loss is obtained according to the second judgment results corresponding to each of the pseudo negative samples and the first judgment results, the question vector, the first answer vector and the second answer vectors corresponding to each of the second answer samples.

[0036] A processing device, comprising:

[0037] An acquisition module, configured to obtain current training data; the training data includes a question sample, a first answer sample corresponding to a first label of the question sample, and a plurality of second answer samples corresponding to a second label; the first label is used to characterize the first answer sample as a positive sample, and the second label is used to characterize the second answer sample as a negative sample;

[0038] A processing module, configured to process the question sample, the first answer sample and the plurality of second answer samples based on a text vector model, so as to determine a pseudo negative sample among the plurality of second answer samples according to a processing result;

[0039] An evaluation module is used to evaluate each of the pseudo-negative samples based on the large model to obtain a first evaluation result corresponding to each of the pseudo-negative samples; the first evaluation result corresponding to each of the pseudo-negative samples is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample;

[0040] The adjustment module is used to adjust the model parameters of the text vector model according to the first evaluation results corresponding to each of the pseudo negative samples.

[0041] An electronic device, comprising:

[0042] A memory for storing at least one set of computer instructions;

[0043] A processor is used to implement the processing method as described in any one of the above items by executing the instruction set stored in the memory. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0045] Figure 1 It is a flowchart of the processing method provided by this application;

[0046] Figure 2 is a flowchart for determining pseudo negative samples provided by this application;

[0047] Figure 3 This is a flowchart of the implementation of judging each pseudo-negative sample based on a large model provided by this application;

[0048] Figure 4 It is a composition structure diagram of the processing device provided by this application;

[0049] Figure 5 It is a structural diagram of the electronic device provided in this application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] The embodiments of the present application provide a processing method, device, and electronic device for solving the problem of lack of consistency between the text vector model and the large model in the known technology, so as to improve the accuracy of the large model reasoning results in the application scenario where the text vector model is used as part of the large model RAG. The processing method provided by the embodiments of the present application can be applied to electronic devices in many general or special computing device environments or configurations, such as personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, etc.

[0052] See also Figure 1As shown in the method flow chart, the processing method provided in the embodiment of the present application may at least include the following steps 101 to 104, and these steps are described in detail below.

[0053] Step 101, obtain current training data; the training data includes a question sample, a first answer sample corresponding to a first label of the question sample, and multiple second answer samples corresponding to a second label; the first label is used to characterize the first answer sample as a positive sample, and the second label is used to characterize the second answer sample as a negative sample.

[0054] The training data is training data used to train the text vector model to adjust the parameters of the text vector model.

[0055] The training data may be local training data of the electronic device, or may be training data transmitted by other devices other than the electronic device based on a wired or wireless connection, for example, training data transmitted by other devices via a Bluetooth connection or a Wi-Fi connection, or training data downloaded from a server on the network / cloud, etc.

[0056] The first label corresponding to the first answer sample in the training data may be a label manually marked for the first answer sample based on the correctness of the question-answer relationship between the question sample and the first answer sample, or may be a label automatically generated for the first answer sample by a machine based on the correctness of the question-answer relationship between the question sample and the first answer sample.

[0057] The first answer sample corresponds to the first label, indicating that the first answer sample is a positive sample answer to the question sample, that is, the answer content provided by the first answer sample is the correct answer content of the question sample.

[0058] Similarly, the second label corresponding to each second answer sample can also be obtained by manual or automatic labeling. Specifically, it can be a label manually labeled for the second answer sample based on the correctness of the question-answer relationship between the question sample and the second answer sample, or a label automatically generated for the second answer sample by a machine based on the correctness of the question-answer relationship between the question sample and the second answer sample.

[0059] The second answer sample corresponds to a second label, indicating that the second answer sample is a negative sample answer to the question sample, that is, the answer content provided by the second answer sample is an incorrect answer content to the question sample.

[0060] Step 102: Process the question sample, the first answer sample, and the plurality of second answer samples based on a text vector model to determine a pseudo negative sample among the plurality of second answer samples according to the processing result.

[0061] Pseudo negative samples refer to data that should actually be positive samples but are mistakenly labeled as negative samples.

[0062] In order to improve the accuracy of the inference results of the big model in the RAG application scenario, it is necessary to improve the quality of the text vector model so that it does not recall irrelevant text, and the text vector model needs to maintain a certain consistency with the big model in the text understanding of user questions and recalled text, so as to provide the big model with recalled text that plays a positive role in the big model's answer to user questions, thereby facilitating the big model to make more accurate responses to user questions.

[0063] The improvement of the quality of text vector models depends on the training process of text vector models. Nowadays, contrast loss is the mainstream objective function in the training stage of text vector models. Contrastive loss requires a high-quality training dataset, and the sample data in the training dataset must have high-quality labels. Otherwise, it will affect the training effect and the quality of the text vector model. In particular, if pseudo-negative samples are mistakenly regarded as negative samples for text vector model training, it will have a great adverse effect on model performance.

[0064] Based on this, the embodiment of the present application searches for potential pseudo-negative samples from the negative samples (the second answer samples corresponding to the second label) included in the training data.

[0065] In known technologies, when determining whether the question-answer relationship between a question sample and an answer sample is correct or not and labeling the answer sample as a positive / negative sample, the labeling is generally performed based on the semantic similarity and / or literal matching (such as keyword matching) between the question sample and the answer sample. In other words, the samples are labeled from the similarity dimension between the question sample and the answer sample. However, the applicant has found that this processing method may be biased in the labeling of some question-answering datasets. For example, for some question-answering datasets, the "similarity" between the question and the answer may not be high, but the "correlation" is very high. For these question-answering datasets, it is easy to mistakenly label the actual positive sample answers as negative samples, which leads to the generation of pseudo-negative samples.

[0066] In view of the above characteristics, the embodiment of the present application proposes to determine the correctness of the question-answer relationship between the question and the answer from the relevant similarity dimension, so as to find potential pseudo-negative samples from the negative samples of the training data.

[0067] When searching for potential pseudo-negative samples from negative samples included in the training data based on the relevant similarity dimension, the embodiment of the present application first processes the question sample, the first answer sample and the plurality of second answer samples in the training data based on the text vector model, so as to determine the pseudo-negative samples in the plurality of second answer samples (negative samples) according to the processing result and based on the relevant similarity dimension. Figure 2 , the process can be further implemented as:

[0068] Step 201: Use a text vector model to convert each sample in the training data into a vector to obtain a question vector of the question sample, a first answer vector of the first answer sample, and second answer vectors corresponding to the multiple second answer samples.

[0069] Assuming that (q i , p i ) represents the positive sample question-answer pair in the training data, where q i represents the problem sample, p i represents the first answer sample corresponding to the first label, q i There are n negative sample answers, that is, n second answer samples corresponding to the second label (r i1 , r i2 , ..., r in ), n is an integer greater than 1.

[0070] Negative samples may be obtained by, but are not limited to, random selection, similarity inversion and / or manual screening.

[0071] For the training data, we can specifically solve the problem sample q i 、First answer sample p i and each second answer sample (r i1 , r i2 , ..., r in ) are respectively input into the text vector model for text conversion processing to obtain the question vector of the question sample, the first answer vector of the first answer sample and the second answer vectors corresponding to each second answer sample.

[0072] Step 202: Based on the question vector, the first answer vector and the second answer vectors of the plurality of second answer samples, judge the correlation similarity between each second answer sample and the question-answer pair formed by the question sample and the first answer sample, and obtain the correlation similarity judgment result corresponding to each second answer sample.

[0073] Optionally, the first similarity between the first answer vector and the question vector can be determined, and the second similarity between the second answer vector corresponding to each second answer sample and the question vector can be determined. On this basis, the relevant similarity between each second answer sample and the question-answer pair formed by the question sample and the first answer sample is determined according to the first similarity and the second similarity corresponding to each second answer sample.

[0074] In implementation, the cosine similarity score between the first answer vector and the question vector may be determined based on, but not limited to, the cosine similarity formula. ii+ =sim(z i , z i+ ), and the cosine similarity score ii+ =sim(z i , z i+ ) as the first similarity, and determine the cosine similarity score between the second answer vector corresponding to each second answer sample and the question vector ij =sim(z i , z j ), and the cosine similarity score ij =sim(z i , z j ) as the second similarity between the second answer vector corresponding to the second answer sample and the question vector. Where j∈[i1,in], z i , z i+ and z j Represent the question vector, the first answer vector and the second answer vector respectively.

[0075] For each second answer sample, in an optional implementation, the absolute value of the difference between the second similarity corresponding to the second answer sample and the first similarity can be specifically determined, and the level of correlation similarity between the second answer sample and the question-answer pair formed by the question sample and the first answer sample can be characterized based on the absolute value of the difference. Among them, the smaller the absolute value of the difference, the higher the correlation similarity between the second answer sample and the question-answer pair formed by the question sample and the first answer sample, and the higher the possibility that the second answer sample belongs to a pseudo-negative sample is, and conversely, the larger the absolute value of the difference, the lower the correlation similarity between the second answer sample and the question-answer pair formed by the question sample and the first answer sample is, and the lower the possibility that the second answer sample belongs to a pseudo-negative sample is.

[0076] For example, the relevant similarity score between the second answer sample and the question-answer pair formed by the question sample and the first answer sample is defined as the absolute value of the difference between the second similarity corresponding to the second answer sample and the first similarity, which can be specifically expressed as:

[0077] score ii+j =|score ij -score ii+ |.

[0078] Specifically, it can be based on the relevant similarity score corresponding to the second answer sample ii+j , characterizing the degree of correlation similarity between the second answer sample and the question-answer pair formed by the question sample and the first answer sample, wherein the lower the corresponding correlation similarity score, the higher the correlation similarity between the second answer sample and the question-answer pair formed by the question sample and the first answer sample, and the higher the possibility that the second answer sample is a pseudo-negative sample; conversely, the lower the possibility that the second answer sample is a pseudo-negative sample.

[0079] However, it is not limited to this. In other optional implementations, for each second answer sample, the correlation similarity between the second answer sample and the question-answer pair formed by the question sample and the first answer sample can also be determined based on the ratio between the second similarity corresponding to the second answer sample and the first similarity. The closer the ratio is to 1, the higher the correlation similarity between the second answer sample and the question-answer pair formed by the question sample and the first answer sample, and the higher the possibility that the second answer sample belongs to a pseudo-negative sample is. Conversely, the farther the ratio is from 1, the lower the correlation similarity between the second answer sample and the question-answer pair formed by the question sample and the first answer sample is, and the lower the possibility that the second answer sample belongs to a pseudo-negative sample is.

[0080] Step 203: Determine a second answer sample whose corresponding related similarity evaluation result meets the target condition as the pseudo negative sample.

[0081] The target condition is a condition for characterizing that the second answer sample has a high correlation similarity with the question-answer pair formed by the question sample and the first answer sample.

[0082] For the relevant similarity score used above ii+j In an example of characterizing the correlation similarity between the second answer sample and the question-answer pair formed by the question sample and the first answer sample, the target condition may be set to one of the following, but is not limited to:

[0083] Condition 1: The relevant similarity score corresponding to the second answer sample is less than the score threshold t.

[0084] The condition can be specifically expressed as: 0≤score ii+j <t.

[0085] Condition 2: The relevant similarity score corresponding to the second answer sample is less than the score threshold t, and belongs to the top_m in the ascending sequence of relevant similarity scores corresponding to each second answer sample.

[0086] The set of pseudo negative samples determined based on condition 2 can be specifically expressed as:

[0087] F = {r j |0≤score ii+j <t&&score ii+j ∈top(score ii+j ,m)}

[0088] Among them, score ii+j ∈top(score ii+j ,m) indicates that the relevant similarity score corresponding to the pseudo-negative sample should belong to the top_m in the ascending sequence of relevant similarity scores corresponding to each second answer sample, r j represents a pseudo negative sample selected from each second answer sample, 1≤m<n, n is the number of second answer samples in the training data, and m and n are integers.

[0089] After obtaining the relevant similarity evaluation results corresponding to each second answer sample, the second answer samples whose corresponding relevant similarity evaluation results meet the target condition can be screened out from each second answer sample as pseudo negative samples. For example, from each second answer sample, the second answer samples whose corresponding relevant similarity scores are less than the score threshold t and belong to the top_m in the ascending sequence of relevant similarity scores corresponding to each second answer sample are screened out as pseudo negative samples.

[0090] Step 103: judge each of the pseudo negative samples based on the large model to obtain first judgment results corresponding to each of the pseudo negative samples.

[0091] The large model may be, but is not limited to, a large language model (LLM).

[0092] Since step 102 processes the question sample, the first answer sample and the multiple second answer samples based on the text vector model, and determines the pseudo-negative samples in the multiple second answer samples according to the various vectors obtained through processing, the pseudo-negative samples in step 102 are essentially determined based on the text vector model's understanding of texts such as questions and answers, which may not be consistent with the understanding of the large model. In other words, the pseudo-negative samples determined in step 102 may not be accurate for the large model.

[0093] In order to ensure that the text vector model and the big model have a certain consistency in text understanding, this step 103 continues to judge each pseudo-negative sample determined in step 102 based on the big model to obtain a judgment result on the possibility of each pseudo-negative sample belonging to a positive sample or a negative sample from the perspective of the big model.

[0094] Specifically, based on the prompt word engineering of the large model, corresponding prompt information can be input into the large model to guide the large model to judge each pseudo-negative sample, thereby obtaining the first judgment result corresponding to each pseudo-negative sample. The first judgment result corresponding to each pseudo-negative sample is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample, and more specifically, it is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample from the perspective of the large model.

[0095] Step 104: Adjust the model parameters of the text vector model according to the first evaluation results corresponding to the pseudo negative samples.

[0096] After judging each pseudo-negative sample based on the large model and obtaining the first judgment results corresponding to each pseudo-negative sample, this step further adjusts the model parameters of the text vector model according to the first judgment results corresponding to the pseudo-negative samples. By using the first judgment results given by the large model when judging the pseudo-negative samples to participate in the training of the text vector model, the bias of the text vector model itself can be reduced, and at the same time, the understanding ability of the text vector model can be induced to align with the large model, so that it can maintain a certain consistency with the large model in understanding texts such as questions / answers.

[0097] When adjusting the model parameters of the text vector model according to the first evaluation results corresponding to each pseudo negative sample, the model parameters of the text vector model can be adjusted according to the first loss. The first loss is obtained according to the first evaluation results corresponding to each pseudo negative sample, the question vector, the first answer vector, and the second answer vector corresponding to each second answer sample.

[0098] Furthermore, the first loss may specifically be a loss determined based on the contrast loss and the first evaluation results corresponding to each pseudo negative sample.

[0099] Alternatively, the contrast loss can be expressed as:

[0100]

[0101] in, and z ij They respectively represent the question vector, the first answer vector and the second answer vector corresponding to the second answer sample, and s() represents a similarity function, such as a cosine similarity function.

[0102] The contrast loss aims to make the vector output by the text vector model for the question sample as close as possible to the vector corresponding to the correct answer to the question sample (the first answer sample), and away from the vector corresponding to the wrong answer to the question sample (the second answer sample).

[0103] The first judgment result corresponding to the pseudo-negative sample may include the confidence that the pseudo-negative sample determined by the large model belongs to the positive sample and / or the confidence that it belongs to the negative sample, and specifically, the expression of the first loss may be obtained by adding confidence parameters that each pseudo-negative sample belongs to the positive sample and / or the negative sample, or adding variant parameters obtained by performing variant processing on the confidence parameters, based on the above-mentioned expression of the contrast loss.

[0104] Exemplarily, the confidence parameter or its corresponding variant parameter that each pseudo-negative sample belongs to a positive sample can be set on the numerator of the above-mentioned contrast loss function expression to obtain an expression for the first loss. This design can make the vector output by the text vector model for the problem sample close to the pseudo-negative sample, and control the degree of closeness based on the confidence that the pseudo-negative sample belongs to the positive sample, wherein the higher the confidence that the pseudo-negative sample belongs to the positive sample, the higher the degree of closeness, and vice versa.

[0105] To summarize, the processing method provided in the embodiment of the present application, after obtaining the current training data, determines the pseudo-negative samples in each negative sample answer (second answer sample) of the training data from the perspective of understanding of the text vector model, and judges each pseudo-negative sample from the perspective of understanding of the large model based on the large model, and obtains the probability judgment result of each pseudo-negative sample belonging to a positive sample or a negative sample from the perspective of understanding of the large model, and then uses the first judgment result of the probability of the pseudo-negative sample belonging to the positive / negative sample given by the large model to participate in the training of the text vector model, which can effectively reduce the bias of the text vector model itself, and at the same time can induce the understanding ability of the text vector model to align with the large model, thereby improving the consistency between the text vector model and the large model in understanding the text, and when the text vector model is used as part of the large model RAG, the accuracy of the large model reasoning result can be improved accordingly.

[0106] In an alternative embodiment, see Figure 3 , step 103 in the method provided by the present application, i.e., judging each of the pseudo negative samples based on the large model to obtain the first judgment results corresponding to each of the pseudo negative samples, can be implemented as follows:

[0107] Step 301: input prompt information to the large model, and input question information to the large model for each pseudo negative sample.

[0108] The question information includes the question sample and the pseudo negative sample.

[0109] The prompt information is used to instruct the large model to judge the possibility of the pseudo-negative sample in the input question information being a positive sample or a negative sample relative to the question sample based on the role ability corresponding to the target role.

[0110] During implementation, the prompt information can be constructed based on the prompt word project of the large model using a prompt word template. The constructed prompt information may include but is not limited to at least part of the following information: the target role specified for the large model, the role capabilities of the target role, the task description information of the role task to be completed by the target role, the inference rules that the target role needs to be based on to complete the role task, etc.

[0111] It should be noted that the above-mentioned information contained in the prompt information is all set around the guidance goal of "used to indicate the possibility of judging the pseudo-negative sample in the input question information as a positive sample or a negative sample relative to the problem sample", so as to guide the large model to judge the possibility of the pseudo-negative sample as a positive sample or a negative sample relative to the problem sample.

[0112] The following provides an example of inputting prompt information to the big model and asking questions to the big model for each pseudo negative sample:

[0113] """

[0114] You are an assistant with basic judgment and logical reasoning abilities. For a given question and paragraph, you need to judge whether the question can be answered based on the content of the paragraph without relying on any other knowledge. You can only answer "yes" or "no";

[0115] Question: Is it better to use the same brand for lotion and emulsion? Can anyone tell me?

[0116] Paragraph: Among the brands you mentioned, I think Olay's products are better. If they are of similar price, I think Avenir and Yiduo are both good.

[0117] answer:

[0118] """

[0119] The first paragraph of text included in the input information of this example is used to specify the target role, the role capabilities of the target role, and the tasks to be completed to the big model. The "question" in the input information represents the question sample, and the "paragraph" represents the pseudo-negative sample. In this example, the big model is set to only answer yes / no. The answer "yes" means that the big model believes that the pseudo-negative sample represented by the paragraph content is qualified relative to the question sample, and the pseudo-negative sample can be regarded as a positive sample of the question sample. The answer "no" means that the big model does not think that the paragraph content can answer the question sample, and therefore considers it a negative sample.

[0120] Step 302: Obtain a first judgment result generated by the large model for judging the possibility of each pseudo negative sample being a positive sample or a negative sample.

[0121] After inputting the prompt information and the big model question information for each pseudo-negative sample into the big model, the big model judges the possibility that the pseudo-negative sample in the input question information belongs to a positive sample or a negative sample relative to the question sample based on the guidance of the prompt information, thereby obtaining the first judgment result generated by the big model for judging the possibility that each pseudo-negative sample belongs to a positive sample or a negative sample.

[0122] As described above, the first evaluation result corresponding to the pseudo negative sample may include the confidence that the pseudo negative sample determined by the large model belongs to a positive sample and / or the confidence that the pseudo negative sample belongs to a negative sample.

[0123] For the above example of inputting information to the big model in this embodiment, since the big model is set to only answer yes / no, but only answering yes / no is not sufficient to quantify the big model's judgment result on the possibility of the pseudo-negative sample belonging to the positive sample or the negative sample, based on this, in implementation, the score / probability logit(Y) of the big model judging the answer result as "yes" and the score / probability logit(N) of the big model judging the answer result as "no" can be obtained, and when the big model outputs "yes", the confidence of the big model that the pseudo-negative sample belongs to the positive sample relative to the problem sample is determined according to logit(Y) and logit(N). Exemplarily, the confidence can be specifically expressed as exp(logit(Y)) / [exp(logit(Y))+exp(logit(N))]; conversely, when the big model outputs "no", exp(logit(N)) / [exp(logit(Y))+exp(logit(N))] can be used as the confidence that the big model believes that the pseudo-negative sample belongs to the negative sample relative to the problem sample.

[0124] In practical applications, the use of a large model to judge each pseudo-negative sample is not limited to the above-mentioned implementation methods. In other implementation methods, sample information and large model question information for each pseudo-negative sample can also be input into the large model, so that the large model can refer to the sample represented by the sample information to judge the possibility that the pseudo-negative sample in the input question information belongs to a positive sample or a negative sample relative to the problem sample.

[0125] Among them, the question information includes question samples and pseudo-negative samples in the training data, the sample information includes question samples and answer samples, the question samples include question sample samples and pseudo-negative sample samples, and the answer samples include possibility judgment result samples of the pseudo-negative sample samples belonging to positive samples or negative samples relative to the question sample samples.

[0126] During implementation, this embodiment can also be combined with the previous embodiment, so that the prompt information, the sample information and the big model question information for each pseudo-negative sample are input into the big model to instruct the big model to judge the possibility of the pseudo-negative sample in the input question information being a positive sample or a negative sample relative to the problem sample based on the role ability corresponding to the target role and referring to the sample represented by the sample information.

[0127] The following provides an example of inputting the prompt information, the sample information, and the big model question information for each pseudo negative sample into the big model under this implementation mode:

[0128] """

[0129] You are an assistant with basic judgment and logical reasoning abilities. For a given question and paragraph, you need to judge whether the question can be answered based on the content of the paragraph without relying on any other knowledge. You can only answer "yes" or "no". Here is an example:

[0130] Sample question: Why don’t people feel upside down when standing on the earth?

[0131] Example paragraph: On Earth, what we call up and down is determined by the gravity we experience (that is, the Earth's attraction). Generally speaking, we think that the direction in which gravity points is down, and the opposite direction is up. Because the Earth is a sphere, the direction of gravity always points to the center of the Earth, so as long as your feet are on the ground, you will not feel like you are upside down.

[0132] Sample answer: Yes

[0133] Question: Is it better to use the same brand for lotion and emulsion? Can anyone tell me?

[0134] Paragraph: Among the brands you mentioned, I think Olay's products are better. If they are of similar price, I think Avenir and Yiduo are both good.

[0135] answer:

[0136] """

[0137] Compared with the example in the first embodiment, this example further adds "question samples", "paragraph samples" and "answer samples", and the added "question samples", "paragraph samples" and "answer samples" together constitute the sample information. Among them, "question samples" specifically refer to question sample samples included in the question sample of the sample information, and "paragraph samples" specifically refer to pseudo-negative sample samples included in the question sample of the sample information. Based on the above input information, the large model can be prompted to judge the possibility of the pseudo-negative samples in the input question information being positive samples or negative samples relative to the question samples based on the role capabilities possessed by the specified target role and based on the samples represented by the sample information.

[0138] To summarize, this embodiment uses a large model to judge the possibility of each pseudo-negative sample belonging to a positive sample or a negative sample through a prompt project based on a large model, so as to obtain the possibility of each pseudo-negative sample belonging to a positive sample or a negative sample from the perspective of the large model understanding, thereby facilitating the subsequent use of the large model's judgment results on the possibility of pseudo-negative samples belonging to positive / negative samples in the training of the text vector model, so as to effectively reduce the bias of the text vector model itself, and at the same time induce the text vector model's understanding ability to align with the large model, so as to improve the consistency between the text vector model and the large model in understanding the text, thereby improving the accuracy of the large model reasoning results in the RAG application scenario.

[0139] In an optional embodiment, the processing method provided by the present application may also include the following processing 11)-12):

[0140] 11) Obtain a third similarity between the second answer vector corresponding to each pseudo negative sample and the question vector.

[0141] This embodiment can determine in real time the third similarity between the second answer vector corresponding to each pseudo-negative sample and the question vector. For example, the cosine similarity between the second answer vector corresponding to each pseudo-negative sample and the question vector is calculated in real time and used as the third similarity between the second answer vector corresponding to the pseudo-negative sample and the question vector.

[0142] Alternatively, the second similarity between the second answer vector of the corresponding second answer sample determined as a pseudo negative sample and the question vector may be reused as the third similarity between the second answer vector corresponding to the pseudo negative sample and the question vector.

[0143] 12) For the current pseudo-negative sample to be judged, the current pseudo-negative sample is judged according to the result of weighted calculation of the third similarity between the second answer vector corresponding to the current pseudo-negative sample and the question vector, and the third similarity between the second answer vector corresponding to each pseudo-negative sample and the question vector, to obtain the second judgment results corresponding to the current pseudo-negative samples, so as to adjust the model parameters of the text vector model according to the second judgment results corresponding to each pseudo-negative sample and the first judgment results.

[0144] Among them, the second judgment result corresponding to each pseudo-negative sample is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample. Specifically, it is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample from the perspective of understanding of the text vector model.

[0145] Optionally, the second evaluation result corresponding to the pseudo negative sample may specifically be a dynamic weight assigned to the pseudo negative sample based on the above evaluation method. An exemplary expression of the dynamic weight is provided below:

[0146]

[0147] Among them, z i , z k They represent the problem vector of the problem sample and the vector of the pseudo negative sample respectively, sim() represents the similarity function, exp() represents the exponential operation with e as the base, ∑ k Represents sim(z) corresponding to all pseudo negative samples i , z k ) is the sum of the results of exponential operations with base e.

[0148] It is worth noting that the dynamic nature of the dynamic weight is specifically reflected in assigning weights to pseudo-negative samples based on the vector similarity (third similarity) between the pseudo-negative samples and the problem samples. Because the vector used in the vector similarity calculation is dynamic, it changes according to the changes in the text vector model parameters during the training process, so this weight is also dynamic.

[0149] During implementation, optionally, the same training data can be used to train the text vector model for multiple rounds. In different rounds of training, the same pseudo-negative sample in the same training data may be assigned different weights (thereby forming a dynamic weight), depending on the parameters of the corresponding text vector model in different rounds of training.

[0150] In this embodiment, the model parameters of the text vector model can be adjusted specifically according to the second loss.

[0151] The second loss is obtained according to the second judgment results corresponding to each pseudo negative sample and the first judgment result, the question vector, the first answer vector and the second answer vector corresponding to each second answer sample.

[0152] Optionally, the second loss may specifically be a loss obtained by adding the dynamic weight on the basis of the first loss described above.

[0153] An exemplary expression for the second loss is provided below:

[0154]

[0155] Among them, Fj represents the pseudo negative sample set, and z j 、z k They represent the question vector of the question sample, the first answer vector of the first answer sample, the second answer vector of the second answer sample, and the second answer vector of the pseudo-negative sample respectively; s() represents the similarity function, llm(z i , z k ) represents the large model for pseudo negative samples z k Relative to the problem sample z i The judgment result of whether it belongs to a negative sample or a positive sample.

[0156] Among them, llm(z i , z k ) can be expressed as:

[0157]

[0158] In this formula, the meaning of each character refers to the description of the corresponding embodiment above.

[0159] This embodiment further judges whether the pseudo-negative sample is a positive sample or a negative sample relative to the problem sample from the perspective of understanding the text vector model, and obtains a second judgment result corresponding to the pseudo-negative sample. By involving the second judgment result corresponding to the pseudo-negative sample in model training, the parameters of the text vector model are adjusted, which can further induce the understanding ability of the text vector model to align with the large model, thereby further improving the consistency between the text vector model and the large model in text understanding, and further improving the accuracy of the large model reasoning results in the RAG application scenario.

[0160] In summary, the processing method provided in the embodiments of the present application has at least the following technical advantages compared with the known technology:

[0161] 1) The “correlated similarity” is introduced to identify and judge pseudo-negative samples, which is more universal and reasonable than pure similarity. It can improve the recognition accuracy of pseudo-negative samples and thus help improve the performance of the text vector model.

[0162] 2) The pseudo-negative samples determined based on the text vector model are not determined to be positive samples or negative samples. Instead, the large model is used to judge the possibility of them being positive samples or negative samples, and dynamic weights are given to them (pseudo-negative samples) based on the similarity between the vectors of the pseudo-negative samples and the problem samples, thereby reducing the impact of misjudgment on the quality of the text vector model during training, and correspondingly reducing the necessity of introducing manpower.

[0163] 3) By incorporating the big model’s evaluation results on pseudo-negative samples into the training, the bias of the text vector model itself is suppressed. At the same time, the text vector model’s understanding ability can be induced to align with the big model, thereby improving its consistency with the big model in text understanding, thereby improving the accuracy of the big model’s reasoning results in RAG application scenarios.

[0164] Corresponding to the above processing method, the present application embodiment also provides a processing device, whose composition structure is as follows: Figure 4 As shown, including:

[0165] The acquisition module 401 is used to obtain current training data; the training data includes a question sample, a first answer sample corresponding to a first label of the question sample, and a plurality of second answer samples corresponding to a second label; the first label is used to characterize the first answer sample as a positive sample, and the second label is used to characterize the second answer sample as a negative sample;

[0166] A processing module 402 is used to process the question sample, the first answer sample and the plurality of second answer samples based on a text vector model, so as to determine a pseudo negative sample among the plurality of second answer samples according to a processing result;

[0167] The judging module 403 is used to judge each of the pseudo negative samples based on the large model to obtain a first judging result corresponding to each of the pseudo negative samples; the first judging result corresponding to each of the pseudo negative samples is used to characterize the possibility that the pseudo negative sample belongs to a positive sample or a negative sample;

[0168] The adjustment module 404 is used to adjust the model parameters of the text vector model according to the first evaluation results corresponding to each of the pseudo negative samples.

[0169] In an optional implementation manner, the processing module 402 is specifically configured to:

[0170] Using a text vector model to convert each sample in the training data into a vector, to obtain a question vector for the question sample, a first answer vector for the first answer sample, and second answer vectors corresponding to the plurality of second answer samples respectively;

[0171] According to the question vector, the first answer vector and the second answer vectors of the plurality of second answer samples, judging the correlation similarity between each second answer sample and the question-answer pair formed by the question sample and the first answer sample, and obtaining a correlation similarity judging result corresponding to each second answer sample;

[0172] A second answer sample whose corresponding related similarity judgment result meets the target condition is determined as the pseudo negative sample.

[0173] In an optional implementation manner, the processing module 402, when judging the correlation similarity between each second answer sample and the question-answer pair formed by the question sample and the first answer sample according to the question vector, the first answer vector and the second answer vectors corresponding to the plurality of second answer samples, is specifically configured to:

[0174] determining a first similarity between the first answer vector and the question vector;

[0175] Determine a second similarity between a second answer vector corresponding to each second answer sample and the question vector;

[0176] According to the first similarity and the second similarities corresponding to each second answer sample, the relevant similarity between each second answer sample and the question-answer pair formed by the question sample and the first answer sample is determined.

[0177] In an optional implementation manner, the judging module 403 is specifically configured to:

[0178] Inputting prompt information to the large model, and questioning information to the large model for each pseudo negative sample;

[0179] The question information includes the question sample and the pseudo-negative sample, and the prompt information is used to instruct the large model to judge the possibility that the pseudo-negative sample in the input question information is a positive sample or a negative sample relative to the question sample based on the role ability corresponding to the target role;

[0180] A first judgment result generated by the large model for judging the possibility of each pseudo-negative sample belonging to a positive sample or a negative sample is obtained.

[0181] In an optional implementation manner, the judging module 403 is specifically configured to:

[0182] Inputting sample information and large-model question information for each pseudo-negative sample into the large model, so that the large model refers to the sample represented by the sample information to judge the possibility that the pseudo-negative sample in the input question information is a positive sample or a negative sample relative to the question sample;

[0183] Among them, the question information includes the question sample and the pseudo-negative sample, the sample information includes question samples and answer samples, the question samples include question sample samples and pseudo-negative sample samples, and the answer samples include possibility judgment results samples of the pseudo-negative sample samples belonging to positive samples or negative samples relative to the question sample samples.

[0184] In an optional implementation manner, the adjustment module 404 is specifically configured to:

[0185] According to the first loss, adjusting the model parameters of the text vector model;

[0186] The first loss is obtained according to the first judgment results corresponding to each of the pseudo negative samples, the question vector, the first answer vector and the second answer vector corresponding to each of the second answer samples.

[0187] In an optional implementation, the judging module 403 is further configured to:

[0188] Obtaining a third similarity between the second answer vector corresponding to each pseudo negative sample and the question vector;

[0189] For the current pseudo-negative sample to be judged, the current pseudo-negative sample is judged according to the result of weighted calculation of the third similarity between the second answer vector corresponding to the current pseudo-negative sample and the question vector, and the third similarity between the second answer vector corresponding to each pseudo-negative sample and the question vector, to obtain the second judgment results corresponding to the current pseudo-negative sample, so as to adjust the model parameters of the text vector model according to the second judgment results corresponding to each pseudo-negative sample and the first judgment results;

[0190] The second evaluation result corresponding to each pseudo-negative sample is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample.

[0191] In an optional implementation manner, the adjustment module 404 is specifically configured to:

[0192] According to the second loss, adjusting the model parameters of the text vector model;

[0193] The second loss is obtained according to the second judgment results corresponding to each of the pseudo negative samples and the first judgment results, the question vector, the first answer vector and the second answer vectors corresponding to each of the second answer samples.

[0194] The present application also discloses an electronic device, the composition structure of the electronic device, such as Figure 5 As shown, including at least:

[0195] A memory 10, for storing a computer instruction set;

[0196] A set of computer instructions can be implemented in the form of a computer program.

[0197] The processor 20 is used to implement the processing method provided by any of the above method embodiments by executing a computer instruction set.

[0198] The processor 20 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a neural network processor (NPU), a deep learning processor (DPU) or other programmable logic devices, etc.

[0199] The electronic device includes a display device and / or includes a display interface and can be connected to an external display device.

[0200] Optionally, the electronic device also includes a camera assembly, and / or is connected to an external camera assembly.

[0201] In addition, the electronic device may also include components such as a communication interface and a communication bus. The memory, the processor and the communication interface communicate with each other through the communication bus.

[0202] The communication interface is used for communication between electronic devices and other devices. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.

[0203] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0204] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0205] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or the part that makes a creative contribution can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0206] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0207] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A processing method comprising: Get the current training data; The training data includes a question sample, a first answer sample corresponding to a first label of the question sample, and a plurality of second answer samples corresponding to a second label; the first label is used to characterize the first answer sample as a positive sample, and the second label is used to characterize the second answer sample as a negative sample; Processing the question sample, the first answer sample, and the plurality of second answer samples based on a text vector model to determine a pseudo negative sample among the plurality of second answer samples according to the processing result; Based on the large model, each of the pseudo-negative samples is judged to obtain a first judgment result corresponding to each of the pseudo-negative samples; the first judgment result corresponding to each of the pseudo-negative samples is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample; According to the first evaluation results respectively corresponding to the pseudo negative samples, the model parameters of the text vector model are adjusted.

2. The processing method according to claim 1, wherein the processing the question sample, the first answer sample and the plurality of second answer samples based on the text vector model to determine the pseudo negative samples in the plurality of second answer samples according to the processing results comprises: Using a text vector model to convert each sample in the training data into a vector, to obtain a question vector for the question sample, a first answer vector for the first answer sample, and second answer vectors corresponding to the plurality of second answer samples respectively; According to the question vector, the first answer vector and the second answer vectors of the plurality of second answer samples, judging the correlation similarity between each second answer sample and the question-answer pair formed by the question sample and the first answer sample, and obtaining a correlation similarity judging result corresponding to each second answer sample; A second answer sample whose corresponding related similarity judgment result meets the target condition is determined as the pseudo negative sample.

3. The method according to claim 2, wherein judging the correlation similarity between each second answer sample and the question-answer pair formed by the question sample and the first answer sample based on the question vector, the first answer vector and the second answer vectors corresponding to the plurality of second answer samples comprises: determining a first similarity between the first answer vector and the question vector; Determine a second similarity between a second answer vector corresponding to each second answer sample and the question vector; According to the first similarity and the second similarities corresponding to each second answer sample, the relevant similarity between each second answer sample and the question-answer pair formed by the question sample and the first answer sample is determined.

4. According to the method of claim 1, the step of judging each of the pseudo negative samples based on the large model to obtain first judging results corresponding to each of the pseudo negative samples comprises: Inputting prompt information to the large model, and questioning information to the large model for each pseudo negative sample; The question information includes the question sample and the pseudo-negative sample, and the prompt information is used to instruct the large model to judge the possibility that the pseudo-negative sample in the input question information is a positive sample or a negative sample relative to the question sample based on the role ability corresponding to the target role; A first judgment result generated by the large model for judging the possibility of each pseudo-negative sample belonging to a positive sample or a negative sample is obtained.

5. According to the processing method of claim 1, the step of judging each of the pseudo negative samples based on the large model to obtain a first judging result corresponding to each of the pseudo negative samples comprises: Inputting sample information and large-model question information for each pseudo-negative sample into the large model, so that the large model refers to the sample represented by the sample information to judge the possibility that the pseudo-negative sample in the input question information is a positive sample or a negative sample relative to the question sample; Among them, the question information includes the question sample and the pseudo-negative sample, the sample information includes question samples and answer samples, the question samples include question sample samples and pseudo-negative sample samples, and the answer samples include possibility judgment results samples of the pseudo-negative sample samples belonging to positive samples or negative samples relative to the question sample samples.

6. The processing method according to claim 2, wherein adjusting the model parameters of the text vector model according to the first evaluation results corresponding to each of the pseudo negative samples comprises: According to the first loss, adjusting the model parameters of the text vector model; The first loss is obtained according to the first judgment results corresponding to each of the pseudo negative samples, the question vector, the first answer vector and the second answer vector corresponding to each of the second answer samples.

7. The processing method according to claim 2, further comprising: Obtaining a third similarity between the second answer vector corresponding to each pseudo negative sample and the question vector; For the current pseudo-negative sample to be judged, the current pseudo-negative sample is judged according to the result of weighted calculation of the third similarity between the second answer vector corresponding to the current pseudo-negative sample and the question vector, and the third similarity between the second answer vector corresponding to each pseudo-negative sample and the question vector, to obtain the second judgment results corresponding to the current pseudo-negative sample, so as to adjust the model parameters of the text vector model according to the second judgment results corresponding to each pseudo-negative sample and the first judgment results; The second evaluation result corresponding to each pseudo-negative sample is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample.

8. The processing method according to claim 7, wherein the step of adjusting the model parameters of the text vector model according to the second evaluation results and the first evaluation results respectively corresponding to the pseudo negative samples comprises: According to the second loss, adjusting the model parameters of the text vector model; The second loss is obtained according to the second judgment results corresponding to each of the pseudo negative samples and the first judgment results, the question vector, the first answer vector and the second answer vectors corresponding to each of the second answer samples.

9. A processing device comprising: Acquisition module, used to obtain current training data; The training data includes a question sample, a first answer sample corresponding to a first label of the question sample, and a plurality of second answer samples corresponding to a second label; the first label is used to characterize the first answer sample as a positive sample, and the second label is used to characterize the second answer sample as a negative sample; A processing module, configured to process the question sample, the first answer sample and the plurality of second answer samples based on a text vector model, so as to determine a pseudo negative sample among the plurality of second answer samples according to a processing result; An evaluation module is used to evaluate each of the pseudo-negative samples based on the large model to obtain a first evaluation result corresponding to each of the pseudo-negative samples; the first evaluation result corresponding to each of the pseudo-negative samples is used to characterize the possibility that the pseudo-negative sample belongs to a positive sample or a negative sample; The adjustment module is used to adjust the model parameters of the text vector model according to the first evaluation results corresponding to each of the pseudo negative samples.

10. An electronic device comprising: A memory for storing at least one set of computer instructions; A processor, configured to implement the processing method according to any one of claims 1 to 8 by executing the instruction set stored in the memory.