Zero-sample long text abstract generation method based on meta-programming multi-agent
By employing a metaprogramming multi-agent approach, dynamic segmentation, collaborative generation, and dual-dimensional evaluation, the problems of context dilution and logical breaks in long text summarization are solved, resulting in coherent and faithful multi-domain long text summarization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-05
- Publication Date
- 2026-04-14
AI Technical Summary
Existing long text summarization technologies suffer from problems such as context dilution, localization, logical breaks, lack of semantic structure in static blocks, insufficient agent collaboration, and lack of closed-loop quality verification in zero-shot scenarios, resulting in incoherent, unfaithful, and inadequate generalization of the summarization generated.
A metaprogramming multi-agent approach is adopted, which generates high-quality summaries through dynamic block division of metaprogramming agents, guidance agents providing global cognition, collaborative generation by professional agents, two-dimensional evaluation by reflective agents, and logical ordering of synthetic agents.
It achieves thematic coherence of document chunking, logical coherence and fidelity of summaries, improves the accuracy and generalization ability of summaries in zero-shot scenarios, and is adapted to the generation of long texts in multiple fields.
Smart Images

Figure CN121859900A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing technology, specifically relating to a zero-sample long text summarization method based on metaprogramming multi-agent systems. Background Technology
[0002] With the advent of the information explosion era, the efficient understanding and extraction of long texts (such as news articles, legal documents, and scientific research papers with thousands to tens of thousands of words) has become a necessity. As one of the core tasks of Natural Language Processing (NLP), long text summarization technology aims to compress lengthy texts into concise, coherent summaries that retain the core information, helping users quickly obtain key content.
[0003] Existing long text summarization technologies mainly face the following technical bottlenecks: The inherent limitations of Large Language Models (LLMs). Although LLMs such as GPT-4 and Claude demonstrate strong capabilities in zero-shot summarization, they are prone to "context dilution" and "lost-in-the-middle" phenomena when processing long texts. Key information in the middle of the text is ignored, and it is difficult to capture the overall thematic structure of the document, resulting in summaries that often suffer from localization and logical breaks. Static chunking methods have rigid defects. For example, traditional chunking-merging strategies (such as fixed 3000-word chunks) ignore the semantic structure of the document, easily fragmenting coherent themes (e.g., the "clause definition - applicable scenario" of legal provisions are split into different chunks), leading to a lack of narrative coherence in subsequent summaries. Some static multi-agent methods typically follow a pre-set fixed process, unable to dynamically adjust the collaboration logic based on the document, resulting in the fallacy of composition—local optimization but global defocus. Existing methods lack dynamic quality verification and collaboration mechanisms. Many methods lack closed-loop optimization—the agents directly concatenate the generated module summaries without verifying their fidelity to the original text or the rationality of the meta-planning block division. Furthermore, the lack of effective collaborative feedback between agents easily leads to inconsistencies in terminology and information redundancy (e.g., different modules repeatedly describing the same background). Generalization in zero-shot scenarios is insufficient: pre-trained abstract models (such as BART and PEGASUS) rely on a large amount of task-labeled data, resulting in a sharp performance drop in zero-shot scenarios (where there is no domain-specific labeled data); while traditional unsupervised methods (such as TextRank and LSA) extract sentences based solely on statistical features, failing to achieve abstract and logical summary generation.
[0004] In conclusion, there is an urgent need for a new zero-sample long text summarization method to break through the technical bottlenecks of existing long text summarization methods and improve the accuracy of long text summarization. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes a zero-sample long text summarization method based on meta-programming multi-agent systems. This method includes:
[0006] S1: Obtain zero-sample long text and use meta-planning multi-agent segmentation to process it and generate a meta-planning scheme;
[0007] S2: A guiding agent generates a global preliminary summary based on a meta-planning scheme; multiple specialized agents generate their respective optimized text module summaries based on the global preliminary summary and the meta-planning scheme.
[0008] S3: Use a reflective agent to evaluate the meta-planning scheme and obtain the meta-planning scheme validation score and planning optimization feedback text; use a reflective agent to evaluate the optimization text module summary and obtain the module summary average fidelity score and summary correction feedback text.
[0009] S4: If the metaprogramming scheme verification score does not meet the preset threshold, return to step S1 and regenerate the metaprogramming scheme using the planning optimization feedback text optimization prompt; if the module summary average fidelity score does not meet the preset threshold, return to step S2 and regenerate the optimized text module summary using the summary correction feedback text optimization prompt.
[0010] S5: Repeat execution Step S4 outputs the final optimized text module summary set, where ;
[0011] S6: A synthetic agent is used to logically sort and fuse the final optimized text module summary set to generate a coherent long text summary.
[0012] Preferably, step S1 specifically includes:
[0013] S11: Specify module division prompts ;
[0014] S12: Metaprogramming agent based on The underlying large language model generation function is used to perform semantic segmentation on zero-sample long texts to obtain a set of text modules;
[0015] S13: Create custom prompts and generate prompt words ;
[0016] S14: Metaprogramming agent based on It uses a low-level large language model to generate functions. Process the text module and zero-sample long text to generate exclusive summary prompts;
[0017] S15: Generate a metaplanning scheme based on the text module and specific summary prompts.
[0018] Preferably, in step S2, the process of generating a preliminary global summary includes:
[0019] Develop global preliminary summary prompts Guide the intelligent agent according to Generate a global preliminary summary from zero-sample long texts.
[0020] Preferably, in step S2, the process by which multiple specialized intelligent agents generate their respective optimized text module summaries based on the global preliminary summary and the meta-planning scheme includes:
[0021] Each specialized agent generates its own initial summary based on the global preliminary summary and the meta-planning scheme;
[0022] Develop collaborative optimization prompts ;
[0023] Each specialized intelligent agent according to The abstract includes a global preliminary summary, the abstract itself, and summaries from other specialized agents. The next iteration updates the optimized text module summary; among which... .
[0024] Furthermore, the initial summary is generated as follows:
[0025]
[0026]
[0027] in, This represents the initial summary of the specialized intelligent agent i. Represents the specialized intelligent agent i. This represents the initial input text for the specialized intelligent agent i. This represents the meta-programming scheme corresponding to the specialized intelligent agent i. Represents text module i, This indicates the specific summary prompt words corresponding to the specialized intelligent agent i. This represents a preliminary global summary. Indicates splicing.
[0028] Furthermore, the iterative update of the specialized intelligent agent is represented as follows:
[0029]
[0030]
[0031] in, This represents the summary of the specialized agent i after the k-th iteration. This represents the input text of the specialized agent i in the k-th iteration. Represents the specialized intelligent agent i. This represents the summary of the specialized agent i after the (k-1)th iteration. This represents the summary of the specialized agent j after the (k-1)th iteration. This represents the meta-programming scheme corresponding to the specialized intelligent agent i. Represents text module i, This indicates the specific summary prompt words corresponding to the specialized intelligent agent i. This represents a preliminary global summary. Indicates splicing.
[0032] Preferably, step S3 specifically includes:
[0033] Planning and Reflection Tips ;
[0034] The reflective agent processes the meta-programming scheme based on planning reflection prompts, generating a meta-programming scheme validation score and planning optimization feedback text, represented as:
[0035]
[0036] in, The score represents the verification score of the metaprogramming scheme. This indicates the feedback text for planning optimization. This indicates that the underlying large language model generates a verification function. , This represents the meta-planning scheme. This represents a long text with zero samples.
[0037] Develop module summary reflection prompts ;
[0038] The reflective agent processes the optimized text module summary based on the module summary reflection prompts, generating a module summary fidelity score and summary correction feedback text, represented as:
[0039]
[0040] in, The summary of the professional agent i is faithful to the text module i, represented by the score. This represents the summary correction feedback text for text module i. This indicates that the underlying large language model generates a verification function. , This represents the optimized text module summary of the specialized intelligent agent i. Represents text module i;
[0041] The average fidelity score of all module summaries is obtained by averaging the fidelity scores of all module summaries.
[0042] Preferably, step S6 specifically includes:
[0043] S61: Develop narrative synthesis prompts ;
[0044] S62: The synthetic agent calls the coherence evaluation function Determine the optimal order of the optimized text module summaries in the optimized text module summary set;
[0045] S63: Based on the optimal permutation order and It uses the underlying large language model to call the synthesis function. Generate coherent long text summaries.
[0046] The beneficial effects of this invention are as follows:
[0047] 1. Overcoming the limitations of static segmentation and improving the rationality of segmentation: The meta-planning agent dynamically segments documents based on semantics to avoid topic fragmentation; experiments show that on the BillSum (legal text) dataset, the module segmentation accuracy (human evaluation) of this method reaches 92.3%, which is significantly higher than the 76.5% of the fixed segmentation method.
[0048] 2. Multi-agent collaborative optimization to improve summary consistency and coherence: Globally guided summarization and multi-round collaborative iteration solve the "local shortsightedness" problem; On the CNN / DailyMail dataset, the summary coherence score (1-5 points) of this method reaches 4.2 points, which is higher than the 3.1 points of the LLM-Chunk-Merge method.
[0049] 3. Reflecting on closed-loop quality assurance and improving summary fidelity: dual-dimensional evaluation and iterative optimization to filter out problems such as "unreasonable block division" and "unfaithful summary"; on the XSum dataset, the summary fidelity (fact consistency) of this method reaches 91.7%, which is higher than the 78.3% of the LLM-Direct method.
[0050] 4. Strong zero-shot generalization and adaptability to long texts in multiple domains: No domain-labeled data is required, and it is adaptable to various types of texts such as news, law, and academic texts. Experiments show that on three benchmark datasets (CNN / DailyMail, BillSum, and XSum), the ROUGE-1 / F1 scores of this method reach 36.07, 48.98, and 41.34, respectively, which are significantly better than existing zero-shot baselines (such as LLM-CoT's 34.47, 41.86, and 37.89).
[0051] 5. The system is highly robust and the underlying LLM is replaceable: it covers a wide range of models, from large proprietary models to small open-source models, and outperforms the baseline model. Attached Figure Description
[0052] Figure 1This is a schematic diagram of the zero-sample long text summarization method based on meta-planning multi-agent in this invention;
[0053] Figure 2 This is a comparison chart of experimental results of the present invention with those of different baseline models. Detailed Implementation
[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] This invention aims to address the aforementioned problems in existing zero-shot long text summarization technologies by breaking down the long text summarization task into four dynamic collaborative stages: "meta-planning - collaborative generation - reflective optimization - narrative synthesis." Through the division of labor and collaboration among multiple types of intelligent agents (meta-planning, guiding, specializing, reflecting, and synthesizing), high-quality summarization of long texts in zero-shot scenarios is achieved. Figure 1 As shown, the method includes the following:
[0056] S1: Obtain zero-sample long text and use metaprogramming multi-agent segmentation to process it and generate a metaprogramming scheme.
[0057] The first stage is the meta-planning phase, in which the meta-planning agent... Based on the document's semantic structure, "thematically coherent modules + customized hints" are generated to avoid the rigidity of fixed chunks. The specific steps are as follows:
[0058] S11: Specify module division prompts :
[0059] Module division prompts The content includes:
[0060] (1) Instructions: Read through the document to understand the overall structure and writing style, identify topic shifts, changes in arguments or key chapters; based on the above changes, divide the document into modules of "independent topics and logical units", and label each module with a descriptive title and module document.
[0061] (2) Output format: Output the module collection as a structured list (e.g., "Module 1: [Title], Content: [Text]").
[0062] S12: Metaprogramming agent based on We use the underlying large language model generation function to perform semantic segmentation on zero-sample long texts to obtain a set of text modules.
[0063] Meta-planning intelligent agents Using the "module division" prompt Generate functions based on the underlying large language model The input text 𝐷 is semantically segmented into N non-overlapping, thematically coherent modules. The final output is a collection of text modules:
[0064]
[0065] And it meets the following conditions:
[0066] ,and
[0067] The number of text modules N is determined by The maximum number of characters in each module is ≤3000, determined dynamically based on the semantic structure of the text.
[0068] Preferably, large-scale language models include GPT-4, Llama3-70B, and Gemini-1.5-Pro.
[0069] S13: Create custom prompts and generate prompt words .
[0070] Generate custom prompts and prompts. The content includes:
[0071] Analyze the core purpose of the module (such as "raising questions", "showing experimental results", "drawing conclusions"), write exclusive summary prompts, guide subsequent agents to highlight the module's key arguments and events, and implicitly associate the module's global role in the document.
[0072] S14: Metaprogramming agent based on It uses a low-level large language model to generate functions. Process the text module and zero-sample long text to generate exclusive summary prompts.
[0073] Meta-planning intelligent agents Prompt words generated through "customized prompts" Generate functions based on the underlying large language model For each module Combined with modules Generate custom summary prompts based on local context and the entire text. :
[0074]
[0075] S15: Generate a metaplanning scheme based on the text module and specific summary prompts.
[0076] The final output is the metaprogramming scheme. :
[0077]
[0078] S2: A guiding agent generates a global preliminary summary based on a meta-planning scheme; multiple specialized agents generate their respective optimized text module summaries based on the global preliminary summary and the meta-planning scheme.
[0079] The multi-agent collaborative generation phase addresses the "local shortsightedness" problem by guiding agents to provide "shared cognitive anchors" and having specialized agent clusters iteratively generate module summaries in parallel. The specific steps are as follows:
[0080] Step 1: Develop preliminary global summary keywords Global preliminary summary prompts The content is: to generate a preliminary summary text for the input text D, providing a shared cognitive anchor for the subsequent summary generation of each module.
[0081] Step 2: Guiding the agent according to Generate a global preliminary summary from zero-sample long texts:
[0082]
[0083] Multiple specialized intelligent agents generate their own optimized text module summaries based on the global preliminary summary and meta-programming scheme. Specifically:
[0084] Step 1: Through N specialized intelligent agents Based on the global preliminary summary and the metaprogramming scheme, each module tuple in the metaprogramming scheme is analyzed. Generate initial summary:
[0085]
[0086]
[0087] in, This represents the initial summary of the specialized intelligent agent i. Represents the specialized intelligent agent i. This represents the initial input text for the specialized intelligent agent i. This represents the meta-programming scheme corresponding to the specialized intelligent agent i. Represents text module i, This indicates the specific summary prompt words corresponding to the specialized intelligent agent i. This represents a preliminary global summary. Indicates splicing.
[0088] Step 2: Develop collaboration optimization prompts Collaborative optimization prompts The content includes:
[0089] (1) Instruction: Collaborate with other professional intelligent agents to modify and improve its own module summary based on the module summary generated by other professional intelligent agents;
[0090] (2) Objectives: Improve consistency by ensuring that the abstract terminology, tone and key information are aligned with the abstracts of other modules; eliminate redundancy by removing repeated points that have been covered by other modules; and enhance coherence by adjusting the abstract to seamlessly integrate logic and content into the overall narrative.
[0091] Step 3: Each specialized intelligent agent, according to... The abstract includes a global preliminary summary, the abstract itself, and summaries from other specialized agents. Updated in each iteration; each iteration The input context of the professional intelligent agent is updated as follows:
[0092]
[0093] The module summary has been optimized as follows:
[0094]
[0095] Output optimized text module summary:
[0096]
[0097] in, This represents the summary of the specialized agent i after the k-th iteration. This represents the input text of the specialized agent i in the k-th iteration. Represents the specialized intelligent agent i. This represents the summary of the specialized agent i after the (k-1)th iteration. This represents the summary of the specialized agent j after the (k-1)th iteration.
[0098] Preferred, The optimal value is 2.
[0099] S3: Use a reflective agent to evaluate the meta-planning scheme and obtain the meta-planning scheme verification score and planning optimization feedback text; use a reflective agent to evaluate the optimization text module summary and obtain the module summary average fidelity score and summary correction feedback text.
[0100] During the reflection and optimization phase, the reflective agent The "meta-programming scheme" and "module summary" are quality-assessed, triggering iterative optimization to ensure the accuracy of the summary and the rationality of the block division. The specific steps of the assessment process are as follows:
[0101] Step 1: Develop planning reflection prompts .
[0102] Planning Reflection Tips The content includes: evaluating whether the module conforms to the semantic structure and whether key topics are fragmented or omitted based on scores for "logical completeness" and "content comprehensiveness," and providing corrective feedback; and generating a verification function based on the underlying large language model. Evaluation of meta-planning schemes The logical rationality and comprehensiveness of the data are used to generate a verification score. and planning optimization feedback text .
[0103] Step 2: The reflective agent processes the meta-programming scheme based on the planning reflection prompts and generates a meta-programming scheme validation score and planning optimization feedback text, represented as follows:
[0104]
[0105] Step 3: Develop module summary reflection prompts .
[0106] Module summary reflection prompts The content is based on scoring for "factual accuracy" and "completeness of key information," verifying whether the summary is distorted, fabricated, or omits the original text, and providing suggestions for improvement. A verification function is generated based on the underlying large language model. Evaluation module summary For the source module Loyalty, generating loyalty scores and summary correction feedback text .
[0107] Step 4: The reflective agent processes the optimized text module summary based on the module summary reflection prompts, generating a module summary fidelity score and summary correction feedback text, represented as:
[0108]
[0109] in, The summary of the professional agent i is faithful to the text module i, represented by the score. This represents the summary correction feedback text for text module i. This represents the optimized text module summary of the specialized intelligent agent i.
[0110] The average module summary fidelity score is obtained by averaging the fidelity scores of all module summaries.
[0111]
[0112] S4: If the metaprogramming scheme verification score does not meet the preset threshold, return to step S1 and regenerate the metaprogramming scheme using the planning optimization feedback text optimization prompt; if the module summary average fidelity score does not meet the preset threshold, return to step S2 and regenerate the optimized text module summary using the summary correction feedback text optimization prompt.
[0113] like Then return to the meta-planning stage and send the planning optimization feedback text. Add module division prompts As a correction instruction, a new metaprogramming scheme is generated; if Then return to the multi-agent collaborative generation stage, and provide the summary correction feedback text corresponding to each text module. Add collaborative optimization prompts respectively As a correction instruction, the module summary is iterated and optimized again.
[0114] S5: Repeat execution Step S4 outputs the final optimized text module summary set, where .
[0115] At most ( ≤3, optimal is 1) Iterative optimization; the final output is a set of verified module summaries. .
[0116] S6: A synthetic agent is used to logically sort and fuse the final optimized text module summary set to generate a coherent long text summary.
[0117] In the narrative synthesis phase, the synthetic agent For module summary set Logical sorting and deep fusion are performed to avoid simple splicing and generate a globally coherent final summary. The specific steps are as follows:
[0118] S61: Develop narrative synthesis prompts .
[0119] Narrative Synthesis Prompt The content is as follows: Combine the optimized set of module summaries into a single coherent summary; core requirements: optimize logical ordering to build a smooth narrative flow; eliminate cross-module redundancy; supplement logical transition sentences; maintain consistent tone and style; fully retain the core information of all modules; simple splicing is prohibited.
[0120] S62: The synthetic agent calls the coherence evaluation function Determine the optimal order of the optimized text module summaries in the optimized text module summary set.
[0121] Calling the coherence evaluation function Determine the optimal arrangement order .in, The coherence between modules is evaluated based on thematic relevance and logical sequence.
[0122] S63: Based on the optimal permutation order and It uses the underlying large language model to call the synthesis function. Generate coherent long text summaries.
[0123] To be according to The sorted sequence of module summaries is used to call the synthesis function based on the underlying large language model. Generate the final long text summary. :
[0124]
[0125] Simulation verification of the present invention:
[0126] 1. Experimental Environment Configuration
[0127] Hardware environment: NVIDIA A100 GPU (40GB VRAM), Intel Xeon Platinum 8375C CPU, 128GB RAM;
[0128] Software environment: Python 3.10, PyTorch 2.1.0, Transformers library 4.35.2;
[0129] The underlying LLM uses GPT-4 (API call) by default. The comparative experiment uses Llama3-70B (local deployment) and Gemini-1.5-Pro (API call).
[0130] Datasets: Three publicly available benchmark datasets (standard test sets) were used: CNN / DailyMail: news text, 11,490 test sets, average text length 5,200 words; BillSum: US Congressional bill text, 3,269 test sets, average text length 8,700 words; XSum: news text (single sentence summarization task), 11,334 test sets, average text length 4,800 words.
[0131] 2. Core parameter settings
[0132] Decoding temperature: 0.7℃ (balancing accuracy and versatility); Collaboration rounds 2 iterations (optimal performance and efficiency); number of iterations for reflection : 1 time (to avoid overcomputation); Maximum character count for the meta-planning module: 3000; Threshold: , .
[0133] 3. Implementation Steps Example (Taking a Bill Text from the BillSum Dataset as an Example)
[0134] Step 1: Input long text and execute the meta-planning phase
[0135] S1. Input text D: U.S. Clean Energy Act of 2023 (excerpt, approximately 10,000 words);
[0136] Meta-planning intelligent agents implement:
[0137] S2. Based on Generate block function Divide D into 6 modules (N=6):
[0138] Module 1: Background and Legislative Objectives of the Act (2,800 words);
[0139] Module 2: Clean Energy Subsidy Policy (2,500 words);
[0140] Module 3: Carbon Emission Assessment Standards (2,200 words);
[0141] Module 4: Corporate Compliance Requirements (2,000 words);
[0142] Module 5: Responsibilities of Regulatory Agencies (1,800 words);
[0143] Module 6: Implementation Schedule and Supplementary Provisions (1,700 words);
[0144] S3. Based on Generate module prompt word function Generate unique summary prompts for each module;
[0145] S4. Output Metaprogramming Scheme .
[0146] Step 2: Multi-agent collaborative generation phase
[0147] S1. Guiding the intelligent agent based on Generate a global preliminary summary ;
[0148] S2. Professional intelligent agent cluster execution:
[0149] S201. Initial Iteration ( ): based on Generate preliminary summary ;
[0150] S202. Collaborative Iteration ( 1): take over Module summary, correct the summary of module i And so on;
[0151] S203: Iteration ends ( ), output .
[0152] Step 3: Execution of the Reflection and Optimization Phase
[0153] S1. Reflective Agent based on , Generate a metaprogramming scheme verification function Module summary verification function :
[0154] S2. Meta-programming scheme evaluation: (>0.7) "No overlap in topics among modules, reasonable segmentation, no need for adjustment";
[0155] S3. Module Summary Evaluation: , "The summary accurately covers the subsidy recipients, standards, and compliance requirements without omissions, and requires no correction."
[0156] S3. Average loyalty (>0.8), no iteration required, output .
[0157] Step 4: Narrative Synthesis Stage
[0158] S1. Synthetic agent Based on prompt words Generate coherence evaluation function and composition function ;
[0159] S2. Obtain the optimal sorting. Module 1 → Module 2 → Module 3 → Module 4 → Module 5 → Module 6 (following the logic of "background-policy-standards-requirements-regulation-implementation");
[0160] S3. Synthetic Agent Execute the composition function Deep integration: supplement transitional statements (such as "To ensure the implementation of the policy, the bill also clarifies the carbon emission assessment standards"), and remove redundancy (merge the "compliance requirements" of Module 2 and Module 3).
[0161] S4. Output the final summary "The Clean Energy Act of 2023 aims to promote the development of renewable energy through multi-dimensional policies, focusing on reducing dependence on traditional energy sources and addressing climate change. Regarding subsidies, solar and wind power companies (with carbon emissions below 500 tons per year) can receive subsidies of 30% of their investment. Residential solar PV installations can receive subsidies up to $5,000. Applications require a project plan to be submitted to the state energy department; companies exceeding the emission standards will be disqualified from subsidies. The carbon emission assessment standards clearly state that companies must have annual emissions below 500 tons, and compliance requirements detail companies' monitoring and reporting obligations. Regulatory responsibility rests with the Federal Energy Regulatory Commission, which is responsible for subsidy review and penalties for violations. The implementation timeline shows that the act will take effect on January 1, 2024, with an appendix specifying that states can develop local implementation rules."
[0162] 4. Performance Verification
[0163] The effectiveness of this invention was verified through comparative experiments. The test indicators were ROUGE-1 / F1, ROUGE-2 / F1, and ROUGE-L / F1 (industry standard summary evaluation indicators). The experimental results are as follows: Figure 2 The method proposed in this invention outperforms traditional statistical methods, pre-trained models, and LLM baseline models in various ROUGE metrics on three benchmark datasets, verifying that the invention has performance advantages and good generalization ability in processing long text summarization tasks in zero-shot scenarios.
[0164] The function of each component of the present invention was verified by ablation experiments. The test index was ROUGE-1, and the experimental results are shown in Table 1. Table 1. Effectiveness results of each component of the present invention
[0165] The optimal settings of various parameters in this invention were verified through comparative experiments. The test index was ROUGE-1. , The experimental results are shown in Tables 2 and 3.
[0166] Table 2 Reflection Iteration Count Impact on model performance
[0167]
[0168] Table 3 Collaboration Rounds Impact on model performance
[0169]
[0170] 5. Variations of specific embodiments
[0171] The specific embodiments of the present invention are not limited to the above examples, and can be modified according to actual needs, for example:
[0172] Adjusting the number of agents: The underlying large language model can be replaced with an open-source model (such as Qwen2.5-7B) to reduce deployment costs, requiring only fine-tuning of the decoding temperature (such as 0.6~0.8).
[0173] For different types of text, prompt words can be modified and adjusted to adapt to the needs of the domain.
[0174] In summary, addressing the issues of rigid static segmentation, insufficient agent collaboration, and lack of quality closure in existing long text summarization methods, this invention decomposes the summarization task into four dynamic collaborative stages: meta-planning, multi-agent collaborative generation, reflective optimization, and narrative synthesis. The meta-planning agent dynamically segments the document semantics and generates customized prompts, guiding the agent to provide global cognitive anchors. A cluster of specialized agents collaborates in parallel to iterate the module summarization. The reflective agent verifies the rationality of segmentation and the fidelity of the summary from two dimensions. Finally, the synthesis agent deeply integrates the module summarization to form a globally coherent text. This invention overcomes the limitations of traditional methods, improving segmentation adaptability, summary coherence, and factual accuracy. It exhibits strong zero-shot generalization ability, is compatible with different underlying large-scale language models, and has promising application prospects.
[0175] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A zero-sample long text summarization method based on metaprogramming multi-agent systems, characterized in that, Includes the following steps: S1: Obtain zero-sample long text and use meta-planning multi-agent segmentation to process it and generate a meta-planning scheme; S2: A guided agent generates a preliminary global summary based on a meta-planning scheme; Multiple specialized intelligent agents generate their own optimized text module summaries based on the global preliminary summary and meta-planning scheme; S3: Use a reflective agent to evaluate the meta-planning scheme and obtain the meta-planning scheme validation score and planning optimization feedback text; use a reflective agent to evaluate the optimization text module summary and obtain the module summary average fidelity score and summary correction feedback text. S4: If the metaprogramming scheme verification score does not meet the preset threshold, return to step S1 and regenerate the metaprogramming scheme using the planning optimization feedback text optimization prompt; if the module summary average fidelity score does not meet the preset threshold, return to step S2 and regenerate the optimized text module summary using the summary correction feedback text optimization prompt. S5: Repeat execution Step S4 outputs the final optimized text module summary set, where ; S6: A synthetic agent is used to logically sort and fuse the final optimized text module summary set to generate a coherent long text summary.
2. The zero-sample long text summarization method based on meta-programming multi-agents according to claim 1, characterized in that, Step S1 specifically includes: S11: Specify module division prompts ; S12: Metaprogramming agent based on The underlying large language model generation function is used to perform semantic segmentation on zero-sample long texts to obtain a set of text modules; S13: Create custom prompts and generate prompt words ; S14: Metaprogramming agent based on It uses a low-level large language model to generate functions. Process the text module and zero-sample long text to generate exclusive summary prompts; S15: Generate a metaplanning scheme based on the text module and specific summary prompts.
3. The zero-sample long text summarization method based on meta-programming multi-agents as described in claim 1, characterized in that, Step S2, the process of generating a preliminary global summary, includes: Develop global preliminary summary prompts Guide the intelligent agent according to Generate a global preliminary summary from zero-sample long texts.
4. The zero-sample long text summarization method based on meta-programming multi-agents according to claim 1, characterized in that, In step S2, the process by which multiple specialized agents generate their respective optimized text module summaries based on the global preliminary summary and the meta-programming scheme includes: Each specialized agent generates its own initial summary based on the global preliminary summary and the meta-planning scheme; Develop collaborative optimization prompts ; Each specialized intelligent agent according to The abstract includes a global preliminary summary, the abstract itself, and summaries from other specialized agents. The next iteration updates the optimized text module summary; among which... .
5. The zero-sample long text summarization method based on meta-programming multi-agents according to claim 4, characterized in that, The initial digest is represented as: ; ; in, This represents the initial summary of the specialized intelligent agent i. Represents the specialized intelligent agent i. This represents the initial input text for the specialized intelligent agent i. This represents the meta-programming scheme corresponding to the specialized intelligent agent i. Represents text module i, This indicates the specific summary prompt words corresponding to the specialized intelligent agent i. This represents a preliminary global summary. Indicates splicing.
6. The zero-sample long text summarization method based on meta-programming multi-agents according to claim 4, characterized in that, The iterative update of a specialized intelligent agent is represented as follows: ; ; in, This represents the summary of the specialized agent i after the k-th iteration. This represents the input text of the specialized agent i in the k-th iteration. Represents the specialized intelligent agent i. This represents the summary of the specialized agent i after the (k-1)th iteration. This represents the summary of the specialized agent j after the (k-1)th iteration. This represents the meta-programming scheme corresponding to the specialized intelligent agent i. Represents text module i, This indicates the specific summary prompt words corresponding to the specialized intelligent agent i. This represents a preliminary global summary. Indicates splicing.
7. The zero-sample long text summarization method based on meta-programming multi-agents according to claim 1, characterized in that, Step S3 specifically includes: Planning and Reflection Tips ; The reflective agent processes the meta-programming scheme based on planning reflection prompts, generating a meta-programming scheme validation score and planning optimization feedback text, represented as: ; in, The score represents the verification score of the metaprogramming scheme. This indicates the feedback text for planning optimization. This indicates that the underlying large language model generates a verification function. , This represents the meta-planning scheme. This represents a long text with zero samples. Develop module summary reflection prompts ; The reflective agent processes the optimized text module summary based on the module summary reflection prompts, generating a module summary fidelity score and summary correction feedback text, represented as: ; in, The summary of the professional agent i is faithful to the text module i, represented by the score. This represents the summary correction feedback text for text module i. This indicates that the underlying large language model generates a verification function. , This represents the optimized text module summary of the specialized intelligent agent i. Represents text module i; The average fidelity score of all module summaries is obtained by averaging the fidelity scores of all module summaries.
8. The zero-sample long text summarization method based on meta-programming multi-agent according to claim 1, characterized in that, Step S6 specifically includes: S61: Develop narrative synthesis prompts ; S62: The synthetic agent calls the coherence evaluation function Determine the optimal order of the optimized text module summaries in the optimized text module summary set; S63: Based on the optimal permutation order and It uses the underlying large language model to call the synthesis function. Generate coherent long text summaries.