Large language model-based Scogla bottom type mathematics teaching method

The Socratic mathematics teaching method enhances large language models with guided teaching data and Socratic prompts to address teaching deficiencies, achieving improved response quality and personalized learning.

CN119107206APending Publication Date: 2024-12-10EAST CHINA NORMAL UNIV

Patent Information

Application Number
CN202411112615.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

Large language models lack the ability to understand teaching concepts, guide teaching processes, provide appropriate questioning, and adapt to diverse student personalities, and are limited by insufficient training data and privacy concerns.

Method used

A Socratic mathematics teaching method is developed, using a large language model fine-tuned with LoRA, incorporating guided teaching data, Socratic prompts, and additional knowledge to enhance heuristic teaching abilities, enabling step-by-step guidance and personalized learning.

Benefits of technology

The method improves the reliability and quality of responses, providing personalized and interactive learning experiences, outperforming traditional models in evaluation indicators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107206A_ABST
    Figure CN119107206A_ABST
Patent Text Reader

Abstract

The invention discloses a large language model-based Scogabi mathematical teaching method, which is integrated with a Scogabi teaching method, a training model has a heuristic teaching ability, and through multi-step questions and answers such as reverse questions, questions and challenges, advanced thinking skills such as discussion, debate, evaluation and analysis of students are motivated, and the teaching efficiency is improved. And the autonomous learning and innovation capabilities of students are cultivated. According to the method, firstly, big language model guide type data synthesis combined with multi-user setting is proposed, data expansion is carried out on mathematical question data, and rich teacher-student dialogue teaching data is formed; furthermore, a knowledge-enhanced Scogla bottom type teaching large language model is provided, the improvement of large language model guide type teaching quality is realized, links such as review, guidance, thinking excitation, error correction, induction and summarization and the like can be executed skilled, and accurate and enlightenment-rich feedback is generated. Compared with other strong generative models, experimental results show that the model has great advantages in teaching accuracy and guidance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a generative dialogue task in the field of natural language, and in particular to a Socratic mathematics teaching method based on a large language model and combining a Socratic teaching method with a generative dialogue task for mathematics teaching. Background Art

[0002] When facing subject teaching, the large language model in general fields focuses on the accuracy of answering questions. People's research on large language models is also mainly focused on improving the ability to respond, while research on teaching is very limited. The combination of large language models and intelligent teaching is usually reflected in the use of prompt word engineering, which directly allows the large model to play the role of the teacher and perform role-playing tasks. In practical applications, there are still the following challenges:

[0003] First, the large language model lacks the ability to understand teaching concepts and guide teaching. When answering questions, the large language model tends to give answers directly, rather than gradually guiding students to think for themselves, and lacks a teaching process.

[0004] Second, the large language model lacks guidance on teaching methodology. It is unclear when, how, and what to ask. Too many or too few questions, too difficult or too easy, will affect students' learning process.

[0005] Third, there is a lack of training data sets for guided teaching. Although classroom videos can provide a large amount of teaching guidance data, there are problems such as privacy security, crowdsourcing costs, and annotation quality.

[0006] Fourth, real teaching scenarios are rich in situations and students have diverse personalities. Large language models find it difficult to control the teaching process when faced with tricky communications.

[0007] In summary, although the big language model has opened up a new path in the field of intelligent education, there are still many pain points that need to be solved. In order to practice and innovate the big language model within the framework of intelligent education, it is indispensable to combine it with traditional teaching methods. By integrating classic teaching theories with cutting-edge artificial intelligence technology, the big language model is expected to start a revolution in the field of education, making personalized and interactive learning experiences possible, thereby greatly improving educational effectiveness and students' learning motivation. Summary of the invention

[0008] The purpose of the present invention is to provide a Socratic mathematics teaching method based on a large language model, and to use the Socratic teaching method to promote the large language model of conversational mathematics teaching to integrate Socratic questioning into mathematical intelligence education. The present invention realizes the construction of a large language model in the field of education by constructing a high-quality guided mathematics teaching dataset containing original questions, answers and solutions, and coordinating the Socratic teaching method system prompts and additional knowledge introduction. As a powerful baseline, the model can improve the reliability and quality of the generated responses through the introduction of additional knowledge. By introducing the teaching structure of review, inspiration, error correction and summary through system prompts, the model will automatically adopt a set of step-by-step teaching strategies in the teaching process. Extensive experiments have shown that the teaching method proposed by the present invention is superior to the teaching effect of the traditional large model in terms of rich automatic and manual / GPT-4 evaluation indicators.

[0009] The specific technical solution for achieving the purpose of the present invention is:

[0010] A Socratic mathematics teaching method based on a large language model is characterized by: fine-tuning the large language model with LoRA based on guided teaching data constructed by multiple personas, combining Socratic teaching prompts (a teaching structure of review, inspiration, error correction, and summary) and introducing additional knowledge in the model training process and reasoning process to enhance the heuristic teaching ability of the large language model and enable the large language model to adopt a step-by-step teaching process; wherein:

[0011] The synthesis of the guided teaching data constructed by the multi-person setting includes the following steps:

[0012] Step 1: Construct the prompt words of the data, which are divided into task requirements, task details, student characteristics and output samples; to ensure the diversity of the data, a variety of personalities are designed in the student characteristics, including smart, careless, negative, naughty and timid, to simulate students with different personalities in the teaching process;

[0013] Step 2: Based on the data generation of the large language model, the data prompt words constructed in step 1 are input into the large language model (such as GPT-4o) to generate dialogue data;

[0014] Step 3: Data cleaning: clean and filter the data with fewer generated data rounds, inconsistent logic, and format errors to improve data quality;

[0015] The model training process and reasoning process specifically include:

[0016] Step 1: The training process uses synthetic guided teaching data as the training data set, and introduces system prompt words P and additional knowledge, namely question analysis K, to explain the Socratic teaching method and model task requirements in the form of prompt words before and after the target question Q, and performs efficient LoRA fine-tuning training on the base large language model;

[0017] Step 2: Given question Q, system prompt word P, and additional knowledge K, the goal of the solution of the present invention is to i-1 = {R1,U1,R2,U2,...,R i- ,U i-1}Where R i is the user's question and answer in round i, generating the response U i ; The specific form is as follows:

[0018]

[0019] Where R i j is the response R i The jth word of |R i | is R i length; use a large language model Μ θ To simulate the generation probability p where θ represents M θ The number of learnable parameters is

[0020]

[0021] Then, the cross entropy function is used to measure the response generation loss, where N is the number of rounds of the conversation:

[0022]

[0023] Step 3: During the reasoning process of the large language model, the system prompt words P and additional knowledge K consistent with those in the training phase are also used to achieve large language model reasoning responses with better teaching quality.

[0024] The beneficial effects of the present invention are:

[0025] A scheme for constructing a guided teaching dataset is proposed, which will help to further construct more large language model training datasets in the field of education. A Socratic mathematics teaching method based on a large language model is proposed. Training a large language model in the field of mathematics teaching can produce better teaching results in the face of mathematical problems. A large language model prompt for the Socratic teaching method is designed, which introduces additional knowledge to guide the teaching process, assists the large language model to produce more guiding and more reliable answers, and realizes guided teaching that teaches students in accordance with their aptitude. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flow chart of the present invention;

[0027] Figure 2 Flowchart for data synthesis;

[0028] Figure 3 Flowchart for guided large language model training;

[0029] Figure 4-Figure 5 This is a rendering of the present invention. DETAILED DESCRIPTION

[0030] The present invention is further described in detail below in conjunction with the examples and drawings. The process, conditions, experimental methods, etc. for implementing the present invention, except for the contents specifically mentioned below, are all common knowledge and common common sense in the art and are not particularly limited by the present invention.

[0031] See also Figure 1 , a Socratic mathematics teaching method based on a large language model of the present invention specifically includes:

[0032] (1) Synthesis of mathematics guided teaching data based on multiple personas: A variety of system prompts are constructed to construct teacher-student dialogue data. The prompts specify the student's personality and learning performance, and limit the teacher's teaching method. Based on existing mathematics test questions and combined with a variety of system prompts, a teacher-student dialogue data set with different styles is constructed. After multiple rounds of data cleaning, a high-quality mathematics guided teaching dialogue is formed.

[0033] Step 1: Building a diverse character

[0034] In order to improve the diversity of the model, the present invention proposes a method for constructing multiple student personalities. Specifically, the present invention sets smart, careless, negative, naughty, timid, etc., to construct a teacher tutoring students with different personalities;

[0035] Step 2: Data synthesis based on large language model

[0036] Based on the persona set in step 1, the present invention uses a large language model such as GPT-4o to generate diverse guided conversation data;

[0037] Step 3: Data cleaning

[0038] Finally, the diverse dialogues generated in step 2 are cleaned and filtered, mainly for problems such as format errors, short dialogue processes, and logical errors.

[0039] (2) Knowledge-enhanced guided large language model: Using synthetic datasets as training datasets, and introducing system prompts and additional extended knowledge (analysis) for explaining the Socratic method, the base model qwen1.5-7B is trained with LoRA. During the model's reasoning process, the corresponding system prompts and additional extended knowledge are also enabled, which can achieve large language model reasoning responses with better teaching quality.

[0040] Step 1: Prompt word construction: The Socratic system prompt word construction is based on external knowledge. The prompt words include the task setting, task requirements P and students' questions Q. At the same time, external knowledge K is added by using prompt words, mainly taking the question analysis as part of the input to reduce the model's hallucination problem.

[0041] Step 2: Model training: Given question Q, prompt word P, and additional knowledge K, the goal of the solution of the present invention is to train the model based on historical conversations.

[0042] H i-1 = {R1,U1,R2,U2,...,R i- ,U i-1}(where R i is the user's question and answer in round i), generating a reply U i The specific form is as follows:

[0043]

[0044] Where R i j is the response R i The jth word of |R i | is R i The present invention uses language model M θ To simulate the generation probability (where θ represents Μ θ The number of learnable parameters), that is

[0045]

[0046] Then, the cross entropy function is used to measure the generation loss of the response (where N is the number of rounds of the dialogue):

[0047]

[0048] Step 3: Model reasoning: During the reasoning process of the model, the corresponding system prompt words and additional expanded knowledge are also enabled to achieve large language model reasoning responses with better teaching quality and realize guided teaching.

[0049] See also Figure 2The present invention completes the data expansion of math problem data by calling the GPT4 API interface. In the prompt words of calling the GPT4 API interface, the student's personality, task requirements, guidance process, demonstration examples and other information are specified, multiple rounds of teacher-student teaching dialogue data are generated, and code screening and manual cleaning are performed to finally complete the construction of the training data set.

[0050] See also Figure 3 , the present invention uses the constructed guided teaching data set for training and performs lora fine-tuning on the llama-factory framework. The specific details are as follows:

[0051] (1) System prompts: Introduce the concept and implementation method of Socratic teaching method and the concept of analysis into the system prompts of the large language model.

[0052] (2) Additional knowledge: Additional analytical knowledge is introduced when students ask questions (data construction stage), making it easier for the model to train the ability of guided teaching.

[0053] (3) Training parameter setting: The present invention uses the q_proj and v_proj layers of the base model as the target layers for LoRA adjustment. The batch size on the device is 2, the number of gradient accumulation steps is 8, and the learning rate is 3e -4 , the training epochs is 6, the cosine annealing learning rate scheduler is used, and a warmup step accounting for 0.01 of the total training steps is set. In order to speed up the calculation, the present invention enables half-precision floating point number (fp16) training.

[0054] Example

[0055] This embodiment uses the synthesis of a piece of data as an example to explain the data construction and model training process.

[0056] (1) Initial data content:

[0057]

[0058] (2) Construct multi-round dialogue data based on prompt words.

[0059] Reference words:

[0060]

[0061] Formatted heuristic conversation data:

[0062]

[0063]

[0064] (3) System prompt words in the training and reasoning stage:

[0065]

[0066] See also Figure 4-Figure 5 , which is a diagram showing the effect of using the present invention.

[0067] The protection content of the present invention is not limited to the above embodiments. Without departing from the spirit and scope of the inventive concept, changes and advantages that can be thought of by those skilled in the art are included in the present invention and are protected by the attached claims.

Claims

1. A Socratic mathematics teaching method based on a large language model, characterized in that: Based on the guided teaching data constructed by multiple personas, the large language model is fine-tuned by LoRA. In the model training process and reasoning process, Socratic teaching prompts and additional knowledge are introduced to enhance the heuristic teaching ability of the large language model, so that the large language model adopts a step-by-step teaching process; among them: The synthesis of the guided teaching data constructed by the multi-person setting includes the following steps: Step 1: Construct the prompt words of the data, which are divided into task requirements, task details, student characteristics and output samples; to ensure the diversity of the data, a variety of personalities are designed in the student characteristics, including smart, careless, negative, naughty and timid, to simulate students with different personalities in the teaching process; Step 2: Based on the data generation of the large language model, the data prompt words constructed in step 1 are input into the large language model to generate dialogue data; Step 3: Data cleaning: clean and filter the data with a small number of generated data rounds, inconsistent logic, and format errors to improve data quality; The model training process and reasoning process specifically include: Step 1: The training process uses synthetic guided teaching data as the training data set, and introduces system prompts P and additional knowledge, namely, question analysis K, to explain the Socratic teaching method and model task requirements in the form of prompts before and after the target question Q, and performs LoRA fine-tuning training on the base large language model; Step 2: Given question Q, system prompt word P, and additional knowledge K, the goal of model training is to calculate the value of the word based on the historical dialogue H. i-1 = {R1,U1,R2,U2,...,R i- ,U i-1 }Where R i is the user's question and answer in round i, generating the response U i ; The specific form is as follows: in is the response R i The jth word of |R i | is R i length; use a large language model Μ θ To simulate the generation probability p, where θ represents Μ θ The number of learnable parameters is Then, the cross entropy function is used to measure the response generation loss, where N is the number of rounds of the conversation: Step 3: In the reasoning process of the large language model, use the system prompt words P and additional knowledge K that are consistent with those in the training phase, which can achieve the large language model reasoning response with better teaching quality.

Citation Information

Patent Citations

  • Small sample text classification method based on semi-supervised teacher-student model

    CN117150021A

  • Intelligent education chat robot training method based on large language model

    CN117171322A

  • Self-inspiration intelligent question answering implementation method and system based on Scogla bottom type question asking

    CN117786091A

  • Personalized accompanying learning method and system for keeping good learning state of children

    CN117935630A

  • Flexible thinking chain learning method and device based on large language model and medium

    CN118333153A

Cited By

  • Multi-model collaborative distillation and dynamic fine tuning model training method and system

    CN119443313A

  • Mathematical reasoning data synthesis method and system based on intelligent agent simulation teaching scene

    CN120297407A

  • Individualized intelligent learning companion construction method based on large model

    CN120430903A

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

    CN120448505A

  • A complex multi-field guided teaching question and answer generation method and device and a storage medium

    CN120448505B