Long document simplification method based on multi-agent large model
By combining the collaboration model of a team of human experts and the multi-agent model, the problems of grammatical errors, semantic deviations and logical confusion in existing document simplification technology are solved, and high-quality, smooth and complete information document simplification effect is achieved.
Patent Information
- Application Number
- CN202411750813.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-18
AI Technical Summary
The lack of high-quality parallel corpus during training of existing document simplification techniques leads to the problems of syntax errors and poor sentence flow in generated simplified documents, and is difficult to deal with complex and long text, resulting in information loss and logical confusion.
A long document simplification method based on multi-agent large model is adopted. By simulating the collaboration model of a human expert team, multi-agent roles are defined and the role-playing prompt templates are used to drive the large language model to perform different role divisions, and overall planning, preliminary simplification, metaphor analysis, terminology interpretation and multi-dimensional simplification integration are carried out. Finally, the simplification capability is improved through fine-tuning of the open source model in parallel corpus.
It improves the accuracy, fluency and information integrity of document simplification, overcomes the problems of grammatical errors, semantic deviations and logical confusion in the prior art, and achieves high-quality document simplification.
Smart Images

Figure CN119849444A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of text simplification, and in particular to a long document simplification method based on a multi-agent large model. Background Art
[0002] Document simplification is a process of converting complex text into a simplified version that is easier to understand and read. It is of great significance to improving information accessibility and popularizing education. Especially in the era of information explosion, a large amount of professional and academic content needs to be understood by a wider audience. Document simplification technology can help non-professionals quickly grasp the core content of the text and reduce reading barriers. It is also beneficial for language learners to improve their reading ability.
[0003] LLM (Large Language Model) is an artificial intelligence algorithm based on deep learning. It can model natural language text by training a large amount of text data to learn the grammar, semantics and context information of the language. This model has a wide range of applications in the field of natural language processing, including but not limited to text generation, text classification, machine translation, sentiment analysis, etc.
[0004] However, existing document simplification technologies have some shortcomings. First, due to the lack of high-quality parallel corpora, simplification models often fail to achieve ideal generalization capabilities during training, resulting in grammatical errors and unsmooth sentences in the generated simplified documents. Second, existing methods are unable to cope with complex and long texts, making it difficult to retain the subtle emotions and professional terminology of the original text, and are prone to information loss and logical confusion. In addition, single-model methods find it difficult to simulate the collaboration model of a team of human experts and cannot effectively handle multiple complex dimensions in document simplification, thus limiting the simplification effect. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a long document simplification method based on a multi-agent large model. Through multi-agent collaboration, prompt engineering and hierarchical simplification strategy, the problems of grammatical errors, semantic deviations and long document processing logic confusion existing in the existing document simplification technology are solved, and the accuracy, fluency and information integrity of document simplification are improved.
[0006] The object of the present invention is achieved by: a long document simplification method based on a multi-agent large model, comprising the following steps:
[0007] 1) Divide the role allocation of the simulated human expert team and use the role-playing prompt template to drive the large language model to achieve different role divisions;
[0008] 2) Make an overall plan for the original documents and generate information that provides global guidance for subsequent simplification work;
[0009] 3) Carry out preliminary simplification and iterative optimization of the original document;
[0010] 4) Based on the initial simplification, a more detailed simplification is carried out through metaphor analysis and terminology explanation;
[0011] 5) Reconstruct the simplified fragments that have undergone multiple simplification operations into a whole simplified article and revise it;
[0012] 6) Fine-tune the open source model based on the generated parallel corpus to improve document simplification capabilities.
[0013] As a further limitation of the present invention, the step 1) specifically comprises:
[0014] 1.1) Define multi-agent roles, including: Project Manager: formulate simplification guidelines, clarify simplification goals and styles; Article Logic Analyst: analyze document structure and generate hierarchical structures of titles and subtitles; Content Simplifier: perform preliminary simplification of sentences and paragraphs of documents; Simplification Manager: review simplification results and provide optimization suggestions; Metaphor Analyst: analyze and explain metaphors and complex emotions; Terminology Interpreter: provide easy-to-understand explanations for professional terms; Content Integrator: merge simplification results after multi-agent parallel simplification; Article Architect: integrate simplified fragments and reconstruct document logic; Proofreader: proofread simplified documents to ensure fluent language and clear logic;
[0015] 1.2) Each role is set by one or more large language models through specific prompt words and dynamic parameter input to complete its task setting. The construction of the prompt template is defined as follows:
[0016] O i =f(T i ,D,M,Θ,Φ) (1)
[0017] In formula (1), O i represents the output of the agent role constructed by the current prompt template; T i Represents the task prompt words of the agent role, which are used to guide the large language model to complete specific tasks; D represents the input original document or the set of segmented fragments; M represents the large language model, which is used to process the input task; Θ represents the model parameters of the large language model, including weights and embedding vectors, which are used to control the internal behavior of the model; Φ represents a set of hyperparameters, including temperature, sampling probability, and repetition penalty, which are used to control the diversity and quality of generated text.
[0018] As a further limitation of the present invention, the step 2) comprises:
[0019] 2.1) Input document: Input the document to be simplified;
[0020] 2.2) Simplified Guidelines Generation: The project manager generates simplified guidelines G based on the document content, including article abstracts, keywords, cultural background, style, tone, and target audience;
[0021] 2.3) Structural framework generation: The article logic analyst analyzes the document structure and generates a hierarchical title and subtitle framework.
[0022] As a further limitation of the present invention, the step 3) comprises:
[0023] 3.1) Split the document into paragraphs or text fragments {P1, P2, ..., P m}, where P i represents the i-th fragment, there are m fragments in total;
[0024] 3.2) Content simplifiers make preliminary simplifications for each segment. Specific simplification operations include sentence reorganization and complex vocabulary replacement. represents the initial simplification result of the content simplifier on the paragraph set, where represents the preliminary simplified version of the i-th paragraph, marked as the 0th round of iteration;
[0025] 3.3) The simplification supervisor reviews the simplification results and provides feedback. The iterative simplification optimization of each fragment is expressed as:
[0026]
[0027] When the total number of iterations N is reached or all simplified results meet the quality standard, the iteration stops:
[0028]
[0029] In formula (2) and formula (3), represents the simplification result of the kth round of the i-th segment, which is the output optimized by the simplifier in the previous round and evaluated by the simplification supervisor in the current round; represents the evaluation feedback of the kth round of the i-th segment, Indicates the simplified supervisor's simplified results Quality ratings and suggestions for improvement, i.e. simplifying the text modification suggestions made by the supervisor in response to the questions; Represents the optimization function of the content simplifier, based on the feedback from the simplification supervisor To update the simplified result; Φ C represents the set of hyperparameters of the content simplifier, which is used to control the behavior of the optimization process; Q threshold represents the quality threshold, which indicates the minimum score for the simplified result to meet the quality requirements; N represents the maximum number of iterations.
[0030] As a further limitation of the present invention, the step 4) comprises:
[0031] 4.1) Metaphor Analysis: Metaphor analysts identify metaphors and provide intuitive explanations;
[0032] 4.2) Terminology explanation: Terminology interpreters provide more understandable explanations for terms in professional fields;
[0033] 4.3) Multi-dimensional simplification integration: The content integrator combines the simplified operations of the above two intelligent roles into an overall simplified fragment, and its calculation formula is expressed as:
[0034]
[0035] In formula (4), S i represents the preliminary simplification result, the final output from the content simplifier, and serves as the input of the metaphor analyst and terminology interpreter; M i Represented by metaphor analyst from S i A simplified version of the metaphor identified in T i Indicates that the term interpreter has been i A simplified version obtained by identifying professional terms and paraphrasing them;Φ I represents the hyperparameter settings of metaphor analysts, terminology interpreters, and content integrators; represents the content integration function, which will initially simplify the result S i , Metaphor Analysis Results i And the term interpretation result T i , generate the final refined and simplified result C i .
[0036] As a further limitation of the present invention, the step 5) comprises:
[0037] 5.1) Fragment integration: The article architect integrates all simplified fragments. First, a fragment size value C is set, and then a fragment is iteratively extracted from the queue of fragments to be processed and integrated by the article architect under the guidance of the simplification guide G; this process is repeated until all fragments are used to integrate into a complete article;
[0038]
[0039] In formula (5), T 1~(k-1) Indicates that the articles from the 1st segment to the k-1th segment have been aggregated. represents the kth simplified fragment to be incorporated into the whole article extracted from the list of length C, G is the simplification guide, Φ R is the hyperparameter of the article architect agent, T krepresents the whole article after incorporating the kth simplified segment. When all C segments are incorporated, all simplified segments are merged and combined into a simplified article;
[0040] 5.2) Final proofreading: Proofreader for T k Correct grammatical errors, spelling mistakes, and factual inaccuracies to produce a final streamlined document.
[0041] As a further limitation of the present invention, the step 6) comprises:
[0042] 6.1) Data preparation: Construct a parallel corpus based on the simplified documents generated in step 5) and the corresponding original documents, and divide them into training set, validation set, and test set;
[0043] 6.2) Select a suitable open source big model and use parallel corpus to fine-tune the open source big model. The optimization objective function is:
[0044]
[0045] In formula (6), x is the original document; y is the simplified document; θ is the model parameter; logP(y|x; θ) represents the conditional probability, that is, the probability that the model generates the output document y given the input document x; this probability is determined by the model parameter θ. The model parameter θ should be adjusted continuously to make the model generate the target output y as likely as possible given the input x.
[0046] 6.3) Evaluation and iteration: Evaluate the simplification effect of the fine-tuned model on the test set, adjust the hyperparameters and repeat the training until the optimal performance is achieved.
[0047] The present invention adopts the above technical solution, and compared with the prior art, the beneficial effects are as follows: 1) The present invention uses a large language model LLM, without a large number of parallel corpora, to achieve high-quality document simplification. In addition, the present invention makes up for the problem of poor simplification effect in the prior art through multi-dimensional simplification strategies, such as metaphor analysis and term interpretation.
[0048] 2) The present invention can better process complex and long texts by simulating the collaborative mode of a team of human experts. For example, metaphor analysts and terminology interpreters can explain complex language phenomena in the text and provide easy-to-understand explanations, overcoming the defect that the prior art is difficult to effectively identify and process professional terms such as metaphors and advanced emotions, resulting in the loss of subtleties of the original text in simplified documents.
[0049] 3) The present invention adopts a multi-agent system, each agent focuses on different tasks, and completes the entire simplification process through collaboration, overcoming the limitations of the single model method. In addition, the present invention also adopts a hierarchical simplification strategy, starting with the overall structure, and then gradually refining it to multiple simplification levels for each fragment, thereby ensuring the logic and information integrity of the simplified document; overcoming the defects of the prior art that usually uses a single model for simplification, it is difficult to simulate the cooperation mode of a human expert team, resulting in limited simplification effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Flowchart of the present invention.
[0051] Figure 2 Examples of generated content of the present invention. DETAILED DESCRIPTION
[0052] like Figure 1 A long document simplification method based on a multi-agent large model is shown, comprising the following steps:
[0053] 1) Divide the role allocation of the simulated human expert team and use the role-playing prompt template to drive the large language model to achieve different role divisions;
[0054] 1.1) Define multi-agent roles, including:
[0055] Project Manager: Develop simplification guidelines and clarify simplification goals and styles;
[0056] Article logic analyst: Analyzes the document structure and generates a hierarchy of titles and subtitles;
[0057] Content Simplifier: Performs preliminary simplification of sentences and paragraphs in the document;
[0058] Simplification Supervisor: Review simplification results and provide optimization suggestions;
[0059] Metaphor Analyst: Analyzes and interprets metaphors and complex emotions;
[0060] Terminology Explainer: Provide easy-to-understand explanations of professional terms;
[0061] Content integrator: merges simplified results after multi-agent parallel simplification;
[0062] Article architect: integrates simplified fragments and restructures document logic;
[0063] Proofreader: Proofread and simplify documents to ensure smooth language and clear logic;
[0064] 1.2) Each role is completed by one or more large language models (such as GPT-4) through specific prompt words and dynamic parameter input to complete its task setting. The construction of the prompt template is defined as follows:
[0065] O i =f(T i ,D,M,Θ,Φ) (1)
[0066] In formula (1), O i represents the output of the agent role constructed by the current prompt template (such as simplified text paragraphs, structural frameworks, terminology explanations, etc.); T i Represents the task prompt words of the intelligent agent role, which are used to guide the large language model to complete specific tasks; D represents the input original document or the set of segmented fragments; M represents the large language model (such as GPT-4, LLaMA, etc.), which is used to process the input task; Θ represents the model parameters of the large language model, including weights and embedding vectors, which are used to control the internal behavior of the model; Φ represents a set of hyperparameters, including temperature, sampling probability, and repetition penalty, which are used to control the diversity and quality of generated text.
[0067] Specifically, a brief template for defining a role looks like this:
[0068] Role: Project Manager
[0069] Task: Based on the input document content, generate simplified guidelines including article summary, keywords, target style, tone and target audience.
[0070] Input: [Original Document]
[0071] Output: Simplified Guide
[0072] Role: Article Logic Analyst
[0073] Task: Analyze the chapter structure of the input document and output a hierarchical framework of titles and subtitles.
[0074] Input: [Original Document]
[0075] Output: [hierarchical title frame]
[0076] Role: Content Simplifier
[0077] Task: Reorganize the input text into sentences, replace complex words, and generate concise and easy-to-understand text.
[0078] Input: [text snippet]
[0079] Output: [Simplified text snippet]
[0080] Role: Simplification Supervisor
[0081] Task: Review simplified text, score its quality (fluency, conciseness, semantic completeness, etc.), and provide suggestions for improvement.
[0082] Input: [Preliminary simplified fragment]
[0083] Output: [rating and improvement suggestions]
[0084] Role: Metaphor Analyst
[0085] Task: Identify metaphorical expressions in a text and provide easy-to-understand explanations.
[0086] Input: [text snippet]
[0087] Output: [Simplified snippet with metaphor analysis]
[0088] Role: Terminology Explainer
[0089] Task: Identify jargon in a text and provide understandable explanations.
[0090] Input: [text snippet]
[0091] Output: [Simplified snippet with explanation of terms]
[0092] Role: Content Aggregator
[0093] Task: Integrate simplified text, metaphor explanations, and terminology explanations to generate a final simplified segment.
[0094] Input: [text fragment after preliminary simplification, text fragment with metaphor analysis, text fragment with terminology explanation]
[0095] Output: [Text fragment after integrating simplification effects]
[0096] Role: Article Architect
[0097] Task: Integrate all content according to the simplification guidelines and simplification snippets.
[0098] Input: [simplified fragment collection]
[0099] Output: [Complete simplified article after refactoring]
[0100] Role: Proofreader
[0101] Tasks: Proofread text to correct grammar, spelling errors, and ensure factual accuracy.
[0102] Input: [Full simplified article after refactoring]
[0103] Output: [Final simplified article after proofreading]
[0104] The output content obtained by the large language model based on the prompt template is passed into the entire framework so that the output result can play a corresponding auxiliary role. i , and adjusting the hyperparameter Φ can achieve a more controllable and personalized simplified process.
[0105] 2) Make an overall plan for the original documents and generate information that provides global guidance for subsequent simplification work;
[0106] 2.1) Input document: Input the document to be simplified (such as an article or chapter);
[0107] 2.2) Simplified Guide Generation: The project manager generates simplified guidelines G based on the document content, including article abstracts, keywords, cultural background, style, tone, and target audience. The specific contents of these simplified guidelines are shown in the following simple examples:
[0108] Article Abstract: "This article introduces the application of artificial intelligence models in medical treatment."
[0109] Keywords: "artificial intelligence, medical care, image analysis".
[0110] Style and tone: "Aiming at a general audience, with a simple and concise style."
[0111] Target audience: “Healthcare practitioners and general readers”.
[0112] 2.3) Structural framework generation: The article logic analyst analyzes the document structure and generates a hierarchical title and subtitle framework; as shown in the following simple example:
[0113] “1. Introduction”
[0114] “2. Application of artificial intelligence”
[0115] “2.1 Medical Image Analysis”
[0116] “2.2 Clinical Decision Support”
[0117] 3) Carry out preliminary simplification and iterative optimization of the original document;
[0118] 3.1) Split the document into paragraphs or text fragments {P1, P2, ..., P m}, where P i represents the i-th fragment, there are m fragments in total;
[0119] The segmentation principle is to segment by logical units: if the paragraph is too long or the logic is complex, it can be further segmented according to the semantic association between sentences.
[0120] For example: Original paragraph: "Artificial intelligence is changing the healthcare industry. For example, in image analysis, AI can improve diagnostic efficiency and also play an important role in clinical decision support."
[0121] Split into:
[0122] Clip 1: “Artificial intelligence is changing the healthcare industry.”
[0123] Clip 2: "For example, in image analysis, AI can improve diagnostic efficiency."
[0124] Clip 3: "It also plays an important role in clinical decision support."
[0125] The method of segmenting by logical units is implemented by writing corresponding prompt templates and inputting them into the content simplifier role of the large language model. The brief style of the prompt template is as follows:
[0126] Task: Divide the overly long text segment into multiple semantically distinct sub-segments so that each segment can be processed in a more detailed manner.
[0127] Input: [Long text snippet]
[0128] Output: [multiple text snippets]
[0129] 3.2) The content simplifier performs preliminary simplification on each segment. The specific simplification operations (all written into the content simplifier's prompt template) include:
[0130] Sentence Reorganization: Break down a complex sentence into multiple simple sentences;
[0131] Complex vocabulary replacement: Replace professional terms or uncommon words with more understandable words;
[0132] Grammatical simplification: removing unnecessary clauses or modifiers to make sentences more concise.
[0133] represents the initial simplification result of the content simplifier on the paragraph set, where represents the preliminary simplified version of the i-th paragraph, marked as the 0th round of iteration;
[0134] The simplified process is expressed as:
[0135]
[0136] In formula (2), P i Represents an input fragment; Indicates the preliminary simplified result; F simplify Represents the operation function of the content simplifier; Φ simplifyRepresents the set of hyperparameters of the content reducer (such as sampling temperature, generation length, etc.).
[0137] 3.3) The simplification supervisor reviews the simplification results and provides feedback. The iterative simplification optimization of each fragment is expressed as:
[0138]
[0139] When the total number of iterations N is reached or all simplified results meet the quality standard, the iteration stops:
[0140]
[0141] In formula (3) and formula (4), represents the simplification result of the kth round of the i-th segment, which is the output optimized by the simplifier in the previous round and evaluated by the simplification supervisor in the current round; represents the evaluation feedback of the kth round of the i-th segment, Indicates the simplified supervisor's simplified results Quality ratings (such as fluency, conciseness, semantic completeness, etc., expressed in quantitative indicators), as well as suggestions for improvement, that is, simplifying the text modification suggestions made by the supervisor in response to the problems (such as grammatical adjustments and supplementation of missing information); Represents the optimization function of the content simplifier, based on the feedback from the simplification supervisor To update the simplified result; Φ C represents the set of hyperparameters of the content simplifier (sampling temperature, repetition penalty, etc.) used to control the behavior of the optimization process; Q threshold represents the quality threshold, which indicates the minimum score for the simplified result to meet the quality requirements; N represents the maximum number of iterations, which is used to ensure that the optimization process does not loop infinitely.
[0142] The simplified supervisor made specific suggestions for changes in the areas with low scores as follows:
[0143] "'AI can also help clinical decision-making' in sentence 3 is not specific enough. It is recommended to supplement the ways in which AI helps decision-making, such as 'providing diagnostic advice or risk assessment'." In addition, "decision-making" has a certain degree of professionalism and complexity, and it can be considered to be replaced by "decision".
[0144] 4) Carry out more detailed simplification based on the preliminary simplification;
[0145] 4.1) Metaphor Analysis: Metaphor analysts identify metaphors and provide intuitive explanations;
[0146] An example is:
[0147] Input text: "Climate change is a ticking time bomb that is counting down on us."
[0148] Metaphor Identification: Metaphorical expressions: “Time bomb”, “The countdown is approaching us”.
[0149] Metaphor explanation: "Climate change is like a time bomb, meaning that the time is running out for it to trigger an inevitable disaster."
[0150] 4.2) Terminology explanation: Terminology interpreters provide more understandable explanations for terms in professional fields;
[0151] A simple example is as follows:
[0152] Input text: "Blockchain is a distributed ledger technology that is decentralized and immutable."
[0153] Terminology identification: Professional terms: "blockchain", "distributed ledger", "decentralized", "immutable".
[0154] Terminology explained: “A blockchain is a system of recording information that is visible to everyone but cannot be controlled or modified by anyone alone.”
[0155] Terminology replacement: "Blockchain is a public, transparent, secure and reliable record system."
[0156] 4.3) Multi-dimensional simplification integration: The content integrator combines the simplified operations of the above two intelligent roles into an overall simplified fragment, and its calculation formula is expressed as:
[0157]
[0158] In formula (5), S i represents the preliminary simplification result, the final output from the content simplifier, and serves as the input of the metaphor analyst and terminology interpreter; M i Represented by metaphor analyst from S i A simplified version of the metaphor identified in T i Indicates that the term interpreter has been i A simplified version obtained by identifying professional terms and paraphrasing them;Φ I represents the hyperparameter settings of metaphor analysts, terminology interpreters, and content integrators; represents the content integration function, which will initially simplify the result S i , Metaphor Analysis Results i And the term interpretation result T i , generate the final refined and simplified result C i .
[0159] 5) Reconstruct the simplified fragments that have undergone multiple simplification operations into a whole simplified article and revise it;
[0160] 5.1) Fragment integration: The article architect integrates all simplified fragments. First, a fragment size value C is set, and then a fragment is iteratively extracted from the queue of fragments to be processed and integrated by the article architect under the guidance of the simplification guide G; this process is repeated until all fragments are used to integrate into a complete article;
[0161]
[0162] In formula (6), T 1~(k-1) Indicates that the articles from the 1st segment to the k-1th segment have been aggregated. represents the kth simplified fragment to be incorporated into the whole article extracted from the list of length C, G is the simplification guide, Φ R is the hyperparameter of the article architect agent, T k represents the whole article after incorporating the kth simplified segment. When all C segments are incorporated, all simplified segments are merged and combined into a simplified article;
[0163] 5.2) Final proofreading: Proofreader for T k Correct grammatical errors, spelling mistakes, and factual inaccuracies to produce a final streamlined document.
[0164] 6) Fine-tune the open source model based on the generated parallel corpus to improve document simplification capabilities.
[0165] 6.1) Data preparation: Construct a parallel corpus based on the simplified documents generated in step 5) and the corresponding original documents, and divide them into training set, validation set, and test set;
[0166] 6.2) Select a suitable open source large model (such as LLaMA-7B), use parallel corpus to fine-tune the open source large model, and optimize the objective function:
[0167]
[0168] In formula (7), x is the original document; y is the simplified document; θ is the model parameter; logP(y|x; θ) represents the conditional probability, that is, the probability that the model generates the output document y given the input document x; this probability is determined by the model parameter θ. The model parameter θ should be adjusted continuously to make the model generate the target output y as likely as possible given the input x.
[0169] 6.3) Evaluation and iteration: Evaluate the simplification effect of the fine-tuned model on the test set, adjust the hyperparameters and repeat the training until the optimal performance is achieved.
[0170] To verify its beneficial effects, the superiority of this method is demonstrated through automatic indicator evaluation and actual output evaluation. This method uses the Newsela dataset (https: / / newsela.com / data / ): the only high-quality simplified English document dataset for evaluation. For the Newsela dataset, we randomly selected 200 articles and obtained the automatic evaluation indicators by calculating the average results of four reference documents for each article.
[0171] This method uses SARI, D-SARI, BART-S and FKGL values to evaluate the quality of the generated simplified document. The definitions of SARI, D-SARI, BART-S and FKGL are as follows:
[0172] SARI is an evaluation metric based on n-gram edit distance, which is used to measure the quality of simplified text generated by the model and measure the similarity between the generated text and the reference simplified text;
[0173] SARI=d1*Addition_Score+d2*Deletion_Score+d3*Keep_Score
[0174] Among them, Addition_Score is the score of the addition operation, Deletion_Score is the score of the deletion operation, Keep_Score is the score of keeping the original word, and d1, d2 and d3 are the weights for balancing the addition, deletion and retention operations.
[0175] D-SARI adds some weight parameters to the evaluation indicators based on SARI to make it more suitable for document simplification tasks:
[0176] Dkeep=Fkeep*LP2*SLP
[0177] Dadd=Fadd*LP1
[0178] Ddel=Pdel*LP2
[0179] D-SARI=(Dkeep+Ddel+Dadd)*1 / 3
[0180] BART-Score is an indicator for evaluating the quality of generated text in natural language processing tasks. Its basic principle is based on the pre-trained BART model, which evaluates by calculating the probability of generating a text given another text:
[0181]
[0182] The BART-Score is used in different ways as follows: Fidelity (s→h): from source document to hypothesis p(h|s,θ). This method measures whether the hypothesis is likely to be generated based on the source text. Potential application scenarios include factuality and relevance. In addition, this method can also be used to estimate the quality of the target text, such as coherence and fluency; Precision (r→h): from reference text to system-generated text p(h|r,θ). This direction evaluates whether the hypothesis is likely to be constructed based on the gold standard, which is suitable for accuracy-oriented scenarios; Recall (h→r): from system-generated text to reference text p(r|h,θ). This version quantifies whether the hypothesis can easily generate the gold standard, which is suitable for pyramid-type evaluation, especially in summary tasks, because the pyramid score measures the fine-grained semantic content units (SCUs) covered by the text generated by the system.
[0183] FKGL (Flesch-Kincaid Grade Level) is a text readability assessment algorithm used to estimate the difficulty of a text for English speakers. The result is expressed as a grade level in the US education system:
[0184] FKGL = 0.39 × (total number of words / total number of sentences) + 11.8 × (total number of syllables / total number of words) - 15.59
[0185] The method of the present invention is compared with the traditional methods (KIS, BART-SWIPE, PG) and the method of directly prompting large models (LLMsBaselines):
[0186] As shown in Table 1, the Newsela dataset (including reference simplified documents) was used to test the automatic evaluation indicators. The results are as follows: 1) The method of the present invention (GPT-4, GPT-3.5) outperforms the traditional direct prompt large language model in most indicators, including the fine-tuned open source large language model (Llama-2*); 2) In the method of the present invention, the iterative combination strategy is slightly better than the direct combination strategy; 3) Fine-tuning the open source large language model using parallel data can significantly improve its performance, reaching a level comparable to that of a larger closed source large language model; The performance of the method of the present invention on the FKGL indicator is weak, which may be because it contains more details and context, which helps content understanding, but increases the FKGL score. FKGL is not suitable for text simplification, so it is only used as a reference.
[0187] Table 1 Comparative experimental results
[0188]
[0189] Figure 2The method is implemented using a simplification framework based on GPT-4, and the simplification of text blocks in three categories, technology, fiction, and sports, is analyzed to highlight the importance of collaborative work between multiple agents. Figure 2 As shown, the content simplifyers consistently performed basic simplifications such as sentence rearrangement, splitting and reorganization, and preliminary word replacements; the metaphor analysts provided extensive explanations due to literary devices such as metaphors and hyperbole in novels, provided metaphor explanations for sports, but rarely explained metaphors in technical texts; the terminology explainers explained rare terms in technical texts in detail, but rarely replaced or explained terms in these categories due to the infrequency of rare terms in novels and sports. Each agent focused on its specific task and together contributed to a clear and understandable final text.
[0190] The present invention is not limited to the above-mentioned embodiments. On the basis of the technical solution disclosed in the present invention, technicians in this field can make some substitutions and deformations to some technical features therein according to the disclosed technical content without creative labor, and these substitutions and deformations are all within the protection scope of the present invention.
Claims
1. A long document simplification method based on a multi-agent large model, characterized in that: The following steps are involved: 1) Divide the role allocation of the simulated human expert team and use the role-playing prompt template to drive the large language model to achieve different role divisions; 2) Make an overall plan for the original documents and generate information that provides global guidance for subsequent simplification work; 3) Carry out preliminary simplification and iterative optimization of the original document; 4) Based on the initial simplification, a more detailed simplification is carried out through metaphor analysis and terminology explanation; 5) Reconstruct the simplified fragments that have undergone multiple simplification operations into a whole simplified article and revise it; 6) Fine-tune the open source model based on the generated parallel corpus to improve document simplification capabilities.
2. A long document simplification method based on a multi-agent large model according to claim 1, characterized in that: The step 1) specifically includes: 1.1) Define multi-agent roles, including: Project Manager: formulate simplification guidelines, clarify simplification goals and styles; Article Logic Analyst: analyze document structure and generate hierarchical structures of titles and subtitles; Content Simplifier: perform preliminary simplification of sentences and paragraphs of documents; Simplification Manager: review simplification results and provide optimization suggestions; Metaphor Analyst: analyze and explain metaphors and complex emotions; Terminology Interpreter: provide easy-to-understand explanations for professional terms; Content Integrator: merge simplification results after multi-agent parallel simplification; Article Architect: integrate simplified fragments and reconstruct document logic; Proofreader: proofread simplified documents to ensure fluent language and clear logic; 1.2) Each role is set by one or more large language models through specific prompt words and dynamic parameter input to complete its task setting. The construction of the prompt template is defined as follows: The i =f(T i ,D,M,Θ,Φ) (1) In formula (1), O i represents the output of the agent role constructed by the current prompt template; T i Represents the task prompt words of the agent role, which are used to guide the large language model to complete specific tasks; D represents the input original document or the set of segmented fragments; M represents the large language model, which is used to process the input task; Θ represents the model parameters of the large language model, including weights and embedding vectors, which are used to control the internal behavior of the model; Φ represents a set of hyperparameters, including temperature, sampling probability, and repetition penalty, which are used to control the diversity and quality of generated text.
3. A method for simplifying long documents based on a multi-agent large model according to claim 1, characterized in that: The step 2) comprises: 2.1) Input document: Input the document to be simplified; 2.2) Simplified Guidelines Generation: The project manager generates simplified guidelines G based on the document content, including article abstracts, keywords, cultural background, style, tone, and target audience; 2.3) Structural framework generation: The article logic analyst analyzes the document structure and generates a hierarchical title and subtitle framework.
4. The method for simplifying long documents based on a multi-agent large model according to claim 1, characterized in that: The step 3) comprises: 3.1) Split the document into paragraphs or text fragments {P1, P2, ..., P m }, where P i represents the i-th fragment, there are m fragments in total; 3.2) Content simplifiers make preliminary simplifications for each segment. Specific simplification operations include sentence reorganization and complex vocabulary replacement. represents the initial simplification result of the content simplifier on the paragraph set, where represents the preliminary simplified version of the i-th paragraph, marked as the 0th round of iteration; 3.3) The simplification supervisor reviews the simplification results and provides feedback. The iterative simplification optimization of each fragment is expressed as: When the total number of iterations N is reached or all simplified results meet the quality standard, the iteration stops: In formula (2) and formula (3), represents the simplification result of the kth round of the i-th segment, which is the output optimized by the simplifier in the previous round and evaluated by the simplification supervisor in the current round; represents the evaluation feedback of the kth round of the i-th segment, Indicates the simplified supervisor's simplified results Quality ratings and suggestions for improvement, i.e. simplifying the text modification suggestions made by the supervisor in response to the questions; Represents the optimization function of the content simplifier, based on the feedback from the simplification supervisor To update the simplified result; Φ C represents the set of hyperparameters of the content simplifier, which is used to control the behavior of the optimization process; Q threshold represents the quality threshold, which indicates the minimum score for the simplified result to meet the quality requirements; N represents the maximum number of iterations.
5. The method for simplifying long documents based on a multi-agent large model according to claim 1, characterized in that: The step 4) comprises: 4.1) Metaphor Analysis: Metaphor analysts identify metaphors and provide intuitive explanations; 4.2) Terminology explanation: Terminology interpreters provide more understandable explanations for terms in professional fields; 4.3) Multi-dimensional simplification integration: The content integrator combines the simplified operations of the above two intelligent roles into an overall simplified fragment, and its calculation formula is expressed as: In formula (4), S i represents the preliminary simplification result, the final output from the content simplifier, and serves as the input of the metaphor analyst and terminology interpreter; M i Represented by metaphor analyst from S i A simplified version of the metaphor identified in T i Indicates that the term interpreter has been i A simplified version obtained by identifying professional terms and paraphrasing them;Φ I represents the hyperparameter settings of metaphor analysts, terminology interpreters, and content integrators; represents the content integration function, which will initially simplify the result S i , Metaphor Analysis Results i And the term interpretation result T i , generate the final refined and simplified result C i .
6. The method for simplifying long documents based on a multi-agent large model according to claim 1, characterized in that: The step 5) comprises: 5.1) Fragment integration: The article architect integrates all simplified fragments. First, a fragment size value C is set, and then a fragment is iteratively extracted from the queue of fragments to be processed and integrated by the article architect under the guidance of the simplification guide G; this process is repeated until all fragments are used to integrate into a complete article; In formula (5), T 1~(k-1) Indicates that the articles from the 1st segment to the k-1th segment have been aggregated. represents the kth simplified fragment to be incorporated into the whole article extracted from the list of length C, G is the simplification guide, Φ R is the hyperparameter of the article architect agent, T k represents the whole article after incorporating the kth simplified segment. When all C segments are incorporated, all simplified segments are merged and combined into a simplified article; 5.2) Final proofreading: Proofreader will review the T k Correct grammatical errors, spelling mistakes, and factual inaccuracies to produce a final streamlined document.
7. The method for simplifying long documents based on a multi-agent large model according to claim 1, characterized in that: The step 6) comprises: 6.1) Data preparation: Construct a parallel corpus based on the simplified documents generated in step 5) and the corresponding original documents, and divide them into training set, validation set, and test set; 6.2) Select a suitable open source big model and use parallel corpus to fine-tune the open source big model. The optimization objective function is: In formula (6), x is the original document; y is the simplified document; θ is the model parameter; logP(y|x; θ) represents the conditional probability, that is, the probability that the model generates the output document y given the input document x; 6.3) Evaluation and iteration: Evaluate the simplification effect of the fine-tuned model on the test set, adjust the hyperparameters and repeat the training until the optimal performance is achieved.
Citation Information
Cited By
Long document processing method and system
CN122364436A