A method and system for generating learning situation reports based on large language model
Through the method of generating academic status reports based on large language models and using AdaLoRA and HydraLoRA side branch network fine-tuning training, the problems of traditional academic status report generation that are time-consuming, highly subjective, and limited in coverage are solved, and efficient and personalized academic status reports are achieved. Generated to meet the needs of modern education.
Patent Information
- Application Number
- CN202410867239.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-01
AI Technical Summary
The generation of traditional academic reports is time-consuming and labor-intensive, highly subjective, has limited coverage, is not updated in a timely manner, is not personalized and targeted enough, and cannot meet the needs of modern education for precise teaching and personalized learning path planning.
Adopt the academic report generation method based on the large language model, collect educational materials and student academic data, build AdaLoRA and HydraLoRA side branch networks, conduct fine-tuning training, generate personalized academic reports, and use regularized expressions and semantic consistency Validation improves reporting accuracy and consistency.
It has significantly improved the efficiency and objectivity of academic reports, can reflect students' learning status and progress in a timely manner, provide personalized feedback, comprehensively cover the situation of all students, and meet the unique needs of each student.
Smart Images

Figure CN118428348B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of educational technology, and in particular to a method and system for generating a learning situation report based on a large language model. Background Art
[0002] In the traditional education system, academic reports have always played a vital role as the core link in evaluating students' learning progress and providing feedback on teaching effectiveness. However, this process has long relied on teachers to write manually, which is not only time-consuming and labor-intensive, but also limited by personal experience and subjective judgment, making it difficult to ensure the objectivity, comprehensiveness and personalization of the report. In the past, schools and educational institutions usually used statistical software to assist in generating data summaries, but these reports often only stayed at the level of data piling up, lacking in-depth analysis and guidance, and unable to meet the needs of modern education for precise teaching and personalized learning path planning. In summary, there are several major problems with the writing of traditional academic reports:
[0003] Time-consuming and labor-intensive: Writing a report requires collecting, collating and analyzing a large amount of data, which is a very time-consuming process.
[0004] Highly subjective: The content and conclusions of the report are often influenced by the author’s personal experience, preferences and values, and lack objectivity.
[0005] Limited coverage: Due to time and energy constraints, traditional reports are unlikely to fully cover the situation of all students.
[0006] Untimely updates: Traditional reports are usually generated periodically and cannot reflect students’ learning status and progress in real time.
[0007] Lack of personalization and targeting: Traditional reports often use a unified template, which makes it difficult to provide personalized advice and guidance based on the specific circumstances of each student. Summary of the invention
[0008] The present invention solves the technical problems in the prior art of being time-consuming and labor-intensive, highly subjective, limited in coverage, untimely in updating, and lacking in personalization and pertinence by providing a method and system for generating academic status reports based on a large language model. It significantly improves the efficiency and objectivity of academic status reports, comprehensively covers the situations of all students, can timely reflect students' learning status and progress, and enhances personalized feedback to meet the unique needs of each student.
[0009] The present invention provides a method for generating a learning situation report based on a large language model, comprising:
[0010] Collect educational materials and student learning data;
[0011] Based on the educational material, an input-output pair is constructed; wherein the input is the educational material, and the output is the shifted text data containing the next token, to obtain a fine-tuning training set for the educational material model;
[0012] Keep the original parameters of the large language model unchanged, establish an AdaLoRA side branch network, perform AdaLoRA fine-tuning on the AdaLoRA side branch network based on the educational data model fine-tuning training set, and obtain the AdaLoRA side branch network weight ;
[0013] Construct an alignment fine-tuning training set based on the student learning data; the alignment fine-tuning training set includes: instructions, input and output; wherein the instructions are content instructions for each part of the learning report, the input is the student learning data, and the output is the content of each part of the learning report;
[0014] Keep the original parameters of the large language model unchanged, establish a HydraLoRA side branch network, perform HydraLoRA fine-tuning on the HydraLoRA side branch network based on the alignment fine-tuning training set, and obtain the HydraLoRA side branch network weight ;
[0015] By formula Get the final parameters of the large language model , and then obtain the trained large language model;
[0016] The educational materials to be generated and the student learning data are input into the trained large language model, and a learning report is output.
[0017] Specifically, the AdaLoRA side branch network is fine-tuned based on the educational data model fine-tuning training set to obtain the AdaLoRA side branch network weight ,include:
[0018] The diagonal matrix Set to Matrix, then fine-tune the training set based on the educational data model, and use gradient descent to update the left singular value vector of the weight and the right singular value vector Then fix the and , recalculate the diagonal matrix The gradient of , using the pruning strategy fine-tuned by AdaLoRA, is obtained as the diagonal matrix Update, continue training until convergence or reach the preset training rounds, and get the training completed weight .
[0019] Specifically, the original parameters of the large language model are maintained. unchanged, establish a HydraLoRA side branch network, perform HydraLoRA fine-tuning on the HydraLoRA side branch network based on the alignment fine-tuning training set, and obtain the HydraLoRA side branch network weight ,include:
[0020] Construct a linear weighted sum of N experts and a random Gaussian matrix A; where is the first Experts, For the The weight of the experts, ,in, Represented as a trainable linear network layer, x is the input feature vector;
[0021] Randomly sample training data from the alignment fine-tuning training set, based on the gradient descent of the target loss function, based on the current moment The parameters of the next moment Parameters, iterate until the parameters converge or the total number of iteration steps is reached ,at this time , , ;
[0022] By formula Get the routing weight after fine-tuning training , at this time, the weight function of the entire instruction alignment branch network is .
[0023] Specifically, after the output is obtained, the following is also included:
[0024] Extract the learning data from the learning report through regular expressions ;
[0025] If the academic data Both in the learning report and in the original learning data set, it is recorded as , then the total score is ;in, is a set of learning data extracted from the learning report by using a regular expression, is the original learning situation data set;
[0026] If the academic data In the learning report, but not in the original learning data set, denoted as , total score lost ;
[0027] If the academic data Not in the learning report, but in the original learning data set, recorded as , the corresponding score ;
[0028] By formula Calculate the total verification score ;in, Indicates the number of elements in a collection;
[0029] If the total verification score If the value is less than the preset first verification threshold, the learning report is marked as having errors.
[0030] Specifically, after the output is obtained, the following is also included:
[0031] The learning report is divided into sentences, and the total number of sentences divided is , for the first Extract the semantic vector of sentences , forming a semantic vector set ;
[0032] Assume that the learning data contains a total of Article text, Extracting semantic vectors from text , forming a semantic vector set ;
[0033] By formula Calculate the mean of the maximum similarity between sentences as the semantic consistency score;
[0034] If the semantic consistency score is less than a preset second verification threshold, the learning status report is marked as having errors.
[0035] The present invention also provides a learning situation report generation system based on a large language model, comprising:
[0036] Data collection module, used to collect educational materials and student learning data;
[0037] An input-output pair construction module, used to construct an input-output pair based on the educational material; wherein the input is the educational material, and the output is the shifted text data containing the next token, so as to obtain a fine-tuning training set for the educational material model;
[0038] AdaLoRA fine-tuning module to maintain the original parameters of the large language model unchanged, establish an AdaLoRA side branch network, perform AdaLoRA fine-tuning on the AdaLoRA side branch network based on the educational data model fine-tuning training set, and obtain the AdaLoRA side branch network weight ;
[0039] An alignment fine-tuning training set construction module is used to construct an alignment fine-tuning training set based on the student learning data; the alignment fine-tuning training set includes: instructions, input and output; wherein the instructions are content instructions for each part of the learning report, the input is the student learning data, and the output is the content of each part of the learning report;
[0040] HydraLoRA fine-tuning module to maintain the original parameters of the large language model unchanged, establish a HydraLoRA side branch network, perform HydraLoRA fine-tuning on the HydraLoRA side branch network based on the alignment fine-tuning training set, and obtain the HydraLoRA side branch network weight ;
[0041] Large language model training module, used to Get the final parameters of the large language model , and then obtain the trained large language model;
[0042] The learning report generation module is used to input the educational materials to be generated and the student learning data into the trained large language model, and output a learning report.
[0043] Specifically, the AdaLoRA fine-tuning module includes:
[0044] AdaLoRA side network building unit, used to maintain the original parameters of the large language model No change, establish AdaLoRA side branch network;
[0045] AdaLoRA fine-tuning training unit is used to convert the diagonal matrix Set to Matrix, then fine-tune the training set based on the educational data model, and use gradient descent to update the left singular value vector of the weight and the right singular value vector Then fix the and , recalculate the diagonal matrix The gradient of , using the pruning strategy fine-tuned by AdaLoRA, is obtained as the diagonal matrix Update, continue training until convergence or reach the preset training rounds, and get the training completed weight .
[0046] Specifically, the HydraLoRA fine-tuning module includes:
[0047] HydraLoRA side network building unit, used to build the linear weighted sum of N experts and a random Gaussian matrix A; where is the first Experts, For the The weight of the experts, ,in, Represented as a trainable linear network layer, is the input feature vector;
[0048] The HydraLoRA side network training unit is used to randomly sample training data from the alignment fine-tuning training set, based on the gradient descent of the target loss function, based on the current moment The parameters of the next moment Parameters, iterate until the parameters converge or the total number of iteration steps is reached ,at this time , , ;
[0049] The weight function obtains the unit for the formula Get the routing weight after fine-tuning training , at this time, the weight function of the entire instruction alignment branch network is .
[0050] Specifically, it also includes:
[0051] The learning data extraction module is used to extract learning data from the learning report through regular expressions. ;
[0052] The first analysis module is used for the learning data Both in the learning report and in the original learning data set, it is recorded as , then the total score is ;in, is a set of learning data extracted from the learning report by using a regular expression, is the original learning situation data set;
[0053] The second analysis module is used for the learning data In the learning report, but not in the original learning data set, denoted as , total score lost ;
[0054] The third analysis module is used for the learning data Not in the learning report, but in the original learning data set, recorded as , the corresponding score ;
[0055] Verify the total score calculation module, which is used to calculate the total score through the formula Calculate the total verification score ;in, Indicates the number of elements in a collection;
[0056] The first verification module is used to verify the total score If the value is less than the preset first verification threshold, the learning report is marked as having errors.
[0057] Specifically, it also includes:
[0058] The first semantic vector extraction module is used to segment the learning report into sentences, and the total number of segmented sentences is , for the first Extract the semantic vector of sentences , forming a semantic vector set ;
[0059] The second semantic vector extraction module assumes that the learning situation data contains a total of Article text, Extracting semantic vectors from text , forming a semantic vector set ;
[0060] The semantic consistency score acquisition module is used to obtain the semantic consistency score through the formula Calculate the mean of the maximum similarity between sentences as the semantic consistency score;
[0061] The second verification module is used to mark the learning status report as having errors if the semantic consistency score is less than a preset second verification threshold.
[0062] One or more technical solutions provided in the present invention have at least the following technical effects or advantages:
[0063] 1. First collect educational materials and student learning data; use the AdaLoRA fine-tuning method when performing prediction training for the next token based on the collected educational materials, train the knowledge details in the education field into the AdaLoRA side branch, and train the AdaLoRA side branch network weights ; Based on the collected student learning data, the constructed HydraLoRA branch is fine-tuned to obtain the HydraLoRA branch network weights through training ; Then the weights of the side network parameters obtained by the above two fine-tunings are superimposed with the original parameters of the large language model to obtain a large language model that has been fine-tuned and trained. Then the large language model that has been fine-tuned and trained is output to obtain a learning report. In the present invention, AdaLoRA designs a pruning strategy by the orthogonality of the SVD singular matrix and the correlation between the absolute value of the singular vector and the feature importance, thereby ensuring the effect of fine-tuning the large education model; HydraLoRA integrates the strategies of multiple experts and reduces the possible hallucination problems of the model through a method similar to ensemble learning, ensuring that the large model meets the requirements of the instruction and the correct content required by the learning report. In addition, the present invention collects educational materials and learning data of different students and obtains learning reports of different students based on machine learning algorithms, which solves the technical problems of time-consuming and labor-intensive, highly subjective, limited coverage, untimely updates, lack of personalization and pertinence in the prior art, significantly improves the efficiency and objectivity of the learning report, comprehensively covers the situation of all students, and can timely reflect the learning status and progress of students, and also enhances personalized feedback to meet the unique needs of each student.
[0064] 2. The present invention provides a method for intelligently capturing educational content. The method is designed to efficiently and accurately capture, screen and integrate various education-related resources from the Internet, including textbooks, academic papers, online courses, teaching videos, education policy documents, etc., in order to provide a rich and high-quality corpus for the automatic generation system of learning situation reports based on the large language model of education. By adopting advanced web crawler technology, NLP and distributed storage and computing framework, the whole process of automatically discovering, parsing, classifying and storing educational content from large-scale data sources is realized. The network crawling system constructed by this method prepares the background knowledge for the subsequent fine-tuning training of the large model, so that the large language model can more accurately identify the relevant knowledge and common sense of the education stage.
[0065] 3. The present invention also designs and implements a comprehensive and accurate student-centered learning data collection and management method, which integrates data acquisition technology, big data processing, and machine learning algorithms. By comprehensively analyzing multi-dimensional data such as students' learning behavior, grades, and participation, the method aims to comprehensively and accurately collect and organize students' learning data. By constructing an accurate learning analysis platform, the present invention provides corresponding learning cases for the fine-tuning training of the educational language model, and provides personalized and targeted support for the subsequent generation of learning reports.
[0066] 4. Use regular expressions to extract all the data information in the generated learning report, and verify the generated basic data based on the original learning data fed into the large language model. At the same time, based on the NLP sentence vector model, establish the semantic similarity between the sentences in the generated learning report and the original learning data, and verify the facts and logic through semantic similarity measurement, which can further improve the accuracy and consistency of the generated learning report. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 An overall flow chart of a method for generating a learning situation report based on a large language model provided by an embodiment of the present invention;
[0068] Figure 2 A specific implementation flow chart of the method for generating a learning situation report based on a large language model provided in an embodiment of the present invention;
[0069] Figure 3 A flowchart of collecting educational materials in a method for generating a learning situation report based on a large language model provided in an embodiment of the present invention;
[0070] Figure 4 A flow chart of collecting student learning data in a learning report generation method based on a large language model provided in an embodiment of the present invention;
[0071] Figure 5 A flowchart of fine-tuning training of a large language model in a method for generating a learning situation report based on a large language model provided in an embodiment of the present invention;
[0072] Figure 6 A flowchart of generating a learning situation report in a learning situation report generating method based on a large language model provided in an embodiment of the present invention;
[0073] Figure 7 A module diagram of a learning report generation system based on a large language model provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0074] The embodiments of the present invention provide a method and system for generating academic report based on a large language model, thereby solving the technical problems in the prior art of being time-consuming and labor-intensive, highly subjective, having limited coverage, being untimely updated, and lacking in personalization and specificity. The method significantly improves the efficiency and objectivity of academic report, comprehensively covers the situations of all students, and can timely reflect the learning status and progress of students. The system also enhances personalized feedback and meets the unique needs of each student.
[0075] The technical solution in the embodiment of the present invention is to solve the above technical problems, and the overall idea is as follows:
[0076] The method for generating a learning situation report based on the educational language model can be implemented through the following steps. Figure 1 As shown in the overall flow chart of FIG. 1 , the processing flow of the embodiment of the present invention includes four main steps:
[0077] Step 1: Intelligent capture of educational content. First, we use web crawler technology to capture a wide range of educational content, including textbook content, online course materials, academic papers, and educational policies, to form a huge educational resource library. We use natural language processing (NLP) technology to classify and summarize the captured content, providing rich corpus for subsequent model training.
[0078] Step 2: Collect and manage student learning data. Data collection: Connect with the school information system to automatically collect multi-dimensional data such as students' test scores, homework submission, online learning behavior (such as video viewing time, forum interaction frequency), and classroom performance records. Data processing: Use data cleaning and preprocessing techniques to remove outliers, unify data formats, build student personal learning archives, and prepare structured data sets for analysis.
[0079] Step 3: Fine-tuning the large educational language model. Based on the general large language model (pre-trained Transformer model, such as Llama3 model), the above-collected educational content and learning data are used for training and fine-tuning to adapt it to the unique language patterns and learning analysis tasks in the field of education. During the fine-tuning process, through reinforcement learning and other technologies, the model learns to extract key information from learning data, such as identifying learning trends, evaluating learning effects, predicting potential problems, etc. Specifically, the present invention will Fine-tuning and Fine-tuning is combined with fine-tuning to achieve fine-tuning training of large educational language models. The method will weight Through the SVD decomposition method, it is converted into , by using the SVD method to assign different ranks to different modules according to their importance, assigning smaller ranks to modules with lower importance will effectively reduce the amount of model calculation, and assigning larger ranks to more important features will be able to more effectively capture the detailed information of the features. The idea of the latest mixed expert MoE (Mixture of Experts) structure in the large language model is introduced into LoRA, and the basic LoRA side network Transformed into the form of multiple experts, that is ,in As the weight distribution coefficient of routing, used to integrate multiple experts ,This method improves the adaptability of domain knowledge by selectively focusing on different ,modules through an asymmetric network structure, thereby enhancing the ,efficiency of fine-tuning and reasoning.
[0080] Step 4: Modular generation of learning situation reports. Based on the fine-tuned educational language model, the prompt engineering technology is adjusted in a targeted manner according to the following modules to complete the modular generation of learning situation reports:
[0081] 1. Learning summary: The model automatically generates a learning summary including the overall learning status and performance trend based on the student’s learning profile.
[0082] 2. Analysis of learning weaknesses: Use the diagnostic capabilities of the model to identify students’ weaknesses in various subjects and knowledge points, and analyze the causes (such as misunderstanding, insufficient practice, etc.).
[0083] 3. Targeted measures and suggestions: Generate personalized learning improvement strategies based on weakness analysis, including learning method adjustments, time management suggestions, etc.
[0084] 4. Recommended learning materials: Based on students’ learning characteristics and current needs, we select and recommend the most suitable learning materials from the educational resource library, such as supplementary exercises, extended reading, etc.
[0085] Through the above process, the fine-tuned large language model is used to generate accurate, complete, and personalized learning reports for specific students' learning data. In order to further ensure the accuracy of the generated report. Through a simple data program comparison method, the key data points in the generated report (such as test scores, attendance rate, homework submission rate, etc.) are checked one by one with the original database to ensure that all numerical and statistical information are accurate; the program automatically checks whether the conclusions and suggestions in the report are based on correct logical reasoning to avoid unreasonable inferences caused by the model's misunderstanding of the data. In addition, a mechanism is established to collect feedback from students, parents, and teachers on the learning report to continuously optimize the model and post-processing process, including verifying the accuracy of the model's predictions and the actual application effect of the report. In this way, through post-processing and model iteration, the generated learning report is comprehensive and targeted, and most importantly, the accuracy and reliability are greatly improved.
[0086] Specifically:
[0087] First, the basic data of the academic report is verified. The basic method is to use regular expressions to automatically extract the key data from the original academic report. For data that cannot be extracted using regular expressions, the trained educational large language model is directly used to extract relevant data. Based on the extracted data, retrieval and comparison are performed from the aforementioned student academic data collection and management subsystem to determine the source of the data. For data whose source cannot be determined, the credibility score of the generated academic report is appropriately lowered. For academic reports with a credibility score below a certain level, regenerate or supplement relevant data until the credibility score of the relevant key data reaches a given threshold.
[0088] Secondly, the logical reasoning verification of the academic report. The basic method is to build a simple rule engine or a small machine learning classification algorithm to automatically review the conclusions and suggestions in the generated report to ensure that they are based on reasonable data analysis and logical reasoning; in addition, it can be combined with the trained education language model to identify logical contradictions or unreasonable inferences that may appear in the report through the broad common sense understanding ability of the big model, such as abnormally high grades improvement speed or unreasonable suggestions.
[0089] Finally, feedback collection and iterative optimization of the educational language model. By establishing standardized questionnaires or online feedback forms, collect students, parents and teachers' opinions on the learning situation reports, especially feedback on accuracy, practicality and personalization, and then conduct regular analysis and reporting: establish a fixed cycle (such as every semester or every year) to systematically analyze the collected feedback to identify patterns, trends and key problem points. According to the update of learning situation data and the content of questionnaire responses, collect improved data to iterate the weights of related branch networks in the educational language model, further enhance the ability of the educational language model to generate learning situation reports, and through the reinforcement learning method of human feedback, make the generated learning situation reports more in line with the preferences of educators, so as to ensure that they are more personalized, accurate and reliable.
[0090] Therefore, the learning report generation method provided by the embodiment of the present invention has the following advantages:
[0091] 1. Significantly improve efficiency and free up educators’ time and energy
[0092] The present invention uses advanced artificial intelligence algorithms to automatically process and analyze massive amounts of student data in a short period of time. From grade distribution to classroom interaction, and even students' online learning behavior patterns, they can all be quickly integrated and converted into detailed report content. This automated process greatly improves the efficiency of report generation, allowing teachers to be freed from repetitive work and focus more on personalized teaching design, one-on-one tutoring, and innovative teaching methods. In addition, education managers can also obtain an overall overview of the learning situation more quickly, providing instant and accurate information support for school policy formulation and resource allocation, thereby accelerating the decision-making process and improving management efficiency.
[0093] 2. Enhance personalized feedback to meet the unique needs of each student
[0094] The present invention uses machine learning algorithms to identify students' learning preferences, strengths and weaknesses, and even their mastery of specific knowledge points based on their historical learning performance data. Then, based on these meticulous analyses, it generates reports containing customized suggestions and learning resource recommendations. This personalized feedback not only helps students to understand themselves and stimulate their intrinsic learning motivation, but also provides teachers with precise teaching intervention directions, such as designing differentiated homework for different students, arranging group cooperation projects, or providing additional tutoring resources, thereby realizing the educational ideal of "teaching students in accordance with their aptitude."
[0095] 3. The report generated is comprehensive, true and effective, ensuring the continuous improvement of teaching quality
[0096] The present invention realizes a multi-dimensional and three-dimensional analysis of the learning situation by integrating diversified data sources, such as academic performance, online learning records, classroom participation, and even students' emotional reactions. The present invention not only ensures the comprehensiveness of the report content, but also ensures the accuracy and effectiveness of the report expression through advanced natural language processing technology. It can automatically identify and filter out irrelevant or erroneous data points, focusing on the extraction and interpretation of key information, making the report content rich and accurate. At the same time, the model can also provide evidence-based improvement suggestions based on educational theories and best practices, ensuring that every suggestion put forward has a basis to rely on, and effectively guiding teaching practice and the adjustment of students' learning strategies. This high-quality academic report is crucial for the continuous monitoring and improvement of education quality.
[0097] 4. Support dynamic adjustment and iterative updates to adapt to the rapid changes in the educational environment
[0098] The present invention can continuously absorb the latest educational research literature, policy orientations, and social trends to ensure that the generated report content keeps pace with the times. Whether it is introducing new teaching evaluation standards or responding to changes in students' learning habits, the system can quickly iterate and optimize the analysis model to ensure that the provided learning situation reports always meet the needs of current educational practice. In addition, through the user feedback loop, it can further optimize its own performance and improve the accuracy and practicality of the report, so as to stay ahead in the rapidly changing educational environment and support the continuous progress and innovation of the education system.
[0099] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0100] See also Figure 2 , the method for generating a learning situation report based on a large language model provided by an embodiment of the present invention includes:
[0101] Step S110: Collecting educational materials and student learning data;
[0102] See also Figure 3 ,The process of collecting educational materials includes the following steps:
[0103] Step 1: Determine the target website and data source, and design a customized web crawler
[0104] Preliminarily determine the target website and database list through educational institution directories, public APIs and meta-search engines, including open course platforms, educational publisher websites, academic journal libraries, etc. Develop advanced crawlers based on tools such as Scrapy, BeautifulSoup or Selenium, supporting dynamic page crawling, login authentication, and JavaScript rendering page processing. Design a crawler scheduler to dynamically adjust the crawling strategy according to the website update frequency and priority to avoid excessive pressure on the target server.
[0105] Step 2: Required web page relevance analysis and content screening
[0106] Pre-crawl a given online education resource web page, extract only the link URL of the web resource itself, as well as the title and keywords marked in the meta field of the web page to complete the initial crawling, without analyzing the actual content of the web page. Then use NLP-related basic algorithms, such as TF-IDF keyword extraction method and word cloud analysis. Perform quality analysis and education topic classification on the pre-crawled related text content, such as link URL, title and keywords, to identify educational relevance. For web pages with lower quality or web page URLs that are not related to education, store them in the crawled library, and when you encounter the URL next time, directly abandon the crawling. For education-related web page URLs, use subsequent web crawlers to crawl the full content and perform further processing.
[0107] Step 3: Web crawler capture and storage
[0108] According to the designed web crawler, the corresponding parsed pages are captured regularly, and the key information of the page, such as the author, release date, summary, and keywords, is extracted by combining HTML web page parsing with regular expressions and other technologies, and then placed in the captured structured database for subsequent processing. In order to prevent web pages from being repeatedly parsed and crawled, the crawler's crawling and parsing rules are set. Before each page is crawled, the address of the page link is compared with the link address in the already crawled database to filter out the newly added web pages. This can prevent the repeated crawling of a large number of web pages in the web crawler's scheduled crawling mechanism, and improve the efficiency of crawling and parsing.
[0109] Step 4: Educational Text Preprocessing
[0110] The NLP text classification model is used to perform preliminary classification of the captured educational text content, distinguishing education levels (such as K12, higher education, etc.), content types (such as theoretical courses, exercises, etc.) and subject categories (such as Chinese, mathematics, etc.), and store the corresponding classification labels in the corresponding database for subsequent query and retrieval.
[0111] In addition, corresponding text keywords and summary information are extracted based on each category, and more education-related content is further captured through search engines, which can ensure that the captured educational resources are more comprehensive, thereby providing a rich educational corpus knowledge base for fine-tuning training of large models.
[0112] After completing the above steps, the educational background knowledge required for the subsequent fine-tuning training of the large model is obtained, and strong educational common sense context support is provided for the generation of subsequent learning situation reports.
[0113] Therefore, the embodiment of the present invention implements an intelligent crawling system for educational content, which has the following core functions:
[0114] Efficient crawling: Automatically traverse and download content from multiple educational websites and databases, covering a wide range of educational topics and formats.
[0115] Intelligent filtering: Use NLP technology to filter irrelevant or low-quality information to ensure the educational relevance and quality of the captured content.
[0116] Automatic classification: Automatically classify the captured content according to content theme, type and applicable level to facilitate subsequent analysis and application.
[0117] Structured storage: The captured educational content is structured to facilitate retrieval and utilization, while supporting large-scale data storage.
[0118] See also Figure 4 ,The process of collecting student learning data includes the following steps:
[0119] Step 1: Collection and connection of learning data
[0120] Based on the current actual situation of education, we connect to the information management system of schools or educational institutions, including learning management platforms, online homework platforms, test scores, online learning behaviors (such as video viewing time, forum interaction frequency), classroom performance records and other multi-dimensional data to ensure the comprehensiveness of data sources. Through local deployment of schools and educational institutions, we establish a student-centered learning data collection and management platform to comprehensively and accurately collect and record students' learning status in chronological order, in preparation for the next step of comprehensive analysis and integration of students' learning data.
[0121] Step 2: Processing and integration of learning data
[0122] First, data cleaning is performed to remove invalid, duplicate, and erroneous data records, and regular expressions, missing value processing, and other technologies are used to improve data quality. After that, the formats and measurement units of different data sources are unified through standardization and normalization of learning data, such as converting the score system to a percentage system to ensure data comparability. After that, data conversion technology is used to integrate data from different sources into a unified data warehouse.
[0123] Step 3: Analysis and mining of learning data
[0124] Based on the integrated student learning data, the following dimensions are analyzed and mined to fully understand the overall statistical situation of students' learning. (1) Descriptive analysis: Statistical charts are used to intuitively display basic information such as the distribution of student scores, study time allocation, and homework completion rate. (2) Machine learning models (such as regression analysis and time series analysis) are used to predict students' future performance trends and learning risks. (3) NLP technology is used to analyze the text data submitted by students to understand their learning attitudes and emotional changes and identify potential problems. (4) Based on the analysis of learning preferences and ability levels, and based on preliminary personalized recommendation algorithms, personalized learning paths and resources are recommended for each student.
[0125] During the entire processing process, we strictly follow the data security requirements of schools and educational institutions to ensure that students' academic data is only used for the targeted writing and generation of academic reports, and strictly protect data security and student privacy. To this end, we will adopt strict access control policies for key data to ensure that only authorized users can access specific data sets; without affecting the results of data analysis, personal identity information will be desensitized.
[0126] Since then, the embodiment of the present invention has established a comprehensive, accurate and secure student learning data collection and management platform, providing personalized cases and decision support for the fine-tuning training of the educational large language model and the generation of targeted learning reports.
[0127] Step S120: constructing an input-output pair based on the educational material; wherein the input is the educational material, and the output is the shifted text data containing the next token, thereby obtaining a fine-tuning training set for the educational material model;
[0128] Step S130: Keep the original parameters of the large language model The AdaLoRA side network is established, and the AdaLoRA side network is fine-tuned based on the education data model fine-tuning training set to obtain the AdaLoRA side network weights. ;
[0129] This step is explained in detail. The AdaLoRA side network is fine-tuned based on the education data model fine-tuning training set to obtain the AdaLoRA side network weights. ,include:
[0130] The diagonal matrix Set to Matrix, then fine-tune the training set based on the educational data model, and use gradient descent to update the left singular value vector of the weight and the right singular value vector ; Then fix and , recalculate the diagonal matrix The gradient of , using the pruning strategy fine-tuned by AdaLoRA, is obtained as the diagonal matrix Update, continue training until convergence or reach the preset training rounds, and get the training completed weight .
[0131] The specific process is described in detail as follows:
[0132] Firstly, SVD singular value decomposition is applied to the side branch network of the LoRA algorithm to model AdaLoRA.
[0133] Weights for AdaLoRA side networks ,in , Represent the weights to be trained The left singular value vector and right singular value vector of Included Singular Values and , will The triplet consisting of an eigenvalue and an eigenvector is denoted as . At the beginning of training, the diagonal matrix is initialized to Matrix, at the same time Matrix and The matrices are initialized to a random Gaussian matrix to ensure the initial training weights for Matrix. To strengthen and The orthogonality of the matrix is improved by adding a regularization term to the training loss function to ensure is the identity matrix, the regularization term is defined as: ,in It represents the square of the F-norm of the matrix, and its calculation result is equal to the sum of the squares of each element in the matrix.
[0134] Secondly, the importance of AdaLoRA modeling features is determined and the model is pruned appropriately to avoid the model from overfitting due to a batch of new training data and forgetting a large amount of knowledge and common sense widely learned by the original large language model.
[0135] During training, the rank is adjusted at each gradient descent iteration. At the same time, for the diagonal matrix Prune the tree based on its importance in training. Adaptive weight matrix for training of labeled side branches , ,in is the number of adaptive weight matrices. Define the adaptive weight matrix No. The triplet of eigenvalues and eigenvectors is , accordingly, the importance score of the weight matrix is recorded as . Further, mark , , , the training cost is recorded as , based on the above regularization term, define the training objective function ,in is the regularization coefficient. Step, first perform a stochastic gradient step to update , as well as ;in In particular, for The calculation is performed using the following iterative steps: ,in represents the learning rate; then, based on the importance score , the singular value is intercepted by the following formula ,in When importance is scored In all Medium Budget The highest time is , otherwise it is directly set to 0. Here represents the importance score of all triples, and Indicates The budget here refers to the cost of the rank of the matrix, so the budget in the definition is is the sum of the ranks of all trained adaptive weight matrices, that is, the sum of all singular values. To facilitate training, at the beginning of training, an initial budget , this budget is smaller than the target budget for training It should be slightly larger, such as 1.5 times At the beginning of training, the ranks of all adaptive weights are initialized , first train Step 1, and then adjust it by the following formula Until reaching Finally, fix the budget distribution and further fine-tune the model Step 1. Budget It is calculated by the following formula .
[0136] Again, the importance scoring function of the modeled features is based on AdaLoRA.
[0137] For singular values and singular vector matrix triplets , and its importance score is recorded as , can be obtained by the following calculation formula .
[0138] The calculated value here is The average importance score of represents the importance scoring function. Furthermore, the embodiment of the present invention defines the sensitivity of the scoring function as the amplitude of the product of the gradient and the weight: ,in Represents any training parameters.
[0139] The training step, the value of the iterative calculation parameter is:
[0140]
[0141]
[0142] in, . For training Step by step through the smooth sensitivity, For training Step time sensitivity With smooth sensitivity The indefinite term caused by the change of , so the embodiment of the present invention obtains the scoring function through the above iterative calculation .
[0143] By calculating the scoring function and combining the above formulas, we can get the SVD singular value and singular vector in the training process. , and finally get the training weight .
[0144] Finally, the model parameters are trained based on the captured and sorted educational text input and output text pairs.
[0145] The total number of steps for a given iteration ; Budget planning ; and the corresponding hyperparameters For the training step , each step performs the following process:
[0146] Step 1: Sample a small batch of data from the input and output educational text pairs and calculate the corresponding gradient based on the training objective loss function ;
[0147] Step 2: For each parameter , based on the sensitivity formula above, calculate the sensitivity ;
[0148] Step 3: For each parameter , based on the smoothing sensitivity iteration formula to calculate the smoothing sensitivity , calculate the indeterminate term based on the indeterminate iterative formula ;
[0149] Step 4: For the serial number and , based on the importance scoring formula, the importance score is obtained ;
[0150] Step 5, based on the formula Update the left eigenvector of the next iteration , and based on the formula Update the right eigenvector of the next iteration
[0151] Step 6: Based on the given budget According to the formula The eigenvalue matrix of the next iteration , until the total number of training steps is reached , so the training of the educational large language model is obtained .
[0152] This completes the fine-tuning training of the large language model for knowledge in the education field.
[0153] Step S140: Construct an alignment fine-tuning training set based on student learning data; the alignment fine-tuning training set includes: instructions, input and output; wherein the instructions are content instructions for each part of the learning report, such as writing the summary part of the learning report, analyzing the weak links of students based on the learning data, giving suggestions and targeted measures, and recommending appropriate learning materials, etc. The input is the student learning data, that is, describing the current learning status of the students, including the age, class, test scores, homework situation, and classroom performance of the students, etc., and the output is the content of each part of the learning report; the output part can be generated by the education big model in the early stage, and then the selection is continuously completed by the review of professionals, that is, human feedback, and then the good generated content is returned as output to the education big model to allow the big model to continue training, this part is reinforcement learning. Through the reinforcement learning of human feedback, the instruction understanding and alignment ability of the education big model is continuously improved, so that the learning report generated by the education big model conforms to the values of professionals. In this way, the instruction alignment training data set generated by the education big language model for the learning report is obtained.
[0154] Step S150: Keep the original parameters of the large language model The HydraLoRA side branch network is established, and the HydraLoRA side branch network is fine-tuned based on the alignment fine-tuning training set to obtain the HydraLoRA side branch network weight ;
[0155] This step is explained in detail, keeping the original parameters of the large language model The HydraLoRA side network is established, and the HydraLoRA side network is fine-tuned based on the aligned fine-tuning training set to obtain the HydraLoRA side network weights. ,include:
[0156] Construct a linear weighted sum of N experts and a random Gaussian matrix A; where is the first Experts, For the The weight of the experts, ,in, Represented as a trainable linear network layer, is the input feature vector (same as the transformer model, usually the token is extracted through an embedding layer network), ;
[0157] First initialize all experts to for matrix, , is a random Gaussian matrix, ensuring that for Matrix. Randomly sample training data from the alignment fine-tuning training set, based on the gradient descent of the target loss function, based on the current moment The parameters of the next moment Parameters, iterate until the parameters converge or the total number of iteration steps is reached ,at this time , , ;
[0158] By formula Get the routing weight after fine-tuning training , at this time, the weight function of the entire instruction alignment branch network is .
[0159] It should be noted here that the weight function is related to the input. In order to maintain the relative independence of the training weights and facilitate model reasoning acceleration, since the training learning report instruction alignment is consistent with the distribution in the actual scenario, the embodiment of the present invention uses the (instructions, inputs) of the training data as the input of the entire model. It is assumed that all the inputs are ,in is the size of the training sample, using the mean of the training sample To approximate the actual input , in the actual reasoning process, no input is needed to affect the trained network weights, that is, This gives the final weight of the instruction-aligned side branch network In this way, the fine-tuning training task of the educational language model for instruction alignment generated for the learning situation report is completed, and the educational model with the ability to generate targeted parts of the learning situation report is obtained.
[0160] Step S160: By formula Get the final parameters of the large language model , and then get the trained large language model, such as Figure 5 As shown;
[0161] Step S170: input the educational materials and student learning data to be generated into the trained large language model, and output a learning report.
[0162] For a detailed description of this step, see Figure 6 In order to realize the automatic generation of the entire learning report, the embodiment of the present invention divides the learning report into the following multiple modules for modular generation according to the content requirements of general learning reports. Common modules include learning summary, learning weakness analysis, targeted measures and suggestions, learning material recommendations, etc. Before performing modular generation tasks, it is necessary to give clear prompts to the big model to ensure that the big model can understand the requirements and generate content that meets user requirements. Here, prompt engineering is needed to help the big model find the prompts or instructions that are most suitable for the corresponding tasks.
[0163] Step 1: System instruction setting for educating large language models
[0164] Set system prompts for the education model (i.e., the System Prompt of the model). The system prompts of the model grasp the generated theme from a general direction, including role-playing and broad theme settings. For example, for the theme of student report generation, the system prompt can be set as "You are an excellent educator." In addition, add roles that are more closely related to the task, and "are also excellent students report writers." In this way, the student report will not deviate from the direction of education and learning.
[0165] Step 2: Modular generation of educational large language models
[0166] After setting the system prompt instructions, it is necessary to set the corresponding user prompts (i.e., the User Prompt of the big model) for the specific modules. Based on the common modules of the academic report that have been listed, the specific content that you want the big model to generate can be directly set in the user prompt. Since the fine-tuning of the instructions alignment has been done specifically for the generation task of the academic report in the aforementioned fine-tuning training, the educational big language model can also better understand the generation requirements of the specific modules of the academic report. In the user prompt, in addition to proposing the requirements of the task, the embodiment of the present invention also introduces the student's academic data and the chart resources drawn by these academic data as the context of generation, so that the big model can be told that the module content corresponding to the academic report is generated for these academic data of this student, thus avoiding the big model from talking in general and being more targeted.
[0167] For the generation of academic report, the general prompt template is set as follows, where the data field represents the student academic data to be filled in, including various learning situations of the student that can be collected and organized, not limited to: age, class, homework situation, test scores, class concentration, etc.; resource represents resources such as icons obtained through the above academic data statistics and resource titles, etc.; and module represents the specific module and chapter name of the academic report to be generated. Common modules include academic summary, analysis of learning weaknesses, targeted measures and suggestions, and learning material recommendations. User prompts for general modules can be written like this: "This is a student's academic data {data} and a chart {resource} drawn corresponding to the academic data. Please strictly follow these contents to write the {module} part of the academic report. The content must be detailed and well-reasoned."
[0168] Step 3: Generate a complete learning report
[0169] Based on the powerful content organization ability of the big model, in the generation of the learning situation report of the education big model, by adjusting the sampling parameters of the big model, the best parameters are selected for generation, or generated several times, and all the generated content is sent to the big model in sequence according to the final module. Based on the one-hot or few-shot learning method, one or several standard complete learning situation report samples are given to the big model, so that the big model can generate a complete learning situation report for specific student learning data based on the organizational format and content of the sample.
[0170] The embodiment of the present invention also provides two methods for verifying the rationality of the generated learning report. Specifically, after the learning report is output, the method further includes:
[0171] Extracting academic data from academic reports through regular expressions ;
[0172] If the academic data In both the learning report and the original learning data set, it is recorded as , then the total score is ;in, is the set of learning data extracted from the learning report through regular expressions. is the original learning data set;
[0173] If the academic data In the learning report, but not in the original learning data set, denoted as , total score lost ;
[0174] If the academic data Not in the learning report, but in the original learning data set, recorded as , which means that the large language model considers this basic data to be unimportant and ignores it during the generation process. The corresponding score ;
[0175] By formula Calculate the total verification score ;in, Indicates the number of elements in a collection;
[0176] If the verification score If it is less than the preset first verification threshold, it is considered that there is a large difference between the generated learning report and the original learning data, and the learning report is marked as having errors.
[0177] Or, after the learning report is output, it also includes:
[0178] The learning report is divided into sentences. The total number of sentences is , for the first Extract the semantic vector of sentences , forming a semantic vector set ;
[0179] Assume that the learning data contains a total of Article text, Extracting semantic vectors from text , forming a semantic vector set Specifically, the semantic vector is extracted through the sentence vector model, such as text2vec. The original learning content with the greatest similarity between the two is calculated: , it can be considered that the generated sentence is obtained based on the learning content.
[0180] By formula Calculate the mean of the maximum similarity between sentences as the semantic consistency score;
[0181] If the semantic consistency score is less than the preset second verification threshold, it means that the generated academic report has a large gap in semantic consistency with the original academic content context provided. There may be problems with the facts and logic of the report, and the academic report is marked as having errors.
[0182] It should be noted that the fact recognition ability of the big language model can also be used through instruction engineering to let the big language model play a role in logic verification and review. The instruction can be set as "You are a professional logic and fact reviewer. Please identify the situations in {report} that are inconsistent with the logic or facts of the given context data {data} one by one, and list them one by one and provide the basis." The big model is used to further verify the accuracy of the generated learning report. If the big model gives multiple inconsistent facts, it is necessary to re-seek the learning data and content to generate a new report.
[0183] See also Figure 7 , the learning situation report generation system based on the large language model provided by the embodiment of the present invention includes:
[0184] The data collection module 100 is used to collect educational materials and student learning data;
[0185] An input-output pair construction module 200 is used to construct an input-output pair based on educational materials; wherein the input is educational materials, and the output is shifted text data containing the next token, thereby obtaining a fine-tuning training set for the educational material model;
[0186] AdaLoRA fine-tuning module 300, used to maintain the original parameters of the large language model The AdaLoRA side network is established, and the AdaLoRA side network is fine-tuned based on the education data model fine-tuning training set to obtain the AdaLoRA side network weights. ;
[0187] Specifically, the AdaLoRA fine-tuning module 300 includes:
[0188] AdaLoRA side network building unit, used to maintain the original parameters of the large language model No change, establish AdaLoRA side branch network;
[0189] AdaLoRA fine-tuning training unit is used to convert the diagonal matrix Set to Matrix, then fine-tune the training set based on the educational data model, and use gradient descent to update the left singular value vector of the weight and the right singular value vector ; Then fix and , recalculate the diagonal matrix The gradient of , using the pruning strategy fine-tuned by AdaLoRA, is obtained as the diagonal matrix Update, continue training until convergence or reach the preset training rounds, and get the training completed weight .
[0190] The alignment fine-tuning training set construction module 400 is used to construct an alignment fine-tuning training set based on student learning data; the alignment fine-tuning training set includes: instructions, input and output; wherein the instructions are content instructions for each part of the learning report, such as writing the summary part of the learning report, analyzing the weak links of students based on the learning data, giving suggestions and targeted measures, and recommending suitable learning materials, etc. The input is the student learning data, that is, describing the current learning status of the students, including the age, class, test scores, homework situation, and classroom performance of the students, etc., and the output is the content of each part of the learning report; the output part can be generated by the education big model in the early stage, and then the selection is continuously completed by the review of professionals, that is, human feedback, and then the good generated content is returned as output to the education big model to allow the big model to continue training, which is reinforcement learning. The instruction understanding and alignment ability of the education big model is continuously improved through reinforcement learning with human feedback, so that the learning report generated by the education big model conforms to the values of professionals. In this way, the instruction alignment training data set generated by the education big language model for the learning report is obtained.
[0191] HydraLoRA fine-tuning module 500, used to maintain the original parameters of the large language model The HydraLoRA side branch network is established, and the HydraLoRA side branch network is fine-tuned based on the alignment fine-tuning training set to obtain the HydraLoRA side branch network weight ;
[0192] Specifically, the HydraLoRA fine-tuning module 500 includes:
[0193] HydraLoRA side network building unit, used to build the linear weighted sum of N experts and a random Gaussian matrix A; where is the first Experts, For the The weight of the experts, ,in, Represented as a trainable linear network layer, is the input feature vector (same as the transformer model, usually the token is extracted through an embedding layer network), ;
[0194] The HydraLoRA side network training unit is used to initialize all experts as for matrix, , is a random Gaussian matrix, ensuring that in the initial state for Matrix. Randomly sample training data from the alignment fine-tuning training set, based on the gradient descent of the target loss function, based on the current moment The parameters of the next moment Parameters, iterate until the parameters converge or the total number of iteration steps is reached ,at this time , , ;
[0195] The weight function obtains the unit for the formula Get the routing weight after fine-tuning training , at this time, the weight function of the entire instruction alignment branch network is It should be noted here that the weight function is related to the input. In order to maintain the relative independence of the training weights and facilitate the acceleration of model reasoning, since the training learning report instruction alignment is consistent with the distribution in the actual scenario, the embodiment of the present invention uses the (instructions, inputs) of the training data as the input of the entire model. It is assumed that all the inputs are ,in is the size of the training sample, using the mean of the training sample To approximate the actual input , in the actual reasoning process, no input is needed to affect the trained network weights, that is, This gives the final weight of the instruction-aligned side branch network In this way, the fine-tuning training task of the educational language model for instruction alignment generated for the learning situation report is completed, and the educational model with the ability to generate targeted parts of the learning situation report is obtained.
[0196] The large language model training module 600 is used to train the language model by formula Get the final parameters of the large language model , and then obtain the trained large language model;
[0197] The learning report generation module 700 is used to input the educational materials to be generated and the student learning data into the trained large language model, and output a learning report.
[0198] The embodiment of the present invention also provides two methods for verifying the rationality of the generated learning situation report, specifically, including:
[0199] The learning data extraction module is used to extract learning data from the learning report through regular expressions ;
[0200] The first analysis module is used for learning data In both the learning report and the original learning data set, it is recorded as , then the total score is ;in, is the set of learning data extracted from the learning report through regular expressions. is the original learning data set;
[0201] The second analysis module is used for learning data In the learning report, but not in the original learning data set, denoted as , total score lost ;
[0202] The third analysis module is used for learning data Not in the learning report, but in the original learning data set, recorded as , which means that the large language model considers this basic data to be unimportant and ignores it during the generation process. The corresponding score ;
[0203] Verify the total score calculation module, which is used to calculate the total score through the formula Calculate the total verification score ;in, Indicates the number of elements in a collection;
[0204] The first verification module is used to verify the total score If it is less than the preset first verification threshold, it is considered that there is a large difference between the generated learning report and the original learning data, and the learning report is marked as having errors.
[0205] Also includes:
[0206] The first semantic vector extraction module is used to segment the learning report into sentences. The total number of sentences segmented is , for the first Extract the semantic vector of sentences , forming a semantic vector set ;
[0207] The second semantic vector extraction module assumes that the learning data contains a total of Article text, Extracting semantic vectors from text , forming a semantic vector set Specifically, the semantic vector is extracted through the sentence vector model, such as text2vec. The original learning content with the greatest similarity between the two is calculated: , it can be considered that the generated sentence is obtained based on the learning content.
[0208] The semantic consistency score acquisition module is used to obtain the semantic consistency score through the formula Calculate the mean of the maximum similarity between sentences as the semantic consistency score;
[0209] The second verification module is used to mark the learning situation report as having errors if the semantic consistency score is less than the preset second verification threshold, indicating that there is a large gap between the generated learning situation report and the original provided learning situation content context in terms of semantic consistency. There may be problems with the facts and logic of the report.
[0210] In summary, the embodiments of the present invention implement a method and system for generating learning situation reports based on an educational big language model, aiming to achieve personalized, accurate, efficient and comprehensive analysis of students' learning situation.
[0211] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0212] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. 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.
[0213] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate 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 A function specified in one or more boxes.
[0214] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0215] The parts not described in detail in the embodiments of the present invention are all known technologies to those skilled in the art. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A method for generating a learning report based on a large language model, characterized in that: include: Collect educational materials and student learning data; Based on the educational material, an input-output pair is constructed; wherein the input is the educational material, and the output is the shifted text data containing the next token, to obtain a fine-tuning training set for the educational material model; Keep the original parameters of the large language model unchanged, establish an AdaLoRA side branch network, perform AdaLoRA fine-tuning on the AdaLoRA side branch network based on the educational data model fine-tuning training set, and obtain the AdaLoRA side branch network weight ; Construct an alignment fine-tuning training set based on the student learning data; the alignment fine-tuning training set includes: instructions, input and output; wherein the instructions are content instructions for each part of the learning report, the input is the student learning data, and the output is the content of each part of the learning report; Keep the original parameters of the large language model unchanged, establish a HydraLoRA side branch network, perform HydraLoRA fine-tuning on the HydraLoRA side branch network based on the alignment fine-tuning training set, and obtain the HydraLoRA side branch network weight ; By formula Get the final parameters of the large language model , and then obtain the trained large language model; Inputting the collected educational materials and student learning data into the trained large language model, and outputting a learning report; The AdaLoRA side branch network is fine-tuned based on the education data model fine-tuning training set to obtain the AdaLoRA side branch network weight ,include: The diagonal matrix Set to Matrix, then fine-tune the training set based on the educational data model, and use gradient descent to update the left singular value vector of the weight and the right singular value vector ; Then fix the and , recalculate the diagonal matrix The gradient of , using the pruning strategy fine-tuned by AdaLoRA, is obtained as the diagonal matrix Update, continue training until convergence or reach the preset training rounds, and get the training completed weight ; The original parameters of the large language model are maintained unchanged, establish a HydraLoRA side branch network, perform HydraLoRA fine-tuning on the HydraLoRA side branch network based on the alignment fine-tuning training set, and obtain the HydraLoRA side branch network weight ,include: Construct a linear weighted sum of N experts and a random Gaussian matrix A; where is the first Experts, For the The weight of the experts, ,in, Represented as a trainable linear network layer, is the input feature vector; Randomly sample training data from the alignment fine-tuning training set, based on the gradient descent of the target loss function, based on the current moment The parameters of the next moment Parameters, iterate until the parameters converge or the total number of iteration steps is reached ,at this time , , ; By formula Get the routing weight after fine-tuning training , at this time, the weight function of the entire instruction alignment branch network is .
2. The method for generating a learning report based on a large language model as claimed in claim 1, characterized in that: After the output is obtained, the following is also included: Extract the learning data from the learning report through regular expressions ; If the academic data Both in the learning report and in the original learning data set, it is recorded as , then the total score is ;in, is a set of learning data extracted from the learning report by using a regular expression, is the original learning situation data set; If the academic data In the learning report, but not in the original learning data set, denoted as , total score lost ; If the academic data Not in the learning report, but in the original learning data set, recorded as , the corresponding score ; By formula Calculate the total verification score ;in, Indicates the number of elements in a collection; If the total verification score If the value is less than the preset first verification threshold, the learning report is marked as having errors.
3. The method for generating a learning report based on a large language model as described in claim 1 or 2, characterized in that: After the output is obtained, the following is also included: The learning report is divided into sentences, and the total number of sentences divided is , for the first Extract the semantic vector of sentences , forming a semantic vector set ; Assume that the learning data contains a total of Article text, Extracting semantic vectors from text , forming a semantic vector set ; By formula Calculate the mean of the maximum similarity between sentences as the semantic consistency score; If the semantic consistency score is less than a preset second verification threshold, the learning status report is marked as having errors.
4. A learning report generation system based on a large language model, characterized in that: include: Data collection module, used to collect educational materials and student learning data; An input-output pair construction module, used to construct an input-output pair based on the educational material; wherein the input is the educational material, and the output is the shifted text data containing the next token, so as to obtain a fine-tuning training set for the educational material model; AdaLoRA fine-tuning module to maintain the original parameters of the large language model unchanged, establish an AdaLoRA side branch network, perform AdaLoRA fine-tuning on the AdaLoRA side branch network based on the educational data model fine-tuning training set, and obtain the AdaLoRA side branch network weight ; An alignment fine-tuning training set construction module is used to construct an alignment fine-tuning training set based on the student learning data; the alignment fine-tuning training set includes: instructions, input and output; wherein the instructions are content instructions for each part of the learning report, the input is the student learning data, and the output is the content of each part of the learning report; HydraLoRA fine-tuning module to maintain the original parameters of the large language model unchanged, establish a HydraLoRA side branch network, perform HydraLoRA fine-tuning on the HydraLoRA side branch network based on the alignment fine-tuning training set, and obtain the HydraLoRA side branch network weight ; Large language model training module, used to Get the final parameters of the large language model , and then obtain the trained large language model; A learning report generation module is used to input the collected educational materials and student learning data into the trained large language model and output a learning report; The AdaLoRA fine-tuning module includes: AdaLoRA side network building unit, used to maintain the original parameters of the large language model No change, establish AdaLoRA side branch network; AdaLoRA fine-tuning training unit is used to convert the diagonal matrix Set to Matrix, then fine-tune the training set based on the educational data model, and use gradient descent to update the left singular value vector of the weight and the right singular value vector Then fix the and , recalculate the diagonal matrix The gradient of , using the pruning strategy fine-tuned by AdaLoRA, is obtained as the diagonal matrix Update, continue training until convergence or reach the preset training rounds, and get the training completed weight ; The HydraLoRA fine-tuning module includes: HydraLoRA side network building unit, used to build the linear weighted sum of N experts and a random Gaussian matrix A; where is the first Experts, For the The weight of the experts, ,in, Represented as a trainable linear network layer, is the input feature vector; The HydraLoRA side network training unit is used to randomly sample training data from the alignment fine-tuning training set, based on the gradient descent of the target loss function, based on the current moment The parameters of the next moment Parameters, iterate until the parameters converge or the total number of iteration steps is reached ,at this time , , ; The weight function obtains the unit for the formula Get the routing weight after fine-tuning training , at this time, the weight function of the entire instruction alignment branch network is .
5. The learning report generation system based on a large language model as claimed in claim 4, characterized in that: Also includes: The learning data extraction module is used to extract learning data from the learning report through regular expressions. ; The first analysis module is used for the learning data Both in the learning report and in the original learning data set, it is recorded as , then the total score is ;in, is a set of learning data extracted from the learning report by using a regular expression, is the original learning situation data set; The second analysis module is used for the learning data In the learning report, but not in the original learning data set, denoted as , total score lost ; The third analysis module is used for the learning data Not in the learning report, but in the original learning data set, recorded as , the corresponding score ; Verify the total score calculation module, which is used to calculate the total score through the formula Calculate the total verification score ;in, Indicates the number of elements in a collection; The first verification module is used to verify the total score If the value is less than the preset first verification threshold, the learning report is marked as having errors.
6. The learning report generation system based on a large language model as described in claim 4 or 5, characterized in that: Also includes: The first semantic vector extraction module is used to segment the learning report into sentences, and the total number of segmented sentences is , for the first Extract the semantic vector of sentences , forming a semantic vector set ; The second semantic vector extraction module assumes that the learning situation data contains a total of Article text, Extracting semantic vectors from text , forming a semantic vector set ; The semantic consistency score acquisition module is used to obtain the semantic consistency score through the formula Calculate the mean of the maximum similarity between sentences as the semantic consistency score; The second verification module is used to mark the learning status report as having errors if the semantic consistency score is less than a preset second verification threshold.
Citation Information
Patent Citations
Method for constructing pre-training subject corpus of digital human teacher multi-mode large language model
CN117076693A
Personalized question generation and auxiliary learning method and system based on large language model
CN117575856A
Multi-task large language model training method and device
CN118261225A
Personalized patient treatment suggestion system based on large language model
CN118262933A
A system and method for assistive teaching using large language models(LLMS)
IN202441027933A
