Answer evaluation method, fine tuning method of large language model and related equipment

Through the fine-tuning of the large language model and the answer assessment method, the problem of the single poetry answering function of traditional children's watches is solved, and rich assessment results are provided to help users correct errors and learn poetry, and improve the memory effect.

CN118568218APending Publication Date: 2024-08-30SHENZHEN QIHOO INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410611082.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

When traditional children's watches provide poetry answering functions, they have a single function. They only randomly select the first or second half of a poem based on a preset poetry knowledge base, which limits the practical application of the voice function.

Method used

Through the fine-tuning of the large language model and the answer evaluation method, it receives the starting instructions, determines the target verse, obtains the question information of the second sub-verse based on the first sub-verse, outputs the question information, receives the user's answer, and evaluates the accuracy and relevance of the answer information. Analyze content, including pronunciation, text, source, author, and background information.

Benefits of technology

Outputting information-rich assessment results can not only correct the user's answers, but also supplement the background knowledge of the poem, helping users consolidate their memory and improve learning effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568218A
    Figure CN118568218A
Patent Text Reader

Abstract

The embodiment of the invention discloses an answer evaluation method, a fine tuning method of a large language model and related equipment, and relates to the field of natural language processing. The answer evaluation method comprises the steps that a starting instruction is received, a target poem sentence is determined from multiple pairs of candidate poem sentences, question information used for indicating a user to answer a second sub-poem sentence corresponding to a first sub-poem sentence is acquired, and the target poem sentence is composed of the first sub-poem sentence and the second sub-poem sentence to form output question information, receiving answer information input by the user according to the question information; the answer information is evaluated according to the large language model, an evaluation result is output, and the evaluation result comprises evaluation content related to the answer information and analysis content related to the target poem. According to the method, the evaluation result with rich information is output according to the answer of the user to the poem, error correction can be carried out on the user, background knowledge and other information related to the poem can be supplemented to the user, the memory of the user to the poem is effectively consolidated, and the user is helped to learn the poem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing, and in particular to an answer assessment method, a large language model fine-tuning method and related equipment. Background Art

[0002] Traditional children's watches also have the function of intelligent voice question and answer, and support the function of waking up the watch by voice. For example, traditional children's watches also include functions such as making calls, setting alarms, opening applications, playing music stories, etc., and can also conduct basic simple encyclopedia knowledge questions and answers to children's doubts in life. For example, children's watches provide a poetry answering function for primary school children. By asking children the first half or the second half of a poem, prompting children to answer the second half or the first half of the poem, the children's memory is consolidated.

[0003] However, the traditional children's watches have great limitations in providing children with the poetry answering function. The watch usually only randomly extracts the first half or the second half of a poem based on the pre-set poem knowledge base and asks the child questions. The single function limits the effectiveness of the voice function of children's watches in practical applications. Summary of the invention

[0004] The embodiment of the present application provides a method for answer assessment, a method for fine-tuning a large language model, and related devices, which can solve the above problems. The technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for evaluating an answer, the method comprising:

[0006] receiving a start instruction, determining a target sentence from a plurality of candidate pairs of sentences, and obtaining question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, wherein the target sentence is composed of the first sub-sentence and the second sub-sentence;

[0007] Outputting the question information, and receiving answer information input by the user according to the question information;

[0008] The answer information is evaluated according to the large language model, and an evaluation result is output, wherein the evaluation result includes evaluation content related to the answer information and evaluation content related to the target poem.

[0009] In a second aspect, an embodiment of the present application provides a method for fine-tuning a large language model, wherein the large language model is applicable to the answer assessment method as described in the first aspect, and the method for fine-tuning the large language model includes:

[0010] According to question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, a plurality of answer information corresponding to the question information is obtained, wherein the first sub-sentence and the second sub-sentence constitute a sample sentence, and the matching degrees between the plurality of answer information and the second sub-sentence are all different;

[0011] Determine, according to the plurality of answer information, sample evaluation results respectively corresponding to the plurality of answer information;

[0012] The multiple answer information are respectively input into the large language model to be trained for evaluation, and multiple training evaluation results are output. The large language model to be trained is trained according to the multiple training evaluation results and the multiple sample evaluation results until convergence, so as to obtain the large language model.

[0013] In a third aspect, an embodiment of the present application provides an answer assessment device, the device comprising:

[0014] A first receiving module is used to receive a start instruction, determine a target sentence from multiple candidate pairs of sentences, and obtain question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, wherein the target sentence is composed of the first sub-sentence and the second sub-sentence;

[0015] A second receiving module, used for outputting the question information and receiving answer information input by the user according to the question information;

[0016] The first evaluation module is used to evaluate the answer information according to the large language model and output an evaluation result, wherein the evaluation result includes evaluation content related to the answer information and evaluation content related to the target poem.

[0017] In a fourth aspect, an embodiment of the present application provides a fine-tuning device for a large language model, wherein the large language model is applicable to the answer assessment method as described in the first aspect, and the device comprises:

[0018] A first acquisition module is used to acquire a plurality of answer information corresponding to the question information according to question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, wherein the first sub-sentence and the second sub-sentence constitute a sample sentence, and the matching degrees between the plurality of answer information and the second sub-sentence are all different;

[0019] A second acquisition module is used to determine the sample evaluation results corresponding to the plurality of answer information respectively according to the plurality of answer information;

[0020] The first training module is used to input the multiple answer information into the large language model to be trained for evaluation, output multiple training evaluation results, train the large language model to be trained according to the multiple training evaluation results and the multiple sample evaluation results until convergence, and obtain the large language model.

[0021] In a fifth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0022] In a sixth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0023] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0024] In an embodiment of the present application, in response to a start instruction for starting the answer evaluation function, a target verse consisting of a first sub-verse and a second sub-verse is determined in multiple pairs of candidate verses, and question information for instructing the user to answer the second sub-verse corresponding to the first sub-verse is obtained according to the target verse, for example, the first sub-verse is the first half of the target verse, and the second sub-verse is the second half of the target verse. The question information is output by voice or the like, and the answer information input by the user according to the question information is received. Further, the answer information is evaluated by a large language model, and the output includes evaluation content related to the answer information and analysis content related to the target verse. The evaluation content related to the answer information represents whether the pronunciation, text, etc. of the second sub-verse in the answer information is correct, and the analysis content related to the target verse represents the source, author, background, interpretation, etc. of the target verse. In other words, the present application outputs an information-rich evaluation result for the user's answer to the verse, which can not only correct the user's error, but also supplement the user with background knowledge and other information related to the verse, effectively consolidate the user's memory of the verse, and help the user learn the verse. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] 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 any creative work.

[0026] Figure 1 This is a schematic diagram of a scenario for outputting question information provided by an embodiment of the present application;

[0027] Figure 2 It is a flowchart of an answer evaluation method provided in an embodiment of the present application;

[0028] Figure 3 It is a flowchart of an answer evaluation method provided in an embodiment of the present application;

[0029] Figure 4 It is a flowchart of an answer evaluation method provided in an embodiment of the present application;

[0030] Figure 5 It is a flowchart of a large language model performing an assessment task provided by an embodiment of the present application;

[0031] Figure 6 It is a flowchart of a method for fine-tuning a large language model provided in an embodiment of the present application;

[0032] Figure 7 It is a structural schematic diagram of an answer evaluation device provided in an embodiment of the present application;

[0033] Figure 8 It is a structural schematic diagram of a large language model training device provided in an embodiment of the present application;

[0034] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0036] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0037] The present application is described in detail below with reference to specific embodiments.

[0038] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the object features, interactive behavior features and user information involved in this specification are all obtained with full authorization.

[0039] Traditional children's watches also have the function of intelligent voice question and answer, and support the function of waking up the watch by voice. For example, traditional children's watches also include functions such as making calls, setting alarms, opening applications, playing music stories, etc., and can also conduct basic simple encyclopedia knowledge questions and answers to children's doubts in life. For example, children's watches provide a poetry answering function for primary school children. By asking children the first half or the second half of a poem, prompting children to answer the second half or the first half of the poem, the children's memory is consolidated.

[0040] like Figure 1 As shown, Figure 1 This is a schematic diagram of a scenario for outputting question information provided by an embodiment of the present application. Figure 1The watch 101 shown is preferably a wearable watch for children. The watch 101 receives a start command through a voice control device. A voice command is a command given to a terminal device (such as a Figure 1 The terminal device 101 is a command or instruction issued by the terminal device, and the language instruction is used to instruct the terminal device to output question information to the child based on the poem answering function. For example, the content of the question information is "Children, do you know the next sentence of 'The moon shines brightly before the bed'", so as to prompt the child as a user to recall the next sentence corresponding to the poem.

[0041] However, the traditional children's watches have great limitations in providing children with the poetry answering function. The watch usually only randomly extracts the first half or the second half of a poem based on the pre-set poem knowledge base and asks the child questions. The single function limits the effectiveness of the voice function of children's watches in practical applications.

[0042] Therefore, in view of the above problems, the present application proposes a method for answering and evaluating the answer. Figure 2 As shown, it is a flow chart of a method for evaluating an answer proposed in an embodiment of the present application, which can be implemented by a computer program and can be run on an answer evaluation device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.

[0043] Specifically, the answer assessment method includes:

[0044] S101, receiving a start instruction, determining a target sentence from multiple candidate pairs of sentences, and obtaining question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence.

[0045] The execution subject of the embodiment of the present application is a terminal device, which is an electronic device used by a user. The electronic device can be a personal computer, a mobile phone, a tablet computer, etc., which has a certain computing power and runs an application or web page with a prompt word generation function. It can also be a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. It can be understood that the number and type of the above-mentioned terminal devices are only for illustration, and the embodiment of the present application does not impose any restrictions on this.

[0046] The target verse is composed of a first sub-verse and a second sub-verse. The first sub-verse can be the first sentence of the target verse, and the second sub-verse is the second sentence of the target verse. For example, the first sub-verse is "the moonlight shines on the bed", and the second sub-verse is "it seems like frost on the ground". The first sub-verse can also be the second sentence of the target verse, and the second sub-verse is the second sentence of the target verse, for example, the first sub-verse is "it seems like frost on the ground", and the second sub-verse is "the moonlight shines on the bed". In another embodiment, the target verse can also be a verse composed of other types of language forms, such as any language form such as English, Chinese, German, Japanese, etc.

[0047] A start instruction is received, and any one of the candidate pairs of verses is determined as a target verse, and the sentence before or after the target verse is determined as the first sub-verse. The candidate pairs of verses can come from any public verse database or other database, and the embodiment of the present application does not impose any limitation on this.

[0048] like Figure 3 As shown, Figure 3 2 is a flowchart of an answer evaluation method provided in an embodiment of the present application. The candidate pairs of verses provided in this embodiment at least include verse 2011, verse 2012 and verse 2013. According to the start instruction, the target verse is determined in the candidate pairs of verses. Figure 3 In the illustrated embodiment, the target verse is verse 2012, the first sub-verse 20121 is "Bright moonlight shines before the bed", and the second sub-verse 20122 is "Looks like frost on the ground".

[0049] Further, question information is obtained according to the first sub-sentence, and the question information is used to instruct the user to answer the question information of the second sub-sentence corresponding to the first sub-sentence. For example, the question information including the first sub-sentence is generated through a question template. The question template can be understood as a preset, predefined, reusable text structure or framework, which contains some placeholders or variable parts, which will be replaced by the first sub-sentence when generating the question information. Figure 3 As shown, the content of the question information 202 is "Do you know the next line of 'The moon shines brightly before the bed'?"

[0050] The main purpose of the prompt text template is to improve the efficiency of initial prompt text generation, ensure that the generated question information has a certain structure and standardization, and reduce repetitive work.

[0051] S102: Output question information, and receive answer information input by the user according to the question information.

[0052] In this embodiment, question information is output through voice, and voice data of the user is received as answer information. When a voice command is received, the voice text corresponding to the voice data is determined according to the voice-to-text rule, and this voice text is used as the answer information. A text can be understood as a text segment capable of expressing meaning composed of natural language in Chinese or non-Chinese, including any text volume such as sentences, paragraphs, articles, etc., and any language form such as English, Chinese, German, Japanese, etc., and the text includes any information that those skilled in the art need to extract, such as characters, semantics, positions of characters, punctuation, frequencies of repeated words, etc. For example, for the voice data emitted by a child, the text content of the answer information is determined to be "suspected frost on the ground".

[0053] S103. Evaluate the answer information according to the large language model and output an evaluation result.

[0054] The evaluation result includes evaluation content related to the answer information and analysis content related to the target poem sentence. The evaluation content related to the answer information represents whether the pronunciation, text, etc. of the second sub-poem sentence in the answer information are correct. For example, the evaluation content includes that the pronunciation of "sì" in "suspected frost on the ground" in the answer information is incorrect, or the evaluation content is that the user has a memory error and wrongly remembers "I wonder if it's frost on the ground" as "suspected frost on the ground". The analysis content related to the target poem sentence represents the author, background, interpretation, etc. of the target poem sentence. The author of the target poem sentence refers to the poet or writer who created the poem sentence, the background of the target poem sentence refers to the era background, social background, cultural background, etc. of the poem creation, and the interpretation of the target poem sentence refers to the explanation and elaboration of the meaning of the poem sentence, including the literal meaning, deep meaning, symbolic meaning, etc. of the poem sentence. For example, for the Figure 3 shown target poem sentence, the analysis content related to the target poem sentence includes "The author of this poem is Li Bai, expressing the feeling of missing his hometown".

[0055] Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between humans and computers in natural language. Natural Language Processing is a science integrating linguistics, computer science, and mathematics. Therefore, the research in this field will involve natural language, that is, the language people use in daily life, so it has a close connection with the research of linguistics. Natural Language Processing technologies usually include text processing, semantic understanding, machine translation, robot question answering, knowledge graph, and other technologies.

[0056] As large language models (Chat Generative Pre-trained Transforme, chatGPT) are becoming more and more popular on social media, large models with huge parameter counts are gaining more and more attention, and larger models usually have better performance. For example, the GPT-3 model has 175 billion parameters, while the GPT-4 model has an even larger parameter scale. These models are applied in the field of natural language processing (NLP), can understand and generate human language, and perform well in tasks such as text translation, question-answering systems, and language generation.

[0057] In this application, the answer information as the question text is input into the large language model in the form of a question, so as to obtain the dialogue result corresponding to the answer information as the evaluation result. Figure 3 As shown, the answer information 203 is input into the large language model, and the answer information 203 includes the task attribute text and the answer text. Specifically, the content of the task attribute information is "Please judge whether 'suspected frost on the ground' is the next sentence of 'bright moonlight in front of the bed', and output the analysis of the above poem", and "suspected frost on the ground" is the answer text of the answer information 203. The large language model performs the evaluation task corresponding to the task attribute information on the answer information, and obtains the evaluation result 204 as the answer, and the evaluation result 204 includes the evaluation content related to the answer information and the analysis content related to the target poem.

[0058] The large language model may include a convolutional neural network (CNN), a recurrent neural network (RNN), or a Transformer network based on the attention mechanism and a classification layer, wherein CNN, RNN, and Transformer are used to semantically encode the input prompt words, and the classification layer is used to map the label dimension of the encoding vector. For another example, the large language model may be a BERT pre-trained model. The BERT (Bidirectional Encoder Representation from Transformers) pre-trained model is a model that recalls at least one dialogue result corresponding to the prompt word by running a self-supervised learning method based on a massive corpus. Self-supervised learning refers to supervised learning that is run on data that is not manually labeled. For another example, the natural language dialogue model is a Chat Generative Pre-trained Transformer (chatGPT) or a causal language model (CLM, Causal Language Model).

[0059] In one embodiment, the large language model used in the embodiment of the present application is a ChatGLM model. The ChatGLM model is a pre-trained model that combines bidirectional and unidirectional attention. The ChatGLM model not only solves the problem that unidirectional attention models such as GPT cannot utilize contextual information, but also overcomes the defects of bidirectional attention models such as BERT in generating tasks. The ChatGLM model is loaded through the AutoModel.from_pretrained function of the transformer library preset by Hugging Face, where the trust_remote_code parameter is set to True, thereby using the ChatGLM model with custom code. The word segmenter of the ChatGLM model is loaded using the AutoTokenizer.from_pretrained of the transformer library, and the vocabulary is obtained through the get_vocab function, and the vocabulary size is 130344.

[0060] It is understandable that the large language model of the embodiment of the present application is not limited to the above-mentioned model, and other natural language dialogue models that can perform dialogue tasks are applicable.

[0061] In one embodiment, the degree of match between the answer information and the second sub-sentence is obtained to determine whether the degree of match meets a preset condition; when the degree of match meets the preset condition, the target sentence is removed from the candidate multiple pairs of sentences. The preset condition may be that the degree of match between the answer information and the second sub-sentence is greater than a preset threshold, for example, the answer information includes the correct second sub-sentence. Figure 3 As shown, when the answer information includes "I suspect it is frost on the ground", it is determined that the answer information matches the second sub-verse, and the matching degree meets the preset condition. The target verse is removed from the candidate multiple pairs of verses, so that the target verse cannot be obtained from the candidate multiple pairs of verses according to the start instruction next time, avoiding selecting the target verse again and outputting the question information to the user.

[0062] In other words, this embodiment removes the verses to which the user has answered correctly from the multiple candidate verses, and will no longer ask the user the target verses to which the user has answered correctly in the previous rounds in the second or subsequent rounds of questions, so as to avoid causing trouble to the user by asking meaningless questions and to avoid making the user feel bored.

[0063] In another embodiment, when the degree of matching does not meet a preset condition, the probability of determining the target sentence in the candidate multiple pairs of sentences is increased. The preset condition may be that the degree of matching between the answer information and the second sub-sentence is greater than a preset threshold, for example, the answer information includes the second sub-sentence. Figure 3As shown, when the answer information does not include "I suspect it is frost on the ground", it is determined that the answer information does not match the second sub-verse, and the degree of matching does not meet the preset condition. The probability of determining the target verse in the candidate multiple pairs of verses is increased, so that the target verse is more likely to be obtained in the candidate multiple pairs of verses according to the start instruction next time, so that the target verse is selected again and the question information is output to the user.

[0064] In other words, this embodiment increases the probability of determining the verses to which the user has answered incorrectly from multiple candidate verses, and asks the user again or multiple times in the second or subsequent rounds of questions about the target verses to which the user has answered incorrectly in the previous rounds, thereby increasing the user's memory of the verses that were answered incorrectly or misremembered, and effectively consolidating the user's memory of the verses.

[0065] In an embodiment of the present application, in response to a start instruction for starting the answer evaluation function, a target verse consisting of a first sub-verse and a second sub-verse is determined in multiple pairs of candidate verses, and question information for instructing the user to answer the second sub-verse corresponding to the first sub-verse is obtained according to the target verse, for example, the first sub-verse is the first half of the target verse, and the second sub-verse is the second half of the target verse. The question information is output by voice or the like, and the answer information input by the user according to the question information is received. Further, the answer information is evaluated by a large language model, and the output includes evaluation content related to the answer information and analysis content related to the target verse. The evaluation content related to the answer information represents whether the pronunciation, text, etc. of the second sub-verse in the answer information is correct, and the analysis content related to the target verse represents the source, author, background, interpretation, etc. of the target verse. In other words, the present application outputs an information-rich evaluation result for the user's answer to the verse, which can not only correct the user's error, but also supplement the user with background knowledge and other information related to the verse, effectively consolidate the user's memory of the verse, and help the user learn the verse.

[0066] In one embodiment, Figure 4 As shown, it is a flow chart of a method for evaluating an answer proposed in an embodiment of the present application, which can be implemented by a computer program and can be run on an answer evaluation device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.

[0067] Specifically, the answer assessment method includes:

[0068] S201, receiving a start instruction, determining a target sentence from multiple candidate pairs of sentences, and obtaining question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence.

[0069] See the above S101, which will not be repeated here.

[0070] S202: Output question information, and receive answer information input by the user according to the question information.

[0071] See the above S102, which will not be described again here.

[0072] S203: Generate a prompt text corresponding to the answer information according to the matching degree between the answer information and the second sub-verse.

[0073] The prompt text includes the answer information and is related to the matching degree between the second sub-sentence. The matching degree between the answer information and the second sub-sentence can be understood as whether the answer information includes a completely correct second sub-sentence, or represents the matching degree between the answer text output by the user in the answer information and the second sub-sentence. For example, the matching degree between the answer information including "suspected frost on the ground" and the second sub-sentence "suspected frost on the ground" is 80%.

[0074] like Figure 5 As shown, Figure 5 3011 is a flowchart of a large language model performing an assessment task provided by an embodiment of the present application. The prompt text 301 includes a task attribute text 3011 and answer information 3012. Specifically, the content of the task attribute information 3011 is "Judge <object2>Is it <object1>verses, and output verses <object3>The content of the answer information 3012 is "object2". The large language model 302 performs the evaluation task corresponding to the task attribute information 3011 on the answer information 3012, and obtains the evaluation result 303 corresponding to the answer information 3012 as the answer result.

[0075] The evaluation results include evaluation content and analysis content related to the matching degree. In this embodiment, if the matching degree between the answer information and the second sub-verse is different, the task attribute information in the prompt information is different.

[0076] When the matching degree between the answer information and the second sub-verse is high or meets the preset conditions, the task attribute information in the prompt information tends to instruct the large language model 302 to output content that encourages the user, so that the evaluation result obtained based on the prompt information includes evaluation content that encourages the user, and the analysis content for the target verse is shorter. For example, the content of the evaluation result is "Correct answer, great! The author of this poem is Li Bai, expressing the feeling of missing his hometown."

[0077] When the matching degree between the answer information and the second sub-verse is low or does not meet the preset conditions, the task attribute information in the prompt information tends to instruct the large language model 302 to output content that helps the user remember the verse, so that the evaluation result obtained based on the prompt information includes evaluation content that prompts the user that the answer is wrong, and the analysis content for the target verse is more complicated. For example, the content of the evaluation result is "No, the answer is 'I suspect it is frost on the ground'. Children, think about it, why is the next sentence of 'The moonlight in front of the bed' 'I suspect it is frost on the ground'? What kind of feelings does the author express?"

[0078] In this embodiment, the evaluation results include evaluation content and analysis content that are related to the matching degree. The evaluation results are more consistent with the answer information input by the user and can better help the user to memorize the poem.

[0079] In one embodiment, based on the degree of matching between the answer information and the second sub-verse, a prompt text template and a prompt enhancement strategy corresponding to the degree of matching are obtained; an initial prompt text corresponding to the answer information is generated based on the prompt text template, and the initial prompt text is prompt enhanced based on the prompt enhancement strategy and the target verse to obtain a prompt text corresponding to the answer information.

[0080] Prompt enhancement processing can be understood as a processing method aimed at building a more robust prompt text, so as to enhance the ability of the large language model to resist the injection of attack instructions into the prompt text, and to improve the large language model's ability to understand the prompt text. Prompt enhancement processing uses the large language model's own understanding ability to "self-enhance", adding emphasis on task attribute information and writing topics to the prompt text to form a more accurate prompt for the prompt text, helping the large language model to better understand the prompt text, and obtaining evaluation results related to the degree of match between the answer information and the second sub-verse.

[0081] In one embodiment, the prompt text is obtained by performing prompt enhancement processing on the initial prompt text, including: performing at least one prompt enhancement processing related to semantic enhancement on the initial prompt text, and / or performing at least one prompt enhancement processing related to structural enhancement, to obtain the prompt text corresponding to the answer information. In other words, in the present application, the prompt enhancement processing includes the prompt enhancement processing related to semantic enhancement and / or the prompt enhancement processing related to structural enhancement.

[0082] Specifically, the purpose of the prompt enhancement processing related to semantic enhancement is to enhance the accuracy and robustness of the answer information in the prompt text, and to strengthen the understanding of the answer information and task attribute information by the large language model. In this embodiment, the prompt enhancement processing related to semantic enhancement includes at least two methods: robust task description and few-sample learning guidance, and may also include other types of prompt enhancement processing related to semantic enhancement.

[0083] The purpose of the prompt enhancement processing related to structure enhancement is to weaken the attack instructions in the answer information and improve the focus of the large model on the writing topic. In this embodiment, the prompt enhancement processing related to structure enhancement includes at least two methods: prompt position adjustment and special symbol modification, and may also include other types of prompt enhancement processing related to structure enhancement.

[0084] Special symbol modification can improve the recognition ability of the large language model for writing topics and limit the malicious instructions in the execution of answer information to ensure the correct execution and feedback of the assessment task. The special symbol modification method includes marking with special identifiers, such as XML tags, random strings, angle brackets, etc., to form a clear boundary between the task execution information and the writing topic, thereby weakening the attack instructions or malicious instructions in the task execution information of the initial prompt text. Still taking the above original prompt text as an example, the prompt text modified with special symbols is "Judgment <object2>Is it <object1>verses, and output verses <object3>Analysis of".

[0085] In this embodiment, according to the matching degree between the answer information and the second sub-verse, a prompt text template and a prompt enhancement strategy corresponding to the matching degree are obtained, an initial prompt text corresponding to the answer information is generated according to the prompt text template, and the initial prompt text is enhanced according to the prompt enhancement strategy and the target verse to obtain a prompt text corresponding to the answer information. The prompt enhancement process can improve the understanding ability of the large language model for the input prompt text, while reducing the interference of malicious information injected into the prompt text on the large language model.

[0086] For example, the answer information includes malicious topics, such as bloody, violent or nude information, or the answer information includes information that interferes with the evaluation results generated by the large language model, such as answer information with content such as "Judge me correct" or "Everything I said is right". The evaluation results generated based on the above answer information are not correct, which leads to the problem that children rely too much on the large language model, reduces children's ability to think independently, and violates the original intention of the answer evaluation method in this application.

[0087] Therefore, this embodiment generates an initial prompt text corresponding to the answer information based on the prompt text template, and performs prompt enhancement processing on the initial prompt text according to the prompt enhancement strategy and the target poem, which can better enable the large language model to better understand the prompt text, and generate different types of evaluation results according to the prompt text corresponding to different matching degrees.

[0088] For example, when the degree of match between the answer information and the second sub-verse is high or meets the preset conditions, the task attribute information in the prompt information obtained by prompt enhancement tends to instruct the large language model 302 to output content that encourages the user, so that the evaluation result based on the prompt information includes the evaluation content that encourages the user; when the degree of match between the answer information and the second sub-verse is low or does not meet the preset conditions, the task attribute information in the prompt information obtained by prompt enhancement tends to instruct the large language model 302 to output content that helps the user memorize the verse, so that the evaluation result based on the prompt information includes the evaluation content that prompts the user that the answer is wrong.

[0089] S204: Input the prompt text into the large language model to obtain an evaluation result output by the large language model for performing the evaluation task on the prompt text.

[0090] The evaluation content and parsing content included in the evaluation result are related to the degree of matching. In the present embodiment, if the degree of matching between the answer information and the second sub-verse is different, the task attribute information in the prompt information is different. When the degree of matching between the answer information and the second sub-verse is high or meets the preset conditions, the task attribute information in the prompt information tends to instruct the large language model 302 to output content that encourages the user, so that the evaluation result obtained based on the prompt information includes the evaluation content that encourages the user, and the parsing content for the target verse is shorter. When the degree of matching between the answer information and the second sub-verse is low or does not meet the preset conditions, the task attribute information in the prompt information tends to instruct the large language model 302 to output content that helps the user remember the verse, so that the evaluation result obtained based on the prompt information includes the evaluation content that prompts the user that the answer is wrong, and the parsing content for the target verse is more complex.

[0091] In this embodiment, the evaluation results include evaluation content and analysis content that are related to the matching degree. The evaluation results are more consistent with the answer information input by the user and can better help the user to memorize the poem.

[0092] In one embodiment, according to the analysis content related to the target poem in the evaluation result, the follow-up information related to the analysis content is output, and the analysis content includes at least one of the following contents: the source, author, background, and interpretation of the target poem.

[0093] The analysis content related to the target poem represents the author, background, interpretation, etc. of the target poem. The author of the target poem refers to the poet or writer who created the poem, the background of the target poem refers to the era background, social background, cultural background, etc. of the poem creation, and the interpretation of the target poem refers to the explanation and elaboration of the meaning of the poem, including the literal meaning, deep meaning, symbolic meaning, etc. Figure 3 The target poem shown has the following analysis content related to the target poem: "The author of this poem is Li Bai, who expresses his longing for his hometown". Further, questions related to the analysis content are asked based on the analysis content. In other words, the questioning information related to the analysis content is output through voice to further inspire children to think.

[0094] like Figure 1 As shown, the watch 101 outputs the evaluation result through the voice control device, and the evaluation result includes the analysis content related to the target poem. For example, the evaluation result is "Correct answer, great! The author of this poem is Li Bai, expressing the longing for his hometown." Furthermore, this embodiment can also output follow-up information related to the analysis content through voice. For example, based on the above analysis content, the watch 101 continues to ask "Children, do you know the poet Li Bai?", thereby inspiring children to think.

[0095] In an embodiment of the present application, in response to a start instruction for starting the answer evaluation function, a target verse consisting of a first sub-verse and a second sub-verse is determined in multiple pairs of candidate verses, and question information for instructing the user to answer the second sub-verse corresponding to the first sub-verse is obtained according to the target verse, for example, the first sub-verse is the first half of the target verse, and the second sub-verse is the second half of the target verse. The question information is output by voice or the like, and the answer information input by the user according to the question information is received. Further, the answer information is evaluated by a large language model, and the output includes evaluation content related to the answer information and analysis content related to the target verse. The evaluation content related to the answer information represents whether the pronunciation, text, etc. of the second sub-verse in the answer information is correct, and the analysis content related to the target verse represents the source, author, background, interpretation, etc. of the target verse. In other words, the present application outputs an information-rich evaluation result for the user's answer to the verse, which can not only correct the user's error, but also supplement the user with background knowledge and other information related to the verse, effectively consolidate the user's memory of the verse, and help the user learn the verse.

[0096] In one embodiment, Figure 6 As shown, it is a flow chart of a fine-tuning method for a large language model proposed in an embodiment of the present application, which can be implemented by a computer program and can be run on a fine-tuning device for a large language model based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.

[0097] Specifically, the fine-tuning method of the large language model includes:

[0098] S301. Acquire multiple pieces of answer information corresponding to the question information according to question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence.

[0099] See S101 and S102 above, which will not be repeated here. The first sub-sentence and the second sub-sentence constitute a sample verse, and the matching degree between the plurality of answer information and the second sub-sentence is different. For example, for the question information "Do you know the next sentence of 'The moon shines on the bed'", one answer information is "I suspect it is frost on the ground", and the other answer information is "I suspect it is frost on the ground".

[0100] S302. Determine sample evaluation results corresponding to the multiple answer information respectively according to the multiple answer information.

[0101] Multiple answer information correspond to different sample evaluation results. When the matching degree between the answer information and the second sub-verse is high or meets the preset conditions, the task attribute information in the prompt information tends to instruct the large language model to be trained to output content that encourages users, so that the evaluation result obtained based on the prompt information includes evaluation content that encourages users, and the analysis content for the target verse is shorter. For example, for the answer information "I suspect it is frost on the ground", the content of the sample evaluation result is "Correct answer, great! The author of this poem is Li Bai, expressing the longing for his hometown."

[0102] When the matching degree between the answer information and the second sub-verse is low or does not meet the preset conditions, the task attribute information in the prompt information tends to instruct the large language model to be trained to output content that helps users remember the verse, so that the evaluation result based on the prompt information includes evaluation content that prompts the user that the answer is wrong, and the analysis content for the target verse is more complex. For example, for another answer information of "suspected frost on the ground", the content of the sample evaluation result is "No, the answer is 'suspected frost on the ground'. Children, think about it, why is the next sentence of 'the moonlight in front of the bed' suspected to be frost on the ground'? What kind of feelings does the author express?"

[0103] S303, respectively inputting the multiple answer information into the large language model to be trained for evaluation, outputting multiple training evaluation results, training the large language model to be trained according to the multiple training evaluation results and the multiple sample evaluation results until convergence, and obtaining the large language model.

[0104] The large language model to be trained is trained according to the multiple training evaluation results and the multiple sample evaluation results until convergence to obtain a large language model, which is used to perform Figure 1-Figure 5 Assessment tasks shown.

[0105] In one embodiment, the large language model to be trained is trained to convergence by using a cross entropy loss function and an autoregressive calculation method to obtain a large language model. After obtaining multiple training evaluation results and multiple sample evaluation results, the large language model to be trained is adjusted to convergence by using a cross entropy loss function and an autoregressive calculation method according to multiple training evaluation results and multiple sample evaluation results and other multiple training evaluation results and multiple sample evaluation results. Cross entropy can measure the degree of difference between two different probability distributions in a random variable, which is expressed as the difference between the true probability distribution and the predicted probability distribution in this embodiment. The smaller the value of the cross entropy loss function, the better the effect of the large language model in generating writing prompt information. Autoregressive calculation is a statistical calculation method for processing time series.

[0106] In this embodiment, the large language model to be trained is adjusted by using a cross entropy loss function and an autoregressive calculation method, so that the effect of training the large language model to perform the assessment task can be improved.

[0107] In an embodiment of the present application, in response to a start instruction for starting the answer evaluation function, a target verse consisting of a first sub-verse and a second sub-verse is determined in multiple pairs of candidate verses, and question information for instructing the user to answer the second sub-verse corresponding to the first sub-verse is obtained according to the target verse, for example, the first sub-verse is the first half of the target verse, and the second sub-verse is the second half of the target verse. The question information is output by voice or the like, and the answer information input by the user according to the question information is received. Further, the answer information is evaluated by a large language model, and the output includes evaluation content related to the answer information and analysis content related to the target verse. The evaluation content related to the answer information represents whether the pronunciation, text, etc. of the second sub-verse in the answer information is correct, and the analysis content related to the target verse represents the source, author, background, interpretation, etc. of the target verse. In other words, the present application outputs an information-rich evaluation result for the user's answer to the verse, which can not only correct the user's error, but also supplement the user with background knowledge and other information related to the verse, effectively consolidate the user's memory of the verse, and help the user learn the verse.

[0108] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0109] See also Figure 7 , which shows a schematic diagram of the structure of an answer evaluation device provided by an exemplary embodiment of the present application. The answer evaluation device can be implemented as all or part of the device through software, hardware or a combination of both. The answer evaluation device includes a first receiving module 401, a second receiving module 402 and a first evaluation module 403.

[0110] The first receiving module 401 receives a start instruction, determines a target sentence from multiple candidate pairs of sentences, and obtains question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, wherein the target sentence is composed of the first sub-sentence and the second sub-sentence;

[0111] The second receiving module 402 is used to output the question information and receive answer information input by the user according to the question information;

[0112] The first evaluation module 403 is used to evaluate the answer information according to the large language model and output an evaluation result, wherein the evaluation result includes evaluation content related to the answer information and evaluation content related to the target poem.

[0113] In one or more embodiments, the answer assessment device further comprises:

[0114] A third receiving module, configured to generate a prompt text corresponding to the answer information according to a matching degree between the answer information and the second sub-verse;

[0115] The first assessment module 403 includes:

[0116] The first evaluation unit is used to input the prompt text into the large language model to obtain the evaluation result output by the large language model for performing the evaluation task on the prompt text, wherein the evaluation result includes evaluation content and analysis content related to the matching degree.

[0117] In one or more embodiments, the third receiving module includes:

[0118] A first receiving unit is used to obtain a prompt text template and a prompt enhancement strategy corresponding to the matching degree between the answer information and the second sub-verse according to the matching degree between the answer information and the second sub-verse;

[0119] The second receiving unit is used to generate an initial prompt text corresponding to the answer information according to the prompt text template, and to perform prompt enhancement processing on the initial prompt text according to the prompt enhancement strategy and the target poem to obtain the prompt text corresponding to the answer information.

[0120] In one or more embodiments, the answer assessment device further includes:

[0121] A first judgment module is used to obtain the matching degree between the answer information and the second sub-verse, and judge whether the matching degree meets a preset condition;

[0122] The second judgment module is used to remove the target poem from the multiple candidate pairs of poems when the matching degree meets the preset condition.

[0123] In one or more embodiments, the answer assessment device further includes:

[0124] The first questioning module is used to output questioning information related to the analysis content related to the target poem in the evaluation result, and the analysis content includes at least one of the following contents: the author, background, and interpretation of the target poem.

[0125] In an embodiment of the present application, in response to a start instruction for starting the answer evaluation function, a target verse consisting of a first sub-verse and a second sub-verse is determined in multiple pairs of candidate verses, and question information for instructing the user to answer the second sub-verse corresponding to the first sub-verse is obtained according to the target verse, for example, the first sub-verse is the first half of the target verse, and the second sub-verse is the second half of the target verse. The question information is output by voice or the like, and the answer information input by the user according to the question information is received. Further, the answer information is evaluated by a large language model, and the output includes evaluation content related to the answer information and analysis content related to the target verse. The evaluation content related to the answer information represents whether the pronunciation, text, etc. of the second sub-verse in the answer information is correct, and the analysis content related to the target verse represents the source, author, background, interpretation, etc. of the target verse. In other words, the present application outputs an information-rich evaluation result for the user's answer to the verse, which can not only correct the user's error, but also supplement the user with background knowledge and other information related to the verse, effectively consolidate the user's memory of the verse, and help the user learn the verse.

[0126] It should be noted that the answer assessment device provided in the above embodiment only uses the division of the above functional modules as an example when executing the answer assessment method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the answer assessment device provided in the above embodiment and the answer assessment method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0127] See also Figure 8 , which shows a schematic diagram of the structure of a fine-tuning device for a large language model provided by an exemplary embodiment of the present application. The fine-tuning device for a large language model can be implemented as all or part of a device through software, hardware, or a combination of both. The fine-tuning device for a large language model includes a first acquisition module 501, a second acquisition module 502, and a first training module 503.

[0128] A first acquisition module 501 is used to acquire a plurality of answer information corresponding to the question information according to question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, wherein the first sub-sentence and the second sub-sentence constitute a sample sentence, and the matching degrees between the plurality of answer information and the second sub-sentence are all different;

[0129] A second acquisition module 502 is used to determine the sample evaluation results corresponding to the plurality of answer information respectively according to the plurality of answer information;

[0130] The first training module 503 is used to input the multiple answer information into the large language model to be trained for evaluation, output multiple training evaluation results, train the large language model to be trained according to the multiple training evaluation results and the multiple sample evaluation results until convergence, and obtain the large language model.

[0131] In an embodiment of the present application, in response to a start-up instruction for starting the fine-tuning function of the large language model, a target sentence consisting of a first sub-sentence and a second sub-sentence is determined from multiple candidate pairs of sentences, and question information for instructing the user to answer the second sub-sentence corresponding to the first sub-sentence is obtained according to the target sentence, for example, the first sub-sentence is the first half of the target sentence, and the second sub-sentence is the second half of the target sentence. The question information is output by voice or other means, and the answer information input by the user according to the question information is received. Further, the answer information is evaluated by the large language model, and the output includes evaluation content related to the answer information and analysis content related to the target sentence. The evaluation content related to the answer information represents whether the pronunciation, text, etc. of the second sub-sentence in the answer information are correct, and the analysis content related to the target sentence represents the source, author, background, interpretation, etc. of the target sentence. In other words, this application outputs informative evaluation results based on the user's answers to the poem, which can not only correct the user's mistakes, but also supplement the user with background knowledge and other information related to the poem, effectively consolidating the user's memory of the poem and helping the user learn the poem.

[0132] It should be noted that the fine-tuning device for a large language model provided in the above embodiment only uses the division of the above functional modules as an example when executing the fine-tuning method for a large language model. In actual applications, the above functional distribution can be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the fine-tuning device for a large language model provided in the above embodiment and the fine-tuning method embodiment for a large language model belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0133] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0134] The present application also provides a computer storage medium that can store multiple instructions, which are suitable for being loaded and executed by a processor as described above. Figure 1 - Figure 6 The image source tracking method of the embodiment shown in the figure can be found in the specific execution process. Figure 1 - Figure 6 The specific description of the illustrated embodiment will not be repeated here.

[0135] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by a processor as described above. Figure 1 - Figure 6 The image source tracking method of the embodiment shown in the figure can be found in the specific execution process. Figure 1 - Figure 6 The specific description of the illustrated embodiment will not be repeated here.

[0136] See also Fig. 9 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 600 may include: at least one processor 601 , at least one network interface 604 , a user interface 603 , a memory 605 , and at least one communication bus 602 .

[0137] The communication bus 602 is used to realize the connection and communication between these components.

[0138] The user interface 603 may include a display screen (Display) and a camera (Camera), and the optional user interface 603 may also include a standard wired interface and a wireless interface.

[0139] The network interface 604 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0140] Among them, the processor 601 may include one or more processing cores. The processor 601 uses various interfaces and lines to connect various parts within the entire server 600, and executes various functions and processes data of the server 600 by running or executing instructions, programs, code sets or instruction sets stored in the memory 605, and calling data stored in the memory 605. Optionally, the processor 601 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 601 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 601, and it can be implemented by a single chip.

[0141] Among them, the memory 605 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 605 includes a non-transitory computer-readable storage medium. The memory 605 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 605 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 605 may optionally be at least one storage device located away from the aforementioned processor 601. As Fig. 9 As shown, the memory 605 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application for fine-tuning answer assessment and / or a large language model.

[0142] exist Fig. 9 In the electronic device 600 shown, the user interface 603 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 601 can be used to call the answer evaluation application stored in the memory 605 and specifically perform the following operations:

[0143] receiving a start instruction, determining a target sentence from a plurality of candidate pairs of sentences, and obtaining question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, wherein the target sentence is composed of the first sub-sentence and the second sub-sentence;

[0144] Outputting the question information, and receiving answer information input by the user according to the question information;

[0145] The answer information is evaluated according to the large language model, and an evaluation result is output, wherein the evaluation result includes evaluation content related to the answer information and analysis content related to the target poem.

[0146] In one or more embodiments, before the processor 601 performs the step of evaluating the answer information according to the large language model and outputting the evaluation result, it further performs:

[0147] generating a prompt text corresponding to the answer information according to the matching degree between the answer information and the second sub-verse;

[0148] The processor 601 evaluates the answer information according to the large language model and outputs the evaluation result, specifically performing:

[0149] The prompt text is input into the large language model to obtain an evaluation result output by the large language model for performing an evaluation task on the prompt text, wherein the evaluation result includes evaluation content and analysis content related to the matching degree.

[0150] In one or more embodiments, the processor 601 performs the step of generating a prompt text corresponding to the answer information according to the matching degree between the answer information and the second sub-verse, specifically performing:

[0151] According to the matching degree between the answer information and the second sub-verse, obtaining a prompt text template and a prompt enhancement strategy corresponding to the matching degree;

[0152] An initial prompt text corresponding to the answer information is generated according to the prompt text template, and prompt enhancement processing is performed on the initial prompt text according to the prompt enhancement strategy and the target poem to obtain a prompt text corresponding to the answer information.

[0153] In one or more embodiments, after the processor 601 evaluates the answer information according to the large language model and outputs the evaluation result, it further executes:

[0154] Obtaining a matching degree between the answer information and the second sub-verse, and determining whether the matching degree meets a preset condition;

[0155] When the matching degree satisfies the preset condition, the target verse is removed from the multiple candidate pairs of verses.

[0156] In one or more embodiments, after the processor 601 evaluates the answer information according to the large language model and outputs the evaluation result, it further executes:

[0157] According to the analysis content related to the target poem in the evaluation result, the follow-up information related to the analysis content is output, and the analysis content includes at least one of the following contents: the author, background, and interpretation of the target poem.

[0158] In one or more embodiments, the processor 601 may be used to call a fine-tuning application of a large language model stored in the memory 605, and specifically perform the following operations:

[0159] According to question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, a plurality of answer information corresponding to the question information is obtained, wherein the first sub-sentence and the second sub-sentence constitute a sample sentence, and the matching degrees between the plurality of answer information and the second sub-sentence are all different;

[0160] Determine, according to the plurality of answer information, sample evaluation results respectively corresponding to the plurality of answer information;

[0161] The multiple answer information are respectively input into the large language model to be trained for evaluation, and multiple training evaluation results are output. The large language model to be trained is trained according to the multiple training evaluation results and the multiple sample evaluation results until convergence, so as to obtain the large language model.

[0162] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0163] 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.

[0164] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for evaluating an answer, characterized in that: The method comprises: receiving a start instruction, determining a target sentence from a plurality of candidate pairs of sentences, and obtaining question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, wherein the target sentence is composed of the first sub-sentence and the second sub-sentence; Outputting the question information, and receiving answer information input by the user according to the question information; The answer information is evaluated according to the large language model, and an evaluation result is output, wherein the evaluation result includes evaluation content related to the answer information and analysis content related to the target poem.

2. The answer evaluation method according to claim 1, characterized in that: The step of evaluating the answer information according to the large language model and outputting the evaluation result further includes: generating a prompt text corresponding to the answer information according to the matching degree between the answer information and the second sub-verse; The step of evaluating the answer information according to the large language model and outputting the evaluation result includes: The prompt text is input into the large language model to obtain an evaluation result output by the large language model for performing an evaluation task on the prompt text, wherein the evaluation result includes evaluation content and analysis content related to the matching degree.

3. The answer evaluation method according to claim 2, characterized in that: The step of generating a prompt text corresponding to the answer information according to the matching degree between the answer information and the second sub-verse includes: According to the matching degree between the answer information and the second sub-verse, obtaining a prompt text template and a prompt enhancement strategy corresponding to the matching degree; An initial prompt text corresponding to the answer information is generated according to the prompt text template, and prompt enhancement processing is performed on the initial prompt text according to the prompt enhancement strategy and the target poem to obtain a prompt text corresponding to the answer information.

4. The answer evaluation method according to claim 1, characterized in that: After evaluating the answer information according to the large language model and outputting the evaluation result, the method further includes: Obtaining a matching degree between the answer information and the second sub-verse, and determining whether the matching degree meets a preset condition; When the matching degree satisfies the preset condition, the target verse is removed from the multiple candidate pairs of verses.

5. The answer evaluation method according to claim 1, characterized in that: After evaluating the answer information according to the large language model and outputting the evaluation result, the method further includes: According to the analysis content related to the target poem in the evaluation result, the follow-up information related to the analysis content is output, and the analysis content includes at least one of the following contents: the author, background, and interpretation of the target poem.

6. A method for fine-tuning a large language model, characterized in that: The large language model is applicable to a dialogue method based on poetry as described in any one of claims 1 to 5, the method comprising: According to question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, a plurality of answer information corresponding to the question information is obtained, wherein the first sub-sentence and the second sub-sentence constitute a sample sentence, and the matching degrees between the plurality of answer information and the second sub-sentence are all different; Determine, according to the plurality of answer information, sample evaluation results respectively corresponding to the plurality of answer information; The multiple answer information are respectively input into the large language model to be trained for evaluation, and multiple training evaluation results are output. The large language model to be trained is trained according to the multiple training evaluation results and the multiple sample evaluation results until convergence, so as to obtain the large language model.

7. A device for evaluating an answer, characterized in that: The device comprises: A first receiving module receives a start instruction, determines a target sentence from multiple candidate pairs of sentences, and obtains question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, wherein the target sentence consists of the first sub-sentence and the second sub-sentence; A second receiving module, used for outputting the question information and receiving answer information input by the user according to the question information; The first evaluation module is used to evaluate the answer information according to the large language model and output an evaluation result, wherein the evaluation result includes evaluation content related to the answer information and evaluation content related to the target poem.

8. A fine-tuning device for a large language model, characterized in that: The device comprises: A first acquisition module is used to acquire a plurality of answer information corresponding to the question information according to question information for instructing a user to answer a second sub-sentence corresponding to a first sub-sentence, wherein the first sub-sentence and the second sub-sentence constitute a sample sentence, and the matching degrees between the plurality of answer information and the second sub-sentence are all different; A second acquisition module is used to determine the sample evaluation results corresponding to the plurality of answer information respectively according to the plurality of answer information; The first training module is used to input the multiple answer information into the large language model to be trained for evaluation, output multiple training evaluation results, train the large language model to be trained according to the multiple training evaluation results and the multiple sample evaluation results until convergence, and obtain the large language model.

9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 6.

10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 6.

Citation Information

Cited By

  • Interview answer evaluation method and device, electronic equipment and storage medium

    CN119295035A