Error correction method and device, computer equipment and computer readable storage medium

By filtering and correcting candidate answers output by large language model, the problem of low answer accuracy under traditional methods is solved, and higher answer accuracy and reliability are achieved.

CN119862250APending Publication Date: 2025-04-22GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311369827.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

Traditional large language models have low accuracy when outputting answers, resulting in inaccurate information obtained by users.

Method used

By determining the multiple first candidate answers and reply requirements for the questions to be answered, the second candidate answer and their error analysis results are selected, and the target answer is finally determined based on this.

Benefits of technology

Improve the accuracy of the output results of the large language model, ensuring that the answer not only meets the answer requirements, but also avoids errors in the wrong analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862250A_ABST
    Figure CN119862250A_ABST
Patent Text Reader

Abstract

The invention relates to an error correction method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: determining a plurality of first candidate answers of a to-be-answered question and an answering requirement corresponding to the to-be-answered question; determining a second candidate answer from the plurality of first candidate answers and an error analysis result of the second candidate answer based on the plurality of first candidate answers and the reply requirement; based on the error analysis result corresponding to the second candidate answer, correcting the second candidate answer to obtain a corrected answer corresponding to the second candidate answer; and determining a target answer of the to-be-answered question based on the corrected answer. By adopting the method, the accuracy of the target answer can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to an error correction method, apparatus, computer equipment, and computer-readable storage medium. Background Art

[0002] With the development of artificial intelligence technology, large language models are widely used in scenarios that require interaction, such as chatbots and virtual assistants. The input and output of large language models are both natural languages, which improves the interaction efficiency of large language models.

[0003] However, in the traditional method, the user inputs the question to be answered into the large language model, and the large language model outputs the target answer based on the question to be answered, resulting in low accuracy of the target answer. Summary of the invention

[0004] The embodiments of the present application provide an error correction method, apparatus, computer device, and computer-readable storage medium, which can improve the accuracy of the output results of a large language model.

[0005] In a first aspect, the present application provides an error correction method. The method comprises:

[0006] Determine multiple first candidate answers to the questions to be answered, and answer requirements corresponding to the questions to be answered;

[0007] Based on the plurality of the first candidate answers and the response requirement, determining a second candidate answer from the plurality of the first candidate answers, and an error analysis result of the second candidate answer;

[0008] Based on the error analysis result corresponding to the second candidate answer, the second candidate answer is corrected to obtain a corrected answer corresponding to the second candidate answer;

[0009] Based on the revised answer, a target answer to the question to be answered is determined.

[0010] In a second aspect, the present application also provides an error correction device. The device comprises:

[0011] An acquisition module, used to determine a plurality of first candidate answers to the question to be answered, and answer requirements corresponding to the question to be answered;

[0012] a screening module, configured to determine a second candidate answer from the plurality of first candidate answers based on the plurality of first candidate answers and the response requirement, and an error analysis result of the second candidate answer;

[0013] a correction module, configured to correct the second candidate answer based on the error analysis result corresponding to the second candidate answer, to obtain a corrected answer corresponding to the second candidate answer;

[0014] A determination module is used to determine a target answer to the question to be answered based on the revised answer.

[0015] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method in the first aspect are implemented.

[0016] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0017] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0018] In the above error correction method, multiple first candidate answers to the question to be answered and the answer requirements corresponding to the question to be answered are determined. Based on the multiple first candidate answers and the answer requirements, the second candidate answer and the error analysis result of the second candidate answer are determined from the multiple first candidate answers, that is, the second candidate answer that meets the answer requirements is screened out from the multiple first candidate answers, and then the second candidate answer is corrected based on the error analysis result corresponding to the second candidate answer to obtain a corrected answer corresponding to the second candidate answer. The corrected answer obtained by screening and correction not only meets the answer requirements, but also avoids errors in the error analysis results, thereby improving the accuracy of the corrected answer. The target answer to the question to be answered is determined based on the corrected answer, thereby improving the accuracy of the target answer. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 is a flow chart of an error correction method in one embodiment;

[0021] Figure 2 A flowchart of the steps of determining the first candidate answer and the response requirement in one embodiment;

[0022] Figure 3 is a schematic diagram of a first prompt word and a first candidate answer in one embodiment;

[0023] Figure 4 A schematic diagram of a second prompt word and a response requirement in one embodiment;

[0024] Figure 5 A flowchart of steps for determining problem analysis results and intention analysis results in one embodiment;

[0025] Figure 6 A flowchart of steps for determining a second candidate answer and an error analysis result in one embodiment;

[0026] Figure 7 A schematic diagram of a third prompt word and a second candidate answer in one embodiment;

[0027] Figure 8 A flowchart of a step of revising an answer determination in one embodiment;

[0028] Fig. 9 is a schematic diagram of a fourth prompt word and a revised answer in one embodiment;

[0029] Fig.10 is a schematic diagram of the process of interaction between a user and a large language model in one embodiment;

[0030] Fig.11 is a schematic diagram of the process of interaction between a user and a large language model in another embodiment;

[0031] Fig.12 A schematic diagram of a flow chart of an error correction method in an embodiment;

[0032] Fig.13 is a structural block diagram of an error correction device in one embodiment;

[0033] Fig.14 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0035] In one embodiment, Figure 1As shown, an error correction method is provided, and the method is applied to an error correction system as an example for explanation. The error correction system can be located in a terminal or a server, and the target large language model that interacts with the error correction system can also be located in a terminal or a server. The error correction system and the target large language model can be located in the same or different terminals, and the error correction system and the target large language model can also be located in the same or different servers. The error correction system and the large language model can also be located in one of the terminals and the other in the server, which is not limited here. The error correction system and the target large language model can be located in the same system, for example, a robot's intelligent chat system. The error correction system and the target large language model can also be located in different systems, which is not limited here. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, smart devices and portable wearable devices. The smart device can be a smart robot, a smart speaker, a smart TV, a smart air conditioner, a smart car device, a smart car, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. In this embodiment, the method includes the following steps 102 to 108, wherein:

[0036] Step 102, determining a plurality of first candidate answers to the question to be answered, and answer requirements corresponding to the question to be answered.

[0037] The question to be answered refers to the text input by the user. The question to be answered is in natural language and can be a question or a statement, which is not limited here. The first candidate answer refers to the initial answer to the question to be answered. The answer requirement refers to the requirement for the answer to the question to be answered, which includes but is not limited to format requirements, content requirements, and reference standard requirements.

[0038] The target large language model refers to a trained large language model (LLM). The target large language model is based on GPT (Generative Pre-trained Transformer), which first performs unsupervised training on a large language, and then fine-tunes it for specific tasks on a much smaller supervised dataset to obtain the target large language model. The architecture of the target large language model can be the Transformer architecture (the Transformer architecture is a deep learning architecture used for natural language processing and other sequence processing tasks).

[0039] Exemplarily, the target object inputs the question to be answered into the error correction system, the error correction system generates prompt words based on the question to be answered, and sends the prompt words to the target large language model, the target large language model generates multiple first candidate answers and answer requirements based on the prompt words, and sends the multiple first candidate answers and answer requirements to the error correction system, and the error correction system receives and determines the multiple first candidate answers and answer requirements for the question to be answered. The target object refers to an object that interacts with at least one of the error correction system and the target large language model.

[0040] In one embodiment, the target object inputs the question to be answered into the error correction system and the target large language model, the target large language model generates multiple first candidate answers based on the question to be answered, and sends the multiple first candidate answers to the error correction system, the error correction system receives and determines the multiple first candidate answers to the question to be answered; the error correction system generates prompt words based on the question to be answered, and sends the prompt words to the large language model, the large language model generates reply requirements based on the prompt words, and sends the reply requirements to the error correction system, the error correction system receives and determines the reply requirements corresponding to the question to be answered.

[0041] In one embodiment, the target object inputs the question to be answered into the error correction system, the error correction system generates a first prompt word and a second prompt word based on the question to be answered, the error correction system inputs the first prompt word into the target large language model, the target large language model generates multiple first candidate answers based on the first prompt word, and sends the multiple first candidate answers to the error correction system, the error correction system receives and determines the multiple first candidate answers to the question to be answered; the error correction system inputs the second prompt word into the target large language model, the target large language model generates a reply requirement based on the second prompt word, and sends the reply requirement to the error correction system, the error correction system receives and determines the reply requirement corresponding to the question to be answered.

[0042] Step 104, based on the plurality of first candidate answers and the response requirement, determine a second candidate answer from the plurality of first candidate answers, and an error analysis result of the second candidate answer.

[0043] The second candidate answer refers to the first candidate answer selected from multiple first candidate answers. The error analysis result refers to the result obtained by error analysis of the second candidate answer. The error analysis result includes but is not limited to the information that needs to be corrected in the second candidate answer. The number of error analysis results can be one or more, that is, multiple second candidate answers can correspond to one error analysis result, or each second candidate answer can correspond to one error analysis result.

[0044] Exemplarily, the error correction system selects a second candidate answer from multiple first candidate answers based on the response requirement, and determines an error analysis result corresponding to the second candidate answer.

[0045] In one embodiment, for each first candidate answer, the error correction system analyzes the first candidate answer based on the response requirement to obtain an error analysis result corresponding to the first candidate answer, and based on the error analysis results corresponding to multiple first candidate answers, screens out a second candidate answer from multiple first candidate answers to obtain a second candidate answer and an error analysis result of the second candidate answer.

[0046] Step 106: Based on the error analysis result corresponding to the second candidate answer, the second candidate answer is corrected to obtain a corrected answer corresponding to the second candidate answer.

[0047] The revised answer refers to the answer obtained by revising the second candidate answer.

[0048] Exemplarily, the error correction system determines a correction prompt corresponding to the second candidate answer based on the error analysis result corresponding to the second candidate answer, and obtains a corrected answer corresponding to the second candidate answer based on the correction prompt corresponding to the second candidate answer.

[0049] In one embodiment, the error correction system determines a correction analysis result based on the error analysis result and the response requirement corresponding to the second candidate answer, and determines a correction answer corresponding to the second candidate answer based on the correction analysis result. The correction analysis result includes a correction prompt, or the correction analysis result includes a correction prompt and a correction output requirement.

[0050] Step 108, determining a target answer to the question to be answered based on the revised answer.

[0051] The target answer refers to the final answer to the question to be answered. The number of target answers is one.

[0052] Exemplarily, the error correction system determines a target answer to the question to be answered from the corrected answer.

[0053] In one embodiment, if the number of revised answers is one, the revised answer is determined as the target answer to the question to be answered; if the number of revised answers is at least two, each revised answer is scored to obtain a score corresponding to the revised answer, and the target answer to the question to be answered is determined based on the scores of each revised answer. Scoring each revised answer to obtain a score corresponding to the revised answer includes: for each revised answer, inputting the revised answer, the question to be answered, and the answer requirement corresponding to the question to be answered into a scoring model to obtain a score corresponding to the revised answer.

[0054] In the above error correction method, multiple first candidate answers to the question to be answered and the answer requirements corresponding to the question to be answered are determined. Based on the multiple first candidate answers and the answer requirements, the second candidate answer and the error analysis result of the second candidate answer are determined from the multiple first candidate answers, that is, the second candidate answer that meets the answer requirements is screened out from the multiple first candidate answers, and then the second candidate answer is corrected based on the error analysis result corresponding to the second candidate answer to obtain a corrected answer corresponding to the second candidate answer. The corrected answer obtained by screening and correction not only meets the answer requirements, but also avoids errors in the error analysis results, thereby improving the accuracy of the corrected answer. The target answer to the question to be answered is determined based on the corrected answer, thereby improving the accuracy of the target answer.

[0055] In one embodiment, Figure 2 As shown, multiple first candidate answers to the questions to be answered and the answer requirements corresponding to the questions to be answered are determined, including:

[0056] Step 202: input the question to be answered into the target large language model, and receive the question analysis result and intention analysis result of the question to be answered output by the target large language model.

[0057] Among them, the question analysis result refers to the result obtained by the target large language model through analyzing the intention, emotion, etc. of the target object according to the question to be answered, and the question analysis result can be described in natural language. The intention analysis result refers to the result obtained by the target large language model through analyzing the format and content of the answer required by the target object according to the question analysis result, and the intention analysis result can be described in natural language. The intention analysis result includes but is not limited to at least one of the format requirement intention, content requirement intention and knowledge rationality dimension, etc. The format requirement intention refers to the output format requirements of the answer to the question to be answered, such as tone, style and text format, etc.; the content requirement intention refers to the content form requirements of the answer to the question to be answered, such as text summary; the knowledge rationality dimension refers to the dimension of evaluating the rationality of the knowledge of the question to be answered.

[0058] Exemplarily, the error correction system inputs the question to be answered into the target large language model, the target large language model generates a question analysis result based on the question to be answered, and sends the question analysis result to the error correction system, and the error correction system receives the question analysis result of the question to be answered; the error correction system inputs the question analysis result into the target large language model, the target large language model generates an intent analysis result based on the question analysis result, and sends the intent analysis result to the error correction system, and the error correction system receives the intent analysis result of the question to be answered.

[0059] Step 204: Generate a first prompt word based on the question analysis result.

[0060] Among them, the prompt word refers to the natural language input provided by the user or system to the large language model, which is used to guide the large language model to generate the corresponding response text. The first prompt word refers to the prompt word used to instruct the large language model to generate multiple first candidate answers. The first prompt word includes but is not limited to at least one of the first task description, the question to be answered, the question analysis result, the associated information and the first output requirement, etc. The question analysis result is the information that must be included in the first prompt word, the first task description and the first output requirement can be preset information, the question to be answered, the question analysis result and the associated information can be filled according to the set logic, it can be understood that the first description and the first output requirement in the first prompt word are fixed information, the question to be answered, the question analysis result and the associated information vary according to the question to be answered input by the target user, that is, the question to be answered, the question analysis result and the associated information are determined based on the question to be answered input by the target user.

[0061] Exemplarily, the error correction system obtains a first template, fills the problem analysis result into the first template, and obtains a first prompt word.

[0062] In one embodiment, the error correction system obtains a first template, which includes a first task description, a place to fill in questions to be answered, a place to fill in question analysis results, a place to fill in related information, and a first output requirement. The error correction system fills the questions to be answered, the question analysis results, and the related information into the places to fill in questions to be answered, the question analysis results, and the related information of the first template, respectively, to obtain a first prompt word. For example, the first prompt word is Figure 3 The input data is shown in .

[0063] Step 206: input the first prompt word into the target large language model, and receive a plurality of first candidate answers to the question to be answered output by the target large language model.

[0064] Exemplarily, the error correction system inputs the first prompt word into the target large language model, the target large language model generates multiple first candidate answers based on the first prompt word, and sends the multiple first candidate answers to the error correction system, and the error correction system receives the multiple first candidate answers to the question to be answered. Figure 3 As shown, the first prompt word is input as input data to the target large language model, and the output data output by the target large language model is a plurality of first candidate answers.

[0065] Step 208: Generate a second prompt word based on the intention analysis result.

[0066] The second prompt word refers to a prompt word used to instruct the large language model to generate a response requirement. The second prompt word includes but is not limited to at least one of the second task description, the question to be answered, the question analysis result, the associated information, the intention analysis result, and the second output requirement. The intention analysis result is the information that must be included in the second prompt word. The second task description and the second output requirement can be preset information. The question to be answered, the question analysis result, the associated information, and the intention analysis result can be filled in according to the set logic.

[0067] Exemplarily, after determining multiple first candidate answers, the error correction system obtains a second template, fills the intent analysis result into the second template, and obtains a second prompt word.

[0068] In one embodiment, the error correction system obtains a second template, which includes a second task description, a place to fill in questions to be answered, a place to fill in question analysis results, a place to fill in related information, a place to fill in intention analysis results, and a second output requirement. The error correction system fills the questions to be answered, the question analysis results, the related information, and the intention analysis results into the places to fill in questions to be answered, the question analysis results, the related information, and the intention analysis results of the second template, respectively, to obtain a second prompt word. For example, the second prompt word is as follows: Figure 4 The input data is shown in .

[0069] Step 210: input the second prompt word into the target large language model, and receive the answer requirement of the unanswered question output by the target large language model.

[0070] Exemplarily, the error correction system inputs the second prompt word into the target large language model, the target large language model generates a reply requirement based on the second prompt word, and sends the reply requirement to the error correction system, and the error correction system receives the reply requirement corresponding to the question to be answered.

[0071] In this embodiment, the error correction system generates a first prompt word based on the problem analysis result, and the first prompt word includes information such as the problem analysis result. The error correction system inputs the first prompt word into the target large language model, and the target large language model generates multiple first candidate answers based on the first prompt word containing rich information, thereby improving the accuracy of the first candidate answers; the error correction system generates a second prompt word based on the intention analysis result, and the second prompt word includes information such as the intention analysis result. The error correction system inputs the second prompt word into the target large language model, and the target large language model generates a reply requirement based on the second prompt word containing rich information, thereby improving the accuracy of the reply requirement and providing accurate basic data for screening the second candidate answer from multiple first candidate answers.

[0072] In one embodiment, the first prompt word includes a first output requirement, and the first output requirement is used to instruct the target large language model to output at least two first candidate answers.

[0073] The first output requirement refers to a restrictive description of the first candidate answer. The first output requirement includes but is not limited to a quantity requirement, which may be a specific requirement for the number of first candidate answers, for example, the number of first candidate answers is ten, or a lower limit requirement for the number of first candidate answers, for example, the number of first candidate answers is at least two.

[0074] Exemplarily, the error correction system inputs a first prompt word into a target large language model, the first prompt word includes a first output requirement, the first output requirement includes a quantity requirement for first candidate answers, and the target large language model generates multiple first candidate answers based on the first prompt word.

[0075] In this embodiment, through the first output requirement in the first prompt word, the target large language model outputs at least two first candidate answers, which provides a basis for selecting a second candidate answer from multiple first candidate answers.

[0076] In one embodiment, Figure 5 As shown, the question to be answered is input into the target large language model, and the question analysis result and the intention analysis result of the question to be answered output by the target large language model are received, including:

[0077] Step 502: extract key information from the question to be answered to obtain key information of the question to be answered.

[0078] Among them, key information extraction refers to the process of extracting key information from the question to be answered. Traditional natural language processing algorithms can be used for key information extraction, such as BERT (Bidirectional Encoder Representations from Transformers). Key information refers to important information of the question to be answered, and the key information can include at least one of the subject information and keywords.

[0079] Exemplarily, the error correction system extracts key information from the questions to be answered to obtain key information of the questions to be answered.

[0080] Step 504: Search based on the key information to obtain related information corresponding to the question to be answered.

[0081] Among them, search refers to the process of searching for information related to key information. Related information refers to information related to the question to be answered.

[0082] Exemplarily, the error correction system searches for key information to obtain related information corresponding to the question to be answered.

[0083] In one embodiment, the error correction system searches for key information through an Internet interface to obtain multiple initial information. For each initial information, the initial information is scored based on the degree of relevance between the initial information and the key information, as well as the generation time of the initial information, to obtain a score corresponding to the initial information. A preset number of initial information with the highest scores are determined as related information corresponding to the question to be answered.

[0084] Step 506, input the question to be answered and the related information into the target large language model, the target large language model analyzes the question to be answered to obtain the question analysis result of the question to be answered, and analyzes the question analysis result and the related information to obtain the intention analysis result of the question to be answered.

[0085] Exemplarily, the error correction system inputs the question to be answered into the target large language model, the target large language model analyzes the question to be answered, obtains the question analysis result of the question to be answered, and sends the question analysis result to the error correction system; the error correction system inputs the question analysis result and related information into the target large language model, the target large language model analyzes the question analysis result and related information, obtains the intention analysis result of the question to be answered, and sends the intention analysis result to the error correction system.

[0086] Step 508: Receive the question analysis results and intention analysis results of the question to be answered output by the target large language model.

[0087] Exemplarily, the error correction system receives a problem analysis result and an intent analysis result.

[0088] In this embodiment, the error correction system searches for key information of the question to be answered and obtains related information of the question to be answered. The related information can provide the target large language model with professional knowledge and new knowledge related to the question to be answered, thereby improving the accuracy of the question analysis results and the intention analysis results.

[0089] In one embodiment, the first prompt word includes the first task description and the problem analysis result, and also includes at least one of the question to be answered, the associated information corresponding to the question to be answered, and the first output requirement.

[0090] The first task description refers to information describing the task for which the target large language model receives the first prompt word. For example, the first task description is an output result of generating the question to be answered by combining the question analysis result and the associated information. The order of the first task description, the question analysis result, the question to be answered, the associated information corresponding to the question to be answered, and the first output requirement in the first prompt word can be set according to actual needs and is not limited here.

[0091] Exemplarily, the first prompt word generated by the error correction system includes the first task description and the problem analysis result, as well as at least one of the question to be answered, the associated information corresponding to the question to be answered, and the first output requirement.

[0092] In this embodiment, the first task description in the first prompt word clarifies the task of the target large language model after receiving the first prompt word, the question analysis result provides the target large language model with information such as the intention and emotion of the target object, and the associated information provides the target large language model with new knowledge and related knowledge related to the question to be answered. The first output requirement clarifies the requirements of the first candidate answer. The target large language model generates multiple first candidate answers based on the rich information contained in the first prompt word, thereby improving the accuracy of the first candidate answers.

[0093] In one embodiment, the second prompt word includes the second task description and the intention analysis result, and also includes at least one of the question to be answered, the question analysis result, the associated information corresponding to the question to be answered, and the second output requirement.

[0094] Among them, the second task description refers to information describing the task of the target large language model receiving the second prompt word. The second output requirement refers to a restrictive description of the output result generated by the target large language model based on the second prompt word, and the second output requirement is different from the first output requirement. The order of the second task description, intent analysis results, questions to be answered, question analysis results, related information corresponding to the questions to be answered, and the second output requirement in the second prompt word can be set according to actual needs, and there is no limitation here.

[0095] Exemplarily, the second prompt word generated by the error correction system includes the second task description and the intention analysis result, as well as the question to be answered, the question analysis result, the associated information corresponding to the question to be answered and at least one of the second output requirements.

[0096] In this embodiment, the second task description in the second prompt word clarifies the task of the target large language model after receiving the second prompt word, the intention analysis result provides the target large language model with information such as the format requirement intention, content requirement intention and reasonable dimension of knowledge of the question to be answered, the question analysis result provides the target large language model with information such as the intention and emotion of the target object, the associated information provides the target large language model with new knowledge and related knowledge related to the question to be answered, the second output requirement clarifies the standard of the reply requirement, and the target large language model generates the reply requirement based on the rich information contained in the second prompt word, thereby improving the accuracy of the reply requirement.

[0097] In one embodiment, the second prompt word is input into the target large language model, and a response requirement of the unanswered question output by the target large language model is received, including:

[0098] The second prompt word is input into the target large language model, and the answer requirement of the unanswered question output by the target large language model and the answer requirement analysis chain corresponding to the answer requirement are received.

[0099] Among them, the answer requirement analysis chain refers to the chain of thought (COT) or thinking process in the process of the target large language model generating the answer requirement. The answer requirement analysis chain may include a series of intermediate steps related to the second prompt word, reflecting the reasoning path of the target large language model to process information from premise to result.

[0100] Exemplarily, the error correction system inputs the second prompt word into the target large language model, the second output requirement of the second prompt word includes an output content requirement, the output content requirement is that the output content includes a reply requirement and a reply requirement analysis chain, the target large language model generates a reply requirement and a reply requirement analysis chain according to the second prompt word, and sends the reply requirement and the reply requirement analysis chain to the error correction system, and the error correction system receives the reply requirement of the unanswered question sent by the target large language model and the reply requirement analysis chain corresponding to the reply requirement. Figure 4 As shown, the second prompt word is input as input data to the target large language model, and the output data output by the target large language model includes a reply requirement and a reply requirement analysis chain.

[0101] In this embodiment, the target large language model is instructed by the second prompt word to generate the answer requirements and the answer requirement analysis chain for the question to be answered. In the process of generating the answer requirement analysis chain, the target large language model will make the analysis process of the answer requirements more reasonable, thereby improving the accuracy of the answer requirements.

[0102] In one embodiment, Figure 6 As shown, based on the plurality of first candidate answers and the reply requirement, a second candidate answer is determined from the plurality of first candidate answers, and an error analysis result of the second candidate answer includes:

[0103] Step 602, obtain the third task description, input the third task description and the response requirement into the target large language model, and receive the reverse task description output by the target large language model.

[0104] The third task description refers to information describing the task of the target large language model receiving the third prompt word. The reverse task description refers to descriptive information used to instruct the target large language model to judge whether the first candidate answer can be used as the answer to the question to be answered. For example, the reverse task description is that the first candidate answer is known to exist, and the first candidate answer is suitable or unsuitable as the answer to the question.

[0105] Exemplarily, the error correction system obtains a third template, obtains a third task description from the third template, inputs the third task description and the reply requirement into the target large language model, the target large language model generates a reverse task description based on the third task description and the reply requirement, and sends the reverse task description to the error correction system, and the error correction system receives the reverse task description output by the target large language model.

[0106] Step 604: Generate a third prompt word based on the reverse task description.

[0107] The third prompt word refers to a prompt word used to instruct the target large language model to screen the second candidate answer.

[0108] Exemplarily, the error correction system fills the reverse task description into the third template to obtain a third prompt word.

[0109] In one embodiment, the third template includes a first candidate answer filling place, a third task description, a question to be answered filling place, a reply requirement filling place, a reverse task description filling place, and a third output requirement. The error correction system fills the first candidate answer, the question to be answered, the reply requirement, and the reverse task description into the first candidate answer filling place, the question to be answered filling place, the reply requirement filling place, and the reverse task description filling place of the third template to obtain a third prompt word. For example, the third prompt word is as follows: Figure 7 Input data as shown in .

[0110] Step 606: input the third prompt word into the target large language model, and receive the second candidate answers and the error analysis results of the second candidate answers output by the target large language model; the number of the second candidate answers is less than or equal to the number of the first candidate answers.

[0111] Exemplarily, the error correction system inputs the third prompt word into the target large language model, the target large language model generates the error analysis results of the second candidate answer and the second candidate answer based on the third prompt word, and sends the error analysis results of the second candidate answer and the second candidate answer to the error correction system, and the error correction system receives the error analysis results of the second candidate answer and the second candidate answer sent by the target large language model, wherein the number of the second candidate answers is less than or equal to the number of the first candidate answers. Figure 7 As shown, the third prompt word is input as input data to the target large language model, and the output data output by the target large language model includes the second candidate answer and the error analysis result of the second candidate answer.

[0112] In this embodiment, the reverse task description is obtained by inputting the third task description and the reply requirement into the target large language model, and then a third prompt word is generated according to the reverse task description, and the third prompt word is input into the target large language model. The target large language model selects the second candidate answer from the first candidate answer according to the third prompt word containing rich information such as the reverse task description, and generates an error analysis result of the second candidate answer, thereby improving the accuracy of the second candidate answer and the error analysis result.

[0113] In one embodiment, the third prompt word includes a third task description and a reverse task description, and also includes at least one of multiple first candidate answers, questions to be answered, answer requirements and third output requirements; the reverse task description is used to instruct the target large language model to screen multiple first candidate answers.

[0114] The third output requirement refers to a restrictive description of the output result generated by the target large language model based on the third prompt word, and the third output requirement is different from the first output requirement and the second output requirement. The order of the third task description, the reverse task description, the multiple first candidate answers, the question to be answered, the answer requirement and the third output requirement in the third prompt word can be set according to actual needs and is not limited here.

[0115] Exemplarily, the third prompt word generated by the error correction system includes a third task description and a reverse task description, as well as at least one of a first candidate answer, a question to be answered, a response requirement, and a third output requirement, wherein the reverse task description is used to instruct the target large language model to screen multiple first candidate answers.

[0116] In this embodiment, the third task description in the third prompt word clarifies the task of the target large language model after receiving the third prompt word, the reverse task description instructs the target large language model to screen multiple first candidate answers, the first candidate answers provide the target large language model with the screening objects, the reply requirements provide the target large language model with the screening criteria, and the third output requirements clarify the requirements for the second candidate answers and the error analysis results. The target large language model outputs the second candidate answers and the error analysis results of the second candidate answers based on the rich information contained in the third prompt word, thereby improving the accuracy of the second candidate answers and the error analysis results.

[0117] In one embodiment, Figure 8 As shown, based on the error analysis result corresponding to the second candidate answer, the second candidate answer is corrected to obtain a corrected answer corresponding to the second candidate answer, including:

[0118] Step 802: Input the error analysis result and reply requirement corresponding to the second candidate answer into the target large language model, and receive the correction prompt and correction output requirement output by the target large language model.

[0119] Among them, the correction prompt refers to the text that describes the information to be corrected in the second candidate answer. The correction prompt includes but is not limited to the information to be corrected in the second candidate answer, the reason why the information to be corrected needs to be corrected, and the modification method of the information to be corrected. The correction prompt can correspond to the second candidate answer one by one, that is, one second candidate answer corresponds to one correction prompt. The correction output requirement refers to the output requirement of the correction answer. The correction output requirement includes but is not limited to the format requirements and form requirements of the correction answer. It can be understood that the correction output requirement is equivalent to the fourth output requirement in the fourth prompt word, but the correction output requirement is determined based on the error analysis results and the answer requirements. Compared with the pre-set output requirements, the correction output requirement is more in line with the question to be answered.

[0120] Exemplarily, the error correction system inputs the error analysis results and response requirements corresponding to the second candidate answer into the target large language model; the target large language model generates correction prompts and correction output requirements based on the error analysis results and response requirements, and sends the correction prompts and correction output requirements to the error correction system; the error correction system receives the correction prompts and correction output requirements sent by the target large language model.

[0121] Step 804: Generate a fourth prompt word based on the revised prompt and the revised output requirement.

[0122] The fourth prompt word refers to a prompt word used to instruct the target large language model to output a corrected answer.

[0123] Exemplarily, the error correction system obtains the fourth template, fills the correction prompt and the correction output requirement into the fourth template, and obtains the fourth prompt word.

[0124] In one embodiment, the error correction system obtains a fourth template, which includes a second candidate answer filling place, an error analysis result filling place, a question to be answered filling place, a reply requirement filling place, a correction prompt filling place, and a correction output requirement filling place. The error correction system fills the second candidate answer, error analysis result, question to be answered, reply requirement, correction prompt, and correction output requirement into the first candidate answer filling place, question to be answered filling place, reply requirement filling place, and reverse task description filling place of the fourth template to obtain a fourth prompt word. For example, the fourth prompt word is as follows: Fig. 9 The input data is shown in .

[0125] Step 806: input the fourth prompt word into the target large language model, and receive the revised answer corresponding to the second candidate answer output by the target large language model.

[0126] Exemplarily, the error correction system inputs the fourth prompt word into the target large language model, the target large language model outputs a corrected answer based on the fourth prompt word, and sends the corrected answer to the error correction system, and the error correction system receives the corrected answer corresponding to the second candidate answer sent by the target large language model.

[0127] In this embodiment, the error correction system inputs the error analysis result and reply requirement corresponding to the second candidate answer into the target large language model to obtain the correction prompt and the correction output requirement, and then generates a fourth prompt word according to the correction prompt and the correction output requirement, and inputs the fourth prompt word into the target large language model. The target large language model generates a corrected answer according to the fourth prompt word containing rich information, thereby improving the accuracy of the corrected answer.

[0128] In one embodiment, the fourth prompt word includes a correction prompt and a correction output requirement, and also includes at least one of a second candidate answer, an error analysis result corresponding to the second candidate answer, a question to be answered, and an answer requirement; the correction prompt is used to indicate a correction method for the second candidate answer, and the correction output requirement is used to indicate an output format of the corrected answer.

[0129] The correction method refers to the modification method of the information to be corrected in the second candidate answer. The output format refers to the format of the output of the corrected answer. The order of the correction prompt, correction output requirement, second candidate answer, error analysis result corresponding to the second candidate answer, question to be answered and answer requirement in the fourth prompt word can be set according to actual needs and is not limited here.

[0130] Exemplarily, the fourth prompt word generated by the error correction system includes a correction prompt and a correction output requirement, as well as at least one of the second candidate answer, the error analysis result corresponding to the second candidate answer, the question to be answered, and the answer requirement, wherein the correction prompt is used to indicate the correction method of the second candidate answer, and the correction output requirement is used to indicate the output format of the corrected answer.

[0131] In this embodiment, the correction prompt in the fourth prompt word provides the target large language model with a correction method for the second candidate answer, the correction output requirement clarifies the output format of the corrected answer, the second candidate answer provides the target large language model with an object for correction, the error analysis result provides the target large language model with information to be corrected for the second candidate answer, the reply requirement provides the target large language model with a correction standard, and the target large language model outputs a corrected answer based on the rich information contained in the fourth prompt word, thereby improving the accuracy of the corrected answer.

[0132] In one embodiment, inputting the fourth prompt word into the target large language model and receiving a revised answer output by the target large language model includes:

[0133] The fourth prompt word is input into the target large language model, and a revised answer output by the target large language model and a revised answer analysis chain corresponding to the revised answer are received.

[0134] Among them, the revised answer analysis chain refers to the thinking chain or thinking process in the process of the target large language model generating a revised answer. The revised answer analysis chain may include a series of intermediate steps related to the fourth prompt word, reflecting the reasoning path of the target large language model in processing information from premise to result.

[0135] Exemplarily, the error correction system inputs the fourth prompt word into the target large language model, and the target large language model generates a revised answer and a revised answer analysis chain corresponding to the revised answer according to the fourth prompt word, and sends the revised answer and the revised answer analysis chain corresponding to the revised answer to the error correction system, and the error correction system receives the revised answer and the revised answer analysis chain corresponding to the revised answer sent by the target large language model. Fig. 9 As shown, the fourth prompt word is input as input data to the target large language model, and the output data of the target large language model includes a revised answer and a revised answer analysis chain corresponding to the revised answer.

[0136] In this embodiment, based on the fourth prompt word, the target large language model generates a corrected answer and a corrected answer analysis chain corresponding to the corrected answer. In the process of generating the corrected answer analysis chain, the target large language model makes the analysis process of the corrected answer more reasonable, thereby improving the accuracy of the corrected answer.

[0137] In one embodiment, based on the revised answer, determining a target answer to the question to be answered includes:

[0138] The number of revised answers is counted to obtain the statistical number of revised answers; when the statistical number is one, the revised answer is determined as the target answer to the question to be answered; when the statistical number is at least two, the revised answer is used as the first candidate answer, and the steps of determining the second candidate answer from the multiple first candidate answers based on the multiple first candidate answers and the response requirements, as well as the error analysis results of the second candidate answer are repeatedly performed until the statistical number of revised answers is one, and the revised answer is determined as the target answer to the question to be answered.

[0139] The statistical quantity refers to the number of corrected answers, and the statistical quantity can be one or more.

[0140] Exemplarily, after the error correction system receives the corrected answers sent by the target large language model, the system counts the number of corrected answers to obtain the statistical number of corrected answers. If the statistical number is one, the corrected answer is determined as the target answer to the question to be answered. If the statistical number is at least two, the corrected answer is used as the first candidate answer, and steps 104 and 106 are repeated until the statistical number of corrected answers is one, and the corrected answer is determined as the target answer to the question to be answered.

[0141] In one embodiment, after the error correction system determines the target answer to the question to be answered based on the corrected answer, it also includes: sending the target answer to the target large language model, and the target large language model outputs the target answer to the question to be answered, that is, the target large language model feeds back the target answer to the question to be answered to the target object.

[0142] In one embodiment, after the error correction system determines the target answer to the question to be answered based on the revised answer, it also includes: the error correction system outputs the target answer to the question to be answered, that is, the error correction system feeds back the target answer to the question to be answered to the target object.

[0143] In this embodiment, if the statistical number is one, the revised answer is determined as the target answer to the question to be answered. The target answer is more in line with the question to be answered after screening and correction, thereby improving the accuracy of the target answer; if the statistical number is at least two, the revised answer is used as the first candidate answer, and the screening and correction steps are repeated, so as to further screen and correct the revised answer, further improving the accuracy of the target answer.

[0144] In an exemplary embodiment, the existing process of interacting with a large language model is as follows: Fig.10 As shown in the figure, the user inputs the question to be answered into the prompt word assembly module, the prompt word assembly module assembles the question to be answered and the task description to obtain the prompt word corresponding to the question to be answered, the prompt word assembly module inputs the prompt word into the large language model, and the large language model outputs the target answer to the question to be answered according to the prompt word. In this process, there are problems such as the training data of the large language model is not new enough, lack of professional knowledge, ignoring the relevant requirements of the user for the answer in the question to be answered, and the deviation between the target answer and the objective facts.

[0145] In order to solve the above problems, a Fig.11 The process of interacting with the large language model shown in the figure, during which the large language model interacts with the error correction system multiple times, the error correction system generates prompt words according to the results of the interaction with the large language model, inputs the prompt words into the large language model, the large language model generates output results according to the prompt words, and sends the output results to the error correction system, thereby improving the accuracy of the target answer to the question to be answered.

[0146] The flowchart of the error correction method is as follows Fig.12 As shown, the following steps are included:

[0147] The user inputs the question to be answered into the target system, wherein the target system includes a target large language model and an error correction system, and the error correction system includes a search module and a prompt word assembly module, wherein the search module is used to search for the associated information corresponding to the question to be answered, and the prompt word assembly module is used to interact with the target large language model and generate prompt words. The error correction system extracts key information from the question to be answered, obtains key information of the question to be answered, searches the key information through the Internet interface, and obtains the associated information corresponding to the question to be answered.

[0148] The error correction system inputs the question to be answered into the target large language model, which analyzes the question to be answered, obtains the question analysis result of the question to be answered, and sends the question analysis result to the error correction system; the error correction system inputs the question analysis result and related information into the target large language model, which analyzes the question analysis result and related information, obtains the intention analysis result of the question to be answered, and sends the intention analysis result to the error correction system. The error correction system receives the question analysis result and the intention analysis result.

[0149] The error correction system obtains a first template, which includes a first task description, a place to fill in questions to be answered, a place to fill in question analysis results, a place to fill in related information, and a first output requirement. The error correction system fills the questions to be answered, the question analysis results, and the related information into the places to fill in questions to be answered, the question analysis results, and the related information of the first template, respectively, to obtain a first prompt word, and inputs the first prompt word into the target large language model. The target large language model generates multiple first candidate answers based on the first prompt word, and sends the multiple first candidate answers to the error correction system, which receives the multiple first candidate answers to the questions to be answered.

[0150] The error correction system obtains a second template, which includes a second task description, a place to fill in questions to be answered, a place to fill in question analysis results, a place to fill in related information, a place to fill in intention analysis results, and a second output requirement. The error correction system fills the questions to be answered, the question analysis results, the related information, and the intention analysis results into the places to fill in questions to be answered, the question analysis results, the related information, and the intention analysis results of the second template, respectively, to obtain a second prompt word, and inputs the second prompt word into the target large language model. The target large language model generates a reply requirement based on the second prompt word, and sends the reply requirement to the error correction system, which receives the reply requirement corresponding to the question to be answered.

[0151] The error correction system obtains a third template, which includes a first candidate answer filling place, a third task description, a question to be answered filling place, a reply requirement filling place, a reverse task description filling place and a third output requirement. The error correction system obtains the third task description from the third template, inputs the third task description and the reply requirement into the target large language model, and the target large language model generates a reverse task description according to the third task description and the reply requirement, and sends the reverse task description to the error correction system, and the error correction system receives the reverse task description output by the target large language model. The error correction system fills the first candidate answer, the question to be answered, the reply requirement and the reverse task description into the first candidate answer filling place, the question to be answered filling place, the reply requirement filling place and the reverse task description filling place of the third template respectively, obtains the third prompt word, and inputs the third prompt word into the target large language model. The target large language model generates the error analysis results of the second candidate answer and the second candidate answer based on the third prompt word, and sends the error analysis results of the second candidate answer and the second candidate answer to the error correction system, and the error correction system receives the error analysis results of the second candidate answer and the second candidate answer sent by the target large language model.

[0152] The error correction system inputs the error analysis result and reply requirement corresponding to the second candidate answer into the target large language model. The target large language model generates a correction prompt and a correction output requirement based on the error analysis result and the reply requirement, and sends the correction prompt and the correction output requirement to the error correction system. The error correction system receives the correction prompt and the correction output requirement sent by the target large language model. The error correction system obtains a fourth template, which includes a second candidate answer filling place, an error analysis result filling place, a question to be answered filling place, a reply requirement filling place, a correction prompt filling place, and a correction output requirement filling place. The error correction system fills the second candidate answer, the error analysis result, the question to be answered, the reply requirement, the correction prompt, and the correction output requirement into the first candidate answer filling place, the question to be answered filling place, the reply requirement filling place, and the reverse task description filling place of the fourth template, respectively, to obtain the fourth prompt word, and input the fourth prompt word into the target large language model. The target large language model outputs a correction answer based on the fourth prompt word, and sends the correction answer to the error correction system. The error correction system receives the correction answer corresponding to the second candidate answer sent by the target large language model.

[0153] After receiving the corrected answers sent by the target large language model, the error correction system counts the number of corrected answers to obtain the statistical number of corrected answers. If the statistical number is one, the corrected answer is determined as the target answer to the question to be answered; if the statistical number is at least two, the corrected answer is used as the first candidate answer, and the above steps are repeated until the statistical number of corrected answers is one, and the corrected answer is determined as the target answer to the question to be answered. The target system outputs the target answer.

[0154] In the above error correction method, multiple first candidate answers to the question to be answered and the answer requirements corresponding to the question to be answered are determined. Based on the multiple first candidate answers and the answer requirements, the second candidate answer and the error analysis result of the second candidate answer are determined from the multiple first candidate answers, that is, the second candidate answer that meets the answer requirements is screened out from the multiple first candidate answers, and then the second candidate answer is corrected based on the error analysis result corresponding to the second candidate answer to obtain a corrected answer corresponding to the second candidate answer. The corrected answer obtained by screening and correction not only meets the answer requirements, but also avoids errors in the error analysis results, thereby improving the accuracy of the corrected answer. The target answer to the question to be answered is determined based on the corrected answer, thereby improving the accuracy of the target answer.

[0155] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0156] Based on the same inventive concept, the embodiment of the present application also provides an error correction device for implementing the error correction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more error correction device embodiments provided below can refer to the limitations of the error correction method above, and will not be repeated here.

[0157] In one embodiment, Fig.13 As shown, an error correction device is provided, including: an acquisition module 1302, a screening module 1304, a correction module 1306 and a determination module 1308, wherein:

[0158] An acquisition module 1302 is used to determine a plurality of first candidate answers to the question to be answered and answer requirements corresponding to the question to be answered;

[0159] A screening module 1304, configured to determine a second candidate answer from the plurality of first candidate answers based on the plurality of first candidate answers and the response requirement, and an error analysis result of the second candidate answer;

[0160] A correction module 1306, configured to correct the second candidate answer based on the error analysis result corresponding to the second candidate answer, to obtain a corrected answer corresponding to the second candidate answer;

[0161] The determination module 1308 is used to determine the target answer to the question to be answered based on the revised answer.

[0162] In one embodiment, the acquisition module 1302 is also used to: input the question to be answered into the target large language model, and receive the question analysis results and intention analysis results of the question to be answered output by the target large language model; generate a first prompt word based on the question analysis result; input the first prompt word into the target large language model, and receive multiple first candidate answers to the question to be answered output by the target large language model; generate a second prompt word based on the intention analysis result; input the second prompt word into the target large language model, and receive the answer requirement of the question to be answered output by the target large language model.

[0163] In one embodiment, the acquisition module 1302 is further used to: the first prompt word includes a first output requirement, and the first output requirement is used to instruct the target large language model to output at least two first candidate answers.

[0164] In one embodiment, the acquisition module 1302 is also used to: extract key information from the question to be answered to obtain the key information of the question to be answered; search based on the key information to obtain related information corresponding to the question to be answered; input the question to be answered into the target large language model, and receive the question analysis result and intention analysis result of the question to be answered output by the target large language model, including: inputting the question to be answered and the related information into the target large language model, the target large language model analyzing the question to be answered to obtain the question analysis result of the question to be answered, and analyzing the question analysis result and the related information to obtain the intention analysis result of the question to be answered; receiving the question analysis result and intention analysis result of the question to be answered output by the target large language model.

[0165] In one embodiment, the acquisition module 1302 is further configured to: the first prompt word includes the first task description and the problem analysis result, and also includes at least one of the question to be answered, the associated information corresponding to the question to be answered, and the first output requirement.

[0166] In one embodiment, the acquisition module 1302 is also used to: the second prompt word includes the second task description and the intention analysis result, and also includes at least one of the question to be answered, the question analysis result, the related information corresponding to the question to be answered and the second output requirement.

[0167] In one embodiment, the acquisition module 1302 is further used to: input the second prompt word into the target large language model, and receive the answer requirement of the unanswered question output by the target large language model and the answer requirement analysis chain corresponding to the answer requirement.

[0168] In one embodiment, the screening module 1304 is also used to: obtain a third task description, input the third task description and the reply requirement into the target large language model, and receive the reverse task description output by the target large language model; generate a third prompt word based on the reverse task description; input the third prompt word into the target large language model, and receive the second candidate answer output by the target large language model and the error analysis result of the second candidate answer; the number of second candidate answers is less than or equal to the number of first candidate answers.

[0169] In one embodiment, the screening module 1304 is also used for: the third prompt word includes a third task description and a reverse task description, and also includes at least one of multiple first candidate answers, questions to be answered, answer requirements and third output requirements; the reverse task description is used to instruct the target large language model to screen multiple first candidate answers.

[0170] In one embodiment, the correction module 1306 is also used to: input the error analysis results and response requirements corresponding to the second candidate answer into the target large language model, and receive the correction prompts and correction output requirements output by the target large language model; generate a fourth prompt word based on the correction prompts and correction output requirements; input the fourth prompt word into the target large language model, and receive the correction answer corresponding to the second candidate answer output by the target large language model.

[0171] In one embodiment, the correction module 1306 is also used for: the fourth prompt word includes a correction prompt and a correction output requirement, and also includes at least one of a second candidate answer, an error analysis result corresponding to the second candidate answer, a question to be answered, and an answer requirement; the correction prompt is used to indicate a correction method for the second candidate answer, and the correction output requirement is used to indicate an output format of the corrected answer.

[0172] In one embodiment, the correction module 1306 is further used to: input the fourth prompt word into the target large language model, and receive the corrected answer output by the target large language model and the corrected answer analysis chain corresponding to the corrected answer.

[0173] In one embodiment, the determination module 1308 is also used to: count the number of revised answers to obtain the statistical number of revised answers; when the statistical number is one, determine the revised answer as the target answer to the question to be answered; when the statistical number is at least two, use the revised answer as the first candidate answer, and repeatedly execute the steps of determining the second candidate answer from the multiple first candidate answers based on the multiple first candidate answers and the response requirements, as well as the error analysis results of the second candidate answer, until the statistical number of revised answers is one, and determine the revised answer as the target answer to the question to be answered.

[0174] Each module in the above error correction device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0175] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.14 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an error correction method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0176] Those skilled in the art will understand that Fig.14The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0177] The embodiment of the present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the error correction method.

[0178] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the error correction method.

[0179] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0180] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0181] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0182] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An error correction method, characterized in that: include: Determine multiple first candidate answers to the questions to be answered, and answer requirements corresponding to the questions to be answered; Based on the plurality of the first candidate answers and the response requirement, determining a second candidate answer from the plurality of the first candidate answers, and an error analysis result of the second candidate answer; Based on the error analysis result corresponding to the second candidate answer, the second candidate answer is corrected to obtain a corrected answer corresponding to the second candidate answer; Based on the revised answer, a target answer to the question to be answered is determined.

2. The method according to claim 1, characterized in that The determining of a plurality of first candidate answers to the question to be answered, and the answer requirements corresponding to the question to be answered, includes: Inputting the question to be answered into the target large language model, and receiving the question analysis result and the intention analysis result of the question to be answered output by the target large language model; Based on the problem analysis result, generating a first prompt word; Inputting the first prompt word into the target large language model, and receiving a plurality of first candidate answers to the question to be answered output by the target large language model; Based on the intention analysis result, generating a second prompt word; The second prompt word is input into the target large language model, and a response requirement for the question to be answered output by the target large language model is received.

3. The method according to claim 2, characterized in that The first prompt word includes a first output requirement, and the first output requirement is used to instruct the target large language model to output at least two first candidate answers.

4. The method according to claim 2, characterized in that: Before inputting the question to be answered into the target large language model and receiving the question analysis result and the intention analysis result of the question to be answered output by the target large language model, the method further includes: Extracting key information from the question to be answered to obtain key information of the question to be answered; Search based on the key information to obtain related information corresponding to the question to be answered; The step of inputting the question to be answered into the target large language model, and receiving the question analysis result and the intention analysis result of the question to be answered output by the target large language model, comprises: Inputting the question to be answered and the associated information into a target large language model, the target large language model analyzing the question to be answered to obtain a question analysis result of the question to be answered, and analyzing the question analysis result and the associated information to obtain an intention analysis result of the question to be answered; Receive the question analysis result and the intention analysis result of the question to be answered output by the target large language model.

5. The method according to claim 2, characterized in that: The first prompt word includes the first task description and the problem analysis result, and also includes at least one of the question to be answered, the associated information corresponding to the question to be answered, and the first output requirement.

6. The method according to claim 2, characterized in that The second prompt word includes the second task description and the intention analysis result, and also includes at least one of the question to be answered, the question analysis result, the associated information corresponding to the question to be answered, and a second output requirement.

7. The method according to claim 2, characterized in that The step of inputting the second prompt word into the target large language model and receiving a response requirement for the question to be answered output by the target large language model includes: The second prompt word is input into the target large language model, and the answer requirement of the question to be answered and the answer requirement analysis chain corresponding to the answer requirement output by the target large language model are received.

8. The method according to claim 1, characterized in that: The determining of a second candidate answer from the plurality of first candidate answers based on the plurality of first candidate answers and the response requirement, and an error analysis result of the second candidate answer, comprises: Obtaining a third task description, inputting the third task description and the response requirement into the target large language model, and receiving a reverse task description output by the target large language model; Based on the reverse task description, generating a third prompt word; The third prompt word is input into the target large language model, and the second candidate answers output by the target large language model and the error analysis results of the second candidate answers are received; the number of the second candidate answers is less than or equal to the number of the first candidate answers.

9. The method according to claim 8, characterized in that The third prompt word includes the third task description and the reverse task description, and also includes at least one of multiple first candidate answers, the questions to be answered, the answer requirements and the third output requirements; the reverse task description is used to instruct the target large language model to screen multiple first candidate answers.

10. The method according to claim 1, characterized in that The step of correcting the second candidate answer based on the error analysis result corresponding to the second candidate answer to obtain a corrected answer corresponding to the second candidate answer includes: Inputting the error analysis result corresponding to the second candidate answer and the reply requirement into the target large language model, and receiving the correction prompt and correction output requirement output by the target large language model; Based on the correction prompt and the correction output requirement, generate a fourth prompt word; The fourth prompt word is input into the target large language model, and a revised answer corresponding to the second candidate answer output by the target large language model is received.

11. The method according to claim 10, characterized in that The fourth prompt word includes the correction prompt and the correction output requirement, and also includes at least one of the second candidate answer, the error analysis result corresponding to the second candidate answer, the question to be answered, and the answer requirement; The correction prompt is used to indicate a correction method for the second candidate answer, and the correction output requirement is used to indicate an output format of the corrected answer.

12. The method according to claim 10, characterized in that The step of inputting the fourth prompt word into the target large language model and receiving a revised answer output by the target large language model includes: The fourth prompt word is input into the target large language model, and a revised answer output by the target large language model and a revised answer analysis chain corresponding to the revised answer are received.

13. The method according to claim 1, characterized in that Determining a target answer to the question to be answered based on the revised answer includes: Counting the number of the corrected answers to obtain the statistical number of the corrected answers; When the statistical number is one, determining the revised answer as the target answer to the question to be answered; When the statistical number is at least two, the revised answer is taken as the first candidate answer, and the steps of determining the second candidate answer from the multiple first candidate answers based on the multiple first candidate answers and the response requirements, as well as the error analysis results of the second candidate answer are repeatedly performed until the statistical number of revised answers is one, and the revised answer is determined as the target answer to the question to be answered.

14. An error correction device, characterized in that: include: An acquisition module, used to determine a plurality of first candidate answers to the question to be answered, and answer requirements corresponding to the question to be answered; a screening module, configured to determine a second candidate answer from the plurality of first candidate answers based on the plurality of first candidate answers and the response requirement, and an error analysis result of the second candidate answer; a correction module, configured to correct the second candidate answer based on the error analysis result corresponding to the second candidate answer, to obtain a corrected answer corresponding to the second candidate answer; A determination module is used to determine a target answer to the question to be answered based on the revised answer.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.