Guided model training method and guiding method
By constructing a dialogue sample data training target guidance model and generating guidance statements, the problem of students having difficulty knowing the reasons for errors in existing automatic question judging technology is solved, thereby improving the learning experience and knowledge level.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING YUANLI WEILAI SCI & TECH CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-05
AI Technical Summary
Existing automatic judgment technology can only output a binary result of "correct" or "incorrect", making it difficult for students to know the reason for the error and affecting their learning experience.
By determining the teacher prompt word template of the teacher language model and the student simulation model, dialogue interaction is carried out to construct dialogue sample data, generating dialogue sample data including "follow-up questions" and "guidance", and training the target guidance model to generate guidance sentences.
It enhances students' learning experience, promotes the improvement of their knowledge level, and enables deep learning through guiding statements.
Smart Images

Figure CN122154833A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of machine learning technology, and in particular to guided model training methods and guided methods. Background Technology
[0002] With the rapid development of artificial intelligence and big data technologies, intelligent teaching support systems have been widely applied in the education field. Automatic question grading technology, as one of its core functions, can judge various types of questions, thus providing students with immediate feedback. Automatic question grading technology typically compares students' answers with preset standard answers to determine whether their responses are correct or not. However, this method only outputs a binary result of "correct" or "incorrect," making it difficult for students to understand the reasons for their errors and hindering targeted improvements in their learning methods, thus negatively impacting their learning experience. Therefore, an effective solution is urgently needed to address these problems. Summary of the Invention
[0003] In view of this, embodiments of this specification provide a guided model training method. One or more embodiments of this specification also relate to a guided method, a guided model training apparatus, a guided device, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0004] According to a first aspect of the embodiments of this specification, a guided model training method is provided, comprising: Determine the teacher prompt word template and student simulation model corresponding to the teacher language model, wherein the student simulation model is used to simulate the user's answering of questions; The teacher language model is used to conduct a dialogue interaction with the student simulation model based on the teacher prompt word template, and dialogue sample data is constructed based on the dialogue interaction results. The initial guidance model is trained using the dialogue sample data to obtain a target guidance model, wherein the target guidance model is used to perform a guidance learning task associated with the teacher's language model.
[0005] According to a second aspect of the embodiments of this specification, a guiding method is provided, comprising: Receive user responses to the object to be addressed; The response statement is input into the target guidance model, which generates and feeds back the corresponding guidance statement. The target guidance model is determined according to the guidance model training method described above.
[0006] According to a third aspect of the embodiments of this specification, a guided model training apparatus is provided, comprising: The determination module is configured to determine the teacher prompt word template and student simulation model corresponding to the teacher language model, wherein the student simulation model is used to simulate the user's answer to the question; The dialogue interaction module is configured to use the teacher language model to conduct dialogue interaction with the student simulation model based on the teacher prompt word template, and to construct dialogue sample data based on the dialogue interaction results. The training module is configured to train an initial guidance model using the dialogue sample data to obtain a target guidance model, wherein the target guidance model is used to perform a guidance learning task associated with the teacher's language model.
[0007] According to a fourth aspect of the embodiments of this specification, a guiding device is provided, comprising: The receiving module is configured to receive user responses to objects to be responded to. The generation module is configured to input the response statement into the target guidance model, generate the guidance statement corresponding to the response statement, and provide feedback, wherein the target guidance model is determined according to the above-mentioned guidance model training method.
[0008] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the above-described guided model training method or guided method.
[0009] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-described guided model training method or guided method.
[0010] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described guided model training method or guided method.
[0011] The guided model training method provided in this embodiment first determines the teacher prompt word template corresponding to the teacher's language model and the student simulation model. The student simulation model is used to simulate the user's answering of questions. Then, the teacher's language model interacts with the student simulation model based on the teacher prompt word template, and then constructs dialogue sample data based on the dialogue interaction results. The dialogue sample data generated in this way includes not only the "correct / incorrect" answers, but also teaching processes such as "follow-up questions" and "guidance". Finally, the initial guided model is trained using the dialogue sample data generated in this way to obtain the target guided model. The target guided model has the ability to generate corresponding guidance statements based on the user's answers. The user can further think and answer based on the guidance statements. In this process, it can guide the user to learn the questions in depth, promote the improvement of the user's knowledge level, and significantly improve the user's interactive experience. Attached Figure Description
[0012] Figure 1 This is a flowchart of a guided model training method provided in one embodiment of this specification; Figure 2 This is a flowchart illustrating a booting method provided in one embodiment of this specification; Figure 3 This is a schematic diagram of the structure of a guided model training device provided in one embodiment of this specification; Figure 4 This is a schematic diagram of the structure of a guiding device provided in one embodiment of this specification; Figure 5 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0013] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0014] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0015] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0016] Furthermore, 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 one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0017] In one or more embodiments of this specification, a large model refers to a deep learning model with a large number of model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even tens of trillions of model parameters. A large model can also be called a foundation model. It is pre-trained using large-scale unlabeled corpora to produce a pre-trained model with hundreds of millions of parameters. Such models can adapt to a wide range of downstream tasks and have good generalization ability. Examples include Large Language Models (LLMs) and multi-modal pre-training models.
[0018] In practical applications, large models only require a small number of samples to fine-tune the pre-trained model before they can be applied to different tasks. Large models can be widely used in fields such as Natural Language Processing (NLP) and Computer Vision. Specifically, they can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and Image Generation, as well as NLP tasks such as text-based sentiment classification, text summarization, and machine translation. The main application scenarios for large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.
[0019] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0020] Large Language Model Large Language Model (LLM) is an artificial intelligence model based on deep learning architecture and trained on massive amounts of text data. Its core feature is that it has billions to trillions of parameters, enabling it to understand the semantics, syntax and contextual logic of natural language, and possess powerful general capabilities such as content generation, multi-turn dialogue, logical reasoning, code writing and knowledge question answering.
[0021] Prompt template The prompt word template of the model is a predefined structured text framework that guides the large language model to generate high-quality responses that meet expectations in specific scenarios by setting instruction format, role background, task constraints and output specifications.
[0022] Knowledge distillation Knowledge distillation is a model compression technique. Its core idea is to transfer the knowledge and capabilities of a large, complex, and high-performance complex model to a more streamlined and computationally efficient simplified model, so that it still retains the capabilities of a complex model with a significantly reduced number of parameters.
[0023] Supervision and fine-tuning Supervised fine-tuning (SFT) refers to the task of training a pre-trained model in a supervised manner using labeled sample data.
[0024] This specification provides a guided model training method. One or more embodiments of this specification relate to a guided method, a guided model training apparatus, a guided device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail in the following embodiments.
[0025] With the development of online education, critical thinking training products are becoming increasingly popular. These products typically include a question-and-answer function, designed to encourage users to explain problems via voice, thus externalizing and reinforcing learned knowledge. Currently, the question-and-answer process in these products is as follows: presenting the question to the user, receiving the user's voice, and displaying the standard answer; or, judging the correctness of the question based on the voice and then displaying the judgment and the standard answer. This approach fails to meet users' needs for in-depth learning and critical thinking training.
[0026] See Figure 1The schematic diagram illustrates the guidance model training method provided in this embodiment. First, a teacher prompt template corresponding to the teacher's language model and a student simulation model are determined. The student simulation model simulates the user's answering of questions. Then, the teacher's language model interacts with the student simulation model based on the teacher prompt template, and dialogue sample data is constructed based on the interaction results. The dialogue sample data generated in this way includes not only the "correct / incorrect" answers but also teaching processes such as "follow-up questions" and "guidance." Finally, the initial guidance model is trained using this dialogue sample data to obtain a target guidance model. The target guidance model has the ability to generate corresponding guidance statements based on the user's answers. Users can further think and answer based on the guidance statements. This process guides users to deeply learn the questions, promotes the improvement of users' knowledge levels, and significantly enhances the user's interactive experience.
[0027] See Figure 1 , Figure 1 A flowchart of a guided model training method according to an embodiment of this specification is shown, which specifically includes the following steps.
[0028] Step S102: Determine the teacher prompt word template and student simulation model corresponding to the teacher language model.
[0029] The guided model training method provided in this embodiment can be applied to any training scenario of a model that interacts with a user on a question, such as an intelligent tutoring system, a scenario where a model is trained to provide step-by-step guidance for math, physics and other science questions, or a scenario where a model is trained to provide progressive guidance and optimization for translation or writing content in language learning. In addition, it can also be applied to scenarios where a model provides various training programs, etc. Relevant technicians can choose the application scenario of the guided model training model provided in this embodiment according to the actual situation. This embodiment does not make any limitations here.
[0030] Specifically, the teacher language model refers to an intelligent agent configured based on a large language model, possessing subject knowledge reserves, logical reasoning abilities, etc. For example, the teacher language model can be GPT-4 or other large language models; this embodiment does not impose any limitations. The teacher prompt word template refers to predefined structured text. The teacher prompt word template can include the teacher language model's role setting, guidance strategies, and output format specifications during the dialogue interaction process, used to guide the teacher language model in generating guiding statements. The student simulation model refers to a large language model that has undergone specific training or possesses specific prompt words, used to simulate users answering questions. Specifically, it can simulate users with different ability levels and learning habits, generating diverse answer content including typical errors, logical flaws, partially correct, or completely correct responses based on the questions.
[0031] Based on this, the teacher language model is first determined. This teacher language model can be any large language model; in practical processing, relevant technicians can choose a complex large language model as the teacher language model to improve the quality of the generated statements. For example, it could be GPT-4 or other large language models; this embodiment does not impose any limitations. Secondly, a prompt word template corresponding to the teacher language model is determined. The prompt word template includes various contents used to instruct the teacher language model to generate guiding statements that meet the requirements. The teacher prompt word template can include the teacher language model's role setting in the dialogue interaction process, a set of guiding strategies, and output format specifications, etc. This allows the prompt word template to determine whether the answer is correct, whether the dialogue needs to be terminated, and how to generate guiding statements based on the guiding strategies.
[0032] In addition, a student simulation model needs to be defined. This model simulates user responses, enabling dialogue and interaction with the teacher's language model. The student simulation model can be trained on a base language model using real user interaction data, allowing it to simulate students answering questions at different levels. Alternatively, the student simulation model can be a larger language model, with student prompt word templates set up to facilitate dialogue between the student simulation model and the teacher's language model. These templates can include role settings, response strategies, and more. Response strategies can include user level settings; for example, setting it to a high level allows the student simulation model to simulate high-achieving students answering questions.
[0033] Step S104: Using the teacher language model, the student simulation model engages in dialogue interaction based on the teacher prompt word template, and constructs dialogue sample data based on the dialogue interaction results.
[0034] Specifically, dialogue sample data refers to the dialogue sequence obtained by the teacher language model interacting with the student simulation model in multiple rounds on a specific topic, based on the constraints of the teacher's prompt word template. A dialogue sample data is obtained by multiple rounds of interaction on a specific topic, and the dialogue sample data may also include that specific topic.
[0035] Based on this, a teacher language model generates guiding statements based on a teacher prompt template, while a student simulation model generates response statements. These two processes alternate to achieve interactive dialogue. Specifically, the student simulation model first generates a simulated response statement based on the question. This simulated response statement is then input into the teacher language model. The teacher language model uses this simulated response statement and the teacher prompt template to generate guiding statements. The student simulation model then generates new simulated responses based on these guiding statements, and this process repeats, enabling the two models to interact interactively. After multiple rounds of dialogue interaction, multiple rounds of guiding statements and simulated responses are obtained. Based on these multiple rounds of guiding statements and simulated responses, combined with the question, dialogue sample data can be obtained.
[0036] Furthermore, to optimize the guiding statements generated by the teacher's language model during the dialogue interaction between the two models, guiding statements can be generated based on the historical dialogue sequence and the guiding strategy set in the prompt word template, and a decision can be made on whether to terminate the dialogue. In this embodiment, the specific implementation is as follows: The dialogue interaction in any round between the teacher language model and the student simulation model includes: using the teacher language model, generating a guiding statement based on the target dialogue sequence constructed before the current dialogue round and the guidance strategy set in the teacher prompt word template, and determining whether the interaction between the teacher language model and the student simulation model meets the dialogue termination condition; if not, using the student simulation model, generating a simulated response statement based on the guiding statement, combining the guiding statement, the simulated response statement, and the target dialogue sequence to obtain an intermediate dialogue sequence, using the intermediate dialogue sequence as the target dialogue sequence, and executing the step of using the teacher language model, based on the target dialogue sequence constructed before the current dialogue round and the guidance strategy set in the teacher prompt word template, generating a guiding statement and determining whether the interaction between the teacher language model and the student simulation model meets the dialogue termination condition; if yes, constructing dialogue sample data based on the guiding statement and the target dialogue sequence.
[0037] Specifically, the current dialogue round refers to the round in which the teacher's language model and the student's simulation model interact in dialogue. One round consists of: the teacher's language model generating a guiding statement, and the student's simulation model generating a simulated response based on that guiding statement. This step completes one round. The target dialogue sequence refers to the set of guiding statements and simulated responses generated before the current dialogue round. Additionally, the target dialogue sequence may include questions. The guiding strategy set refers to the basis for the teacher's language model's guidance, which can be used to determine the correctness of responses, whether to terminate the dialogue, and how to generate guiding statements, etc. The guiding statement refers to the statement generated by the teacher's language model that provides feedback to the simulated response output by the student's simulation model.
[0038] The dialogue termination condition refers to the conditions used to determine whether a dialogue should end. If the condition is met, an ending statement is generated, which is then used as the guiding statement to end the dialogue. If the condition is not met, a guiding statement is generated, and the student simulation model then generates a simulated response statement based on this statement, before proceeding to the next round of dialogue. The simulated response statement refers to the statement generated by the student simulation model simulating a real user. This simulated response statement can be an answer to a question, a demonstration of the problem-solving process, or a response to the guiding statement, etc. The intermediate dialogue sequence refers to the dialogue sequence generated based on the guiding statement, simulated response statement, and the target dialogue sequence constructed before the current round. This intermediate dialogue sequence is used as the new target dialogue sequence constructed for the current round.
[0039] Based on this, firstly, the student simulation model generates a simulated answer statement based on the question. This simulated answer statement is then input into the teacher's language model, and dialogue interaction is then conducted between the teacher's language model and the student simulation model. Any round of dialogue interaction between the teacher's language model and the student simulation model includes the following steps: using the teacher's language model, based on the target dialogue sequence constructed before the current dialogue round (including all guiding statements and simulated answer statements generated before the current dialogue round in chronological order), and processing the target dialogue sequence according to the guiding strategy set in the teacher's prompt word template, corresponding guiding statements are generated, and it is determined whether the dialogue interaction meets the dialogue termination condition. If the dialogue termination condition is not met, it indicates that a new round of dialogue interaction is needed. The student simulation model then generates a corresponding simulated response based on the currently generated guiding statement. This guiding statement, the simulated response, and the target dialogue sequence built before the current dialogue round are combined to obtain an intermediate dialogue sequence. This intermediate dialogue sequence is used as the target dialogue sequence built for the current round. The process then moves to the teacher language model, which generates guiding statements based on the target dialogue sequence built before the current dialogue round and the guiding strategy set in the teacher prompt template. The teacher language model and the student simulation model are then evaluated to determine if the interaction between them meets the dialogue termination condition. This initiates the next round of dialogue interaction, where the target dialogue sequence is the same as the one built in the current round. If the dialogue termination condition is met, dialogue sample data can be constructed based on the guiding statement generated by the teacher simulation model in the current round and the target dialogue sequence built between the current rounds.
[0040] When the dialogue termination condition is met, it indicates that the dialogue can be ended. Dialogue ending can occur in various ways, such as when the simulated answer generated by the student simulation model is the standard answer to the question, when the dialogue round threshold is exceeded, or when, under guidance, the target dialogue sequence includes all correct solution steps. Different guiding statements can be generated for different situations. For example, if the answer is correct, a praise-type guiding statement can be generated and the question summarized; if the dialogue round threshold is exceeded, an encouraging guiding statement can be generated and the incorrect steps briefly explained. The guiding statements generated under the dialogue termination condition mentioned in this embodiment are merely examples. In actual processing, relevant personnel can determine the appropriate statements based on the actual situation; this embodiment does not impose any limitations.
[0041] For example, suppose the current dialogue round is the fifth round of dialogue interaction, and the target dialogue sequence is {U0, [S1, U1], [S2, U2], [S3, U3], [S4, U4]}. Here, statements starting with U are simulated responses generated by the student simulation model, and statements starting with S are guiding statements generated by the teacher language model. If the dialogue termination condition is met, the teacher language model generates S5, and the dialogue training data is {U0, [S1, U1], [S2, U2], [S3, U3], [S4, U4], S5}. If the dialogue termination condition is not met, the teacher language model generates S5, and the student simulation model generates U5, resulting in the intermediate dialogue sequence {U0, [S1, U1], [S2, U2], [S3, U3], [S4, U4], [S5, U5]}. This intermediate dialogue sequence is used as the target dialogue sequence for the sixth round of dialogue interaction, until the dialogue termination condition is met.
[0042] In summary, the teacher's language model determines the dialogue in any round based on the content of the prompt word template, ensuring the regularity of the dialogue interaction. Furthermore, the guiding statements are generated based on the guiding strategies in the prompt word template, making the generation of guiding statements more flexible, thus resulting in high-quality dialogue sample data.
[0043] Furthermore, the guidance strategy set can include various strategies, based on which the dialogue termination condition can be determined and guidance statements can be generated. This embodiment provides two different guidance strategy sets, each corresponding to a dialogue termination condition and a method for generating guidance statements. The scheme corresponding to the first guidance strategy set is: the teacher's language model generates guidance statements based on the answer, terminating the dialogue when the answer is correct or when the final answer is correct based on the step-by-step process. The scheme corresponding to the second guidance strategy set is: the teacher's language model generates guidance statements based on the answer and the process, terminating the dialogue when the answer is correct and the process is correct, or when the final answer is correct based on the step-by-step process. The following describes these two different guidance strategy sets separately.
[0044] The first set of guidance strategies: For the first set of guidance strategies, this set includes a first answer judgment strategy, a first termination strategy, and a first dialogue strategy. In actual processing, using a teacher language model, the first answer judgment module determines whether the answer is correct based on the first answer judgment strategy; the first termination module determines whether the dialogue should end based on the first termination strategy; and the first dialogue module generates guidance statements based on the first dialogue strategy. In this embodiment, the specific implementation is as follows: Using the teacher language model, and based on the first answer judgment strategy in the teacher prompt template, the target dialogue sequence constructed before the current dialogue round is compared with the standard answer of the question corresponding to the target dialogue sequence to obtain the first answer judgment result; using the teacher language model, and based on the first termination strategy in the teacher prompt template, if it is determined that the first answer judgment result is correct or the current dialogue round is greater than the first dialogue round threshold, the step of constructing dialogue sample data based on the guiding statement and the target dialogue sequence is executed; wherein, the generation of the guiding statement includes: using the teacher language model, and based on the first dialogue strategy in the teacher prompt template, determining the first problem-solving step in the set of standard problem-solving steps corresponding to the question based on the target dialogue sequence, generating a first guiding statement based on the first problem-solving step, and using the first guiding statement as the guiding statement.
[0045] Specifically, the first answer judgment strategy refers to the strategy of determining whether the student simulation model generates a standard answer based on the target dialogue sequence. The question refers to the question addressed in the current dialogue interaction. The standard answer refers to the correct answer corresponding to the question addressed in the current dialogue interaction. The first termination strategy refers to the strategy of determining whether to terminate the dialogue interaction after the current dialogue round ends. The first dialogue round threshold refers to a pre-set upper limit on the number of dialogue rounds allowed. The first dialogue round threshold can be set to 10, 20, etc., and the specific value can be determined by relevant technical personnel according to the actual situation; this embodiment does not impose any limitations. The first dialogue strategy refers to the strategy for generating guiding statements. The standard problem-solving step set refers to the set of problem-solving steps corresponding to the question addressed in the current dialogue interaction. These problem-solving steps have a sequential order; each subsequent problem-solving step requires the previous one to obtain the correct answer. The first problem-solving step refers to the problem-solving step referenced by the current round's generating guiding statements, used to guide the user through that step. The first guiding statement refers to the guiding statement generated based on the first problem-solving step. This guiding statement can remove the answer in the problem-solving step and generate the question corresponding to the problem-solving step. This question is the first guiding statement.
[0046] Based on this, utilizing the first-answer judgment module in the teacher's language model, and according to the first-answer judgment strategy in the teacher's prompt word template, the target dialogue sequence constructed before the current dialogue round is compared with the standard answer of the question corresponding to the target dialogue sequence. That is, one or more simulated response statements in the target dialogue sequence are comprehensively evaluated to determine whether they can yield the standard answer. When the target dialogue sequence includes one simulated response statement, it indicates that the student's simulated response model is generating an answer based on the question for the first time, and it is judged whether this simulated response statement matches the standard answer. Furthermore, when the target dialogue sequence includes multiple simulated response statements, it is necessary to comprehensively evaluate whether the combination of these multiple simulated response statements can yield the standard answer. That is, whether multiple simulated response statements generated based on multiple prompting statements can yield the standard answer, ultimately obtaining the first-answer judgment result. The first-answer judgment result can include three cases: correct, partially correct, and incorrect.
[0047] Using the first termination module in the teacher language model, and based on the first termination strategy in the teacher prompt template, the dialogue terminates when the first answer is correct or the current dialogue round exceeds the first dialogue round threshold. Specifically, one scenario is that the answer is correct, and the other is that the dialogue round threshold is exceeded. The process then proceeds to the step of constructing dialogue sample data based on the guiding statements and the target dialogue sequence. Using the first dialogue module in the teacher language model, and based on the first dialogue strategy in the teacher prompt template, and considering the various guiding statements and simulated answer statements included in the target dialogue sequence, the first problem-solving step requiring guidance in the current round is determined from the set of standard problem-solving steps corresponding to the question. A first guiding statement is generated based on this first problem-solving step. Data related to the answer in the first problem-solving step can be removed to generate a question as the first guiding statement. This first guiding statement is then used as the guiding statement, i.e., the guiding statement generated by the teacher language model for the current round.
[0048] For example, suppose the current dialogue round is the fifth round of dialogue interaction, the target dialogue sequence is {U0, [S1, U1], [S2, U2], [S3, U3], [S4, U4]}, the standard answer is a, and the standard problem-solving steps set is {b1, b2, b3, b4, b5}.
[0049] Assuming that a can be obtained based on a comprehensive judgment of U0, U1, U2, U3, and U4, the first judgment result is correct, satisfying the dialogue termination condition. The dialogue terminates and the guiding statement S5 is generated, resulting in the dialogue training data {U0, [S1, U1], [S2, U2], [S3, U3], [S4, U4], S5}. Assuming that a cannot be obtained based on a comprehensive judgment of U0, U1, U2, U3, and U4, the first judgment result is partially correct, not satisfying the dialogue termination condition. The dialogue continues, and the first problem-solving step is determined to be b3. S5 is generated based on b3.
[0050] In summary, we can determine whether the dialogue interaction has ended based on the answer result or the number of dialogue rounds, and generate guiding statements based on the problem-solving steps, thereby making the final dialogue sample data of higher quality.
[0051] Furthermore, the method for determining the problem-solving steps for different dialogue rounds differs. Different methods are used to determine the problem-solving steps based on whether the current round meets the condition of answering the question for the first time. In other words, different methods are used depending on whether it is the first time answering the question. In this embodiment, the specific implementation is as follows: The step of determining the first problem-solving step from the set of standard problem-solving steps corresponding to the question based on the target dialogue sequence includes: if the current dialogue round meets the condition of answering the question for the first time, selecting the first initial problem-solving step corresponding to the incorrect answer statement in the target dialogue sequence from the set of standard problem-solving steps corresponding to the question, and using the first initial problem-solving step as the first problem-solving step; if the current dialogue round does not meet the condition of answering the question for the first time, determining the first matching guidance statement and the first matching simulated answer statement corresponding to the previous dialogue round in the target dialogue sequence, determining whether the first matching guidance statement and the first matching simulated answer statement meet the first matching condition, and determining the number of times the first step of the problem-solving step corresponding to the previous dialogue round is answered; if the first matching condition is met or the number of times the first step is answered is greater than or equal to the first step threshold, using the next adjacent step of the problem-solving step corresponding to the previous dialogue round as the first problem-solving step; otherwise, using the problem-solving step corresponding to the previous dialogue round as the first problem-solving step.
[0052] Specifically, the "first answer condition" refers to the simulated answer statement generated by the student simulation model in the previous dialogue round being the first answer to the question; this statement is generally the simulated answer corresponding to the question. The "incorrect answer statement" refers to the statement corresponding to the incorrect part of the simulated answer statement. The "first initial solution step" refers to the first solution step in at least one solution step corresponding to the incorrect part of the simulated answer statement. The "first guide statement to be matched" refers to the guide statement generated in the previous dialogue round. The "first simulated answer statement to be matched" refers to the simulated answer statement generated in the previous dialogue round. The "first matching condition" refers to the condition corresponding to the first simulated answer statement to be matched matching the first guide statement to be matched. For example, when the guide statement is a question, whether the simulated answer statement is the corresponding correct answer; if yes, the matching condition is met; if no, the matching condition is not met. The "number of times the first step is answered" refers to the number of times the solution step corresponding to the previous dialogue round is answered. The "first step threshold" refers to the maximum number of times a step can be answered; for example, the first step threshold can be set to 2 or 3. The specific value can be determined by relevant technical personnel according to the actual situation, and this embodiment does not impose any limitations.
[0053] Based on this, utilizing the first dialogue module in the teacher's language model, and according to the first dialogue strategy, if the current dialogue round meets the condition of the first response to the question (i.e., the simulated response generated in the previous dialogue round is the first response to the question), the incorrect part of the simulated response is identified as the incorrect response statement. Then, the first initial solution step corresponding to the incorrect response statement is selected from the set of standard solution steps corresponding to the question, and this first initial solution step is used as the first solution step. If the current dialogue round does not meet the condition of the first response to the question, it indicates that at least a guiding statement has been generated based on the solution steps, and a simulated response statement is generated based on this guiding statement. The system can identify the first matching guidance statement and the first matching simulated response statement generated in the previous dialogue round within the target dialogue sequence. It then determines whether the first matching guidance statement and the first matching simulated response statement satisfy the first matching condition. If they do, the first matching response statement is considered a correct response to the first matching guidance statement. Furthermore, it determines the number of responses to the first step of the problem-solving process corresponding to the previous dialogue round. If the first matching condition is met or the number of responses to the first step is greater than or equal to the first step threshold, the next adjacent step of the problem-solving process corresponding to the previous dialogue round is taken as the first problem-solving step. Otherwise, the problem-solving process corresponding to the previous dialogue round is taken as the first problem-solving step. In other words, if the student simulation model answers incorrectly multiple times consecutively for a certain problem-solving step, the guidance statement is generated for the next adjacent problem-solving step. Additionally, this guidance statement may include the correct answer to the problem-solving step corresponding to the multiple consecutive incorrect answers.
[0054] For example, suppose the target dialogue sequence is {U0}, the standard answer is a, and the standard solution steps are {b1, b2, b3, b4, b5}. If U0 satisfies the standard answer a, generate the guiding statement "Great!"; if U0 does not satisfy the standard answer a, generate the guiding statement S1 based on step b1.
[0055] In another example, suppose the target dialogue sequence is {U0, [S1, U1], [S2, U2], [S3, U3], [S4, U4]}, and the standard solution steps are {b1, b2, b3, b4, b5}, with a first-step threshold of 2. Assume S3 and S4 are both guiding statements generated for step b3. If U4 and S4 do not match, S5 is generated based on step b4.
[0056] In summary, when guiding problem-solving steps, a threshold for the number of attempts can be set for each step, thereby generating higher-quality dialogue sample data.
[0057] The second set of guidance strategies: The second set of guidance strategies includes a second answer judgment strategy, a process judgment strategy, a second termination strategy, and a second dialogue strategy. In practice, using a teacher language model, the second answer judgment module determines the correctness of the answer based on the second answer judgment strategy; the process judgment module determines the correctness of the answer process based on the process judgment strategy; the second termination module determines whether the dialogue should end based on the second termination strategy; and the second dialogue module generates guidance statements based on the second dialogue strategy. In this embodiment, the specific implementation is as follows: Using the teacher language model, and based on the second answer judgment strategy in the teacher prompt template, the target dialogue sequence constructed before the current dialogue round is compared with the standard answer of the question corresponding to the target dialogue sequence to obtain the second answer judgment result; using the teacher language model, and based on the process judgment strategy in the teacher prompt template, the target dialogue sequence is compared with the standard problem-solving step set corresponding to the question to obtain the process judgment result; using the teacher language model, and based on the second termination strategy in the teacher prompt template, if it is determined that the second answer judgment result is correct and the process judgment result is correct, or if the current dialogue round is greater than the second dialogue round threshold, the step of constructing dialogue sample data based on the guiding statement and the target dialogue sequence is executed; wherein, the generation of the guiding statement includes: using the teacher language model, based on the second dialogue strategy in the teacher prompt template, generating a second guiding statement based on the process judgment result and the target dialogue sequence, and using the second guiding statement as the guiding statement.
[0058] Specifically, the second answer judgment strategy refers to the strategy of determining whether the student simulation model generates a standard answer based on the target dialogue sequence. The question refers to the question addressed in the current dialogue interaction. The standard answer refers to the correct answer corresponding to the question addressed in the current dialogue interaction. The process judgment strategy refers to the strategy of determining whether the student simulation model generates a standard problem-solving process based on the target dialogue sequence. The second termination strategy refers to the strategy of determining whether to terminate the dialogue interaction after the current dialogue round ends. The second dialogue round threshold refers to the pre-set upper limit of the number of dialogue rounds allowed. The second dialogue round threshold can be set to 10, 20, etc., and the specific value can be determined by relevant technical personnel according to the actual situation. This embodiment does not impose any limitations here. The second dialogue strategy refers to the strategy of generating guiding statements. The second guiding statement refers to the guiding statement generated based on the process judgment result and the target dialogue sequence. The second guiding statement can be a statement instructing the student simulation model to generate answer process statements, or a guiding statement generated for a specific problem-solving step.
[0059] Based on this, using the second answer judgment module in the teacher language model, and according to the second answer judgment strategy in the teacher prompt word template, the target dialogue sequence constructed before the current dialogue round is compared with the standard answer of the question corresponding to the target dialogue sequence to obtain the second answer judgment result. This judgment logic can refer to the judgment logic of the first answer judgment module mentioned above, and will not be elaborated in detail here. Using the process judgment module in the teacher language model, and according to the process judgment strategy in the teacher prompt word template, the target dialogue sequence is compared with the standard problem-solving step set corresponding to the question to obtain the process judgment result. Specifically, it can be determined whether each simulated answer statement in the target dialogue sequence contains a simulated answer statement with a corresponding answer process, and, if it contains a simulated answer statement with a corresponding answer process, whether the answer process in the simulated answer statement is correct to obtain the process judgment result. The process judgment result can include three cases: missing process, partially correct process, and incorrect process.
[0060] Using the second termination module in the teacher language model, and based on the second termination strategy in the teacher prompt template, the dialogue terminates when the second answer judgment result is correct and the process judgment result is correct, or when the current dialogue round exceeds the second dialogue round threshold. That is, one case is when the answer judgment result and the process are correct, and the other case is when the dialogue round threshold is exceeded. Then, proceed to the step of constructing dialogue sample data based on the guiding statement and the target dialogue sequence, i.e., constructing dialogue sample data. Using the second dialogue module in the teacher language model, and based on the second dialogue strategy in the teacher prompt template, a second guiding statement is generated based on the process judgment result and the target dialogue sequence. That is, one type of guiding statement can be generated when the process is missing, and another type of guiding statement can be generated when the process is not missing, and the second guiding statement is used as the guiding statement.
[0061] For example, suppose the current dialogue round is the fifth round of dialogue interaction, the target dialogue sequence is {U0, [S1, U1], [S2, U2], [S3, U3], [S4, U4]}, the standard answer is a, and the standard problem-solving steps set is {b1, b2, b3, b4, b5}.
[0062] Assuming that a can be obtained by comprehensively judging based on U0, U1, U2, U3 and U4, the second judgment result is correct, the judgment includes all the problem-solving steps and each problem-solving step is correct, the process judgment result is that the process is correct, the dialogue terminates and the guiding statement S5 is generated, and the dialogue training data is obtained as {U0, [S1, U1], [S2, U2], [S3, U3], [S4, U4], S5}.
[0063] In summary, we can determine whether the dialogue interaction has ended based on the answer judgment result, the process judgment result, or the dialogue round, and generate guiding statements based on the process judgment result and the target dialogue sequence, thereby making the final dialogue sample data of better quality.
[0064] Furthermore, the simulated answer statements generated by the student simulation model may or may not include the problem-solving process. Using the teacher's language model, guiding statements can be generated even without the problem-solving process. These guiding statements are used by the student simulation model to generate process statements. In this embodiment, the specific implementation is as follows: The step of generating a second guiding statement based on the process judgment result and the target dialogue sequence includes: if the process judgment result satisfies the process missing condition, generating a third guiding statement based on the target dialogue sequence, and using the third guiding statement as the second guiding statement, wherein the third guiding statement is used by the student simulation model to generate process statements for the target dialogue sequence; if the process judgment result does not satisfy the process missing condition, determining a second problem-solving step from the set of standard problem-solving steps corresponding to the question based on the target dialogue sequence, generating a fourth guiding statement based on the second problem-solving step, and using the fourth guiding statement as the second guiding statement.
[0065] Specifically, the missing process condition refers to whether the simulated answer statement generated by the student simulation model for the question includes a complete answer process. If it does not include a complete answer process, the missing process condition is met; if it does include a complete answer process, the missing process condition is not met. The third guiding statement is the statement that instructs the student simulation model to generate the answer process statement. The standard problem-solving step set refers to the set of problem-solving steps corresponding to the question in the current dialogue interaction. These steps have a sequential order, and each subsequent step requires the preceding step to arrive at the correct answer. The second problem-solving step refers to the problem-solving step referenced by the current round's guiding statement, providing guidance for that step. The fourth guiding statement is the guiding statement generated based on the second problem-solving step. This guiding statement can remove the answer from the problem-solving step and generate the corresponding question, which is the fourth guiding statement.
[0066] Based on this, utilizing the second dialogue module in the teacher's language model, and according to the second dialogue strategy, when the process judgment result meets the condition of process missing (i.e., the process judgment result is process missing), a third guiding statement is generated based on the target dialogue sequence. This third guiding statement serves as the second guiding statement, meaning that guiding statements can be generated to guide students in simulating the generation of process response statements. It should be noted that this scheme includes two scenarios: one is when the second answer judgment result is correct, in which case a praising guiding statement can be generated, such as, "Great job! Can you explain your response process?"; the other is when the second answer judgment result is partially correct or incorrect, in which case an encouraging guiding statement can be generated, such as, "The result is incorrect. Please explain your response process!". If the process judgment result does not meet the process missing condition, that is, the simulated answer statement includes the answer process, the second problem-solving step that needs to be guided in the current round can be determined based on the target dialogue sequence in the set of standard problem-solving steps corresponding to the question. The fourth guiding statement is generated based on the second problem-solving step. The data about the answer in the second problem-solving step can be removed to generate a question as the fourth guiding statement, and the fourth guiding statement is used as the second guiding statement, that is, the guiding statement generated by the teacher language model in the current round.
[0067] For example, suppose the target dialogue sequence in the current dialogue round is {U0}, the standard answer is 'a', and the set of standard problem-solving steps is {b1, b2, b3, b4, b5}. Assuming the process is missing based on U0, the teacher's language model generates guiding statements S1 to instruct students to simulate the model's response process. Assuming the process exists based on U0, the first problem-solving step corresponding to the first error in the process is determined to be b3, and S1 is generated based on b3.
[0068] In summary, regardless of whether the answers generated by the student simulation model are correct, in the case of missing processes, the model guides the student to generate the answer process, which allows for subsequent processing of the answer process and ultimately results in higher quality dialogue sample data.
[0069] Furthermore, the method for determining the solution steps for each round of dialogue differs. Different methods are used based on whether the current round meets the condition of an initial response; that is, different methods are used depending on whether it is the first time a process response has been provided. In this embodiment, the specific implementation is as follows: The step of determining the second problem-solving step based on the target dialogue sequence from the set of standard problem-solving steps corresponding to the question includes: if the current dialogue round meets the initial response process condition, selecting the second initial problem-solving step corresponding to the erroneous process statement in the process statements of the target dialogue sequence from the set of standard problem-solving steps corresponding to the question, and using the second initial problem-solving step as the second problem-solving step; if the current dialogue round does not meet the initial response process condition, determining the second matching guidance statement and the second matching simulated response statement corresponding to the previous dialogue round in the target dialogue sequence, determining whether the second matching guidance statement and the second matching simulated response statement meet the second matching condition, and determining the number of second-step responses for the problem-solving step corresponding to the previous dialogue round; if the second matching condition is met or the number of second-step responses is greater than or equal to the second-step threshold, using the next adjacent step of the problem-solving step corresponding to the previous dialogue round as the second problem-solving step; otherwise, using the problem-solving step corresponding to the previous dialogue round as the second problem-solving step.
[0070] Specifically, the initial response process condition refers to the simulated answer statement generated by the student simulation model in the previous dialogue round, which is the first process response to the question. The erroneous process statement refers to the statement corresponding to the erroneous part of the simulated answer statement. The second initial solution step refers to the first solution step in at least one solution step corresponding to the erroneous part. The second matching guidance statement refers to the guidance statement generated in the previous dialogue round. The second matching simulated answer statement refers to the simulated answer statement generated in the previous dialogue round. The second matching condition refers to the condition corresponding to the matching of the second matching simulated answer statement and the second matching guidance statement. The number of second-step responses refers to the number of times the solution step corresponding to the previous dialogue round was responded to. The second-step threshold refers to the maximum number of times a response to a step is allowed; for example, the second-step threshold can be set to 2 or 3. The specific value can be determined by relevant technical personnel according to the actual situation, and this embodiment does not impose any limitations.
[0071] Based on this, utilizing the second dialogue module in the teacher's language model, and according to the second dialogue strategy, when the process judgment result does not meet the process missing condition, the specific implementation method for determining the second problem-solving step based on the target dialogue sequence from the set of standard problem-solving steps corresponding to the question is as follows: If the current dialogue round meets the first response process condition, i.e., the simulated answer statement generated in the previous dialogue round is the first process response statement for the question, the incorrect process in the simulated answer statement is identified to obtain the incorrect process statement. Then, the second initial problem-solving step corresponding to the incorrect process statement is selected from the set of standard problem-solving steps corresponding to the question, and this second initial problem-solving step is used as the second problem-solving step. If the current dialogue round does not meet the first response process condition, this indicates that at least a guiding statement has been generated based on the problem-solving steps, and a simulated answer statement is generated based on this guiding statement. The second matching guiding statement and the second matching simulated response statement generated in the previous dialogue round can be identified in the target dialogue sequence. It is then determined whether the second matching guiding statement and the second matching simulated response statement satisfy the second matching condition. If they do, it indicates that the second matching response statement is the correct feedback of the second matching guiding statement. Furthermore, the number of responses to the second step of the problem-solving step corresponding to the previous dialogue round is determined. If the second matching condition is satisfied or the number of responses to the second step is greater than or equal to the second step threshold, the next adjacent step of the problem-solving step corresponding to the previous dialogue round is taken as the second problem-solving step. Otherwise, the problem-solving step corresponding to the previous dialogue round is taken as the second problem-solving step.
[0072] For example, suppose the target dialogue sequence is {U0, [S1, U1], [S2, U2]}, the standard answer is 'a', and the standard solution steps are {b1, b2, b3, b4, b5}. Determine that U2 is the simulated response statement corresponding to the initial response. Based on U2, determine that steps b1 and b2 are correct, and generate the guiding statement S3 based on b3.
[0073] In summary, the response process can be judged, and guiding statements can be generated for incorrect responses, thereby generating higher-quality dialogue sample data.
[0074] Furthermore, when generating simulated responses, the student simulation model can be pre-set with different level levels, allowing it to generate simulated responses according to the preset level. In this embodiment, the specific implementation is as follows: Using the student simulation model, simulated answer statements are generated according to the guidance statements and preset level levels; wherein, when the target guidance model is an answer guidance mode, the preset level level is used to adjust the quality level of the answer in the simulated answer statements; when the target guidance model is a process guidance mode, the preset level level is used to adjust the quality level of the answer and the answer process in the simulated answer statements.
[0075] Specifically, the preset level refers to the level corresponding to the simulated answers generated by the student simulation model. The answer-guided mode refers to a mode that guides students based on their answers. The process-guided mode refers to a mode that guides students based on both their answers and the process of answering questions.
[0076] Based on this, a student simulation model is used to generate simulated response statements according to its preset level. The following explains different scenarios: When the target-guided model is in answer-guided mode, low level: simulates common conceptual errors, pauses in expression, complete silence, or off-topic answers. Medium-low level: simulates partial understanding but incomplete expression, skipped steps, and requiring extensive prompts to continue. Medium-high level: simulates correct basic ideas but vague details, and occasional need for confirmation guidance. High level: simulates clear thinking, fluent expression, and the ability to complete the response independently. When the target-guided model is in process-guided mode, low level: simulates "incorrect answer and missing or confused process" (e.g., "The answer is 5. Because… um… it's 5."). Medium-low level: simulates "incorrect answer but partially correct process" or "correct answer but skipped / incomplete process" (e.g., "There are 3 red ones, 2 blue ones, a total of… 4?" (correct process, incorrect calculation); or directly saying "5!" (correct answer, no process)). Intermediate to advanced level: Simulates "correct answer and basically correct process but imprecise expression" (e.g., "3 plus 2 equals 5." (lacking the step description of "first count the red, then count the blue")). Advanced level: Simulates "correct answer and complete and clear process" (e.g., "I first counted the red blocks, there are 3; then I counted the blue blocks, there are 2; then I added them together, 3+2=5, so there are 5 in total.").
[0077] In summary, when generating simulated response statements, the student simulation model can generate them according to different preset level levels, thereby improving the richness of the dialogue sample data and enabling the target guidance model trained based on rich dialogue sample data to have better performance.
[0078] Step S106: Train the initial guidance model using the dialogue sample data to obtain the target guidance model.
[0079] Specifically, the initial guidance model refers to a pre-trained language model that has not been trained on dialogue sample data, and it possesses basic dialogue interaction capabilities. The target guidance model refers to a model obtained after supervised fine-tuning training on the aforementioned dialogue sample data. The target guidance model is used to perform the guidance learning task associated with the teacher's language model; that is, the target language model possesses the guidance capabilities of the teacher's language model. Furthermore, the parameter size of the target guidance model can be smaller than that of the teacher's language model, but it internalizes the guidance capabilities of the teacher's language model, thereby achieving "knowledge distillation."
[0080] Based on this, an initial guidance model can be determined. This initial guidance model can be a large language model with dialogue capabilities, and its size can be smaller than that of the teacher's language model. For example, the initial guidance model could be Qwen2.5. In actual processing, relevant technical personnel can determine the initial guidance model according to the actual situation; this embodiment does not impose any limitations. After obtaining the dialogue sample data, the initial guidance model can be subjected to supervised fine-tuning training using the dialogue sample data to obtain the target guidance model.
[0081] As described in step S104 above, different dialogue sample data can be obtained based on the different combinations of guidance strategies in the teacher prompt word template corresponding to the teacher language model. Consequently, the target guidance model obtained after training the initial guidance model based on the different dialogue sample data will also be different. These will be explained in detail below.
[0082] For the first set of guidance strategies mentioned above, namely, the teacher's language model has the ability to guide responses based on answers, the model is trained using dialogue sample data generated under this condition to obtain a target guidance model for performing the first guidance learning task of guiding responses based on answers. In this embodiment, the specific implementation is as follows: First answer guidance features are extracted from the dialogue sample data. An initial guidance model is trained based on the first answer guidance features to obtain a target guidance model. The target guidance model is used to perform a first guidance learning task of guiding based on the answer.
[0083] Specifically, the first-answer guidance feature refers to the feature in the dialogue sample data that guides the answer to the question. The dialogue sample data includes the first-answer guidance feature; more specifically, it refers to the feature that provides step-by-step guidance based on the corresponding problem-solving steps when the answer is incorrect. The first-guided learning task refers to the learning task that guides the answer to the question.
[0084] Therefore, since the dialogue sample data includes guiding statements that provide step-by-step guidance based on the user's answers—specifically, guiding statements that provide step-by-step guidance based on incorrect problem-solving steps corresponding to incorrect answers—this dialogue sample data possesses a first-answer guidance feature. In this case, the first-answer guidance feature is extracted from the dialogue sample data, and this feature is used to train the initial guidance model. This allows the model to learn the thought process of generating guiding statements based on the user's answers, thereby acquiring the ability to generate guiding statements based on the user's answers, resulting in the final target guidance model. The target guidance model can perform the first guidance learning task of providing guidance based on the user's answers.
[0085] In summary, a target guidance model can be obtained to guide the user's response. When using the target guidance model to interact with users, the user's interactive experience can be significantly improved.
[0086] For the second set of guidance strategies mentioned above, namely, the teacher's language model has the ability to guide based on both the answer and the process of the response, the model is trained using dialogue sample data generated under this condition to obtain a target guidance model for performing the second guidance learning task based on the answer and the response process. In this embodiment, the specific implementation is as follows: Second answer guidance features and process guidance features are extracted from the dialogue sample data. The initial guidance model is trained based on the second answer guidance features and the process guidance features to obtain the target guidance model. The target guidance model is used to perform a second guidance learning task based on the answer and the answer process.
[0087] Specifically, the second-answer guidance feature refers to the feature in the dialogue sample data that guides the answer to the question, while the process guidance feature refers to the feature in the dialogue sample data that guides the answering process. The dialogue sample data includes both second-answer guidance features and process guidance features. Specifically, it refers to features that can provide comprehensive guidance based on both the answer and the answering process; that is, the dialogue sample data includes the answering process, and if the answering process is incorrect, it can provide step-by-step guidance based on the corresponding solution steps. The second-guided learning task refers to a learning task that provides guidance based on both the answer and the answering process.
[0088] Based on this, since the dialogue sample data includes guiding statements that provide step-by-step guidance based on the answer and the answering process—specifically, the dialogue sample data includes the answering process, and if the answering process is incorrect, guiding statements provide step-by-step guidance based on the corresponding solution steps—this dialogue sample data possesses second-answer guidance features and process guidance features. In this case, the second-answer guidance features and process guidance features are extracted from the dialogue sample data, and the initial guidance model is trained using these features. This allows the model to learn the thought process of generating guiding statements based on the user's answer and answering process, thereby acquiring the ability to generate guiding statements based on the user's answer and answering process, resulting in the final target guidance model. The target guidance model can perform the second guidance learning task of guiding based on the user's answer and answering process.
[0089] In summary, a target guidance model can be obtained that guides the answer and the answering process. When using the target guidance model to interact with users, the user interaction experience can be significantly improved.
[0090] Furthermore, the dialogue sample data can be quality checked to filter out low-quality sample data, or low-quality sample data can be filtered out and the defective sample data can be supplemented or modified. In this embodiment, the specific implementation method is as follows: Before training the initial guidance model using the dialogue sample data to obtain the target guidance model, the method further includes: performing a quality assessment on the dialogue sample data; if the quality assessment result meets the basic quality conditions, training the initial guidance model using the dialogue sample data to obtain the target guidance model; or, performing a quality assessment on the dialogue sample data; if the quality assessment result meets the basic quality conditions but does not meet the expected quality conditions, optimizing and adjusting the dialogue sample data, using the optimized and adjusted dialogue sample data as the dialogue sample data, and training the initial guidance model using the dialogue sample data to obtain the target guidance model.
[0091] Specifically, the baseline quality condition refers to the minimum quality level required to train the dialogue training data. The desired quality condition refers to the minimum quality level required to train the optimized dialogue training data. The quality level corresponding to the desired quality condition is higher than that corresponding to the baseline quality condition.
[0092] Based on this, before training the initial guidance model using dialogue sample data to obtain the target guidance model, the process includes: performing a quality assessment on the dialogue sample data; if the quality assessment result meets the basic quality conditions, then training the initial guidance model using the dialogue sample data to obtain the target guidance model, which is the subsequent model training process. Alternatively, the dialogue sample data is assessed for quality; if the quality assessment result meets the basic quality conditions but does not meet the expected quality conditions, the dialogue sample data is optimized and adjusted to meet the expected quality conditions; the optimized and adjusted dialogue sample data is then used as the dialogue sample data, and the initial guidance model is trained using the dialogue sample data to obtain the target guidance model, which is the subsequent model training process.
[0093] In summary, further filtering or optimization of the dialogue training data can be performed to ensure that the dialogue training data used for training is of higher quality, thus guaranteeing the quality of the target guidance model.
[0094] The following examples illustrate the prompt word templates and corresponding dialogue sample data for the two different guidance strategy sets mentioned above.
[0095] For the first set of guidance strategies: The teacher prompt word template corresponding to its teacher language model can be: { # Role: Early childhood math thinking mentor.
[0096] # Goals: - By analyzing the user's answers, determine whether the user answered correctly. If the answer was incorrect, provide **guidance** to help the user solve the problem.
[0097] # Skills: - Can you understand the language expressed by a 3-year-old user? - Your word choice is comprehensible to a 3-year-old user. - **Guidance**: -- Analyze user responses to locate Step n in the 'problem-solving steps'. Starting from Step n, provide step-by-step prompts to the user regarding the content within Step n. Skipping steps and creating custom questions are not allowed.
[0098] -- You cannot prompt or ask the user any questions they have already answered correctly.
[0099] -- Without revealing the answer (absolutely do not reveal the answer), subtly and gradually add clues to prompt the user to ask a question with a clear answer.
[0100] -- The content prompting the user must not conflict with the 'problem description', 'problem', or 'solution steps'.
[0101] # Teacher Strategy - `StudentAnswer` is a summary of user answers that combine **the question** with understanding the answer. - `Answer` represents the content of the **correct answer**.
[0102] Step 1: Determine if the student's answer matches the correct answer. The result is `Result`. - If `StudentAnswer` matches the content of `Answer`, then `Result` returns `Correct`. - If `StudentAnswer` contains only a portion of `Answer`, then `Result` returns `partially correct`. - If `StudentAnswer` does not match `Answer` at all, then `Result` returns `Error`. - Step 2: Determine if the dialogue can end, and the result is `End`.
[0103] - If `Result` returns `correct`, then `End` will always return `Yes`.
[0104] - If `Result` returns an `error` or `partially correct`: -- If the user has not answered correctly within 2 rounds or less, `End` returns `No`.
[0105] -- If the user fails to answer correctly after more than two rounds, briefly summarize the question and force the conversation to end, returning `Yes` to `End`.
[0106] Step 3: Reply to the student with a `Talk` response. The content of `Talk` follows the pseudocode below: ``` 1. if (End == `Yes`): Praise the user and briefly summarize the correct answer; 2. else: **Provide guidance** for problem-solving steps that were not explained or explained incorrectly, with only one question allowed at a time. If a user cannot answer correctly after more than one guidance on a particular problem-solving step, the correct answer for that step will be explained directly to the user, combining teaching methods and problem-solving steps, and the user will be guided to continue to the next step or the conversation will end.
[0107] Please note!! Be sure to follow the guided steps correctly; do not explain too much from the problem description!! Pay close attention to the solution steps. ``` # Output Format: **Your output must strictly adhere to the following format; otherwise, there will be very serious consequences.** Children will only receive the content following `[Talk]`; any other content will be discarded and will not be received by the child.
[0108] ``` [StudentAnswer]:{StudentAnswer} [Result]:{Result} [End]:{End} [Talk]:{Talk} ``` - StudentAnswer: A summary of user answers to help them understand the questions. - Result: This is either "correct" or "incorrect", representing the execution result of Step 1 in the Teacher Strategy.
[0109] - End: If it is `Yes` or `No`, it is the execution result of `Step2` in `Teacher Strategy`.
[0110] - Talk: This is the explanation section, following **Step 3 of the **Teacher Strategy**.
[0111] } The corresponding dialogue training data can be: Example 1: User: # Question Type: Double Variation Pattern # Problem Description There are six toy airplanes, arranged from left to right as follows: rectangular wings with a green tail, triangular wings with a green tail, rectangular wings with a red tail, triangular wings with a green tail, and rectangular wings with a green tail. # Question What parts should be installed to assemble the next toy airplane? # Solution Steps 1. Which parts of the airplane are changing? (Wings and tail) 2. Following the pattern, what kind of wings and tail should be installed next? # Correct Answer Triangular wings / wings, red tail Assistant: [Talk]: Let's take a look at the following topic together! User: It should have a round wing, a red tail, and a round wing, which is the last one, the second to last and the first wing, and the second wing is the same.
[0112] Assistant: [StudentAnswer]: It should have a round wing and a red tail. [Result]: Partially correct [End]: No [Talk]: Yes! The tail is red. Children, observe again, according to the pattern, what shape should the wings of the airplane be? User: circular wings Assistant: [StudentAnswer]: Circular wings [Result]: Partially correct [End]: No [Talk]: Kids, think about it again. Based on the shapes of the first five airplanes, what should the shape of the sixth airplane be? User: Oh, it's a triangular wing. Assistant: [StudentAnswer]: Triangular wings and a red tail. [Result]: Correct [End]: Yes [Talk]: Great! Kid, you got it right! The shape of the wings changes according to the pattern of rectangles and triangles, and the color of the tail changes according to the pattern of green, green, and red. So next we should install triangular wings and a red tail.
[0113] Example 2: User: # Question Type: Understanding Acute and Obtuse Angles # Problem Description The chair back and seat form a right angle. (Adjusting the chair back backward and to the left makes no difference.) # Question This chair forms a right angle. To make it more comfortable, what angle can the backrest be adjusted to? # Solution Steps 1. Which direction should you adjust your seat to make it more comfortable? 2. What angle was formed? # Correct Answer obtuse angle Assistant: [Talk]: Let's take a look at the following topic together! User: Forward and backward, forward and backward Assistant: [StudentAnswer]: Forward and Backward [Result]: Error [End]: No [Talk]: Kids, which direction should you adjust your seat to make it more comfortable? User: Left, left. Assistant: [StudentAnswer]: To the left [Result]: Partially correct [End]: No [Talk]: Yes, little one. So, is the angle formed after adjustment an obtuse or acute angle? User: acute angle Assistant: [StudentAnswer]: Acute angle [Result]: Partially correct [End]: No [Talk]: Kids, when you adjust the backrest to the left, that is, adjust the backrest backward, what kind of angle is formed? User: (Since the user has failed to answer correctly in multiple rounds, please briefly summarize the question, refrain from praising the user, and end the conversation.) Assistant: [StudentAnswer]: Acute angle [Result]: Partially correct [End]: Yes [Talk]: Kid, adjusting the backrest will create an obtuse angle. It will be more comfortable sitting like that! Keep it up! For the second set of guidance strategies: The teacher prompt word template corresponding to its teacher language model can be: { # Role: Early childhood math thinking mentor.
[0114] # Goals: - By analyzing the user's answers, we pinpointed where the user was stuck on the **problem-solving steps**, and provided **hints** to help the user understand the **teaching method** and receive a complete explanation of the problem.
[0115] # Skills: - Can you understand the language expressed by a 5-year-old user? - Your word choice is comprehensible to a 5-year-old user. - Skilled at **providing guidance**: -- Analyze user responses to locate Step n in the 'problem-solving steps'. Starting from Step n, provide step-by-step prompts to the user regarding the content within Step n. Skipping steps and creating custom questions are not allowed.
[0116] -- During the prompting process, please encourage the children to explain their solution process or problem-solving ideas.
[0117] -- If the child only gave the correct answer, please ask the child again about their problem-solving process or steps.
[0118] -- You cannot prompt or ask the user any questions they have already answered correctly.
[0119] -- Without revealing the answer (absolutely do not reveal the answer), subtly and gradually add clues to prompt the user to ask a question with a clear answer.
[0120] -- The content prompting the user must not conflict with the 'problem description', 'problem', or 'solution steps'.
[0121] # Teacher Strategy - `StudentAnswer` summarizes the user's problem-solving process. It uses each user's answer, combined with the `question` and `solution steps`, to supplement information. It's crucial to retain historical data during this supplementation process, ultimately creating a new, complete, and detailed summary of the user's problem-solving.
[0122] Step 1: Determine if the student's answer matches the correct answer. The result is `Result`. - If `StudentAnswer` matches the content of `Answer`, then `Result` returns `Correct`. - If `StudentAnswer` contains only a portion of `Answer`, then `Result` returns `partially correct`. - If `StudentAnswer` does not match `Answer` at all, then `Result` returns `Error`. - Step 2: Determine whether all **problem-solving steps** have been explained. The result is `Process`.
[0123] - If the user does not provide any **solution steps**, `Process` returns an `error`.
[0124] - If the user provides part of the **solution steps**, `Process` returns `partially correct`.
[0125] - If the user provides all the distributions of the **solution steps**, then `Process` returns `correct`.
[0126] - Step 3: Determine if the dialogue can end. The result is `End`.
[0127] - If `Result` returns `correct` and `Process` returns `correct`, then `End` will always return `Yes`.
[0128] - If `Result` returns `error` or `partially correct` or `Process` returns `error` or `partially correct`: -- If the user has not answered correctly within 2 rounds or less, `End` returns `No`.
[0129] -- If the user fails to answer correctly after more than two rounds, briefly summarize the question and force the conversation to end, returning `Yes` to `End`.
[0130] Step 4: Reply to the student with a `Talk` response. The content of `Talk` follows the pseudocode below: ``` 1. if (End == `Yes`): Praise the user and briefly summarize the correct answer; 2. elif (Result == `Correct` && Process == `Incorrect`): First, praise the user for answering correctly, then politely and concisely ask the user to explain their reasoning. Your reply should not reveal any content related to the **solution steps**.
[0131] 3. else: **Provide guidance** for problem-solving steps that were not explained or explained incorrectly, with only one question allowed at a time. If a user cannot answer correctly after more than one guidance on a particular problem-solving step, the correct answer for that step will be explained directly to the user, combining teaching methods and problem-solving steps, and the user will be guided to continue to the next step or the conversation will end.
[0132] Please note!! Be sure to follow the guided steps correctly; do not explain too much from the problem description!! Pay close attention to the solution steps. ``` # Output Format: Your output must strictly adhere to the following format, otherwise there will be very serious consequences. Children will only receive the content following `[Talk]`; any other content will be discarded and will not be received by the child. ``` [StudentAnswer]: {StudentAnswer} [Result]: {Result} [Process]: {Process} [End]: {End} [Talk]: {Talk} ``` - StudentAnswer: A summary of all the user's past answers.
[0133] - Result: This is either "correct" or "incorrect", representing the execution result of Step 1 in the Teacher Strategy.
[0134] - Process: This indicates whether the result is `correct`, `partially correct`, or `incorrect`, and is the execution result of `Step 2` in `TeacherStrategy`.
[0135] - End: If it is `Yes` or `No`, it is the execution result of `Step3` in `Teacher Strategy`.
[0136] - Talk: This is the explanation section, following **Step 4 of the **Teacher Strategy**.
[0137] } The corresponding dialogue training data can be: Example 1: User: #Question Type: Principle Analysis # Problem Description The squirrel and the hedgehog now have the same number of berries. The squirrel says to the hedgehog, "If I give you some, you'll have three more berries than me." # Question They have the same amount of fruit. Is it possible, as the squirrel said, that this is possible? Why? # Solution Steps 1. Think about it: if the squirrel gives the hedgehog one fruit, the difference is two fruits; if it gives the hedgehog two fruits, the difference is four fruits.
[0138] or 1. It's a multiplication by two relationship. Choose either of the two methods above, but do not actively use words such as "times," "even numbers," or "double numbers." # Correct Answer impossible Assistant: [StudentAnswer]: None [Result]: Error [Process]: Error [End]: No [Talk] Let's take a look at the following topic together! User: Impossible, it will never be possible, and I don't know why. (At this point, the answer is correct, but the process is wrong, and the user says they don't know why.) Assistant: [StudentAnswer]: Impossible, it will never be possible, and I don't know why.
[0139] [Result]: Correct [Process]: Error [End]: No [Talk]: Your answer is correct! Then can you tell me why the squirrel said it's impossible? User: Well, that will never happen, and I don't know why (the user still doesn't understand, at which point the prompting script needs to be changed). Assistant: [StudentAnswer]: Impossible, it can never be possible, I don't know why. [Result]: Correct [Process]: Error [End]: No [Talk]: It's okay, let's think about it together. If the squirrel gives the hedgehog one nut, how many nuts will they have different amounts of? User: 2 (The user answered correctly after being guided; continue guiding them) Assistant: [StudentAnswer]: Impossible, it can never be possible, I don't know why. If the squirrel gives the hedgehog one nut, the difference in the number of nuts they have will be two. [Result]: Correct [Process]: Partially correct [End]: No [Talk]: Okay, let's think about it again. If the squirrel gives the hedgehog 2 berries, how many berries will they have in total? User: 4 stars (After guiding the user to answer correctly, praise and summarize). Assistant: [StudentAnswer]: Impossible, it's never going to happen. I don't know why. If the squirrel gives the hedgehog 1 nut, the difference in the number of nuts they have will be 2, 4, 6, or 8. I don't know, it's just a pattern. If the squirrel gives the hedgehog 2 nuts, the difference in the number of nuts they have will be 4.
[0140] [Result]: Correct [Process]: Correct [End]: Yes [Talk]: Great! You understand now. After the squirrel gives the hedgehog fruit, the number of fruits they receive will differ by 2, 4, 6, and 8, so what the squirrel said is impossible.
[0141] Example 2: User: #Question Type: Rule Comprehension (Sudoku) # Teaching Methods - Remainder Method: By observing both rows and columns and eliminating numbers that have already appeared, you can determine how many numbers to fill in the dotted box.
[0142] # Problem Description - Rules of the Grid Game: Fill in the grid with 1, 2, 3, 4 so that each number appears only once in each row and column, without repetition.
[0143] - Horizontal lines are rows, vertical lines are columns.
[0144] - There are 4 in this row (dashed box), and 1 and 3 in this column.
[0145] # Question - What number should be filled in the dashed box? # Solution Steps - Step 1: Consider the row and column of the dashed box together, exclude the already existing 1, 3, and 4, and only 2 is missing.
[0146] # Correct Answer - 2 or two Assistant: [StudentAnswer]: None [Result]: Error [Process]: Error [End]: No [Talk]: Let's take a look at the following topic together! User: The answer is four (in this case, both the answer and the process are wrong). Assistant: [StudentAnswer]: The answer is four. [Result]: Error [Process]: Error [End]: No [Talk]: Take another look. What numbers are in this row and column with the dotted box? User: The answer should be three (at this point, the user seems to be guessing, but both the answer and the process are still wrong). Assistant: [StudentAnswer]: This should be filled with three. [Result]: Error [Process]: Error [End]: No [Talk]: We already have 1, 3, and 4 in this row and column with the dotted line box. Now, take another look, what number should we fill in the dotted line box with? User: The answer is two, because we already have four and three, so we should fill in two in the middle. (After the hint in the previous step, the user's answer and process are both correct.) Assistant: [StudentAnswer]: It should be 2, because 4, 1, and 3 are already taken, so 2 should be filled in the middle. [Result]: Correct [Process]: Correct [End]: Yes [Talk]: Absolutely correct! There is 4 in the row with the dashed box, and 1 and 3 in this column, so 2 should be filled in the dashed box.
[0147] The guided model training method provided in this embodiment first determines the teacher prompt word template corresponding to the teacher's language model and the student simulation model. The student simulation model is used to simulate the user's answering of questions. Then, the teacher's language model interacts with the student simulation model based on the teacher prompt word template, and then constructs dialogue sample data based on the dialogue interaction results. The dialogue sample data generated in this way includes not only the "correct / incorrect" answers, but also teaching processes such as "follow-up questions" and "guidance". Finally, the initial guided model is trained using the dialogue sample data generated in this way to obtain the target guided model. The target guided model has the ability to generate corresponding guidance statements based on the user's answers. The user can further think and answer based on the guidance statements. In this process, it can guide the user to learn the questions in depth, promote the improvement of the user's knowledge level, and significantly improve the user's interactive experience.
[0148] See Figure 2 , Figure 2 A flowchart of a booting method provided according to an embodiment of this specification is shown, which specifically includes the following steps.
[0149] Step S202: Receive the user's response statement for the object to be responded to.
[0150] Step S204: Input the response statement into the target guidance model, generate the guidance statement corresponding to the response statement and provide feedback, wherein the target guidance model is determined according to the above guidance model training method.
[0151] Specifically, the feedback object can be a question, in which case the corresponding response statement is a statement that answers the question. This response statement can be the answer to the question, or it can be the process of answering the question along with the answer. The feedback object can also be a guidance statement generated by the target guidance model, in which case the response statement is the statement that the user answers in response to the guidance statement.
[0152] The guidance method provided in this embodiment has the ability to generate corresponding guidance statements based on the user's answers. The user can further think and answer based on the guidance statements. In this process, the user can be guided to learn the questions in depth, which can promote the improvement of the user's knowledge level and significantly improve the user's interactive experience.
[0153] Corresponding to the above method embodiments, this specification also provides embodiments of a guided model training device. Figure 3 A schematic diagram of a guided model training device according to one embodiment of this specification is shown. Figure 3 As shown, the device includes: The determination module 302 is configured to determine the teacher prompt word template and student simulation model corresponding to the teacher language model, wherein the student simulation model is used to simulate the user answering questions; The dialogue interaction module 304 is configured to use the teacher language model to conduct dialogue interaction with the student simulation model based on the teacher prompt word template, and to construct dialogue sample data based on the dialogue interaction results. Training module 306 is configured to train an initial guidance model using the dialogue sample data to obtain a target guidance model, wherein the target guidance model is used to perform a guidance learning task associated with the teacher's language model.
[0154] In an optional embodiment, any round of dialogue interaction between the teacher language model and the student simulation model includes: Using the teacher language model, based on the target dialogue sequence constructed before the current dialogue round and the set of guidance strategies in the teacher prompt word template, a guidance statement is generated, and it is determined whether the interaction between the teacher language model and the student simulation model meets the dialogue termination condition. If not, using the student simulation model, generate simulated response statements based on the guidance statements, combine the guidance statements, the simulated response statements, and the target dialogue sequence to obtain an intermediate dialogue sequence, use the intermediate dialogue sequence as the target dialogue sequence, and execute the steps of using the teacher language model to generate guidance statements based on the target dialogue sequence constructed before the current dialogue round and the guidance strategy set in the teacher prompt word template, and determine whether the interaction between the teacher language model and the student simulation model meets the dialogue termination condition; If so, construct dialogue sample data based on the guiding statement and the target dialogue sequence.
[0155] In an optional embodiment, the step of using the teacher language model to generate guiding statements based on the target dialogue sequence constructed before the current dialogue turn and the guiding strategy set in the teacher prompt word template, and determining whether the interaction between the teacher language model and the student simulation model meets the dialogue termination condition, includes: Using the teacher language model, and based on the first answer judgment strategy in the teacher prompt word template, the target dialogue sequence constructed before the current dialogue round is compared with the standard answer of the question corresponding to the target dialogue sequence to obtain the first answer judgment result; Using the teacher language model, and based on the first termination strategy in the teacher prompt word template, if the first answer judgment result is correct or the current dialogue round is greater than the first dialogue round threshold, the step of constructing dialogue sample data based on the guiding statement and the target dialogue sequence is executed. The generation of the guiding statement includes: Using the teacher language model, based on the first dialogue strategy in the teacher prompt word template, the first problem-solving step is determined from the set of standard problem-solving steps corresponding to the question based on the target dialogue sequence. A first guiding statement is generated based on the first problem-solving step, and the first guiding statement is used as the guiding statement.
[0156] In an optional embodiment, determining the first problem-solving step based on the target dialogue sequence from the set of standard problem-solving steps corresponding to the question includes: If the condition for answering the question for the first time is met in the current dialogue round, the first initial solution step corresponding to the incorrect answer statement in the target dialogue sequence is selected from the set of standard solution steps corresponding to the question, and the first initial solution step is used as the first solution step. If the current dialogue round does not meet the condition for the first answer to the question, the first guiding statement to be matched and the first simulated answer statement to be matched corresponding to the previous dialogue round are determined in the target dialogue sequence. It is then determined whether the first guiding statement to be matched and the first simulated answer statement to be matched meet the first matching condition. In addition, the number of answers to the first step of the problem-solving step corresponding to the previous dialogue round is determined. If the first matching condition is met or the number of answers to the first step is greater than or equal to the first step threshold, the next adjacent step of the problem-solving step corresponding to the previous dialogue round is taken as the first problem-solving step. Otherwise, the problem-solving step corresponding to the previous dialogue round is taken as the first problem-solving step.
[0157] In an optional embodiment, training the initial guidance model using the dialogue sample data to obtain the target guidance model includes: First answer guidance features are extracted from the dialogue sample data. An initial guidance model is trained based on the first answer guidance features to obtain a target guidance model. The target guidance model is used to perform a first guidance learning task of guiding based on the answer.
[0158] In an optional embodiment, the step of using the teacher language model to generate guiding statements based on the target dialogue sequence constructed before the current dialogue turn and the guiding strategy set in the teacher prompt word template, and determining whether the interaction between the teacher language model and the student simulation model meets the dialogue termination condition, includes: Using the teacher language model, and based on the second answer judgment strategy in the teacher prompt word template, the target dialogue sequence constructed before the current dialogue round is compared with the standard answer of the question corresponding to the target dialogue sequence to obtain the second answer judgment result; Using the teacher language model, and based on the process judgment strategy in the teacher prompt word template, the target dialogue sequence is compared with the set of standard problem-solving steps corresponding to the question to obtain the process judgment result; Using the teacher language model, based on the second termination strategy in the teacher prompt template, if it is determined that the second answer judgment result is correct and the process judgment result is correct, or if the current dialogue round is greater than the second dialogue round threshold, the step of constructing dialogue sample data based on the guiding statement and the target dialogue sequence is executed; The generation of the guiding statement includes: Using the teacher language model, based on the second dialogue strategy in the teacher prompt word template, a second guiding statement is generated based on the process judgment result and the target dialogue sequence, and the second guiding statement is used as the guiding statement.
[0159] In an optional embodiment, generating the second guiding statement based on the process judgment result and the target dialogue sequence includes: If the process judgment result satisfies the process missing condition, a third guiding statement is generated based on the target dialogue sequence, and the third guiding statement is used as the second guiding statement. The third guiding statement is used by the student simulation model to generate process statements for the target dialogue sequence. If the process judgment result does not meet the process missing condition, a second problem-solving step is determined from the set of standard problem-solving steps corresponding to the question based on the target dialogue sequence, a fourth guiding statement is generated based on the second problem-solving step, and the fourth guiding statement is used as the second guiding statement.
[0160] In an optional embodiment, determining the second problem-solving step based on the target dialogue sequence from the set of standard problem-solving steps corresponding to the question includes: If the conditions for the first response process are met in the current dialogue round, the second initial solution step corresponding to the erroneous process statement in the process statement of the target dialogue sequence is selected from the set of standard solution steps corresponding to the question, and the second initial solution step is used as the second solution step. If the current dialogue round does not meet the initial response process conditions, the second matching guidance statement and the second matching simulated response statement corresponding to the previous dialogue round are determined in the target dialogue sequence. It is then determined whether the second matching guidance statement and the second matching simulated response statement meet the second matching condition, and the number of responses to the second step of the problem-solving step corresponding to the previous dialogue round is determined. If the second matching condition is met or the number of responses to the second step is greater than or equal to the second step threshold, the next adjacent step of the problem-solving step corresponding to the previous dialogue round is taken as the second problem-solving step; otherwise, the problem-solving step corresponding to the previous dialogue round is taken as the second problem-solving step.
[0161] In an optional embodiment, training the initial guidance model using the dialogue sample data to obtain the target guidance model includes: Second answer guidance features and process guidance features are extracted from the dialogue sample data. The initial guidance model is trained based on the second answer guidance features and the process guidance features to obtain the target guidance model. The target guidance model is used to perform a second guidance learning task based on the answer and the answer process.
[0162] In an optional embodiment, generating simulated response statements based on the guided statements using the student simulation model includes: Using the student simulation model, simulated response statements are generated according to the preset level based on the guiding statements; In the case where the target guidance model is an answer guidance mode, the preset level is used to adjust the quality level of the answer in the simulated answer statement; When the target guidance model is a process guidance mode, the preset level is used to adjust the quality level of the answer and the answering process in the simulated answer statement.
[0163] In an optional embodiment, before training the initial guidance model using the dialogue sample data to obtain the target guidance model, the method further includes: The dialogue sample data is subjected to quality assessment. If the quality assessment result meets the basic quality conditions, the initial guidance model is trained using the dialogue sample data to obtain the target guidance model; or, The dialogue sample data is subjected to quality assessment. If the quality assessment result meets the basic quality conditions but does not meet the expected quality conditions, the dialogue sample data is optimized and adjusted. The optimized and adjusted dialogue sample data is used as the dialogue sample data. The initial guidance model is trained using the dialogue sample data to obtain the target guidance model.
[0164] The guided model training device provided in this embodiment first determines the teacher prompt word template corresponding to the teacher's language model and the student simulation model. The student simulation model is used to simulate the user's answering of questions. Then, the teacher's language model interacts with the student simulation model based on the teacher prompt word template, and then constructs dialogue sample data based on the dialogue interaction results. The dialogue sample data generated in this way includes not only the "correct / incorrect" answers, but also teaching processes such as "follow-up questions" and "guidance". Finally, the dialogue sample data generated in this way is used to train the initial guided model to obtain the target guided model. The target guided model has the ability to generate corresponding guidance statements based on the user's answers. The user can further think and answer based on the guidance statements. In this process, it can guide the user to learn the questions in depth, promote the improvement of the user's knowledge level, and significantly improve the user's interactive experience.
[0165] The above is an illustrative scheme of a guided model training device according to this embodiment. It should be noted that the technical solution of this guided model training device and the technical solution of the guided model training method described above belong to the same concept. For details not described in detail in the technical solution of the guided model training device, please refer to the description of the technical solution of the guided model training method described above.
[0166] Corresponding to the above method embodiments, this specification also provides embodiments of a guiding device. Figure 4 A schematic diagram of a guiding device according to one embodiment of this specification is shown. Figure 4 As shown, the device includes: The receiving module 402 is configured to receive responses submitted by users to the object to be responded to; The generation module 404 is configured to input the answer statement into the target guidance model, generate the guidance statement corresponding to the answer statement and provide feedback, wherein the target guidance model is determined according to the above-mentioned guidance model training method.
[0167] The guidance device provided in this embodiment has the ability to generate corresponding guidance statements based on the user's answers. The user can further think and answer based on the guidance statements. In this process, the user can be guided to learn the questions in depth, which can promote the improvement of the user's knowledge level and significantly improve the user's interactive experience.
[0168] The above is a schematic representation of a guiding device according to this embodiment. It should be noted that the technical solution of this guiding device and the technical solution of the above-described guiding method belong to the same concept. For details not described in detail in the technical solution of the guiding device, please refer to the description of the technical solution of the above-described guiding method.
[0169] Figure 5A structural block diagram of a computing device 500 according to one embodiment of this specification is shown. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.
[0170] The computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 540 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.
[0171] In one embodiment of this specification, the above-described components of the computing device 500 and Figure 5 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 5 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0172] The computing device 500 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 500 can also be a mobile or stationary server.
[0173] The processor 520 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-described guided model training method or guided method.
[0174] The above is a schematic representation of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the aforementioned guided model training method or guided method technical solution. Details not described in detail in the technical solution of the computing device can be found in the description of the aforementioned guided model training method or guided method technical solution.
[0175] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described guided model training method or guided method.
[0176] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the above-described guided model training method or guided method. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-described guided model training method or guided method.
[0177] An embodiment of this specification also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described guided model training method or guided method.
[0178] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product belongs to the same concept as the above-described guided model training method or guided method. For details not described in detail in the technical solution of the computer program product, please refer to the description of the above-described guided model training method or guided method.
[0179] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0180] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0181] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0182] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0183] The preferred embodiments disclosed above are merely illustrative of this specification. Optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described in this specification. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification.
Claims
1. A guided model training method, characterized in that, include: Determine the teacher prompt word template and student simulation model corresponding to the teacher language model, wherein the student simulation model is used to simulate the user's answering of questions; The teacher language model is used to conduct a dialogue interaction with the student simulation model based on the teacher prompt word template, and dialogue sample data is constructed based on the dialogue interaction results. The initial guidance model is trained using the dialogue sample data to obtain a target guidance model, wherein the target guidance model is used to perform a guidance learning task associated with the teacher's language model.
2. The method according to claim 1, characterized in that, The dialogue interaction between the teacher language model and the student simulation model in any round includes: Using the teacher language model, based on the target dialogue sequence constructed before the current dialogue round and the set of guidance strategies in the teacher prompt word template, a guidance statement is generated, and it is determined whether the interaction between the teacher language model and the student simulation model meets the dialogue termination condition. If not, using the student simulation model, generate simulated response statements based on the guidance statements, combine the guidance statements, the simulated response statements, and the target dialogue sequence to obtain an intermediate dialogue sequence, use the intermediate dialogue sequence as the target dialogue sequence, and execute the steps of using the teacher language model to generate guidance statements based on the target dialogue sequence constructed before the current dialogue round and the guidance strategy set in the teacher prompt word template, and determine whether the interaction between the teacher language model and the student simulation model meets the dialogue termination condition; If so, construct dialogue sample data based on the guiding statement and the target dialogue sequence.
3. The method according to claim 2, characterized in that, The step of using the teacher language model to generate guiding statements based on the target dialogue sequence constructed before the current dialogue turn and the guiding strategy set in the teacher prompt word template, and determining whether the interaction between the teacher language model and the student simulation model meets the dialogue termination condition, includes: Using the teacher language model, and based on the first answer judgment strategy in the teacher prompt word template, the target dialogue sequence constructed before the current dialogue round is compared with the standard answer of the question corresponding to the target dialogue sequence to obtain the first answer judgment result; Using the teacher language model, and based on the first termination strategy in the teacher prompt word template, if the first answer judgment result is correct or the current dialogue round is greater than the first dialogue round threshold, the step of constructing dialogue sample data based on the guiding statement and the target dialogue sequence is executed. The generation of the guiding statement includes: Using the teacher language model, based on the first dialogue strategy in the teacher prompt word template, the first problem-solving step is determined from the set of standard problem-solving steps corresponding to the question based on the target dialogue sequence. A first guiding statement is generated based on the first problem-solving step, and the first guiding statement is used as the guiding statement.
4. The method according to claim 3, characterized in that, The step of determining the first problem-solving step from the set of standard problem-solving steps corresponding to the question based on the target dialogue sequence includes: If the condition for answering the question for the first time is met in the current dialogue round, the first initial solution step corresponding to the incorrect answer statement in the target dialogue sequence is selected from the set of standard solution steps corresponding to the question, and the first initial solution step is used as the first solution step. If the current dialogue round does not meet the condition for the first answer to the question, the first guiding statement to be matched and the first simulated answer statement to be matched corresponding to the previous dialogue round are determined in the target dialogue sequence. It is then determined whether the first guiding statement to be matched and the first simulated answer statement to be matched meet the first matching condition. In addition, the number of answers to the first step of the problem-solving step corresponding to the previous dialogue round is determined. If the first matching condition is met or the number of answers to the first step is greater than or equal to the first step threshold, the next adjacent step of the problem-solving step corresponding to the previous dialogue round is taken as the first problem-solving step. Otherwise, the problem-solving step corresponding to the previous dialogue round is taken as the first problem-solving step.
5. The method according to claim 3 or 4, characterized in that, The step of training the initial guidance model using the dialogue sample data to obtain the target guidance model includes: First answer guidance features are extracted from the dialogue sample data. An initial guidance model is trained based on the first answer guidance features to obtain a target guidance model. The target guidance model is used to perform a first guidance learning task of guiding based on the answer.
6. The method according to claim 2, characterized in that, The step of using the teacher language model to generate guiding statements based on the target dialogue sequence constructed before the current dialogue turn and the guiding strategy set in the teacher prompt word template, and determining whether the interaction between the teacher language model and the student simulation model meets the dialogue termination condition, includes: Using the teacher language model, and based on the second answer judgment strategy in the teacher prompt word template, the target dialogue sequence constructed before the current dialogue round is compared with the standard answer of the question corresponding to the target dialogue sequence to obtain the second answer judgment result; Using the teacher language model, and based on the process judgment strategy in the teacher prompt word template, the target dialogue sequence is compared with the set of standard problem-solving steps corresponding to the question to obtain the process judgment result; Using the teacher language model, based on the second termination strategy in the teacher prompt word template, if it is determined that the second answer judgment result is correct and the process judgment result is correct, or if the current dialogue round is greater than the second dialogue round threshold, the step of constructing dialogue sample data based on the guiding statement and the target dialogue sequence is executed; The generation of the guiding statement includes: Using the teacher language model, based on the second dialogue strategy in the teacher prompt word template, a second guiding statement is generated based on the process judgment result and the target dialogue sequence, and the second guiding statement is used as the guiding statement.
7. The method according to claim 6, characterized in that, The generation of the second guiding statement based on the process judgment result and the target dialogue sequence includes: If the process judgment result satisfies the process missing condition, a third guiding statement is generated based on the target dialogue sequence, and the third guiding statement is used as the second guiding statement. The third guiding statement is used by the student simulation model to generate process statements for the target dialogue sequence. If the process judgment result does not meet the process missing condition, a second problem-solving step is determined from the set of standard problem-solving steps corresponding to the question based on the target dialogue sequence, a fourth guiding statement is generated based on the second problem-solving step, and the fourth guiding statement is used as the second guiding statement.
8. The method according to claim 7, characterized in that, The step of determining the second problem-solving step based on the target dialogue sequence from the set of standard problem-solving steps corresponding to the question includes: If the conditions for the first response process are met in the current dialogue round, the second initial solution step corresponding to the erroneous process statement in the process statement of the target dialogue sequence is selected from the set of standard solution steps corresponding to the question, and the second initial solution step is used as the second solution step. If the current dialogue round does not meet the initial response process conditions, the second matching guidance statement and the second matching simulated response statement corresponding to the previous dialogue round are determined in the target dialogue sequence. It is then determined whether the second matching guidance statement and the second matching simulated response statement meet the second matching condition, and the number of responses to the second step of the problem-solving step corresponding to the previous dialogue round is determined. If the second matching condition is met or the number of responses to the second step is greater than or equal to the second step threshold, the next adjacent step of the problem-solving step corresponding to the previous dialogue round is taken as the second problem-solving step; otherwise, the problem-solving step corresponding to the previous dialogue round is taken as the second problem-solving step.
9. The method according to any one of claims 6 to 8, characterized in that, The step of training the initial guidance model using the dialogue sample data to obtain the target guidance model includes: Second answer guidance features and process guidance features are extracted from the dialogue sample data. The initial guidance model is trained based on the second answer guidance features and the process guidance features to obtain the target guidance model. The target guidance model is used to perform a second guidance learning task based on the answer and the answer process.
10. The method according to claim 2, characterized in that, The step of generating simulated response statements based on the guided statements using the student simulation model includes: Using the student simulation model, simulated response statements are generated according to the preset level based on the guiding statements; In the case where the target guidance model is an answer guidance mode, the preset level is used to adjust the quality level of the answer in the simulated answer statement; When the target guidance model is a process guidance mode, the preset level is used to adjust the quality level of the answer and the answering process in the simulated answer statement.
11. The method according to claim 1, characterized in that, Before training the initial guidance model using the dialogue sample data to obtain the target guidance model, the process also includes: The dialogue sample data is subjected to quality assessment. If the quality assessment result meets the basic quality conditions, the initial guidance model is trained using the dialogue sample data to obtain the target guidance model; or, The dialogue sample data is subjected to quality assessment. If the quality assessment result meets the basic quality conditions but does not meet the expected quality conditions, the dialogue sample data is optimized and adjusted. The optimized and adjusted dialogue sample data is used as the dialogue sample data. The initial guidance model is trained using the dialogue sample data to obtain the target guidance model.
12. A guiding method, characterized in that, include: Receive user responses to the object to be addressed; The response statement is input into the target guidance model, which generates the guidance statement corresponding to the response statement and provides feedback. The target guidance model is determined according to any one of claims 1 to 11.
13. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, It stores computer-executable instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-12.
15. A computer program product, characterized in that, Includes a computer program or instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-12.