Multi-agent cooperation and dynamic feedback long text generation system and method

The long text generation system, which utilizes multi-agent collaboration and dynamic feedback, solves the problems of insufficient coherence and lack of quality control in long text generation, achieving high-quality and stable long text generation results.

CN121413623APending Publication Date: 2026-01-27BEIJING JIBU QIANLI TECHNOLOGY CO LTD

Patent Information

Application Number
CN202511522246.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-01-27

AI Technical Summary

Technical Problem

Existing technologies for long text generation suffer from problems such as insufficient long-term coherence, lack of quality control and feedback mechanisms, inconsistent character portrayal, and limited evaluation dimensions, making it difficult to guarantee the coherence and quality of long text generation.

Method used

A long text generation system employing multi-agent collaboration and dynamic feedback is proposed, comprising a director agent, a writer agent, an evaluator agent, and a memory bank. Through the planning and scheduling of the director agent, the generation and correction of the writer agent, the multi-dimensional evaluation of the evaluator agent, and the contextual support of the memory bank, a dynamic feedback closed-loop mechanism is established to achieve continuous optimization of text generation.

Benefits of technology

It improves the plot coherence, character consistency, theme consistency, language style and innovation of long text generation, ensures the overall logical unity and long-term coherence of the text, and improves the generation quality and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121413623A_ABST
    Figure CN121413623A_ABST
Patent Text Reader

Abstract

The invention provides a multi-agent cooperation and dynamic feedback long text generation system and method, and the system comprises a performance agent which is used for receiving a theme or an outline inputted by a user, planning and scheduling a long text generation process, coordinating the interaction of an author agent and an evaluation agent, and dynamically adjusting a generation strategy based on an evaluation result; the author agent is used for generating text content according to an instruction of the director agent and correcting a generation result; the evaluation agent is used for performing multi-dimensional quality evaluation on the text content generated by the author agent and returning optimization suggestions; and the memory bank is used for storing the historical generation information and the global setting information and providing context support in subsequent text generation. Through the synergistic effect of the director agent, the author agent, the evaluation agent and the memory bank, a dynamic feedback closed-loop mechanism is established, so that the text generation process has continuous improvement capability, and the overall quality and stability of long text generation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence and natural language processing, and in particular to a long text generation system and method with multi-agent collaboration and dynamic feedback. Background Technology

[0002] With the development of artificial intelligence and natural language processing technologies, large language models (LLMs) can now generate fluent and grammatically correct short texts with relatively high accuracy. However, existing technologies still have shortcomings when it comes to long text creation tasks such as novels and screenplays.

[0003] Currently, the industry typically uses a phased generation approach, such as first generating an outline and then expanding it into the main text. While this method improves the structure of the text to some extent, it still has the following problems:

[0004] 1. Insufficient long-term coherence: Due to the limited context window of the model, as the text length increases, it is easy to forget the early content, resulting in a deviation between the plot and the theme.

[0005] 2. Lack of quality control and feedback mechanisms: The production process lacks effective feedback and correction mechanisms, making it difficult to correct defects in the outline or chapters in a timely manner.

[0006] 3. In terms of character development, the characters' behavior and motivations may be inconsistent, which reduces the rationality of the narrative.

[0007] 4. Limited evaluation dimensions: Commonly used automated evaluation metrics (such as ROUGE and BLEU) can only measure surface similarity and are difficult to fully reflect the logical coherence, character consistency and narrative innovation of long texts.

[0008] In summary, existing technologies are still insufficient to effectively guarantee the coherence and quality of long text generation, and improvements are urgently needed. Summary of the Invention

[0009] To address the shortcomings of existing technologies, this application provides a long text generation system and method based on multi-agent collaboration and dynamic feedback, which at least solves the problems of insufficient coherence, lack of quality control, and lack of autonomous optimization in the long text generation process in existing technologies.

[0010] To achieve the above objectives and other advantages, some embodiments of this application provide the following aspects:

[0011] In a first aspect, some embodiments of this application provide a long text generation system with multi-agent collaboration and dynamic feedback, including:

[0012] The director agent is used to receive the theme or outline input by the user, plan and schedule the long text generation process, generate and issue text generation instructions and text modification instructions to the writer agent, coordinate the interaction between the writer agent and the evaluation agent, and adjust the generation strategy for long text generation based on the evaluation results of the evaluation agent.

[0013] The writer agent, connected to the director agent, is used to generate text content according to the text generation instructions and to modify the text content according to the text modification instructions.

[0014] An evaluation agent, connected to the director agent, is used to perform multi-dimensional quality evaluation of the text content generated by the writer agent and to feed the evaluation results back to the director agent.

[0015] A memory bank, connected to the director agent, is used to store historical generation information and global setting information during the generation process, and to provide relevant contextual information to the writer agent when generating long texts.

[0016] Secondly, some embodiments of this application also provide a long text generation method based on the multi-agent collaboration and dynamic feedback long text generation system described above, the method comprising:

[0017] Receive user input for a topic or outline;

[0018] The director agent plans and schedules the long text generation process, generates and issues text generation and text modification instructions to the writer agent, and coordinates the interaction between the writer agent and the evaluation agent.

[0019] The writer agent generates text content according to the text generation instructions, and modifies the text content based on the text modification instructions;

[0020] The evaluation agent performs a multi-dimensional quality assessment of the text content generated by the writer agent and feeds the assessment results back to the director agent.

[0021] The memory bank stores historical generation information and global setting information during the generation process, and provides context information to the writer agent during the long text generation process;

[0022] The director agent dynamically adjusts the generation strategy based on the evaluation results of the evaluation agent, and applies the generation strategy during the iterative process of long text generation to achieve continuous optimization of long text generation.

[0023] Compared with existing technologies, the solution provided in this application establishes a closed-loop mechanism for long text generation with dynamic feedback by introducing the collaborative effects of a director agent, a writer agent, an evaluation agent, and a memory bank. This solution enables controllable planning and scheduling in the generation process and dynamically adjusts the generation strategy based on the evaluation results of the evaluation agent, thereby avoiding the problems of a one-way, rigid, and uncontrollable generation process. The evaluation agent performs multi-dimensional analysis on the text generated by the writer agent and provides optimization suggestions, ensuring that the text achieves a higher level in terms of plot coherence, character consistency, theme consistency, language style, and innovation. The memory bank stores historical generation information and global setting information, and provides contextual support in subsequent generation, effectively avoiding theme drift and inconsistencies in character settings, enhancing the global logical unity and long-term coherence of the text. Under the scheduling of the director agent, the writer agent can correct the generated content based on the feedback from the evaluation agent, enabling the text generation process to have continuous improvement capabilities, thereby improving the overall quality and stability of long text generation. Attached Figure Description

[0024] 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 implementation methods can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a schematic diagram of the structure of a long text generation system with multi-agent collaboration and dynamic feedback provided in an embodiment of this application;

[0026] Figure 2 This is a flowchart illustrating a long text generation method based on multi-agent collaboration and dynamic feedback provided in an embodiment of this application. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0028] First Embodiment

[0029] The first embodiment of this application relates to a long text generation system with multi-agent collaboration and dynamic feedback, referring to... Figure 1As shown, the system includes a director agent, a writer agent, an evaluator agent, and a memory bank. These modules interact through pre-defined communication interfaces to achieve task allocation, content generation, quality assessment, and strategy optimization during the long text generation process. The system architecture is designed based on a Multi-Agent System (MAS) paradigm. This paradigm personifies different functional modules as agents with specific roles, memories, and behavioral patterns. Specifically, the director agent dynamically allocates resources and responsibilities based on the generation task status; the writer agent and the evaluator agent achieve a feedback loop through the director agent; and the memory bank provides context and knowledge support for the entire system, enabling the system to adaptively adjust, continuously learn, and stably optimize during long text generation. The agents collaborate decoupled through message protocols, giving the system distributed collaboration, autonomous decision-making, and dynamic feedback capabilities.

[0030] Each agent possesses an independent information processing unit, task execution logic, and communication interface, enabling information interaction with other agents under a unified scheduling mechanism. Different agents assume different functional roles within the system: the director agent is responsible for global planning and task scheduling, essentially acting as the system's "control center"; the writer agent is responsible for generating and revising text content, acting as the system's "creative executor"; the evaluation agent is responsible for multi-dimensional assessment and feedback of the generated results, acting as the system's "quality reviewer"; and the memory bank provides a shared semantic memory space for all agents, acting as the system's "knowledge and experience repository."

[0031] The director agent receives user input on the theme or outline, plans and schedules the long text generation process, generates and issues text generation and modification instructions to the writer agent, coordinates the interaction between the writer agent and the evaluation agent, and adjusts the generation strategy for long text generation based on the evaluation results of the evaluation agent.

[0032] In this embodiment, the Director Agent serves as the central control unit of the system, responsible for planning, coordinating, and arbitrating the entire process of long text generation. The Director Agent possesses core functions such as task allocation, strategy adjustment, and information scheduling, and is the central node of the entire multi-agent collaborative framework.

[0033] The director agent receives user input on a theme or outline. This input can be a creative theme described in natural language, genre requirements, or a preliminary outline including chapter structure. The director agent's workflow planning module parses the global plan for the generation task based on this input, determines the overall structure, number of chapters, and generation order of the long text, and forms an initial generation plan.

[0034] During the planning phase, the director agent generates two types of structured control instructions for the writer agent based on preset generation strategy parameters (such as narrative style, language register, generation temperature, context length limits, etc.): Text generation instructions: used to guide the writer agent to perform the initial text generation task, the instructions include the target chapter range, style parameters, length constraints, context retrieval method, and the range of memory to be called; Text modification instructions: generated after receiving the evaluation results from the evaluation agent, used to guide the writer agent to revise based on the existing text, the instructions include the content range to be adjusted, the corresponding quality dimensions (such as plot coherence, character consistency, language fluency, etc.), and the direction of revision.

[0035] Furthermore, the director agent is responsible for managing the system's overall workflow, including creating generation tasks, determining and maintaining dependencies between tasks, and monitoring the operational status of each agent module. During task execution, the director agent continuously tracks the information interaction between the writer agent and the evaluation agent, coordinating their task connections and feedback processes to ensure the continuity and consistency of the generation and evaluation process.

[0036] Specifically, the director's intelligent agent includes:

[0037] The process planning module is used to parse the user-input topic or initial outline and determine the corresponding text generation tasks, which include outline generation tasks, chapter generation tasks, and feedback-based text correction tasks.

[0038] In one specific implementation, the process planning module can perform semantic analysis on the input text based on a natural language understanding model, extracting keywords, narrative objectives, and plot structure information to determine the text generation task type. Text generation tasks include outline generation, chapter generation, and feedback-based text correction tasks.

[0039] When a user inputs a creative theme, the process planning module generates a corresponding outline generation task; when the system enters the specific chapter creation stage, the process planning module generates a chapter generation task; if the evaluation agent's feedback score is lower than a preset threshold, a text correction task based on the feedback is generated so that the writer agent can perform targeted optimization. Through the above task division, the system can plan the generation process at a macro level and maintain a consistent creative rhythm.

[0040] The task scheduling module is used to assign text generation tasks to the writer agent and receive evaluation results from the evaluation agent. During system operation, this module is responsible for coordinating the information exchange between the writer agent and the evaluation agent, ensuring a closed loop in the generation and feedback process.

[0041] In one specific implementation, the task scheduling module sends execution instructions to the writer agent via an instruction interface based on the task type output by the process planning module, and receives the generated content returned by the writer agent after the task is completed. The director agent submits the generated content to the evaluation agent for multi-dimensional quality assessment through this module, and receives the assessment results and optimization suggestions in real time.

[0042] In one optional implementation, the task scheduling module continuously monitors the execution status of each generation task and the dependencies between tasks, dynamically updating the task queue and execution priority to ensure that multiple generation tasks are executed in the planned order. Through this mechanism, the system can maintain the consistency and coordination of the global workflow in the case of multiple tasks running in parallel, avoiding task blocking or dependency conflicts, thereby improving the overall running efficiency of long text generation.

[0043] The strategy adjustment module is used to dynamically adjust the long text generation strategy based on the evaluation results. This module can determine the parameter adjustment scheme and the logical rule update scheme based on the quantitative results and optimization suggestions of each scoring dimension.

[0044] In a preferred implementation, the strategy adjustment module can map the scoring results of dimensions such as plot coherence and character consistency to the adjustment values ​​of generation model parameters (such as temperature, top-p, generation step size, etc.) through a preset mapping model or heuristic rules, thereby achieving adaptive optimization of the generation strategy. When the evaluation agent reports a low "innovation" score, the strategy adjustment module can increase the creativity parameter; when the "topic consistency" score is insufficient, the context scope of the retrieval-enhanced generation (RAG) call can be increased.

[0045] Through continuous optimization of the strategy adjustment module, the director agent can achieve autonomous adjustment and dynamic learning in the generation process, thereby continuously improving the generation quality and stability in subsequent text generation tasks.

[0046] Furthermore, the director agent maintains continuous interaction with the memory bank to ensure effective access to and updating of historical content and global settings during the generation of long texts. When generating new chapters or modifying existing content, the director agent can retrieve contextual information, character relationships, and plot background stored in the memory bank to assist the writer agent in generating text results that conform to global logic. After generation, the director agent can write the new content summary, plot status, and character relationship information back to the memory bank, thereby achieving long-term semantic consistency maintenance of the system.

[0047] The writer agent, connected to the director agent, is used to generate text content based on text generation instructions and to revise the text content based on text modification instructions.

[0048] In this embodiment, the Writer Agent, as the core module responsible for content generation in the system, is used to execute text generation and revision tasks according to different types of instructions issued by the Director Agent. The Writer Agent generates corresponding text content by receiving text generation instructions from the Director Agent, and upon receiving text revision instructions, performs targeted revisions to the aforementioned text content, thereby achieving continuous optimization of the generated results. Text content refers to the output of the Writer Agent when performing text generation tasks under the direction of the Director Agent, and may include chapter outlines, plot paragraphs, or complete chapter text. Text content can serve as input for the evaluation agent to conduct quality assessments, and can also be modified or regenerated under the instructions of the Director Agent.

[0049] The writer agent possesses functional modules such as plot planning, text generation, and self-correction. It can collaborate with the director agent, the evaluator agent, and the memory bank to achieve a high-quality, coherent, and optimizable long text generation process. Specifically, the writer agent includes:

[0050] The plot planning module is used to generate chapter outlines based on the instructions of the director agent.

[0051] In one specific implementation, after receiving the user's input of a theme or overall outline, the director agent sends a generation instruction to the writer agent. The writer agent's plot planning module then generates a detailed chapter outline or plot development based on this instruction and long-range contextual information provided in its memory (such as previous content, character relationships, and background settings). For example, when the theme is "science fiction adventure," the plot planning module can automatically analyze the logical connections between generated chapters and generate a chapter outline that includes scene transitions, character actions, and conflict development, ensuring logical consistency and plot coherence in subsequent text generation.

[0052] The text generation module is used to generate chapter content based on the chapter outline and contextual information provided in the chapter memory.

[0053] In one specific implementation, the text generation module can invoke a Large Language Model (LLM) or a finely tuned language generation model to generate chapter text based on the input outline and contextual information. This module can further employ a retrieval-enhanced generation mechanism to retrieve relevant global setting information (such as key characters, event states, world-building rules, etc.) from the memory database and input it as additional semantic conditions into the generation model to prevent issues such as "topic drift" and "inconsistent character settings." Thus, the text generation module can generate chapter text content that is consistent with the global narrative logic, has a unified style, and is semantically coherent.

[0054] The self-correction module is used to make partial or overall corrections to the chapter content based on feedback information from the evaluation agent.

[0055] In one specific implementation, after the director agent receives multi-dimensional scores and optimization suggestions from the evaluation agent, it forwards the feedback information to the writer agent. The writer agent's self-correction module then automatically corrects the text accordingly: for example, if the evaluation results show a low score for "plot coherence," the module will logically reconstruct the chapter transitions; if "character consistency" is low, it will adjust the behavioral descriptions or language style of the relevant characters; if "language readability" is insufficient, it will perform sentence simplification and grammatical optimization.

[0056] In a preferred embodiment, the self-correction module may employ a differential editing-based strategy to update the original text with minimal modifications, thereby improving local quality without disrupting the overall logical structure.

[0057] Specifically, the self-correction module first determines the target segment to be corrected based on dimensional information (such as plot coherence, character consistency, and language readability) provided by the evaluation agent, and then uses a semantic alignment algorithm (such as sentence vector-based similarity matching) to accurately locate the corresponding sentence segment in the chapter text. After localization, the module generates one or more candidate revised segments using a constrained text generation model, while keeping the preceding and following context locked. The constraints include: maintaining the characters, events, and scene settings unchanged, not introducing new facts or characters, and limiting the number of modified words to no more than a preset threshold.

[0058] Subsequently, the self-correction module performs difference calculations between the original fragment and each candidate revised fragment. It analyzes the number of insertion, deletion, and replacement operations using a minimum edit distance algorithm (such as Levenshtein distance or dynamic programming) and calculates the corresponding editing costs. While ensuring an improvement in the target dimension score, the module selects the candidate revision with the lowest editing cost and generates a patch containing the minimum set of operations.

[0059] After the patch is generated, the system performs consistency and quality checks on the revision results. First, the evaluation agent is invoked to perform a secondary scoring of the revised segment to confirm that the target dimension score has indeed improved. Second, the system checks whether the character names, event order, and background settings in the text are consistent with the global information in the knowledge memory. If discrepancies are found, the knowledge graph is updated. After passing the above checks, the system applies the patch to the chapter text and records the modification history in a versioned manner to support subsequent backtracking and iterative optimization.

[0060] By employing a revision mechanism based on differential editing, the self-correction module can improve text quality with minimal modifications, effectively avoiding the issues of inconsistency disruption and style drift caused by rewriting the entire text.

[0061] The evaluation agent, connected to the director agent, is used to perform multi-dimensional quality assessments of the text content generated by the writer agent and feeds the assessment results back to the director agent.

[0062] In this embodiment, the evaluation agent, as one of the core modules of the system, is used to automate content quality analysis and feedback during the long text generation process. This agent can be implemented based on a large language model (LLM). Through preset multi-dimensional scoring criteria, it systematically and structurally evaluates the text content generated by the writer agent, thereby providing the director agent with quantifiable and interpretable evaluation results. The evaluation results refer to the comprehensive evaluation information output by the evaluation agent after completing the quality analysis, specifically including: quantitative scores for each scoring dimension, reflecting the text's performance on different quality indicators (such as plot coherence, character consistency, language readability, thematic consistency, and originality); analysis conclusions for each dimension, such as logical chain integrity, narrative rhythm stability, and style matching; and optimization suggestions generated based on the analysis conclusions, indicating specific paragraphs, elements, or writing directions that need improvement.

[0063] Specifically, evaluating intelligent agents includes:

[0064] The multi-dimensional analysis module is used to analyze the text content generated by the writer's intelligent agent item by item on multiple preset scoring dimensions, and obtain the analysis results of each scoring dimension. The scoring dimensions include at least one of the following: plot coherence, character consistency, theme consistency, language style and readability, and innovation.

[0065] In one specific implementation, the multi-dimensional analysis module is based on a multi-task learning framework built on a large language model, and uses the "LLM-as-a-Judge" paradigm to intelligently evaluate text. This module pre-defines the meaning, evaluation criteria, and quantification range of each scoring dimension through prompt word templates, making the evaluation process consistent and interpretable.

[0066] Specifically, when analyzing text, the system embeds evaluation criteria of different dimensions into prompt words and uses the semantic reasoning capabilities of the Large Language Model (LLM) to generate corresponding analysis results and numerical scores. The scoring dimensions and their quantification standards include:

[0067] Plot coherence

[0068] This system is used to assess whether the development of events in a text is logically consistent and whether there are abrupt transitions or contradictions. During the analysis, the system judges the logical continuity of the text through semantic chain extraction and event graph alignment. The scoring range is [1–10], with 10 points indicating that the logic is rigorous, the events are naturally connected, and there are no logical gaps.

[0069] Character Consistency

[0070] This system is used to assess whether a character's behavior, motivations, and emotional changes align with their established persona. It extracts the character's feature vector and compares it to the character's established persona information recorded in the memory bank to determine if the character's performance deviates from the original setting. The scoring range is [1–10], with 10 indicating a stable and believable character.

[0071] Thematic Consistency

[0072] This system is used to assess whether a text consistently revolves around a core theme and whether "topic drift" exists. It uses keyword extraction and semantic clustering analysis to identify the consistency between the core theme and paragraph themes. The scoring range is [1–10], with 10 indicating a clear and consistent theme throughout the text.

[0073] Language style and readability

[0074] This system is used to evaluate a text's performance in terms of language expression, syntactic structure, and readability. It integrates grammar check results, sentence diversity indicators, and text fluency indicators to generate a corresponding score. The score range is [1–10], with 10 indicating fluent and natural writing, correct grammar, and a good reading experience.

[0075] Innovation (Novelty)

[0076] This system is used to evaluate the novelty of a text in terms of plot conception, narrative structure, or language expression. It employs a semantic similarity comparison method, comparing the generated content with existing knowledge bases or historical content to measure its originality. The scoring range is [1–10], with 10 indicating that the content is creative, uniquely structured, and engaging for readers.

[0077] The quantification and suggestion module is used to generate quantitative scores and corresponding optimization suggestions for each scoring dimension based on the analysis results, and then feeds the quantitative scores and optimization suggestions back to the director's intelligent agent.

[0078] In one specific implementation, the quantification and suggestion module first receives the analysis results output by the multi-dimensional analysis module. These results include structured information such as semantic feature representations for each dimension, logical consistency judgments, and topic clustering results. To enhance the interpretability of the evaluation process and the credibility of the evaluation conclusions, the quantification and suggestion module instructs the model to employ a thought chain reasoning mechanism during analysis before generating the quantification results. Specifically, before outputting scores for each dimension, the model performs step-by-step logical deduction, analyzing and explaining the text's performance in each dimension item by item. For example, in the "Plot Coherence" dimension, the model identifies the sequence of events and causal relationships in the text through thought chain reasoning, determining whether there are any gaps or contradictions in the plot progression; in the "Character Consistency" dimension, the model infers whether a character's motivations are consistent with their established character by reasoning about their behavior, language, and psychological state at different times; in the "Thematic Consistency" dimension, the model analyzes whether the text content revolves around the core theme and whether there are any deviations or thematic drifts; in the "Language Style and Readability" dimension, the model combines syntactic structure, semantic fluency, and stylistic consistency for logical evaluation; and in the "Innovation" dimension, the model infers the uniqueness of the plot conception and narrative structure, judging whether it possesses novelty and appeal. Through the above-mentioned dimension-by-dimensional reasoning process, the model not only generates corresponding scoring criteria but also forms an explanatory analysis chain to support subsequent quantitative calculations and optimization suggestion generation.

[0079] After completing the reasoning process, the module maps the performance of each dimension numerically based on preset scoring criteria and a quantification model, generating corresponding quantified scores. For example, in the plot coherence dimension, the module can calculate a score based on the consistency of the event chain or the strength of logical dependencies; in the language style and readability dimension, the module can quantify the score by combining syntactic complexity, grammatical error rate, and fluency indicators. The system combines the quantified results of each dimension into a scoring vector. Each element corresponds to a score for a specific rating dimension. The rating range can be set to [1–10], with higher values ​​indicating better text quality in that dimension.

[0080] To avoid unstable or overly biased model outputs, the module can introduce a confidence-weighted mechanism or a multi-model review fusion strategy. In a preferred implementation, the system can employ multiple large language models as parallel "LLM-as-a-Judge agents" to perform independent thought chain reasoning analysis and score output on the same generated text. Specifically, the evaluation agent can simultaneously call several language models with different parameter scales or training biases (e.g., GPT-4, Claude Opus, or dedicated models fine-tuned for multiple tasks). Each model independently generates multi-dimensional analysis results and score vectors based on a unified prompt word template. The system then fuses the outputs of each model, for example, by using strategies such as weighted averaging, median filtering, or consensus determination to calculate the final comprehensive score vector. It also includes a confidence index to ensure the stability and consistency of the scoring results.

[0081] While generating quantitative scores, the quantification and suggestion module also generates corresponding optimization suggestions using natural language generation technology. Based on the analysis results and scoring deviations, the optimization suggestions use templated or generative instruction output methods to indicate the specific content to be improved and the direction of modification. For example, when the "Character Consistency" score is low, the output might be "Character B's behavior in Chapter 3 is inconsistent with the previous setting; it is recommended to add psychological descriptions to enhance rationality"; when the "Theme Consistency" score is low, the output might be "The narrative in Chapter 5 deviates from the main plot; it is recommended to adjust the plot to strengthen the theme's coherence."

[0082] Furthermore, the evaluation agent can generate an optimization priority list based on the significance of logical differences across various dimensions derived from the thought chain reasoning, guiding the director agent to prioritize the correction of key issues. Finally, the module outputs the scoring results, reasoning chain summary, optimization suggestions, and priority data to the director agent in a structured format (such as JSON). The director agent then determines whether the text meets a preset threshold. If not, it adjusts the generation parameters based on the optimization suggestions or instructs the writer agent to perform targeted revisions, thus achieving an adaptive closed loop between generation and evaluation.

[0083] The report generation module is used to generate analysis reports based on the analysis results. The analysis reports include the analysis conclusions and comprehensive evaluations for each scoring dimension.

[0084] The analysis report includes: analytical conclusions and quantitative results for each scoring dimension; key issues and improvement directions for each dimension; comprehensive evaluation and priority ranking (e.g., overall score, scope of impact of key issues); a list of optimization suggestions and corresponding chapter positioning information. The analysis report is output in a structured format (JSON or tabular form) for the director agent to read and archive. The director agent can dynamically adjust the generation strategy or trigger correction tasks from the writer agent based on the report results.

[0085] The memory bank, connected to the director agent, is used to store historical generation information and global settings during the generation process, and to provide relevant contextual information to the writer agent when generating long texts.

[0086] In this embodiment, the memory bank is used to provide context support and maintain global consistency during the long text generation process. It is a key component for realizing the system's long text logic control and preventing "topic drift" and "intermediate forgetting".

[0087] Specifically, the memory includes:

[0088] The context storage module (short-term memory layer) stores recent text information and current task context information during the generation process to ensure local coherence in the long text generation process. This module can save several recently generated chapters of text and semantic fragments directly related to the current generation task in the form of a cache sequence. When the writer agent generates new chapter content, the director agent retrieves the context information from this module and inputs the text fragments associated with the current chapter into the writer agent, thereby ensuring the continuity of character behavior, event connections, and narrative context. For example, when the writer agent generates chapter N, the system automatically retrieves key characters, unfinished events, and semantic context from the previous chapter as references to avoid narrative gaps or repetitive descriptions.

[0089] The global knowledge storage module (long-term memory layer) stores the global setting information required for long text generation in structured data form (such as a knowledge graph or relational database), and interacts with the director agent to retrieve and update this global setting information. This module can include elements such as the story's world view, character relationships, timeline, key events, geographical locations, and background settings. Through structured representation, the system can query and update the relationships between characters and events. The director agent can update this knowledge graph in real time according to the creation progress, for example, automatically adding new character information, modifying event states, or updating world view parameters during the generation process.

[0090] In a preferred implementation, the global knowledge storage module can implement a knowledge graph based on a graph database structure. Nodes represent people, events, locations, or concepts, while edges represent semantic relationships between nodes (such as 'belongs to', 'occurred in', 'caused', etc.). When the director agent calls the memory, it can retrieve contextual knowledge related to the current chapter by searching the node relationship paths in the knowledge graph, and pass the results as input to the writer agent to guide the generation of subsequent chapters.

[0091] In this embodiment, when the generated chapter content needs to be modified, the director agent sends the optimization suggestions fed back by the evaluation agent to the writer agent. After the writer agent completes the modification of the chapter content, the director agent parses the modified chapter content and updates it to the knowledge graph in the memory bank.

[0092] In one specific implementation, when the system detects inconsistencies in the generated chapter content, thematic deviations, or abnormal character behavior requiring adjustment, the director agent triggers a chapter content revision process. The director agent first determines the chapter content to be revised and the specific direction of modification based on optimization suggestions from the evaluation agent. These optimization suggestions are typically generated by the evaluation agent based on multi-dimensional scoring analysis, covering dimensions such as plot coherence, character consistency, thematic completeness, and language readability. Upon receiving these optimization suggestions, the director agent sends them to the writer agent as a task instruction, directing it to make targeted modifications to the corresponding chapter content.

[0093] Upon receiving the instruction, the writer agent performs content revisions based on the revision goals issued by the director agent and the contextual information provided in the memory bank. Preferably, the writer agent can use a differential editing strategy to modify only the text segments corresponding to the optimization suggestions, in order to maintain the overall style and narrative structure of the original text. After the revision is completed, the writer agent returns the updated chapter content to the director agent.

[0094] After receiving the revision results, the director agent performs semantic parsing and structuring processing on the modified chapter content. The parsing process includes extracting the main entities (characters, events, locations, items, etc.) and their relational features from the text, and identifying new or changed information within the chapter. Subsequently, the director agent writes these parsing results into a long-term knowledge graph in its memory, enabling updates to the system's global knowledge. This knowledge graph records the core elements of the story and their logical connections in a graph structure to maintain global consistency.

[0095] After the knowledge graph is updated, the director agent invokes a retrieval-enhanced generation mechanism, using the latest updated knowledge graph as factual basis to provide semantic support for subsequent chapter generation tasks. Through this mechanism, subsequent chapters can reference revised content and the latest settings during the generation process, ensuring that character states, event outcomes, and world-building logic remain consistent with the modified chapters.

[0096] Furthermore, to achieve continuous optimization of the system during multiple rounds of generation and revision, this embodiment introduces an autonomous iteration and continuous optimization mechanism. Specifically, the director agent uses the evaluation agent's rating of the chapter content as a reward signal and inputs this signal into a preset policy mapping model for fine-tuning the generation policy and updating weights. This process is similar to the idea of ​​reinforcement learning based on human feedback (RLHF): the system continuously accumulates the mapping relationship between policy, result, and rating through multiple rounds of "generation-evaluation-correction-regeneration".

[0097] In practice, the director agent maintains a dynamic generation strategy library to store and manage parameter combinations and control instructions for different generation strategies. This library can contain various parameter configurations that influence the LLM generation results, such as text genre, style preference, randomness control parameters (temperature, top-p), contextual retrieval scope, cue template format, and topic consistency constraints. Each time text generation and evaluation is completed, the director agent associates the currently used strategy configuration with the corresponding evaluation score and stores it in the strategy library, forming a traceable "strategy-result-feedback" mapping.

[0098] In subsequent generation tasks, the system can prioritize high-performing strategy combinations based on historical data to guide the writer agent in executing the next round of generation. When new evaluation feedback indicates a decline in strategy effectiveness, the director agent can automatically adjust parameters or generate new strategy combinations through the policy mapping model to replace or supplement the original configuration. With multiple iterations, the system dynamically updates the policy library, gradually stabilizing and optimizing the generated strategies, thereby achieving adaptive learning and continuous improvement without relying on human intervention.

[0099] In this embodiment, when the generated chapter outline needs to be modified, the director agent calls the writer agent to regenerate the chapter outline and submits it to the evaluation agent for evaluation. If the evaluation is passed, the director agent discards the chapter content generated based on the original chapter outline. When generating new chapter content based on the newly generated chapter outline, the director agent calls the updated knowledge graph through the enhanced generation mechanism to ensure that the newly generated chapter content is consistent with the newly generated chapter outline and global setting information.

[0100] In one specific implementation, when the system detects that the generated chapter outline needs modification, the director's agent will initiate an outline adjustment process. This process is suitable for scenarios such as users actively adjusting their creative direction, discovering story structural flaws, or the evaluation agent identifying logical anomalies in the outline during assessment.

[0101] First, the director agent invokes the plot planning module within the writer agent to regenerate the chapter outline. The new chapter outline is comprehensively planned based on the user's revision intentions, global theme constraints, feedback from existing chapters, and global setting information in the memory bank. Specifically, the director agent transmits the latest outline generation instructions to the writer agent, specifying the target theme, narrative direction, main characters, and constraints. The writer agent then generates a new chapter outline and returns it to the director agent.

[0102] Subsequently, the director agent submits the newly generated chapter outline to the evaluation agent for quality assessment. The evaluation agent comprehensively analyzes the new outline based on a pre-set multi-dimensional scoring system (including plot coherence, character consistency, thematic completeness, language fluency, and originality), generating a quantitative score and optimization suggestions. Upon receiving the evaluation results, the director agent determines whether the new outline passes based on pre-set thresholds. If the evaluation passes, the new outline is confirmed as valid, and the old chapter content generated based on the original chapter outline is discarded to prevent logical conflicts between the old content and the new outline.

[0103] During the new chapter generation phase, the director agent invokes the updated knowledge graph through a retrieval enhancement generation mechanism to ensure that the text generation process remains consistent with the new outline. This knowledge graph, stored in a memory bank, records global knowledge of the long text, including global semantic information such as character relationships, key events, scene settings, and timelines. Before generating each new chapter, the director agent retrieves entity nodes and relationship paths related to the new outline from this knowledge graph, providing them as contextual information to the writer agent to guide the generation of subsequent chapter content.

[0104] Furthermore, after receiving the multi-dimensional evaluation results of the chapter outline from the evaluation agent, if the score of the chapter outline does not meet the preset threshold, the director agent adjusts the generation strategy and guides the writer agent to modify the chapter outline based on the adjusted generation strategy until the score of the chapter outline meets the preset threshold.

[0105] Specifically, after the evaluation agent completes a multi-dimensional assessment of the chapter outline, it generates an evaluation result containing scores for each dimension and optimization suggestions. Upon receiving this evaluation result, the director agent first determines whether the current chapter outline meets the generation quality requirements based on preset thresholds. If the outline score does not meet the preset thresholds, a strategy adjustment and iterative optimization process is initiated.

[0106] In this process, the director agent compares the scores and optimization suggestions from the evaluation agent to identify key dimensions leading to low scores, such as insufficient plot coherence, thematic deviation, or inconsistent character settings. To address these issues, the director agent invokes its internal strategy adjustment module to fine-tune the generation strategy parameters. Generation strategies may include a temperature parameter (total temperature), a probability truncation parameter (total top-p), a theme focus parameter, chapter length constraints, and narrative style strategies to control the output style and innovation of the writer agent. For example, when the evaluation agent reports a low theme consistency score, the director agent can increase the weight of the theme focus parameter or add theme constraint instructions to the prompt template; when the plot coherence score is low, the director agent can reduce the randomness parameter to enhance logical consistency; if the innovation score is insufficient, the temperature can be appropriately increased or a new narrative style strategy can be introduced to balance creativity and coherence.

[0107] After the strategy adjustment is completed, the director agent guides the writer agent to regenerate or modify the chapter outline based on the updated strategy parameters. The new chapter outline is then submitted to the evaluation agent for review. The director agent determines whether the preset threshold has been met based on the latest score. If it still does not meet the threshold, the above strategy optimization and regeneration process is repeated until the chapter outline score meets the preset requirements. Through this adaptive feedback mechanism, the system achieves dynamic quality control and continuous optimization at the chapter outline level. The director agent no longer relies on fixed rules or manual intervention, but can adjust the generation strategy in real time based on the evaluation results, giving the outline optimization process feedback loop characteristics and strategy learning capabilities.

[0108] In this embodiment, the director agent takes the quantitative scores and optimization suggestions of each rating dimension fed back by the evaluation agent as input through a pre-trained mapping model and / or heuristic rules to generate a corresponding generation strategy. The generation strategy includes parameter configuration and logical rules for controlling the long text generation process.

[0109] During the iterative process of long text generation, the director agent dynamically adjusts the generation strategy based on the feedback from the evaluation agent, and stores the generation strategies that meet the preset conditions as determined by the evaluation results into the generation strategy library, so as to be called first in subsequent text generation tasks, thereby achieving continuous optimization.

[0110] In one specific implementation, the director agent can adaptively adjust and continuously optimize the generation strategy through a pre-trained mapping model. This mapping model is a "parameter-outcome" correspondence model based on machine learning or reinforcement learning techniques, used to learn the influence of different generation parameters on text quality. After receiving the quantified scores and optimization suggestions for each scoring dimension from the evaluation agent, the director agent can use this feedback information as model input. The mapping model automatically calculates the direction and magnitude of parameter adjustments for the next round of text generation, thereby dynamically optimizing the generation process.

[0111] In one implementation, the mapping model can employ a supervised learning structure, using "generation parameter-quality score" data pairs recorded in historical generation tasks as training samples. The input includes a score vector <S1, S2, S3, S4, S5> and an encoded representation of optimization suggestions, while the output is a parameter adjustment amount ΔP, such as lowering the temperature parameter to enhance plot coherence or expanding the context window to improve topic consistency. This model can employ a multilayer perceptron (MLP) or a lightweight Transformer network, trained by minimizing the prediction score error or maximizing the overall quality metric.

[0112] In another implementation, the mapping model can be built based on reinforcement learning, treating the director agent as a learning agent. The comprehensive score of the agent's output is used as a reward signal, and the "feedback → parameter adjustment" policy function is continuously updated through policy gradient or Q-learning algorithms. With the iteration of the generation loop, the director agent can accumulate experience by receiving multiple rounds of feedback, allowing the parameter configuration to gradually approach the optimum.

[0113] In this embodiment, the director agent can also dynamically adjust the generation strategy based on heuristic rules. This mechanism does not rely on model training; instead, it updates the template through preset logical conditions and parameters, and directly corrects the generation parameters based on the results of each scoring dimension. Heuristic rules are usually derived from expert experience or historical statistical patterns during the system design phase. They are characterized by simple structure, rapid response, and strong interpretability, and are particularly suitable for early-stage systems or scenarios with insufficient training data.

[0114] Specifically, when the "plot coherence" score of the evaluation agent is lower than a set threshold, the director agent can reduce the randomness parameter of text generation (such as temperature value) through heuristic rules and expand the context window of retrieval-enhanced generation (RAG) to strengthen the logical consistency of the plot; when the "creativity" score is low, the director agent can increase the randomness parameter or change the creation template to introduce more semantic variations and increase the creativity of the text; if the "character consistency" and "theme consistency" scores are low at the same time, the system can automatically increase the knowledge graph retrieval weight or increase the frequency of long-term memory retrieval, thereby maintaining the stability of character behavior and theme clues in subsequent generation.

[0115] Through the aforementioned heuristic rule mechanism, the director agent can make real-time decisions and policy corrections without model inference, enabling fine-grained control over the generation process. This mechanism can operate independently or be used in conjunction with a pre-trained mapping model. That is, while rule-based decisions provide the basic direction, the mapping model further fine-tunes the parameters, thus forming a hybrid strategy system of experience-driven and data-optimized approaches. This allows the system to achieve a balance between real-time performance and adaptability, continuously improving the overall quality and consistency of long text generation.

[0116] Second Embodiment

[0117] The second embodiment of this application relates to a long text generation method based on the multi-agent collaboration and dynamic feedback long text generation system described in the first embodiment above, referring to... Figure 2 As shown, the method may include the following steps:

[0118] Receive user input for a topic or outline;

[0119] The director agent plans and schedules the long text generation process, generates and issues text generation and text modification instructions to the writer agent, and coordinates the interaction between the writer agent and the evaluation agent.

[0120] The writer's intelligent agent generates text content based on text generation instructions, and then modifies the text content based on text modification instructions;

[0121] The evaluation agent performs a multi-dimensional quality assessment of the text content generated by the writer agent and feeds the assessment results back to the director agent.

[0122] The memory bank stores historical generation information and global setting information during the generation process, and provides contextual information to the writer agent during the long text generation process;

[0123] The director agent dynamically adjusts the generation strategy based on the evaluation results of the evaluation agent, and applies the generation strategy during the iterative process of long text generation to achieve continuous optimization of long text generation.

[0124] To more clearly illustrate the specific implementation process of the method in this application, the following is combined with... Figure 2 The implementation steps of this embodiment will be further explained below. The method includes the following steps:

[0125] Step 1: Input and initialization.

[0126] Upon receiving the user's input of a theme or initial outline, the director agent establishes the workflow configuration and quality threshold for this round of creation tasks, and initializes generation strategy parameters, such as prompt templates, sampling temperature, sampling probability (top-p), and RAG retrieval window.

[0127] Step 2: Invoke the plot planner.

[0128] The director agent issues the "outline generation" task to the writer agent; the writer agent's plot planner generates an initial outline under the constraints of existing settings and strategy parameters.

[0129] Step 3: Outline evaluation.

[0130] The director agent submits the initial outline to the evaluation agent for multi-dimensional assessment, obtains a score vector and optimization suggestions, and generates a corresponding analysis report.

[0131] Step 4: Assessment of syllabus compliance.

[0132] If the outline score does not reach the preset threshold, the director agent adjusts the generation strategy based on the score and optimization suggestions (pre-trained mapping models and / or heuristic rules can be used), and instructs the writer agent to revise the outline, returning to step 2 to repeat the iteration until the outline meets the standard; if the outline meets the standard, the chapter generation stage begins.

[0133] Step 5: Chapter generation and scheduling.

[0134] The director agent sends a "chapter generation" task to the writer agent, providing the current chapter's goals and constraints, including characters, events, key themes, language style, and length range.

[0135] Step 6: Memory retrieval assistance.

[0136] Before generating text, the writer agent accesses the memory bank to retrieve short-term context (recently generated text, unresolved foreshadowing, etc.) and long-term global settings (character relationships, timelines, worldview information, etc. in the knowledge graph) related to the chapter, and uses this information as the input model for the generation context enhanced by RAG retrieval.

[0137] Step 7: Chapter content generation.

[0138] The writer agent's text generation module generates a draft chapter content based on the context information obtained in step 6 and the current generation strategy parameters.

[0139] Step 8: Chapter Evaluation.

[0140] The director agent submits the chapter content to the evaluation agent for multi-dimensional quality assessment, obtaining a score vector, problem identification and optimization suggestions, and generating a corresponding analysis report.

[0141] Step 9: Chapter Completion Assessment:

[0142] If the chapter score does not meet the preset standard, the director agent will adjust the generation strategy based on the score and suggestions, and instruct the writer agent to perform self-correction of the chapter with minimal modifications using differential editing; if necessary, the RAG search scope can be expanded or the prompt template can be updated, and the process can return to step 6 or 7 to regenerate until the chapter meets the standard; if the chapter meets the standard, step 10 will be executed.

[0143] Step 10: Memory update and consistency maintenance.

[0144] The director agent parses the chapter text that has passed the evaluation, extracts new facts or relational information and writes it back to the memory bank: local context information is written into short-term memory for reference in subsequent chapters; stable facts and relational information are updated to the knowledge graph (long-term memory) to maintain consistency across chapter content.

[0145] Step 11: Chapter progression and completion determination.

[0146] If there are still chapters to be generated, the director agent moves on to the next chapter and returns to step 5 to repeat the process; if all chapters have been completed, proceed to step 12.

[0147] Step 12: Output and Archiving.

[0148] Output the final long text work and comprehensive evaluation report; and store the generation strategies that meet the preset conditions to the strategy library so that they can be called first in subsequent generation tasks, thereby realizing the continuous optimization and self-learning of the system.

[0149] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this application.

[0150] As can be seen from the above embodiments, the long text generation system and method provided in this application, which features multi-agent collaboration and dynamic feedback, establishes a closed-loop mechanism for long text generation with dynamic feedback by introducing the collaborative effects of a director agent, a writer agent, an evaluation agent, and a memory bank. This scheme enables controllable planning and scheduling in the generation process and dynamically adjusts the generation strategy based on the evaluation results of the evaluation agent, thereby avoiding the problems of unidirectional, rigid, and uncontrollable quality in the generation process. The evaluation agent performs multi-dimensional analysis on the text generated by the writer agent and provides optimization suggestions, ensuring that the text achieves a higher level in terms of plot coherence, character consistency, theme consistency, language style, and innovation. The memory bank stores historical generation information and global setting information, and provides contextual support in subsequent generation, effectively avoiding theme drift and inconsistencies in character settings, enhancing the global logical unity and long-term coherence of the text. Under the scheduling of the director agent, the writer agent can correct the generated content based on the feedback results of the evaluation agent, enabling the text generation process to have continuous improvement capabilities, thereby improving the overall quality and stability of long text generation.

[0151] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0152] The scope of this application is defined by the appended claims rather than the foregoing description, and is therefore intended to encompass all variations falling within the meaning and scope of equivalents of the claims. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device in software or hardware. Terms such as "first," "second," etc., are used only for distinguishing descriptions and do not indicate any particular order, nor should they be construed as indicating or implying relative importance.

[0153] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily made by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims, and the above embodiments should be regarded as exemplary and non-limiting.

Claims

1. A long text generation system with multi-agent collaboration and dynamic feedback, characterized in that, include: The director agent is used to receive the theme or outline input by the user, plan and schedule the long text generation process, generate and issue text generation instructions and text modification instructions to the writer agent, coordinate the interaction between the writer agent and the evaluation agent, and adjust the generation strategy for long text generation based on the evaluation results of the evaluation agent. The writer agent, connected to the director agent, is used to generate text content according to the text generation instructions and to modify the text content according to the text modification instructions. An evaluation agent, connected to the director agent, is used to perform multi-dimensional quality evaluation of the text content generated by the writer agent and to feed the evaluation results back to the director agent. A memory bank, connected to the director agent, is used to store historical generation information and global setting information during the generation process, and to provide relevant contextual information to the writer agent when generating long texts.

2. The long text generation system according to claim 1, characterized in that, The director agent includes: The process planning module is used to parse the user-input topic or initial outline and determine the corresponding text generation tasks, which include outline generation tasks, chapter generation tasks, and feedback-based text correction tasks. The task scheduling module is used to assign the text generation task to the writer agent and receive the evaluation result from the evaluation agent. The strategy adjustment module is used to dynamically adjust the generation strategy for long text generation based on the evaluation results.

3. The long text generation system according to claim 1, characterized in that, The writer's intelligent agent includes: The plot planning module is used to generate chapter outlines based on the instructions of the director agent; The text generation module is used to generate chapter content based on the chapter outline and the context information provided in the memory. The self-correction module is used to make partial or overall corrections to the content of the chapter based on the feedback information from the evaluation agent.

4. The long text generation system according to claim 1, characterized in that, The evaluation agent includes: The multi-dimensional analysis module is used to analyze the text content generated by the writer's intelligent agent item by item on multiple preset scoring dimensions to obtain the analysis results of each scoring dimension. The scoring dimensions include at least one of plot coherence, character consistency, theme consistency, language style and readability, and innovation. The quantification and suggestion module is used to generate quantified scores and corresponding optimization suggestions for each scoring dimension based on the analysis results, and to feed the quantified scores and optimization suggestions back to the director agent; The report generation module is used to generate an analysis report based on the analysis results. The analysis report includes the analysis conclusions and comprehensive evaluation of each scoring dimension.

5. The long text generation system according to claim 1, characterized in that, The memory bank includes: The context storage module is used to store recent text information and current task context information during the generation process to ensure the local coherence of the long text generation process. The global knowledge storage module is used to store the global setting information required for long text generation in the form of structured data, and to interact with the director agent to realize the retrieval and updating of the global setting information.

6. The long text generation system according to claim 3, characterized in that, When the generated chapter content needs to be modified, the director agent sends the optimization suggestions fed back by the evaluation agent to the writer agent. After the writer agent completes the modification of the chapter content, the director agent parses the modified chapter content and updates it to the knowledge graph in the memory bank.

7. The long text generation system according to claim 3, characterized in that, When the generated chapter outline needs to be modified, the director agent calls the writer agent to regenerate the chapter outline and submits it to the evaluation agent for evaluation. If the evaluation is successful, the director agent discards the chapter content generated based on the original chapter outline. When generating new chapter content based on the newly generated chapter outline, the director agent uses the enhanced generation mechanism to call the updated knowledge graph to ensure that the newly generated chapter content is consistent with the newly generated chapter outline and the global setting information.

8. The long text generation system according to claim 1, characterized in that, The director agent takes the quantitative scores and optimization suggestions of each scoring dimension fed back by the evaluation agent as input through a pre-trained mapping model and / or heuristic rules to generate a corresponding generation strategy. The generation strategy includes parameter configuration and logical rules for controlling the long text generation process. During the iterative process of long text generation, the director agent dynamically adjusts the generation strategy based on the feedback from the evaluation agent, and stores the generation strategy that meets the preset conditions as determined by the evaluation results into the generation strategy library, so as to be called first in subsequent text generation tasks, thereby achieving continuous optimization.

9. The long text generation system according to claim 1, characterized in that, After receiving the multi-dimensional evaluation results of the chapter outline from the evaluation agent, if the score of the chapter outline does not meet the preset threshold, the director agent adjusts the generation strategy and guides the writer agent to modify the chapter outline based on the adjusted generation strategy until the score of the chapter outline meets the preset threshold.

10. A method for generating long text based on the multi-agent collaboration and dynamic feedback long text generation system according to any one of claims 1-9, characterized in that, The method includes: Receive user input for a topic or outline; The director agent plans and schedules the long text generation process, generates and issues text generation and text modification instructions to the writer agent, and coordinates the interaction between the writer agent and the evaluation agent. The writer agent generates text content according to the text generation instructions, and modifies the text content based on the text modification instructions; The evaluation agent performs a multi-dimensional quality assessment of the text content generated by the writer agent and feeds the assessment results back to the director agent. The memory bank stores historical generation information and global setting information during the generation process, and provides context information to the writer agent during the long text generation process; The director agent dynamically adjusts the generation strategy based on the evaluation results of the evaluation agent, and applies the generation strategy during the iterative process of long text generation to achieve continuous optimization of long text generation.

Citation Information

Patent Citations

  • Video generation method and electronic equipment

    CN119600156A

  • Large model knowledge base construction and retrieval method for complex long text

    CN120046710A

  • Two-stage long text report generation method and system

    CN120337867A

  • RAG-based memory enhanced script generation agent system

    CN120337981A

  • Strong association control method for long text streaming conversion

    CN120524919A

Cited By

  • Memory enhancement and multi-agent collaborative generative engine optimization method and system

    CN121859960A