Progressive text quality improvement method, device and medium based on large language model
By employing a progressive text quality improvement method based on a large language model, combined with knowledge graphs and hierarchical diagnostic logic, this approach addresses the subjectivity and lack of in-depth analysis inherent in traditional teacher peer feedback assessment methods, thereby achieving precise feedback quality improvement and personalized suggestion generation in intelligent education scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA NORMAL UNIV
- Filing Date
- 2026-01-15
- Publication Date
- 2026-06-02
AI Technical Summary
Existing peer feedback assessment methods for teachers are difficult to use in smart education scenarios to achieve real-time evaluation of feedback quality and generate targeted improvement suggestions. Furthermore, traditional methods are highly subjective and cannot provide in-depth feedback to improve quality.
This paper adopts a progressive text quality improvement method based on a large language model. It selects the optimal large language model for text diagnosis, constructs a knowledge graph for knowledge retrieval, formulates a text quality gap report, and generates personalized text quality improvement plans. By combining hierarchical progressive diagnostic logic with knowledge graph retrieval enhancement mechanism, it achieves precise quality improvement.
It enables objective and quantitative analysis of the quality of teacher feedback, generates targeted improvement suggestions, improves the efficiency and quality of teacher professional development, and provides systematic and intelligent technical support.
Smart Images

Figure CN122133660A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge enhancement technology, specifically to a progressive text quality improvement method, device, and medium based on a large language model. Background Technology
[0002] Peer feedback is a general term for reflective dialogue and professional support mechanisms within the teacher professional community, encompassing both feedback provision and feedback reception. It plays a central role in professional activities such as teacher professional development, improvement of teaching quality, and problem-solving in education and teaching, helping teachers efficiently allocate professional resources and enhance the efficiency and quality of educational activities.
[0003] With the deepening development of educational science and teacher professional development theory, the core position of teacher peer feedback in teacher professional growth has become increasingly prominent. As a result, the effective evaluation of teacher peer feedback has become an important issue in research and practice.
[0004] Currently, methods for evaluating teacher peer feedback include numerical scoring and text commentary. While numerical scoring is widely used due to its ease of quantification, it is easily influenced by the evaluator's subjective standards and cognitive limitations, and it cannot achieve in-depth improvement in feedback quality, especially in smart education scenarios, where it is difficult to immediately assess the quality of feedback content to generate targeted improvement suggestions. Text commentary, while visually demonstrating the teacher's feedback process, is easily constrained by writing skills and professional competence, and lacks an effective mechanism for qualitative evaluation and improvement suggestions regarding "feedback on peer feedback." Clearly, these traditional methods have significant limitations, failing to achieve objective quantitative analysis of feedback quality and lacking the ability to intelligently generate targeted improvement paths based on quality gaps, thus restricting the continuous improvement of teacher peer feedback quality and teacher professional development. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a progressive text quality improvement method, device, and medium based on a large language model.
[0006] The first aspect of this invention provides a progressive text quality improvement method based on a large language model, comprising the following steps: The optimal large language model is selected as the base model, and the base model is used to perform quality diagnosis on the input text to obtain the text quality diagnosis result. Using the text quality diagnostic results, knowledge retrieval is performed to obtain multiple sets of knowledge entities; Based on the text quality diagnostic results, a text quality gap report is generated; The input text is improved using the knowledge entity set and the text quality gap report to obtain a text quality improvement scheme.
[0007] Furthermore, the selection of the optimal large language model as the base model specifically includes the following steps: Test candidate large language models using a pre-labeled text dataset; The output of each candidate large language model is evaluated using a weighted F1 score to determine the optimal large language model.
[0008] Furthermore, prior to the step of performing quality diagnosis on the input text using the base model, the following steps are also included: The output of the optimal large language model is compared with the pre-labeled results to identify erroneous samples; The error samples are analyzed to determine their error patterns. Expand the error samples corresponding to the error patterns through data augmentation; The process of using the base model to perform quality diagnosis on the input text specifically includes the following steps: Perform a macro-level evaluation of the input text to determine the target evaluation dimensions; The target evaluation dimensions are used to rate the input text to obtain the target level; The target evaluation dimensions and target levels are output as text quality diagnostic results.
[0009] Furthermore, the knowledge retrieval using the text quality diagnostic results specifically includes the following steps: A knowledge graph is constructed based on a pre-defined corpus, and the entities and relations in the knowledge graph are vectorized and encoded. Based on the text quality diagnosis results of the input text, construct knowledge retrieval statements; Using the knowledge retrieval statement, a search is performed in the knowledge graph to obtain multiple sets of knowledge entities.
[0010] Furthermore, the vectorization encoding of entities and relations in the knowledge graph specifically includes the following steps: Extract the descriptive information of entities and relations from the knowledge graph; for entity nodes, concatenate the entity name and entity description to obtain entity text; for relation edges, concatenate the relation name and relation description to obtain relation text. The entity text and relation text are semantically encoded to obtain entity semantic vectors and relation semantic vectors; Entity semantic vectors and relation semantic vectors are stored in a vector database. Each vector is associated with its corresponding entity / relation ID, name, and metadata information, and a vector index is constructed.
[0011] Furthermore, the step of using the knowledge retrieval statement to perform a retrieval in the knowledge graph specifically includes the following steps: Transform the knowledge retrieval statement into a retrieval vector; Calculate the cosine similarity between the retrieval vector and all entity semantic vectors in the vector database, and output the entity nodes corresponding to the entity semantic vectors with cosine similarity greater than a preset similarity threshold as a set of knowledge entities.
[0012] Furthermore, the step of generating a text quality gap report based on the text quality diagnostic results specifically includes the following steps: Based on the text quality diagnosis results and historical text data, the target improvement dimensions, target improvement indicators, and target levels for text quality improvement are determined sequentially. Through multi-factor evaluation based on semantic matching, the quantitative gap between the input text and the target improvement dimensions, target improvement indicators, and target level is determined; Based on the aforementioned target improvement dimensions, target improvement indicators, and target levels, combined with the corresponding quantitative gaps, a text quality gap report is generated.
[0013] Furthermore, the step of using the knowledge entity set to improve the input text according to the text quality gap report to obtain a text quality improvement scheme specifically includes the following steps: The knowledge entity set and the text quality gap report are encapsulated into a structured input set; The structured input set is input into the generative large language model, and constraints are used to guide the generative large language model to generate text quality improvement schemes. The text quality improvement scheme generated by the generative large language model is subjected to quality diagnosis. When the quality improvement score is lower than the preset quality threshold, the generative large language model is controlled to regenerate the text quality improvement scheme until the quality improvement score of the text quality improvement scheme reaches the preset quality threshold.
[0014] Another aspect of the present invention discloses an electronic device, including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the aforementioned progressive text quality improvement method based on a large language model.
[0015] In another aspect, the present invention provides a computer-readable storage medium storing a program that is executed by a processor to implement the above-described progressive text quality improvement method based on a large language model.
[0016] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.
[0017] The embodiments of the present invention have the following beneficial effects: The present invention provides a progressive text quality improvement method, device and medium based on a large language model, which combines hierarchical progressive diagnostic logic with knowledge graph retrieval enhancement mechanism, achieves accurate quality improvement by fine-tuning the large language model, and plans personalized improvement paths based on hierarchical decision-making algorithms. First, in the quality improvement stage, the optimal base is selected from multiple mainstream large language models using weighted F1 scores. Unsupervised clustering analysis is then used to identify systematic biases and make targeted fine-tuning. A hierarchical architecture combining coarse-grained indicator identification and fine-grained level assessment is employed to achieve multi-dimensional quality improvement. Second, in the knowledge retrieval stage, domain-specific knowledge is constructed into a structured knowledge graph. Deep semantic embedding and vector similarity calculation are used to accurately recall knowledge data related to quality gaps. Third, in the path decision-making stage, based on a three-dimensional quality improvement matrix of "dimension-indicator-level," the improvement path is adaptively planned and quality gaps are quantified through dimension weight sampling, indicator priority selection, and vertical priority principles. Finally, in the suggestion generation stage, structured suggestion templates are constructed by integrating quality improvement results and retrieved knowledge. This guides the large language model to generate diagnostic suggestions that are both professional and feasible. A multi-level quality control mechanism ensures the relevance and usability of the output, providing systematic and intelligent technical support for teachers' feedback on quality improvement.
[0018] Additional aspects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description or may be learned by practice of the invention. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of the basic steps of a progressive text quality improvement method based on a large language model according to the present invention. Figure 2 This is a flowchart illustrating the specific implementation of the quality improvement steps in the method of this invention; Figure 3 This is a flowchart illustrating the specific implementation of the knowledge retrieval step in the method of this invention; Figure 4 This is a flowchart illustrating the specific implementation of the gap quantification step in the method of this invention; Figure 5 This is a flowchart illustrating the specific implementation steps of the quality improvement scheme generation method in the present invention. Figure 6 This is a schematic diagram of the structure of an electronic device according to the present invention; Figure 7 This is a schematic diagram of a computer-readable storage medium structure according to the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0022] The first embodiment of this invention provides a progressive text quality improvement method based on a large language model, such as... Figure 1 As shown, it includes the following steps: S1. Select the optimal large language model as the base model, use the base model to perform quality diagnosis on the input text, and obtain the text quality diagnosis results; S2. Use the text quality diagnostic results to perform knowledge retrieval and obtain multiple sets of knowledge entities; S3. Based on the text quality diagnostic results, develop a text quality gap report; S4. Use the knowledge entity set and text quality gap report to improve the input text and obtain a text quality improvement plan.
[0023] This invention combines hierarchical progressive diagnostic logic with a knowledge graph retrieval enhancement mechanism, achieves accurate diagnosis by fine-tuning a large language model, and plans personalized improvement paths based on a hierarchical decision-making algorithm.
[0024] The implementation process of each step of this invention is described in detail below: S1. Select the optimal large language model as the base model, use the base model to perform quality diagnosis on the input text, and obtain the text quality diagnosis results.
[0025] like Figure 2 As shown, in step S1, the optimal base is selected from multiple mainstream large language models by weighted F1 score, and systematic biases are identified and fine-tuned by unsupervised clustering analysis. A hierarchical architecture of coarse-grained index identification and fine-grained level evaluation is adopted to complete multi-dimensional quality improvement.
[0026] Preferably, in step S1, selecting the optimal large language model as the base model specifically includes the following steps: S1-1. Test candidate large language models using a pre-labeled text dataset; S1-2. Evaluate the output of each candidate large language model using a weighted F1 score to determine the optimal large language model.
[0027] In this embodiment of the invention, to ensure the accuracy of the diagnosis, the best model is first selected from a candidate set containing multiple mainstream large language models (such as DeepSeek, GPT, Gemini, etc.). For example, testing can be conducted on a teacher peer feedback dataset pre-annotated by domain experts, and the weighted F1 score is used as the core evaluation metric to assess the performance of each model. In this embodiment of the invention, the formula for calculating the weighted F1 score is as follows: ; Where P represents precision and R represents recall. In a specific implementation of this invention, the parameter β is set to a range of (0, 1) to give higher weight to precision, thereby ensuring the rigor of the diagnostic results. After evaluation, the GPT-4o model, which performs best, is selected as the base model in this embodiment of the invention.
[0028] In some embodiments, fine-tuning is required to further improve the performance of the GPT-4o model in teacher feedback diagnostic tasks. Therefore, before using the pedestal model to perform quality diagnostics on the input text, the following steps are also included: S1-3. Compare the output of the optimal large language model with the pre-labeled results to identify erroneous samples; S1-4. Analyze the error samples to determine their error patterns; S1-5. Expand the error samples corresponding to the error patterns through data augmentation; In this embodiment of the invention, the fine-tuning of the model first involves comparing the model's diagnostic results with expert annotation results to identify samples with erroneous diagnoses. Then, unsupervised clustering algorithms such as K-means are applied to analyze the features of the erroneous samples, identifying typical error patterns. Finally, data augmentation strategies are used to specifically expand the training samples related to these error patterns, fine-tuning the GPT-4o model to enhance its ability to recognize complex features and ambiguous boundaries.
[0029] Preferably, in step S1, the base model is used to perform quality diagnosis on the input text, which specifically includes the following steps: S1-6. Conduct a macro-level evaluation of the input text to determine the target evaluation dimensions; S1-7. Use the target evaluation dimensions to rate the input text and obtain the target level; S1-8. Output the target evaluation dimensions and target levels as text quality diagnostic results.
[0030] In this embodiment of the invention, after receiving input text, the model first performs coarse-grained recognition, classifying the input text according to macro-dimensional categories and outputting which evaluation dimension(s) the text belongs to. Then, the output evaluation dimension results are used as key context input to guide the model to conduct in-depth analysis under specific dimensions, ultimately outputting a specific level rating for the text under that dimension, and providing a structured diagnostic result containing both "dimension" and "level". Taking teacher peer feedback text as an example, its evaluation dimensions include "teaching strategies" and "classroom management," while specific quality levels include "excellent," "good," and "qualified."
[0031] As can be seen, the hierarchical progressive quality improvement algorithm provided in this embodiment of the invention, through a two-stage architecture of "coarse-grained index identification → fine-grained level assessment", can accurately identify the evaluation dimensions covered by the feedback text and conduct refined level assessment. It effectively overcomes the limitations of traditional numerical scoring methods, which are highly subjective and unable to provide in-depth diagnosis, and improves the accuracy and objectivity of diagnosis of different types of teacher feedback texts.
[0032] S2. Use the text quality diagnostic results to perform knowledge retrieval and obtain multiple sets of knowledge entities.
[0033] like Figure 3 As shown, in step S2, domain expertise is constructed into a structured knowledge graph, and knowledge data related to quality gaps is accurately recalled through deep semantic embedding and vector similarity calculation.
[0034] Preferably, in step S2, knowledge retrieval is performed using the text quality diagnostic results, specifically including the following steps: S2-1. Construct a knowledge graph based on a pre-set corpus, and vectorize the entities and relations in the knowledge graph; S2-2. Based on the text quality diagnosis results of the input text, construct knowledge retrieval statements; S2-3. Use knowledge retrieval statements to search the knowledge graph and obtain multiple sets of knowledge entities.
[0035] This invention employs a joint entity relation extraction algorithm model. Based on the entity relation extraction of this model, massive amounts of unstructured teacher feedback text are transformed into a structured knowledge network. Taking teacher peer feedback as an example, the input of this model is a teacher peer feedback corpus. The output is a series of structured knowledge triples. Specifically, the embodiments of the present invention employ a sequence labeling method based on the BERT pre-trained language model. For any input sentence... The model first obtains the context vector representation of each word using BERT. Then, it uses two independent classifiers to complete the tasks: ① Entity recognition: classifying the vector of each word to determine its corresponding entity label; ② Relation extraction: identifying labeled entity pairs. Predefined relationships that may exist between them Using this algorithm, the system can automatically parse knowledge triples from text and store them in the graph database Neo4j, forming the underlying data structure of the knowledge graph; Preferably, in step S2, the entities and relations in the knowledge graph are vectorized and encoded, specifically including the following steps: S2-4. Extract the descriptive information of entities and relations from the knowledge graph; for entity nodes, concatenate the entity name and entity description to obtain the entity text; for relation edges, concatenate the relation name and relation description to obtain the relation text. S2-5. Perform semantic vector encoding on entity text and relation text to obtain entity semantic vectors and relation semantic vectors; S2-6. Store entity semantic vectors and relation semantic vectors in a vector database. Each vector is associated with its corresponding entity / relation ID, name, and metadata information, and a vector index is constructed.
[0036] In this embodiment of the invention, to achieve knowledge retrieval based on semantic similarity, a dense vector representation model optimized for Chinese semantic retrieval is adopted to vectorize and encode entities and relations in the knowledge graph. First, textual descriptions of knowledge entities and relations are extracted from the graph database Neo4j, and a standardized text representation is constructed for each entity. For entity nodes, the entity name and entity description are concatenated to construct the entity text T_entity = [entity name] + ":" + [entity description]; for relations, the relation text T_relation = [relation name] + ":" + [relation description]. Then, preprocessing operations are performed on the constructed text, including: removing redundant whitespace characters, standardizing punctuation to half-width format, and truncating excessively long texts to a maximum length of 512 tokens. The semantic vector encoding step uses the BGE (BAAI GeneralEmbedding) Chinese semantic embedding model to encode the preprocessed text. After inputting the text into the model, the last hidden state corresponding to the [CLS] tag is taken as the semantic vector representation of the text, generating a 1024-dimensional dense vector. The generated semantic vectors are then L2 normalized to a magnitude of 1, facilitating efficient calculation of cosine similarity using inner product operations. Finally, the normalized entity and relation vectors are stored in the vector database Chroma, with each vector associated with its corresponding entity / relation ID, name, and metadata information. An approximate nearest neighbor indexing algorithm is used to construct the vector index.
[0037] Preferably, in step S2, the knowledge retrieval statement is used to perform a retrieval in the knowledge graph, specifically including the following steps: S2-7. Convert the knowledge retrieval statement into a retrieval vector; S2-8. Calculate the cosine similarity between the retrieved vector and all entity semantic vectors in the vector database, and output the entity nodes corresponding to the entity semantic vectors with cosine similarity greater than the preset similarity threshold as a set of knowledge entities.
[0038] This invention employs a chained call mechanism for semantic retrieval. First, it extracts core keywords from the original feedback text and diagnostic results, then integrates them into a single query statement. Next, the query statement will be... Transform into query vectors using the S21 semantic embedding model. In a vector database, the query vector is calculated. With all entity vectors in the knowledge graph The cosine similarity is used to recall the most relevant knowledge, and its calculation formula is as follows: ; Ultimately, the vector database will return the Top-K knowledge entities with the highest similarity scores, serving as direct knowledge input for generating improvement suggestions.
[0039] As can be seen, this invention employs a joint entity relation extraction method based on a BERT pre-trained language model to construct a knowledge graph for teacher peer feedback. It utilizes the Sentence-BERT deep semantic embedding model based on the Transformer architecture to vectorize knowledge triples and achieves accurate retrieval of relevant knowledge through cosine similarity calculation based on a chained call mechanism. Compared to the lack of professional knowledge support in traditional text commenting methods, this invention provides deep domain knowledge input for improving suggestion generation, ensuring the professional depth and accuracy of the suggestions.
[0040] S3. Based on the text quality diagnostic results, develop a text quality gap report.
[0041] like Figure 4 As shown, in step S3, based on the three-dimensional quality improvement matrix of "dimension-indicator-level", the improvement path is adaptively planned and the quality gap is quantified through dimension weight sampling, indicator priority selection and vertical priority principle.
[0042] Preferably, in step S3, a text quality gap report is generated based on the text quality diagnosis results, specifically including the following steps: S3-1. Based on the text quality diagnosis results and historical text data, determine the target improvement dimensions, target improvement indicators, and target levels for text quality improvement in sequence.
[0043] In this embodiment of the invention, based on the teacher's historical feedback data and current diagnostic results, the optimal next improvement path is dynamically planned for the teacher.
[0044] The next improvement path is divided into three aspects: target improvement dimensions, target improvement indicators, and target levels. Regarding dimension decision-making, this embodiment of the invention uses a weighted probability model to select the target improvement dimension. For any dimension in the teacher feedback quality evaluation system The probability of it being selected By a dynamic weight The decision is made. The formula for calculating this weight is: ; in, It is the teacher in the dimension The lower the historical average performance score, the greater the contribution of this item; It is the teacher's dimension The adoption rate of historical improvement suggestions is considered, and the higher the adoption rate, the higher the weight. It is a measurement dimension The more frequently a factor has been frequently increased recently, the lower its weight. These are adjustable hyperparameters used to balance the influence of various factors. After calculating the weights of all dimensions, the selection probabilities are obtained through normalization, and weighted random sampling is performed to determine the final target dimension. .
[0045] Regarding indicator-based decision-making, embodiments of the present invention select dimensions... Internally, the algorithm determines the target improvement metric through an optimization process. The process aims to select the weakest link, and its decision function is: ; in, It is a metric The qualitative rating is mapped to a numerical function, ensuring that the lowest-rated indicator is prioritized.
[0046] In terms of hierarchical decision-making, target indicators are determined. Subsequently, embodiments of the present invention follow the "vertical priority" principle to plan target levels. The decision-making process can be represented by the following conditional function: ; in, The function indicates that as long as the current indicator level has not yet reached "excellent", the goal is to improve it to the next level of the same indicator. The function indicates that if the current indicator reaches the level of "excellent", the algorithm will execute the "horizontal expansion" mechanism, which will re-execute the second step and select the next non-"excellent" indicator that most needs improvement from the current dimension.
[0047] S3-2. Through multi-factor evaluation based on semantic matching, determine the quantitative gap between the input text and the target improvement dimensions, target improvement indicators, and target level.
[0048] After determining the improvement path, this embodiment of the invention performs precise, multi-dimensional quantification of the gap between the original feedback text and the target standard. For example, it first starts from the knowledge base... Retrieve target indicators from the middle. A set of specific evaluation criteria under the "Excellent" level, and formalized into a set. Each element This represents an operational and verifiable standard.
[0049] Secondly, regarding sets Each benchmark in The algorithm calculates the original feedback text. Satisfaction score with it This score is calculated using a deep semantic matching model, for example, by calculating the text. vector representation Compared with the benchmark vector representation Cosine similarity between them: ; The score The range of values is [0, 1], and the higher the value, the higher the degree of satisfaction.
[0050] S3-3. Based on the dimensions, indicators, and levels of the target improvement, and combined with the corresponding quantitative gaps, formulate a text quality gap report.
[0051] Specifically, in this embodiment of the invention, a threshold is set. All benchmarks are divided into two subsets: "satisfied" and "unsatisfied". The set of satisfied benchmarks is... The unsatisfied benchmark set is These two sets will be integrated into a structured gap analysis report.
[0052] As can be seen, the hierarchical path decision-making algorithm proposed in this invention, based on a three-dimensional quality improvement matrix of "dimension-indicator-level," provides teachers with personalized and sustainable feedback-based capability improvement paths through intelligent planning at three levels: dimension decision-making, indicator decision-making, and level decision-making. This algorithm dynamically optimizes based on teachers' historical performance and the effectiveness of suggestion adoption, adhering to the "vertical priority" principle to ensure priority improvement of weak areas, while simultaneously establishing a horizontal expansion mechanism to promote the comprehensive development of teachers' capabilities. This effectively solves the problem that traditional methods cannot intelligently generate targeted improvement paths.
[0053] Meanwhile, the quality gap quantification algorithm proposed in this invention decomposes excellent standards into operable evaluation benchmarks and uses a deep semantic matching model for multi-factor comparative evaluation, achieving accurate quantification of the gap between feedback text and target standards. Compared with traditional methods that can only provide qualitative descriptions, this invention can generate structured gap analysis reports that clearly point out the advantages of the feedback text and specific improvement directions, providing a clear and quantitative basis for generating targeted suggestions.
[0054] S4. Use the knowledge entity set and text quality gap report to improve the input text and obtain a text quality improvement plan.
[0055] like Figure 5 As shown, in step S4, the diagnostic results and retrieval knowledge are integrated to construct a structured prompt template, which guides the large language model to generate improvement suggestions that are both professional and feasible, and ensures the relevance and usability of the output through a multi-level quality control mechanism.
[0056] Preferably, in step S4, the input text is improved using a knowledge entity set according to the text quality gap report to obtain a text quality improvement plan, which specifically includes the following steps: S4-1. Encapsulate the knowledge entity set and the text quality gap report into a structured input set.
[0057] In this embodiment of the invention, all necessary information is first dynamically assembled into a structured input set. The input can be formally represented as a tuple: ; in, yes The original feedback text input. It is a structured gap analysis report generated by the S323 algorithm. It is a set of relevant knowledge entities retrieved from the knowledge graph by the S22 algorithm. ; It is a set of explicit output constraint instructions that stipulate that the recommendation text should follow a four-part structure: "affirming advantages → analyzing problems → proposing specific recommendations → summarizing and looking ahead". .
[0058] S4-2. Input the structured input set into the generative large language model, and use constraints to guide the generative large language model to generate text quality improvement schemes.
[0059] In this embodiment of the invention, the suggested text The generation process is defined as a process in a structured input set. A text probability maximization process under multiple constraints and conditions. This process is carried out by a finely tuned generative large language model. Execution. Its objective function can be expressed as: ; This maximization process must simultaneously satisfy the following constraints: ① Knowledge constraint: the generated text must meet certain conditions. The retrieved knowledge must be effectively integrated. This constraint can be represented as a utility function. This function measures References or representations in Medium correlation, ① Preset threshold. ② Problem constraints: Requirements for the generated text. We must respond directly to the gap analysis report. The unmet benchmarks pointed out in the text This constraint can be expressed as This function measures Coverage of specific problems. ③ Structural constraints: Requirements for the generated text. Strictly follow The output structure defined in .
[0060] In practice, these constraints will be implemented by... The entire code is implemented using a carefully designed prompt to guide the model. Search in its generated space toward regions that satisfy all conditions.
[0061] S4-3. Improve the quality of the text quality improvement scheme generated by the generative large language model. When the quality improvement score is lower than the preset quality threshold, control the generative large language model to regenerate the text quality improvement scheme until the quality improvement score of the text quality improvement scheme reaches the preset quality threshold.
[0062] To ensure the reliability of the final output, embodiments of the present invention also include a final quality control gate. During the generation... Then, a verification function It will evaluate the text's fluency, logical consistency, and contextual relevance to the original feedback. Only when... The score is higher than the preset quality threshold. Only then is the suggestion considered qualified and finally output.
[0063] As can be seen, the suggestion generation algorithm of this invention, which integrates quality improvement and knowledge retrieval, ensures that the generated improvement suggestions are professional, targeted, and feasible through multiple guidance mechanisms including knowledge constraints, problem constraints, and structural constraints. Furthermore, by setting up multi-level quality control mechanisms at each stage of suggestion generation—before, during, and after—low-quality outputs are effectively filtered out, ensuring the stability and reliability of the entire method chain and overcoming the limitations of traditional methods in lacking effective mechanisms for "feedback to peer feedback."
[0064] In summary, the embodiments of the present invention construct a complete algorithm chain of "quality improvement - knowledge retrieval - path decision-making - suggestion generation", providing systematic and intelligent technical support for improving the quality of teacher feedback.
[0065] Figure 6 This is a schematic diagram of the electronic device proposed in the second embodiment of the present invention. In this embodiment, the memory stores program instructions for implementing the progressive text quality improvement method based on a large language model according to any of the above embodiments. The processor executes the program instructions stored in the memory to perform progressive text quality improvement based on a large language model. The processor can also be called a CPU (Central Processing Unit). The processor may be an integrated circuit chip with signal processing capabilities. The processor can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0066] The methods described in the first embodiment of the present invention are applicable to the embodiments of the present electronic device. The specific functions implemented by the embodiments of the present electronic device are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0067] Figure 7This is a schematic diagram of the structure of a computer-readable storage medium according to the third embodiment of the present invention. The computer-readable storage medium of the fourth embodiment of the present invention stores program instructions capable of implementing the above-described progressive text quality improvement method based on a large language model. These program instructions can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.
[0068] The methods described in the first embodiment of the present invention are applicable to the computer-readable storage medium embodiment. The specific functions implemented by the computer-readable storage medium embodiment are the same as those in the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method.
[0069] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to realize the progressive text quality improvement method based on a large language model provided in the above embodiment.
[0070] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0071] Those skilled in the art will understand that modules in the device of the embodiments of the present invention can be adaptively modified and placed in one or more devices different from those embodiments. Modules, units, or components in the embodiments of the present invention can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the corresponding claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the corresponding claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0072] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0073] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0074] Furthermore, the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. In particular, for embodiments such as apparatus and devices, since they are basically similar to the method embodiments, the relevant parts can be referred to the description of the method embodiments. The apparatus, devices, and other embodiments described above are merely illustrative, and the modules, units, etc., described as separate components may or may not be physically separate, that is, they may be located in one place or distributed in multiple places, such as nodes in a system network. Specifically, some or all of the modules and units can be selected according to actual needs to achieve the purpose of the above-described embodiment solutions. Those skilled in the art can understand and implement this without creative effort.
[0075] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0076] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0077] Furthermore, the terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying relative importance, or implicitly specifying the number of technical features indicated in this embodiment. Therefore, features defined with terms such as "first" and "second" in the embodiments of this invention can explicitly or implicitly indicate that the embodiment includes at least one of those features. In the description of this invention, the word "multiple" means at least two or more, such as two, three, four, etc., unless otherwise explicitly specified in the embodiments.
[0078] In embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of the present invention may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0079] Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention. Other embodiments of the present invention will readily conceive of by considering the specification and practicing the invention. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
Claims
1. A progressive text quality improvement method based on a large language model, characterized in that, Includes the following steps: The optimal large language model is selected as the base model, and the base model is used to perform quality diagnosis on the input text to obtain the text quality diagnosis result. Using the text quality diagnostic results, knowledge retrieval is performed to obtain multiple sets of knowledge entities; Based on the text quality diagnostic results, a text quality gap report is generated; The input text is improved using the knowledge entity set and the text quality gap report to obtain a text quality improvement scheme.
2. The progressive text quality improvement method based on a large language model according to claim 1, characterized in that, The selection of the optimal large language model as the base model specifically includes the following steps: Test candidate large language models using a pre-labeled text dataset; The output of each candidate large language model is evaluated using a weighted F1 score to determine the optimal large language model.
3. The progressive text quality improvement method based on a large language model according to claim 2, characterized in that, Prior to the step of performing quality diagnosis on the input text using the base model, the following steps are also included: The output of the optimal large language model is compared with the pre-labeled results to identify erroneous samples; The error samples are analyzed to determine their error patterns. Expand the error samples corresponding to the error patterns through data augmentation; The process of using the base model to perform quality diagnosis on the input text specifically includes the following steps: Perform a macro-level evaluation of the input text to determine the target evaluation dimensions; The target evaluation dimensions are used to rate the input text to obtain the target level; The target evaluation dimensions and target levels are output as text quality diagnostic results.
4. The progressive text quality improvement method based on a large language model according to claim 1, characterized in that, The knowledge retrieval using the text quality diagnostic results specifically includes the following steps: A knowledge graph is constructed based on a pre-defined corpus, and the entities and relations in the knowledge graph are vectorized and encoded. Based on the text quality diagnosis results of the input text, construct knowledge retrieval statements; Using the knowledge retrieval statement, a search is performed in the knowledge graph to obtain multiple sets of knowledge entities.
5. The progressive text quality improvement method based on a large language model according to claim 4, characterized in that, The vectorization of entities and relations in the knowledge graph specifically includes the following steps: Extract the descriptive information of entities and relations from the knowledge graph; for entity nodes, concatenate the entity name and entity description to obtain entity text; for relation edges, concatenate the relation name and relation description to obtain relation text. The entity text and relation text are semantically encoded to obtain entity semantic vectors and relation semantic vectors; Entity semantic vectors and relation semantic vectors are stored in a vector database. Each vector is associated with its corresponding entity / relation ID, name, and metadata information, and a vector index is constructed.
6. The progressive text quality improvement method based on a large language model according to claim 5, characterized in that, The process of using the knowledge retrieval statement to perform a retrieval in the knowledge graph specifically includes the following steps: Transform the knowledge retrieval statement into a retrieval vector; Calculate the cosine similarity between the retrieval vector and all entity semantic vectors in the vector database, and output the entity nodes corresponding to the entity semantic vectors with cosine similarity greater than a preset similarity threshold as a set of knowledge entities.
7. The progressive text quality improvement method based on a large language model according to claim 1, characterized in that, The process of generating a text quality gap report based on the text quality diagnostic results includes the following steps: Based on the text quality diagnosis results and historical text data, the target improvement dimensions, target improvement indicators, and target levels for text quality improvement are determined sequentially. Through multi-factor evaluation based on semantic matching, the quantitative gap between the input text and the target improvement dimensions, target improvement indicators, and target level is determined; Based on the aforementioned target improvement dimensions, target improvement indicators, and target levels, combined with the corresponding quantitative gaps, a text quality gap report is generated.
8. The progressive text quality improvement method based on a large language model according to claim 1, characterized in that, The step of using the knowledge entity set to improve the input text according to the text quality gap report to obtain a text quality improvement scheme specifically includes the following steps: The knowledge entity set and the text quality gap report are encapsulated into a structured input set; The structured input set is input into the generative large language model, and constraints are used to guide the generative large language model to generate text quality improvement schemes. The text quality improvement scheme generated by the generative large language model is subjected to quality diagnosis. When the quality improvement score is lower than the preset quality threshold, the generative large language model is controlled to regenerate the text quality improvement scheme until the quality improvement score of the text quality improvement scheme reaches the preset quality threshold.
9. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement a progressive text quality improvement method based on a large language model as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The storage medium stores a program, which is executed by a processor to implement a progressive text quality improvement method based on a large language model as described in any one of claims 1-8.