Complex multi-field guided teaching question and answer generation method and device and storage medium

By constructing a multi-round question-and-answer dataset and a large language model for guiding teaching question-and-answer language, the problem of small scope of application and single evaluation indicators is solved, and efficient guidance and comprehensive evaluation of multi-field teaching question-and-answer is achieved.

CN120448505AActive Publication Date: 2025-08-08BEIJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202510900516.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-08-08
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

The existing teaching Q&A language model has a single application field, lacks guidance ability, poor interaction ability, and single teaching effect evaluation indicators, making it difficult to meet diversified teaching needs.

Method used

Collect teaching Q&A pairs from multiple fields, transform them into thinking chain form, build a data set of multiple rounds of question and answer pairs, and build a large language model for guiding teaching Q&A based on prompt word engineering and context learning mechanisms, and use multiple evaluation indicators to optimize the model to improve guidance ability and evaluation accuracy.

Benefits of technology

It enhances the applicability and practicality of the teaching question-and-answer model, improves the model's guidance ability, provides multi-dimensional teaching effect evaluation, and is suitable for multi-field teaching scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448505A_ABST
    Figure CN120448505A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of large language models, in particular to a complex multi-field guided teaching question and answer generation method, device and equipment and a computer storage medium. According to the complex multi-field guided teaching question and answer generation method, aiming at the problem that the model is single in application field, the corresponding multi-round question and answer pair data set is processed by using a multi-field data source, and the model is finely adjusted based on the multi-round question and answer pair data set, so that the problem that the related field is single is solved, and the applicability and practicability of the teaching question and answer model are enhanced; aiming at the problem that the model lacks guiding ability, the input of the teaching question and answer model is further processed through thinking chain-based question extraction and disassembly and prompt engineering and context learning mechanism-based processing, so that the model question guiding ability is improved; in order to solve the problem that teaching effect evaluation indexes are single, the invention provides a new evaluation system, and a plurality of evaluation indexes can more comprehensively and accurately evaluate and optimize model teaching effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of large language models, and in particular to a method, device, equipment, and computer storage medium for generating complex multi-domain guided teaching questions and answers. Background Art

[0002] In recent years, large language models have demonstrated tremendous potential in the field of smart education, thanks to their superior knowledge and problem-understanding capabilities. In particular, using large language models as intelligent teachers to help students solve various learning problems has become a key research area in educational question-answering systems.

[0003] Current research mainly focuses on two aspects: one is to make the general large language model better adapt to personalized teaching needs by optimizing prompt words, such as thought chain (COT) and thought tree (TOT); the other is to fine-tune the large model based on a specific multi-round question and answer dataset to build a customized large language model specifically for teaching scenarios.

[0004] However, current large-scale language models for teaching question-answering are mostly optimized for specific domains or tasks (such as math problem solving and language learning), resulting in a very limited scope of applicability. Furthermore, existing models struggle to meet the diverse teaching needs of real-world education, hindering their widespread adoption. Furthermore, existing models lack adaptability to new domains. Emerging disciplines or rapidly evolving knowledge domains often require retraining or adjustments, which consumes significant time and resources and reduces their practical usability.

[0005] While existing large-scale language models for teaching question-answering can generate logically coherent answers, they often provide passive responses rather than proactive guidance. For example, when faced with open-ended questions, the models often directly output answers, failing to help students think independently through step-by-step questions or heuristic dialogues, thus neglecting the development of students' thinking skills.

[0006] Existing technologies for evaluating teaching effectiveness typically rely on simple question-answer matching or standardized test results, failing to fully consider the diversity of students' actual learning outcomes (such as knowledge mastery, skill improvement, and development of thinking skills). Furthermore, existing evaluation systems overlook the multidimensional nature of teaching objectives, focusing solely on superficial language matching while ignoring deeper learning outcomes. Summary of the Invention

[0007] To this end, the technical problem to be solved by the present invention is to overcome the problems in the existing technology of large language models for teaching questions and answers, such as single application field, small scope of application, lack of guidance ability, poor interactive ability and single teaching effect evaluation indicators.

[0008] To solve the above technical problems, the present invention provides a complex multi-domain guided teaching question and answer generation method, comprising: Collect teaching question-answer pairs from multiple fields and convert them into thought chains to construct a multi-round question-answer pair dataset, which is divided into training and test sets in proportion. Taking the current user question input and the current conversation history as input and constructing a complete guiding teaching prompt word based on the prompt word engineering and context learning mechanism, and taking the guiding teaching answer as output, constructing a multi-round guiding teaching question and answer large language model, and training the multi-round guiding teaching question and answer large language model based on the training set to obtain a target teaching question and answer large language model; Testing the target teaching question-answering large language model based on the test set, and performing quality assessment and optimization on the target teaching question-answering large language model based on multiple indicators including a first indicator measuring the length difference between the generated text and the reference answer, a second indicator measuring the degree of vocabulary matching between the generated text and the reference answer, and a third indicator evaluating the degree of overlap between the generated text and the reference answer at the word level, the phrase level, and the longest common subsequence; Continuously monitor user online question input and obtain historical conversation records in real time, and generate guiding teaching answers one by one based on the optimized target teaching question and answer language model.

[0009] Preferably, the collecting of teaching question-answer pairs in multiple fields and converting them into thought chain form to construct a multi-round question-answer pair dataset includes: Collect teaching question-answer pairs in multiple fields; By analyzing the characteristics of teaching question-answer pairs, including question complexity and answer completeness, and evaluating the relevance and accuracy of teaching question-answer pairs through a large language model, the teaching question-answer pairs are screened; Based on the prompt word project, the screened teaching question and answer pairs are transformed into a thought chain form to construct a multi-round question and answer pair dataset; Based on multiple dimensions of students' key cognitive states, we simulate diverse responses to the same question and expand the dataset of multi-round question-answering.

[0010] Preferably, the method of constructing a multi-round guided teaching question-answering large language model using the current user question input and the current conversation history as input, constructing a complete guided teaching prompt word based on prompt word engineering and context learning mechanism, and outputting a guided teaching answer includes: Build a memory module to store user conversation records; Construct a prompt word combination module to generate complete prompt words for teaching guidance based on prompt word engineering and context learning mechanism, taking the current user question input and the current conversation history obtained from the memory module; Build a large model reasoning module to generate teaching guidance answers based on complete teaching guidance prompt words.

[0011] Preferably, the method of generating guiding teaching complete prompt words based on prompt word engineering and context learning mechanism by inputting the current user question and the current conversation history records obtained from the memory module includes: Generate structured teaching guidance word templates based on the integration of thought chain reasoning and few-sample example learning strategy; Based on the prompt word template, the complete prompt words for guiding teaching are dynamically generated by combining the current user question input and the contextual key information of the current dialogue history obtained from the memory module.

[0012] Preferably, before obtaining the target teaching question-answering large language model, the method further includes: fine-tuning the trained multi-round guided teaching question-answering large language model using a low-rank matrix model.

[0013] Preferably, the calculation formula of the first indicator is:

[0014] Among them, R represents the reference answer, C represents the generated text, T(X) represents the word segmentation of text X, and |T(X)| represents the length of text X.

[0015] Preferably, the quality assessment and optimization of the target teaching question-answering language model includes: The target teaching question-answering large language model is evaluated based on the weighted average score of multiple indicators. If the evaluation score is less than a preset threshold, the performance of the target teaching question-answering large language model on the test set is analyzed, and the target teaching question-answering large language model is optimized by one or more of multiple methods including adding training data, adjusting the prompt word template, and optimizing the model hyperparameters.

[0016] The present invention also provides a complex multi-field guided teaching question and answer generation device, comprising: The module for constructing a multi-round question-answer pair dataset is used to collect teaching question-answer pairs from multiple fields, convert them into thought chains, construct a multi-round question-answer pair dataset, and divide it into training and test sets in proportion. A target teaching question and answer large language model acquisition module is used to take the current user question input and the current conversation history as input, construct a complete teaching prompt word based on the prompt word engineering and context learning mechanism, and output a guided teaching answer to construct a multi-round guided teaching question and answer large language model, and train the multi-round guided teaching question and answer large language model based on the training set to obtain a target teaching question and answer large language model; a model optimization module, configured to test the target teaching question-answering large language model based on the test set, and perform quality assessment and optimization on the target teaching question-answering large language model based on a plurality of indicators, including a first indicator measuring the length difference between the generated text and the reference answer, a second indicator measuring the degree of vocabulary matching between the generated text and the reference answer, and a third indicator evaluating the degree of overlap between the generated text and the reference answer at the word level, the phrase level, and the longest common subsequence; The teaching question and answer generation module is used to continuously monitor user online question input and obtain historical conversation records in real time. Based on the optimized target teaching question and answer language model, it generates guiding teaching answers one by one.

[0017] The present invention also provides a complex multi-field guided teaching question and answer generation device, comprising: Memory for storing computer programs; A processor is used to implement the above-mentioned steps of a complex multi-field guided teaching question and answer generation method when executing the computer program.

[0018] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned complex multi-field guided teaching question and answer generation method are implemented.

[0019] The above technical solution of the present invention has the following advantages over the prior art: The complex multi-field guided teaching question and answer generation method described in the present invention addresses the problem of the single applicable field of the model. It utilizes multi-field data sources to process them into corresponding multi-round question and answer data sets, and fine-tunes the model based on this multi-round question and answer data set, thereby solving the problem of the single applicable field and enhancing the applicability and practicality of the teaching question and answer model. To address the problem of the model's lack of guidance ability, the present invention further processes the input of the teaching question and answer model through question extraction and decomposition based on the thinking chain and processing based on prompt engineering and contextual learning mechanisms, thereby improving the model's problem guidance ability. To address the problem of the single teaching effect evaluation indicator, the present invention proposes a new evaluation system with multiple evaluation indicators that can more comprehensively and accurately evaluate and optimize the model's teaching effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments of the present invention in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart for implementing a complex multi-field guided teaching question-answer generation method provided by the present invention; Figure 2 It is a flowchart for constructing a multi-round question-answering dataset; Figure 3This is the architecture diagram of the multi-round guided question-answering model; Figure 4 1 is a schematic diagram of a model prompt word template in one embodiment of the present invention; Figure 5 This is a comparison chart of the intelligent teaching question-answering effect under the existing technology and the intelligent teaching question-answering effect of the present invention. DETAILED DESCRIPTION

[0021] The core of the present invention is to provide a complex multi-field guided teaching question and answer generation method, device, equipment and computer storage medium, which effectively solves the problems of large language models for teaching questions and answers having a single application field, lacking guidance capabilities, poor interactive capabilities and single teaching effect evaluation indicators.

[0022] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0023] Please refer to Figure 1. Figure 1 This is a flowchart for implementing a complex multi-domain guided teaching question-answer generation method provided by the present invention; the specific operation steps are as follows: S101: Collect teaching question-answer pairs from multiple fields and convert them into thought chains. Build a multi-round question-answer pair dataset and divide it into training and test sets in proportion. S102: Taking the current user question input and the current conversation history as input and constructing a complete guiding teaching prompt word based on the prompt word engineering and context learning mechanism, and outputting a guiding teaching answer, constructing a multi-round guiding teaching question and answer large language model, and training the multi-round guiding teaching question and answer large language model based on the training set to obtain a target teaching question and answer large language model; S103: Testing the target teaching question-answering large language model according to the test set, and performing quality assessment and optimization on the target teaching question-answering large language model based on multiple indicators including a first indicator measuring the length difference between the generated text and the reference answer, a second indicator measuring the degree of vocabulary matching between the generated text and the reference answer, and a third indicator evaluating the degree of overlap between the generated text and the reference answer at the word level, the phrase level, and the longest common subsequence; S104: Continuously monitor the user's online question input and obtain historical conversation records in real time. Based on the optimized target teaching question and answer language model, generate guiding teaching answers one by one.

[0024] Based on the above embodiment, this embodiment describes step S101 in detail: In one embodiment, collecting teaching question-answer pairs in multiple fields and converting them into thought chains to construct a multi-round question-answer pair dataset includes: Collect teaching question-answer pairs in multiple fields; By analyzing the characteristics of teaching question-answer pairs, including question complexity and answer completeness, and evaluating the relevance and accuracy of teaching question-answer pairs through a large language model, the teaching question-answer pairs are screened; Based on the prompt word project, the screened teaching question and answer pairs are transformed into a thought chain form to construct a multi-round question and answer pair dataset; Based on multiple dimensions of students' key cognitive states, we simulate diverse responses to the same question and expand the dataset of multi-round question-answering.

[0025] In a specific embodiment, the data sources of teaching question-answer pairs in multiple fields may include: Educational platforms: Extract question-and-answer pairs from course discussion forums and exercise solutions on platforms such as Coursera, edX, and NetEase Cloud Classroom.

[0026] Academic resources: Use papers and textbooks in academic databases such as JSTOR and CNKI to extract key knowledge points and answers.

[0027] Competition projects: Extract technical problems and solutions from project documents of innovation and entrepreneurship competitions and academic competitions.

[0028] Ensure that the questions and answers cover at least 10 subject areas such as mathematics, physics, chemistry, history, and literature.

[0029] Extraction methods may include: Natural language processing technology: Use named entity recognition (NER) to extract key terms in questions, and use relation extraction technology to identify the logical relationship between questions and answers.

[0030] Large language model assistance: Prompt words (such as "Please extract technical problems and their solutions from the following text") guide the model to automatically generate question-answer pairs.

[0031] like Figure 2 In one embodiment, the present invention utilizes a large language model to convert the extracted question-answer pairs into thought chains, which are then processed into a dialogue format that fits the teacher-student teaching scenario. In this process, it is first necessary to ensure the logic and accuracy of the thought chains, and secondly, to ensure that the generated dialogue style is close to the real teaching interaction scenario. To this end, we use prompt-based techniques, including thought chains and few-shot learning methods, such as: Break down complex problems into logically coherent sub-problems. For example: Original question: "How to design a low-cost smart home system?" Thought chain: What are the core components of a smart home system? What is the low-cost implementation of each component? How to ensure system compatibility and security? Conversational format conversion: Convert the question-answer pair into a teacher-student dialogue format, for example: Student: "Why does photosynthesis require light?" Teacher: "What is the source of energy for photosynthesis? What role does light play?" In one embodiment, the multi-round question-answering dataset is expanded based on multiple student key cognitive state dimensions to simulate diverse responses to the same question, including: Based on educational psychology theory, six types of students are designed: Weak knowledge type: There are frequent factual errors in the answers.

[0032] Logic disorder type: The answers are disorganized and jumpy.

[0033] Superficial type: Only answers surface questions without in-depth analysis.

[0034] Excessive divergence: The answer deviates from the core of the question and introduces irrelevant content.

[0035] Perfectionist type: answers are lengthy and they overly pursue perfection.

[0036] All-rounder: Answers are accurate, concise and logically clear.

[0037] Answer generation: For the same question, differentiated answers are generated for each type of student, simulating real-world teaching scenarios. Generative adversarial networks (GANs) are used to automatically generate more diverse student answers and expand the dataset of multi-round question-answer pairs.

[0038] Based on the above embodiment, this embodiment describes step S102 in detail: like Figure 3 In one embodiment, a multi-round guided teaching question-answering large language model is constructed based on prompt word engineering and contextual learning mechanisms, using the current user question input and the current conversation history as input, and outputting a guided teaching answer. The model includes: Build a memory module to store user conversation records; Construct a prompt word combination module to generate complete prompt words for teaching guidance based on prompt word engineering and context learning mechanism, taking the current user question input and the current conversation history obtained from the memory module; Build a large model reasoning module to generate teaching guidance answers based on complete teaching guidance prompt words.

[0039] The memory module is responsible for storing and updating the current conversation's memory, providing context for subsequent conversations. At the start of a conversation, the memory module provides the prompt word combination module with the current conversation's history. When the large model question-answering module generates new output, the memory module promptly updates its stored content, saving the user input and model's response as a new round of conversation. In one embodiment, the conversation history is divided into short-term memory (the most recent five rounds) and long-term memory (key conclusions), which are stored in the memory module.

[0040] The prompt word module first receives user input and retrieves the current conversation history from the memory module. The module then embeds this information into a preset prompt word template. The template typically contains the specific content of the user input, the historical context of the current conversation, and specific task instructions or role settings. Finally, the module outputs a complete prompt word string for use by the large model inference module.

[0041] Without fine-tuning model parameters, this paper utilizes prompt word engineering and contextual learning mechanisms to enable large language models to complete task responses in specific roles (such as a teacher). By designing structured prompt word templates, the model can effectively guide user questions and provide high-quality answers without additional training. To improve the logic and accuracy of the question-answering process, this paper proposes a prompt word construction method that integrates Chain-of-Thought (CoT) reasoning and few-shot learning strategies. This method significantly enhances the model's ability to understand and respond to complex questions by guiding step-by-step reasoning and referencing a small number of typical examples.

[0042] Furthermore, this invention supports automatic loading and contextual integration of conversation history, dynamically constructing a complete prompt word structure encompassing both historical interaction information and current input. By inputting this structured prompt word template into a pre-trained language model, it generates instructionally guided natural language output, enabling an efficient and intelligent interactive question-and-answer experience. This technical solution boasts excellent versatility and scalability, making it suitable for a variety of role-playing-based intelligent question-and-answer systems, particularly in application scenarios such as educational assistance and online tutoring.

[0043] In one embodiment, the prompt word combination module is used to generate a structured teaching guidance prompt word template based on the integration of thought chain reasoning and few-shot example learning strategy, and dynamically generate a complete teaching guidance prompt word by combining the current user question input and the contextual key information of the current conversation history obtained from the memory module. For example: Role setting: Clarify the model's identity (e.g., "You are a patient physics teacher").

[0044] Task Statement: Define the response requirements (e.g., “Please use Socratic questions to guide student thinking”).

[0045] Example injection: Add a few sample examples to the prompt words (such as "Student: Why is the earth round? Teacher: What effect do you think gravity has on the shape of objects?").

[0046] First-round dialogue template: "Please answer the following question as a teacher: [user question input]." Multi-turn dialogue template: "Based on the previous discussion ([historical dialogue record]), please further guide students to think about: [user question input]." Dynamically integrate conversation history and user input to generate a complete context; in addition, it can extract summaries of long conversation histories to retain key information.

[0047] like Figure 4 , Figure 4 This is a schematic diagram of a model prompt word template in another embodiment.

[0048] The large model inference module generates the model's response based on the prompt and is the core of the entire system. This module first receives the complete prompt generated by the prompt combination module and inputs it into the large model, triggering the model's inference process. After the model generates an answer based on the prompt, it returns the result. The generated answer is also passed to the memory module to update the conversation history.

[0049] Based on the above embodiments, in one embodiment, before obtaining the target teaching question and answer large language model, the method also includes fine-tuning the trained multi-round guided teaching question and answer large language model using a low-rank matrix model. The low-rank matrix model fine-tuning method is a technology used to fine-tune the instruction model. The core idea of this method is to reduce the number of model parameters by introducing low-rank matrix decomposition technology and only update a small number of parameters during the fine-tuning process, thereby significantly reducing computing costs and storage requirements while maintaining high performance.

[0050] like Figure 5 , Figure 5 This is a comparison chart of the intelligent teaching question-answering effect under the existing technology and the intelligent teaching question-answering effect of the present invention.

[0051] Based on the above embodiment, this embodiment describes step S103 in detail: The present invention proposes a first indicator for measuring the length difference between the generated text and the reference answer, thereby reflecting the model's ability to balance content comprehensiveness and conciseness. Since there is no standard answer in the teaching process, the previous indicator of the similarity between the response generated by the calculation model and the annotation response may not be able to fully evaluate the teaching quality of large language models. When the model is reasoning, it often gives answers that are too complex. Therefore, the present invention proposes a new indicator, logarithmic proportional error, to measure the model's ability to balance content comprehensiveness and conciseness. The calculation formula of the first indicator is:

[0052] Among them, R represents the reference answer, C represents the generated text, T(X) represents the word segmentation of text X, and |T(X)| represents the length of text X.

[0053] The calculation formula for the second indicator is:

[0054] Where: BP: Length Penalty, defined as:

[0055] c: length of candidate translation; r: best matching length of reference translation : n-gram precision, defined as:

[0056] : weights, usually evenly distributed, satisfying

[0057] The calculation formula of the third indicator is: ROUGE-1, ROUGE-2, ROUGE-L: Evaluate the overlap between the generated text and the reference answer at the word level, phrase level, and longest common subsequence level, respectively.

[0058]

[0059] Where: S: reference summary set; g: n-gram; Countmatch(g): the number of n-grams that match between the candidate summary and the reference summary; Count(g): the total number of n-grams in the reference summary.

[0060] Evaluate the overall performance of the model by taking into account multiple indicators. For example, you can calculate a weighted average score and adjust the weights of each indicator based on actual needs.

[0061] Based on the results of the quality assessment, the model is optimized: Analyze the model's performance on the test set and identify any issues (e.g., generated text that is too long, poor vocabulary matching, etc.). Based on the results of this analysis, adjust the model's training strategy or structure. For example, increase training data, adjust the prompt word template, optimize the model's hyperparameters, etc. Retrain and retest the optimized model to verify the effectiveness of the optimization.

[0062] In one embodiment, quality evaluation and optimization of the target teaching question-answering language model includes: The target teaching question-answering large language model is evaluated based on a weighted average score of multiple indicators. If the evaluation score is less than a preset threshold, the performance of the target teaching question-answering large language model on the test set is analyzed, and the target teaching question-answering large language model is optimized by one or more of the following methods: adding training data, adjusting the prompt word template, and optimizing the model hyperparameters: Based on the above embodiment, this embodiment describes step S104 in detail: The embodiment of the present invention further provides a device for generating complex multi-domain guided teaching questions and answers; the specific device may include: The module for constructing a multi-round question-answer pair dataset is used to collect teaching question-answer pairs from multiple fields, convert them into thought chains, construct a multi-round question-answer pair dataset, and divide it into training and test sets in proportion. A target teaching question and answer large language model acquisition module is used to take the current user question input and the current conversation history as input, and construct a complete teaching prompt word based on the prompt word engineering and context learning mechanism, and output the guided teaching answer, thereby constructing a multi-round guided teaching question and answer large language model, and training the multi-round guided teaching question and answer large language model based on the training set to obtain the target teaching question and answer large language model; a model optimization module, configured to test the target teaching question-answering large language model based on the test set, and perform quality assessment and optimization on the target teaching question-answering large language model based on a plurality of indicators, including a first indicator measuring the length difference between the generated text and the reference answer, a second indicator measuring the degree of vocabulary matching between the generated text and the reference answer, and a third indicator evaluating the degree of overlap between the generated text and the reference answer at the word level, the phrase level, and the longest common subsequence; The teaching question and answer generation module is used to continuously monitor user online question input and obtain historical conversation records in real time. Based on the optimized target teaching question and answer language model, it generates guiding teaching answers one by one.

[0063] The complex multi-field guided teaching question and answer generation device of this embodiment is used to implement the aforementioned complex multi-field guided teaching question and answer generation method. Therefore, the specific implementation method of the complex multi-field guided teaching question and answer generation device can be seen in the embodiment part of the complex multi-field guided teaching question and answer generation method above. For example, the multi-round question and answer data set construction module, the target teaching question and answer large language model acquisition module, the model optimization module, and the teaching question and answer generation module are respectively used to implement steps S101, S102, S103, S104 and S105 in the above-mentioned complex multi-field guided teaching question and answer generation method. Therefore, its specific implementation method can refer to the description of the corresponding each part embodiment, and will not be repeated here.

[0064] A specific embodiment of the present invention also provides a complex multi-field guided teaching question and answer generation device, including: a memory for storing a computer program; a processor for implementing the steps of the above-mentioned complex multi-field guided teaching question and answer generation method when executing the computer program.

[0065] A specific embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned complex multi-field guided teaching question and answer generation method are implemented.

[0066] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0067] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0068] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0069] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0070] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.

Claims

1. A complex multi-domain guided teaching question and answer generation method, characterized by: include: Collect teaching question-answer pairs from multiple fields and convert them into thought chains to construct a multi-round question-answer pair dataset, which is divided into training and test sets in proportion. Taking the current user question input and the current conversation history as input and constructing a complete guiding teaching prompt word based on the prompt word engineering and context learning mechanism, and taking the guiding teaching answer as output, constructing a multi-round guiding teaching question and answer large language model, and training the multi-round guiding teaching question and answer large language model based on the training set to obtain a target teaching question and answer large language model; Testing the target teaching question-answering large language model based on the test set, and performing quality assessment and optimization on the target teaching question-answering large language model based on multiple indicators including a first indicator measuring the length difference between the generated text and the reference answer, a second indicator measuring the degree of vocabulary matching between the generated text and the reference answer, and a third indicator evaluating the degree of overlap between the generated text and the reference answer at the word level, the phrase level, and the longest common subsequence; Continuously monitor user online question input and obtain historical conversation records in real time, and generate guiding teaching answers one by one based on the optimized target teaching question and answer language model.

2. The complex multi-domain guided teaching question and answer generation method according to claim 1 is characterized in that: The collection of teaching question-answer pairs in multiple fields and their conversion into thought chain form to construct a multi-round question-answer pair dataset includes: Collect teaching question-answer pairs in multiple fields; By analyzing the characteristics of teaching question-answer pairs, including question complexity and answer completeness, and evaluating the relevance and accuracy of teaching question-answer pairs through a large language model, the teaching question-answer pairs are screened; Based on the prompt word project, the screened teaching question and answer pairs are transformed into a thought chain form to construct a multi-round question and answer pair dataset; Based on multiple dimensions of students' key cognitive states, we simulate diverse responses to the same question and expand the dataset of multi-round question-answering.

3. The complex multi-domain guided teaching question and answer generation method according to claim 1 is characterized in that: The method of constructing a multi-round guided teaching question-answering large language model using the current user question input and the current conversation history as input and constructing a guided teaching complete prompt word based on prompt word engineering and context learning mechanism, with guided teaching answers as output, includes: Build a memory module to store user conversation records; Construct a prompt word combination module to generate complete prompt words for teaching guidance based on prompt word engineering and context learning mechanism, taking the current user question input and the current conversation history obtained from the memory module; Build a large model reasoning module to generate teaching guidance answers based on complete teaching guidance prompt words.

4. The complex multi-domain guided teaching question and answer generation method according to claim 3 is characterized in that: The method of generating a complete instructional prompt word based on the prompt word engineering and context learning mechanism by inputting the current user question and the current conversation history record obtained from the memory module includes: Generate structured teaching guidance word templates based on the integration of thought chain reasoning and few-sample example learning strategy; Based on the prompt word template, the complete prompt words for guiding teaching are dynamically generated by combining the current user question input and the contextual key information of the current dialogue history obtained from the memory module.

5. The complex multi-domain guided teaching question and answer generation method according to claim 1 is characterized in that: Before obtaining the target teaching question-answering large language model, the method also includes: fine-tuning the trained multi-round guided teaching question-answering large language model using a low-rank matrix model.

6. The complex multi-domain guided teaching question and answer generation method according to claim 1 is characterized in that: The calculation formula of the first indicator is: Among them, R represents the reference answer, C represents the generated text, T(X) represents the word segmentation of text X, and |T(X)| represents the length of text X.

7. The complex multi-domain guided teaching question and answer generation method according to claim 1 is characterized in that: The quality evaluation and optimization of the target teaching question-answering language model includes: The target teaching question-answering large language model is evaluated based on the weighted average score of multiple indicators. If the evaluation score is less than a preset threshold, the performance of the target teaching question-answering large language model on the test set is analyzed, and the target teaching question-answering large language model is optimized by one or more of multiple methods including adding training data, adjusting the prompt word template, and optimizing the model hyperparameters.

8. A complex multi-domain guided teaching question and answer generation device, characterized by: include: The module for constructing a multi-round question-answer pair dataset is used to collect teaching question-answer pairs from multiple fields, convert them into thought chains, construct a multi-round question-answer pair dataset, and divide it into training and test sets in proportion. A target teaching question and answer large language model acquisition module is used to take the current user question input and the current conversation history as input, construct a complete teaching prompt word based on the prompt word engineering and context learning mechanism, and output a guided teaching answer to construct a multi-round guided teaching question and answer large language model, and train the multi-round guided teaching question and answer large language model based on the training set to obtain a target teaching question and answer large language model; a model optimization module, configured to test the target teaching question-answering large language model based on the test set, and perform quality assessment and optimization on the target teaching question-answering large language model based on a plurality of indicators, including a first indicator measuring the length difference between the generated text and the reference answer, a second indicator measuring the degree of vocabulary matching between the generated text and the reference answer, and a third indicator evaluating the degree of overlap between the generated text and the reference answer at the word level, the phrase level, and the longest common subsequence; The teaching question and answer generation module is used to continuously monitor user online question input and obtain historical conversation records in real time. Based on the optimized target teaching question and answer language model, it generates guiding teaching answers one by one.

9. A device for generating complex multi-domain guided teaching questions and answers, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of a complex multi-field guided teaching question and answer generation method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a complex multi-field guided teaching question-and-answer generation method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Training method and device for question and answer pair generation model

    CN116186212A

  • Large language model-based Scogla bottom type mathematics teaching method

    CN119107206A

  • Multi-modal large model self-reinforcement learning method based on thinking chain guidance

    CN119670878A

  • Training method of thinking chain compression large model for rewriting task, electronic equipment and storage medium

    CN119940553A

  • System and method using intelligent privacy assistant model for large language model operation

    US20250131122A1

Cited By

  • Training method and device of dialogue interactive German intelligent writing feedback large model

    CN121388122A

  • Training method and device of dialogue interactive german intelligent writing feedback large model

    CN121388122B

  • Training sample generation and model training method and device, storage medium and product

    CN121525752A

  • Training sample generation and model training method and device, storage medium and product

    CN121525752B

  • Teaching material question and answer method and system based on course perception mixed retrieval and teacher alignment prompt

    CN121901373A