Document generation system and method based on multi-agent collaboration
By using a multi-agent collaborative document generation system, deep learning and graph theory algorithms are employed to optimize the document generation process, solving the problems of time-consuming, labor-intensive, and quality-unreliable traditional document generation. This enables efficient and personalized document generation, meeting complex business needs.
Patent Information
- Application Number
- CN202510958382.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-11-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional document generation methods are time-consuming and labor-intensive, and it is difficult to guarantee consistency and quality. Simple template filling cannot meet complex business needs, and the generated documents lack flexibility and depth. Existing large-scale models generate documents that lack clear structure and practicality.
This document generation system employs multi-agent collaboration. It understands user needs through deep learning models and generates documents using a multi-agent collaborative approach. This includes a user interaction agent, a task planning agent, a strategy coordination agent, a task orchestration and execution module, and a monitoring and feedback module. It combines graph theory and search algorithms to optimize task execution and performs syntax and format verification, thereby achieving personalized and efficient document generation.
It significantly improves the personalization and accuracy of document generation, enhances the efficiency and quality of document generation, ensures that documents meet user needs and industry standards, and strengthens the professionalism and readability of documents.
Smart Images

Figure CN120994820A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence and automated document generation, and particularly relates to a document generation system and method based on multi-agent collaboration. BACKGROUND
[0002] In traditional document generation processes, human writing or simple template filling are usually relied on. These methods have obvious limitations. Human writing is time-consuming and labor-intensive, and it is difficult to ensure consistency and quality in large-scale generation. Although simple template filling can quickly generate documents, the generated documents often lack flexibility and depth, and cannot meet complex and variable business needs.
[0003] With the development of artificial intelligence technology, especially the emergence of large models, new opportunities have been brought to the field of document generation. Large models have the ability to understand and generate natural language through deep learning and massive data training. In existing technologies, large models usually need a large amount of context information to generate high-quality documents, but in actual applications, only limited information input can be provided. The generated documents lack clear structure and logic, and are difficult to meet the format requirements of professional documents; and the content of the generated documents is often out of touch with actual business needs, lacking practicality and pertinence. SUMMARY
[0004] The purpose of the present application is to provide a document generation system and method based on multi-agent collaboration, which combines the actual use of business and the ability of large models, uses the multi-agent (Agent) collaboration method, and puts the large model in the right place to improve the quality of document generation.
[0005] The technical solution adopted by the present application is:
[0006] A document generation method based on multi-agent collaboration, comprising the following steps:
[0007] Step 1, user interaction and demand analysis: understanding and extracting high-level semantic information of user input text through a deep learning model, and dynamically generating questions to guide the user to clarify the demand and form a detailed document demand;
[0008] Specifically, the user interaction agent uses a deep learning model such as BERT or GPT to understand and extract high-level semantic information in the user input. Through a sequence-to-sequence (Seq2Seq) model, questions are dynamically generated to guide the user to clarify the demand, and are integrated into a detailed document demand.
[0009] Step 2, task planning and strategy coordination: identify the theme and key elements of the document from the detailed document requirements; determine the optimal order of task execution based on the shortest path algorithm, while predicting and solving potential conflicts in task execution through parallel processing and search algorithms, and forming an optimized task plan through a feedback loop;
[0010] Specifically, the task planning agent identifies the theme and key elements of the requirement document using text analysis techniques such as the LDA topic model. The shortest path algorithm in graph theory is applied to determine the optimal order of task execution. The strategy coordination agent solves potential conflicts in task execution through parallel processing and search algorithms, and optimizes the task plan through a feedback loop.
[0011] Step 3, task orchestration and execution: generate a document outline based on user requirements, retrieve associated content for chapter writing based on the document outline, and finally write chapter content that has passed syntax and format checks to form a preliminary document;
[0012] Specifically, the task orchestration and execution module dynamically mobilizes the demand analysis agent, outline writing agent, chapter writing agent, data search agent, and content verification agent. The outline writing agent uses a graph neural network (GNN) model to generate a document outline. The chapter writing agent uses a Seq2Seq model to write chapter content in combination with the results of the outline and data search agent. The data search agent uses search engine algorithms and data mining techniques to retrieve relevant information. The content verification agent uses a BERT-based model for syntax, format, and content verification.
[0013] Step 4, monitoring feedback and self-adjustment: define document quality evaluation indicators based on user requirements and industry standards and perform document quality evaluation on the preliminary document; when the evaluation is passed, the document is fed back to the user; when the evaluation is not passed, the parameters are self-adjusted and step 2 is executed to regenerate the document content;
[0014] Specifically, the monitoring feedback module automatically evaluates the task execution results through the evaluation and feedback agent. If the evaluation is passed, the document is fed back to the user through the user interaction agent. If the evaluation is not passed, the evaluation results are fed back to the task planning agent for self-adjustment. The supervision module maintains the task execution state to ensure task intelligent management.
[0015] Step 5, document generation and output: generate a complete final document and present it to the user, completing the document generation.
[0016] That is, integrate the work results of all agents to generate a complete document. The user interaction agent presents the final document to the user, completing the document generation process.
[0017] Further, step 1 specifically includes the following steps:
[0018] Step 1-1, according to the user's initial requirements, through keyword matching and semantic analysis, select the corresponding preset question template to generate targeted questions;
[0019] Further, in step 1-1, according to the common document generation requirements, design templates covering various questions, including theme, content range, format requirements, word limit, and other key information.
[0020] Specifically, when the user inputs the initial requirements, the system uses NLP technology to analyze the semantics of the user input, selects the most relevant question template from the question template library according to the analysis results, and dynamically generates specific questions. For example, if the user inputs "write an article about the application of artificial intelligence in the medical field", the system will analyze that the theme is "application of artificial intelligence in the medical field", and then generate the question "do you want to focus on the application of artificial intelligence in medical diagnosis, treatment, or nursing?"
[0021] Step 1-2, refine the question according to the user's answer, until the complete document requirement is obtained.
[0022] Specifically, support multi-round dialogue, refine the question according to the user's answer, until the complete document requirement is obtained. For example, if the user answers "medical diagnosis", the system will further ask "which specific artificial intelligence diagnosis technologies do you want to introduce, such as medical image analysis, disease prediction, etc." Through this multi-round dialogue, gradually guide the user to clarify the document content requirements.
[0023] Further, the specific steps of determining the optimal order of task execution in step 2 are as follows:
[0024] Step 2-1-1, decompose the document generation task into multiple sub-tasks (such as outline writing, chapter writing, content verification, etc.), and represent the sub-tasks as nodes in the graph; according to the dependency relationship between sub-tasks (such as outline writing must be completed before chapter writing), construct a task dependency graph;
[0025] Step 2-1-2, define the state of each sub-task, including not started, in progress, and completed; the transition of sub-task state is triggered by the completion of the sub-task;
[0026] Step 2-1-3, set the reward value according to the quality and efficiency of task completion.
[0027] Specifically, for example, give a higher reward for high-quality completed sub-tasks; give a negative reward for task rollback due to errors. The specific reward value can be adjusted according to the importance and difficulty of the task.
[0028] Step 2-1-4, based on historical task data and task dependency relationships, calculate state transition probabilities; for example, by analyzing the success rate and failure rate of subtasks in past similar tasks, and the degree of dependency between subtasks, estimate the transition probabilities between states in the current task.
[0029] Step 2-1-5, use Dijkstra algorithm or A * algorithm, etc. graph theory algorithm, combined with rewards and state transition probabilities, calculate the optimal path from the beginning to the end of the task, form the optimal order of task execution.
[0030] The calculation formula of the optimal path is:
[0031] Where V(s) is the value function of the state, R(s, a) is the reward of executing action a in state s, P(s'|s, a) is the state transition probability, γ is the discount factor, and s' is the next state after action execution.
[0032] Further, the specific steps of predicting and solving potential conflicts in task execution in step 2 are as follows:
[0033] Step 2-2-1, conflict detection: during task execution, real-time monitoring of conflicts such as resource competition and data dependency between agents. For example, when multiple agents simultaneously request access to the same data source, a conflict is detected.
[0034] Step 2-2-2, design heuristic function: define heuristic function h(n) to estimate the cost from current node n to target node. For example, according to the priority of the task, the remaining workload and other factors, design the heuristic function to preferentially solve the conflict of high priority tasks.
[0035] Step 2-2-3, cost calculation: calculate the total estimated cost f(n) = g(n) + h(n) of the node, where g(n) is the actual cost from the starting point to node n, and h(n) is the heuristic estimated cost from node n to the target; the actual cost can be calculated according to the execution time, resource consumption, etc. of the task.
[0036] Step 2-2-4, conflict resolution path search: use A * algorithm to search for the optimal path from the current conflict state to the conflict-free state according to the total estimated cost f(n). In the search process, dynamically adjust the task execution order and resource allocation of each agent to solve the conflict.
[0037] Step 2-2-5, conflict resolution strategy execution: execute the conflict resolution strategy according to the optimal path searched, to ensure the smooth progress of the task. For example, adjust the task execution order, allocate additional resources or redistribute tasks to ensure the smooth progress of the task.
[0038] Further, step 3 specifically includes the following steps:
[0039] Step 3-1, using a graph neural network (GNN) model to generate a document outline based on user requirements;
[0040] Step 3-2, using a search engine algorithm combined with data mining techniques to search for data and information related to the document topic, and using cosine similarity to measure the similarity between the demand content and the query data;
[0041] Step 3-3, according to the similarity calculation result, filter out the most relevant data to the user's demand, and integrate and preprocess the data for direct use by chapter writing;
[0042] Step 3-4, using the GPT model on the basis of the document outline to write the content of the document chapters combined with the most relevant data searched;
[0043] Step 3-5, checking the generated document outline and chapter content for grammar, format, and content, and adjusting the model parameters to regenerate the document according to the verification results to ensure that the document meets the user's requirements and industry standards to form a preliminary document.
[0044] Further, step 3-5 specifically includes the following steps:
[0045] Step 3-5-1, feedback collection: collect and organize the grammar and format verification results (such as syntax errors, format problems, semantic consistency problems, etc.) to form feedback information;
[0046] Step 3-5-2, online learning update: using the FTRL online learning algorithm to update the model parameters of each agent in real time according to the feedback information; for example, for syntax errors, adjust the parameters of the syntax generation model; for format problems, optimize the format generation rules; for semantic consistency problems, adjust the semantic representation of the content generation model.
[0047] Step 3-5-3, each agent regenerates the content according to the updated model parameters and performs verification again, through multiple iterations of optimization, gradually improving the quality of the document content, until meeting the user's requirements and industry standards.
[0048] Further, step 4 specifically includes the following steps:
[0049] Step 4-1, quality evaluation index definition: according to user requirements and industry standards, define document quality evaluation indexes (such as content accuracy, completeness, logicality, format specification, etc.). For example, measure the accuracy of the content by the semantic similarity with the user's requirements, and evaluate the completeness of the document by checking whether it contains all necessary parts.
[0050] Step 4-2, Model Building: Use machine learning algorithm SVM to build a document quality evaluation model. Train the evaluation model to enable it to automatically evaluate document content based on defined quality evaluation indicators.
[0051] Step 4-3, Model Evaluation: Input the generated document content into the evaluation model, and determine whether the document meets the quality requirements based on the output results of the evaluation model. For example, if the accuracy score output by the evaluation model is below the threshold, it is considered that the document content needs to be further optimized.
[0052] Step 4-4, Feedback and Adjustment: When the evaluation result is not passed, adjust the task planning strategy based on the feedback information formed from the evaluation result to regenerate the document content; when the evaluation result is passed, feedback the document result to the user.
[0053] A document generation system based on multi-agent collaboration includes the following modules:
[0054] Task planning and coordination module: used to form detailed document requirements according to requirements, convert document requirements into task steps, and develop corresponding execution strategies and task arrangements; predict and solve potential conflicts in task execution while synchronously executing tasks in parallel mode;
[0055] Task arrangement and execution module: used to generate document outlines by calling associated tools according to task arrangements, retrieve associated content required for writing document chapter content, and perform syntax and format checks on written chapter content to form a preliminary document;
[0056] Monitoring and feedback module: define document quality evaluation indicators based on user requirements and industry standards, and perform document quality evaluation on the preliminary document; when the evaluation is passed, feedback the document to the user; when the evaluation is not passed, regenerate the document content after self-adjustment of parameters until the user requirements and industry standards are met.
[0057] Document generation and output module: used to generate complete final documents and present them to users.
[0058] Further, the task planning and coordination module includes a user interaction agent, a task planning agent, a strategy collaboration agent, and a task intelligent manager; the user interaction agent is used to understand and extract high-level semantic information of user input text through a deep learning model, and dynamically generate questions to guide users to clarify requirements and form detailed document requirements; the task planning agent is used to convert user requirements into task steps, and develop corresponding execution strategies and arrange tasks; the strategy collaboration agent is used to synchronously execute tasks in parallel processing mode, while predicting and solving potential conflicts in task execution; the task intelligent manager is used to maintain and manage the execution status of each task.
[0059] Further, the task orchestration execution module includes a requirement analysis agent, an outline writing agent, a chapter writing agent, a data search agent, and a content verification agent; the outline writing agent uses a graph neural network (GNN) model, such as GCN or GraphSAGE, to generate a document outline according to user requirements; the data search agent uses a search engine algorithm combined with data mining technology to search for data and information associated with the document theme, and uses cosine similarity to measure the similarity between the document requirement content and the query data to obtain the most relevant associated content; the chapter writing agent uses a generation model (using a GPT model, such as a GPT model) to write document chapter content based on the results obtained by the outline writing agent and the associated content retrieved by the data search agent; the content verification agent verifies the generated content for syntax, format, and content to ensure that the document meets user requirements and industry standards.
[0060] Further, the monitoring feedback module includes an evaluation and feedback agent and a monitoring module; the feedback agent uses an online learning (Online Learning) strategy, such as Follow-the-Regularized-Leader (FTRL), to automatically return the verification results to the various agents (requirement analysis agent, outline writing agent, chapter writing agent, data search agent) of the task orchestration execution module to continuously optimize their content until the document content is complete; the monitoring module is used to obtain the status of each task execution and maintain the task intelligence manager to the task planning and coordination module.
[0061] Further, the system also includes an atomic tool layer and a data layer; the atomic tool layer includes a knowledge base recall tool, a word analysis tool, a third-party API interface tool, etc.; the data layer is responsible for storing, managing, and retrieving data and information required for document generation to ensure data availability and consistency. The atomic tool layer and data layer modules are key infrastructure that supports the entire document generation system and provide data support for the task scheduling agent.
[0062] The present application adopts the above technical solution, through the cooperative work of the user interaction agent and the task planning agent, the high-level semantic information in the text is extracted by using the pre-training model such as BERT or GPT, so as to more accurately understand the user's demand. Through task analysis and task decomposition, the system can convert the user's demand into specific task steps, and formulate the optimal execution strategy, which significantly improves the individualization and accuracy of document generation. Through the application of the strategy coordination agent, the optimal order of task execution is determined by using the shortest path algorithm in graph theory, and the potential conflicts in task execution are solved by parallel processing and search algorithm. This strategy coordination mechanism makes the task execution more efficient, and the resource allocation more reasonable, thereby improving the overall efficiency of document generation. Through the introduction of the monitoring feedback module, real-time monitoring and evaluation of the task execution state are realized. The evaluation and feedback agent can automatically perform evaluation and feed back the results to the task planning agent, realizing self-adjustment of document output. This closed-loop monitoring feedback mechanism ensures the quality of document generation and improves user satisfaction. Through the use of the data search agent, combined with search engine algorithm and data mining technology, the data and information related to the document theme can be quickly and accurately retrieved. The cosine similarity is used to measure the similarity between the demand content and the query data, further improving the accuracy of information retrieval, so that the generated document content is more rich and accurate.
[0063] The present application introduces the content verification agent, uses the BERT-based natural language verification model for syntax and format verification, ensures the accuracy of the document content. At the same time, online learning strategies such as FTRL are adopted, the verification results are automatically fed back to the relevant agents, the content is continuously optimized until the document content output is complete, which significantly improves the professionalism and readability of the document. BRIEF DESCRIPTION OF DRAWINGS
[0064] The present application will be further described in detail below in combination with the drawings and specific embodiments.
[0065] Figure 1 The present application is a schematic diagram of the architecture of a document generation method based on multi-agent collaboration. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application.
[0067] As shown in Figure 1 The present application discloses a document generation method based on multi-agent collaboration, which includes the following steps:
[0068] Step 1, User Interaction and Requirement Analysis: Understand and extract high-level semantic information from user input text through deep learning models, and dynamically generate questions to guide users to clarify requirements and form detailed document requirements;
[0069] Specifically, the user interaction agent uses deep learning models such as BERT or GPT to understand and extract high-level semantic information from user input. Through the sequence-to-sequence (Seq2Seq) model, dynamically generate questions to guide users to clarify requirements, and integrate into detailed document requirements.
[0070] Step 2, Task Planning and Strategy Coordination: Identify the theme and key elements of the document from the detailed document requirements; determine the optimal order of task execution based on the shortest path algorithm, while predicting and solving potential conflicts in task execution through parallel processing and search algorithms, and forming an optimized task plan through a feedback loop;
[0071] Specifically, the task planning agent uses text analysis techniques such as LDA topic models to identify the theme and key elements of the requirement document. Apply the shortest path algorithm in graph theory to determine the optimal order of task execution. The strategy coordination agent solves potential conflicts in task execution through parallel processing and search algorithms, and optimizes the task plan through a feedback loop.
[0072] Step 3, Task Scheduling and Execution: Generate a document outline based on user requirements, retrieve associated content based on the document outline to write chapter content, and finally write chapter content after grammar and format verification to form a preliminary document;
[0073] Specifically, the task scheduling and execution module dynamically mobilizes the requirement analysis agent, outline writing agent, chapter writing agent, data search agent, and content verification agent. The outline writing agent uses a graph neural network (GNN) model to generate a document outline. The chapter writing agent combines the outline and the results of the data search agent, and uses the Seq2Seq model to write chapter content. The data search agent uses search engine algorithms and data mining techniques to retrieve relevant information. The content verification agent uses a BERT-based model for grammar, format, and content verification.
[0074] Step 4, Monitoring Feedback and Self-Adjustment: Define document quality evaluation indicators based on user requirements and industry standards and perform document quality evaluation on the preliminary document; when the evaluation is passed, the document is fed back to the user; when the evaluation is not passed, then perform parameter self-adjustment and execute step 2 to regenerate the document content;
[0075] Specifically, the monitoring feedback module assesses the automatic assessment of task execution results by the feedback agent. If the assessment is passed, the document is fed back to the user through the user interaction agent. If the assessment is not passed, the assessment result is fed back to the task planning agent for self-adjustment. The supervision module maintains the task execution state and ensures intelligent management of the task.
[0076] Step 5, document generation and output: generate a complete final document and present it to the user, complete the document generation.
[0077] That is, integrate the work results of all agents to generate a complete document. The user interaction agent presents the final document to the user, completing the document generation process.
[0078] Further, step 1 specifically includes the following steps:
[0079] Step 1-1, according to the user's initial requirements, through keyword matching and semantic analysis, select the corresponding preset problem template to generate targeted questions;
[0080] Further, in step 1-1, according to common document generation requirements, templates covering a variety of questions are designed, including theme, content range, format requirements, word limit, and other key information.
[0081] Specifically, when the user inputs the initial requirements, the NLP technology is used to analyze the semantics of the user input, and according to the analysis result, the most relevant problem template is selected from the problem template library, and the specific question is dynamically generated. For example, if the user inputs "write an article about the application of artificial intelligence in the medical field", the system will analyze that the theme is "application of artificial intelligence in the medical field", and then generate the question "do you want to focus on the application of artificial intelligence in medical diagnosis, treatment, or nursing?"
[0082] Step 1-2, refine the question according to the user's answer step by step until the complete document requirement is obtained.
[0083] Specifically, support multi-round dialogue, refine the question according to the user's answer step by step until the complete document requirement is obtained. For example, if the user answers "medical diagnosis", the system will further ask "which specific artificial intelligence diagnosis technologies do you want to introduce, such as medical image analysis, disease prediction, etc." Through this multi-round dialogue, the user is guided to clearly define the document content requirements.
[0084] Further, the specific steps for determining the optimal order of task execution in step 2 are as follows:
[0085] Step 2-1-1, decompose the document generation task into multiple subtasks (such as outline writing, chapter writing, content checking, etc.), and represent the subtasks as nodes in the graph; according to the dependency relationship between subtasks (such as outline writing is completed before chapter writing), build a task dependency graph;
[0086] Step 2-1-2, define the state of each subtask, including not started, in progress, completed; the transition of subtask state is triggered by the completion of subtask;
[0087] Step 2-1-3, set the reward value according to the quality and efficiency of task completion.
[0088] Specifically, for example, for high-quality completed subtasks, give higher rewards; for the case of task rollback due to errors, give negative rewards. The specific reward value can be adjusted according to the importance and difficulty of the task.
[0089] Step 2-1-4, based on historical task data and task dependency relationship, calculate state transition probability; for example, by analyzing the success rate and failure rate of subtask completion in past similar tasks, and the degree of dependence between subtasks, estimate the transition probability between states in the current task.
[0090] Step 2-1-5, use Dijkstra algorithm or A * algorithm, etc. graph theory algorithm, combined with reward and state transition probability, calculate the optimal path from task start to end, form the optimal order of task execution.
[0091] The calculation formula of the optimal path is:
[0092] Where V(s) is the state value function, R(s,a) is the reward of executing action a in state s, P(s'|s,a) is the state transition probability, γ is the discount factor, and s' is the next state after action execution.
[0093] Further, the specific steps of predicting and solving potential conflicts in task execution in step 2 are as follows:
[0094] Step 2-2-1, conflict detection: in the process of task execution, real-time monitoring of conflicts such as resource competition and data dependency between agents. For example, when multiple agents request access to the same data source at the same time, a conflict is detected.
[0095] Step 2-2-2, design heuristic function: define the heuristic function h(n) to estimate the cost from the current node n to the target node. For example, according to the priority of the task, the remaining workload and other factors, design the heuristic function to preferentially solve the conflicts of high-priority tasks.
[0096] Step 2-2-3, cost calculation: Calculate the total estimated cost f(n) of the node, where g(n) is the actual cost from the starting point to node n, and h(n) is the heuristic estimated cost from node n to the target; The actual cost can be calculated according to the execution time of the task, resource consumption, etc.
[0097] Step 2-2-4, conflict resolution path search: Use A * algorithm to search for the optimal path from the current conflict state to the conflict-free state according to the total estimated cost f(n). During the search process, dynamically adjust the task execution order and resource allocation of each agent to solve the conflict.
[0098] Step 2-2-5, conflict resolution strategy execution: Execute the conflict resolution strategy according to the optimal path searched, and ensure the smooth progress of the task. For example, adjust the task execution order, allocate additional resources, or reassign tasks to ensure the smooth progress of the task.
[0099] Further, step 3 specifically includes the following steps:
[0100] Step 3-1, adopt a graph neural network (GNN) model to generate a document outline according to user requirements;
[0101] Step 3-2, use search engine algorithms combined with data mining techniques to retrieve data and information related to the document topic, and use cosine similarity to measure the similarity between the demand content and the query data;
[0102] Step 3-3, filter out the most relevant data to user requirements according to the similarity calculation results, and integrate and preprocess the data for direct use by chapter writing;
[0103] Step 3-4, use the GPT model to write document chapter content based on the document outline and the most relevant data searched;
[0104] Step 3-5, check the generated document outline and chapter content for grammar, format, and content, and adjust the model parameters according to the verification results to regenerate the document, ensuring that the document meets user requirements and industry standards to form a preliminary document.
[0105] Further, step 3-5 specifically includes the following steps:
[0106] Step 3-5-1, feedback collection: Collect and organize grammar and format verification results (such as syntax errors, format problems, semantic consistency problems, etc.) to form feedback information;
[0107] Step 3-5-2, online learning update: using FTRL online learning algorithm to update the model parameters of each agent in real time according to feedback information; for example, adjusting the parameters of the grammar generation model for syntax errors; optimizing the format generation rules for format problems; adjusting the semantic representation of the content generation model for semantic consistency problems.
[0108] Step 3-5-3, each agent re-generates content according to the updated model parameters and checks again, through multiple iterations of optimization, gradually improving the quality of the document content until meeting user requirements and industry standards.
[0109] Further, step 4 specifically includes the following steps:
[0110] Step 4-1, quality evaluation index definition: according to user requirements and industry standards, define document quality evaluation indexes (such as content accuracy, completeness, logicality, format specification, etc.). For example, measure the accuracy of the content by the semantic similarity with the user's requirements, and evaluate the completeness of the document by checking whether it contains all necessary parts.
[0111] Step 4-2, evaluation model construction: using machine learning algorithm SVM to construct document quality evaluation model. Through training the evaluation model, it can automatically evaluate the document content according to the defined quality evaluation indexes.
[0112] Step 4-3, model evaluation: input the generated document content into the evaluation model, and judge whether the document meets the quality requirements according to the output results of the evaluation model. For example, if the accuracy score output by the evaluation model is lower than the threshold, it is considered that the document content needs to be further optimized.
[0113] Step 4-4, feedback and adjustment: when the evaluation result does not pass, adjust the task planning strategy according to the feedback information formed by the evaluation result to re-generate the document content; when the evaluation result passes, feedback the document result to the user.
[0114] A document generation system based on multi-agent collaboration, which includes the following modules:
[0115] Task planning and coordination module: used to form detailed document requirements according to requirements, convert document requirements into task steps, and develop corresponding execution strategies and task arrangement; predict and solve potential conflicts in task execution while synchronously executing tasks in parallel mode;
[0116] Task arrangement and execution module: used to call associated tools to generate document outline according to task arrangement, retrieve associated content needed for writing document chapter content; perform syntax and format checking on written chapter content to form a preliminary document;
[0117] Monitoring feedback module: define document quality evaluation indicators according to user needs and industry standards and evaluate the preliminary document; when the evaluation is passed, the document is fed back to the user; when the evaluation fails, the parameters are self-adjusted and the document content is regenerated until the user needs and industry standards are met.
[0118] Document generation and output module: used to generate complete final documents and present them to users.
[0119] Further, the task planning coordination module includes a user interaction agent, a task planning agent, a strategy coordination agent, and a task intelligent manager.
[0120] (1) The user interaction agent is used to understand and extract high-level semantic information of the user input text through a deep learning model, and dynamically generate questions to guide the user to clarify the demand and form detailed document requirements. Specifically, the user interaction agent uses a deep learning model such as BERT or GPT to extract high-level semantic information in the text to more accurately understand the user's needs. The main steps of this module include:
[0121] Interactive question generation: use GPT model to dynamically generate questions to guide users to clarify their needs. The specific implementation is:
[0122] a. Question template library construction: according to common document generation needs, design templates covering a variety of questions, including theme, content range, format requirements, word limit, etc. According to the user's initial demand, the agent selects the appropriate template and fills in the relevant variables through keyword matching and semantic analysis to generate targeted questions.
[0123] b. Question optimization mechanism: when the user inputs the initial demand, use NLP technology to analyze the semantics of the user input, select the most relevant question template from the question template library according to the analysis results, and dynamically generate specific questions. For example, if the user inputs "write an article about the application of artificial intelligence in the medical field", the system will analyze that the theme is "application of artificial intelligence in the medical field", and then generate the question "Do you want to focus on the application of artificial intelligence in medical diagnosis, treatment, or care?"
[0124] c. Multi-round dialogue management: support multi-round dialogue, gradually refine questions according to user answers until complete document requirements are obtained. For example, if the user answers "medical diagnosis", the system will further ask "Which specific artificial intelligence diagnosis technologies do you want to introduce? Such as medical image analysis, disease prediction, etc." Through this multi-round dialogue, the user's document content requirements are gradually clarified.
[0125] (2) Demand analysis: In this invention, BERT model is applied for deep semantic understanding, extracting key information from user's answers and integrating into detailed document requirements. The specific implementation is as follows:
[0126] a. Text preprocessing: Tokenization, stop word removal and other preprocessing operations are performed on user's answers to reduce noise information interference to semantic understanding and better extract key information.
[0127] b. Semantic vectorization: The preprocessed text is input into the BERT model to obtain the context-related vector representation of each word. The vectors are aggregated using weighted summation to obtain the semantic vector of the entire text.
[0128] c. Key information extraction: The pre-trained Named Entity Recognition (NER) model and keyword extraction algorithm are used to extract key topics, technical terms, specific requirements and other key information from the semantic vector. For example, from the user's answer "focus on medical image analysis technology of artificial intelligence in medical diagnosis", extract "artificial intelligence", "medical diagnosis", "medical image analysis" and other key information.
[0129] d. Requirement integration: The extracted key information is integrated according to the document structure to generate a detailed document requirement description. For example, the generated requirement description is "document theme: application of artificial intelligence in medical diagnosis; focus content: medical image analysis technology; target audience: medical industry professionals; word count requirement: about 3000 words; document format: academic paper format".
[0130] The user interaction agent uses deep learning models such as BERT or GPT to extract key information from user's answers and integrate into detailed document requirements. The application of deep learning models significantly improves the accuracy of user requirement understanding, enabling the system to more accurately capture user intent and requirements, providing accurate guidance for subsequent document generation.
[0131] (2) Task planning agent is used to convert user's requirements into task steps and formulate corresponding execution strategies and task scheduling; mainly including the following aspects:
[0132] Task analysis: Use text analysis techniques such as LDA topic model to identify the theme and key elements of the requirement document, and determine the theme content and focus content of the document by analyzing the user's requirement description.
[0133] Task decomposition: Apply the shortest path algorithm in graph theory to determine the optimal order of task execution. The specific implementation is as follows:
[0134] a. Task graph construction: Break down the document generation task into multiple subtasks (e.g., outline writing, chapter writing, content verification, etc.) and represent these subtasks as nodes in a graph. Construct a task dependency graph based on the dependencies between subtasks (e.g., chapter writing cannot be done until outline writing is complete).
[0135] b. State definition: Define the state of each subtask, including not started, in progress, completed, etc. State transitions are triggered by the completion of subtasks.
[0136] c. Reward setting: Set reward values based on the quality and efficiency of task completion. For example, give higher rewards for high-quality completed subtasks, and negative rewards for task rollback due to errors. Specific reward values can be adjusted according to the importance and difficulty of the task.
[0137] d. State probability value calculation: Calculate state transition probabilities based on historical task data and task dependencies. For example, by analyzing the success rate and failure rate of subtask completion in past similar tasks, and the degree of dependency between subtasks, estimate the transition probabilities between states in the current task.
[0138] e. Shortest path calculation: Use Dijkstra's algorithm or A * algorithm, etc. graph theory algorithm, combined with rewards and state transition probabilities, to calculate the optimal path from the beginning to the end of the task. The determination of the optimal path not only considers the order of task completion, but also considers the efficiency and quality of task completion. The formula is:
[0139] where V(s) is the state value function, R(s, a) is the reward of executing action a in state s, P(s'|s, a) is the state transition probability, γ is the discount factor, and s' is the next state after action execution.
[0140] (3) Strategy coordination agent is used for synchronous execution of tasks through parallel processing, while predicting and solving potential conflicts in task execution; task intelligent manager is used for maintaining and managing the execution state of each task. The specific implementation is:
[0141] a. Conflict detection: In the process of task execution, real-time monitoring of conflicts such as resource competition and data dependency between agents. For example, when multiple agents simultaneously request access to the same data source, a conflict is detected.
[0142] b. Heuristic function design: Define a heuristic function h(n) to estimate the cost from the current node n to the target node. For example, based on factors such as task priority, remaining workload, etc., design a heuristic function to prioritize the resolution of high-priority task conflicts.
[0143] c. Cost calculation: Calculate the total estimated cost f(n) = g(n) + h(n) of a node, where g(n) is the actual cost from the start to node n, and h(n) is the heuristic estimated cost from node n to the goal. The actual cost can be calculated based on the execution time, resource consumption, and other factors of the task.
[0144] d. Conflict resolution path search: Use A * algorithm to search for the optimal path from the current conflict state to the conflict-free state based on the total estimated cost f(n). During the search process, dynamically adjust the task execution order and resource allocation of each agent to resolve conflicts.
[0145] e. Conflict resolution strategy execution: Execute the conflict resolution strategy based on the optimal path found. For example, adjust the task execution order, allocate additional resources, or redistribute tasks to ensure smooth task execution
[0146] Feedback mechanism: Use a feedback loop to allow feedback information during task execution to be collected and used to optimize task planning.
[0147] The strategy coordination agent solves potential conflicts in task execution through parallel processing and search algorithms. Intelligent task planning and strategy coordination improve the efficiency and accuracy of task execution, reduce conflicts and errors during task execution, and ensure the quality and speed of document generation.
[0148] Further, the task orchestration execution module includes a requirement analysis agent, an outline writing agent, a chapter writing agent, a data search agent, and a content verification agent;
[0149] (1) The outline writing agent uses a graph neural network (GNN) model, such as GCN or GraphSAGE, to generate a document outline based on user requirements; the specific implementation is as follows:
[0150] a. Knowledge graph construction: Extract relevant concepts and entities from the knowledge base based on user requirements to construct a knowledge graph. For example, for technical document generation, extract relevant technical concepts, application scenarios, etc. from the technical knowledge base and construct a knowledge graph.
[0151] b. Node feature extraction: Use the GNN model to extract features of nodes in the knowledge graph to obtain vector representations of each node. Update the feature vector of the current node by aggregating the information of neighboring nodes to capture the semantic association between nodes.
[0152] c. Outline generation: Based on the extracted node features, generate a document outline through the aggregation and update operations of the graph neural network. The outline generation process can combine keywords and logical structures in user requirements to ensure the completeness and logicality of the outline.
[0153] d. Optimization and adjustment: Based on user feedback and the requirements of the task planning agent, the generated outline is optimized and adjusted. For example, according to the user's modification suggestions on the outline, the structure and content of the outline are adjusted to better meet the user's needs.
[0154] The outline writing agent uses a graph neural network (GNN) model, such as GCN or GraphSAGE, to generate a document outline based on user requirements. The use of GNN models enables the system to better understand and organize the document structure, generating a logical and reasonable document outline that lays a solid foundation for subsequent chapter content writing.
[0155] (2) Data search agent is used to search data and information associated with the document topic using search engine algorithms combined with data mining techniques, and use cosine similarity to measure the similarity between the document requirement content and the query data to obtain the most relevant associated content; the specific implementation is:
[0156] a. Keyword extraction: Use the BERT model to extract keywords from user requirement descriptions and outline content as query conditions for data search.
[0157] b. Data retrieval: Use search engine algorithms (such as inverted index, Boolean retrieval, etc.) combined with data mining techniques (such as clustering, classification, etc.) to retrieve data and information related to keywords from data sources. Data sources can include internal knowledge bases, external databases, the Internet, etc.
[0158] c. Similarity calculation: Calculate the similarity between the retrieved data and information and the user requirement content using the cosine similarity algorithm. By comparing the cosine value between the data vector and the requirement vector, the relevance of the data is determined. Data with high similarity will be preferentially recommended to the chapter writing agent.
[0159] d. Data filtering and integration: According to the similarity calculation results, filter out the most relevant data to the user requirements, and integrate and preprocess the data so that the chapter writing agent can directly use it. For example, format the data, remove duplicates, supplement missing information, etc.
[0160] (3) Chapter writing agent is used to write document chapter content based on the results obtained by the outline writing agent using a generation model (using a GPT model, such as GPT model) combined with the associated content retrieved by the data search agent; the specific implementation is:
[0161] a. Input preparation: The outline content generated by the outline writing agent and the relevant data retrieved by the data search agent are input into the GPT model.
[0162] b. Data encoding: The Transformer is used to encode the input outline content and data, generating a context vector. The decoder generates chapter content step by step based on the context vector. During the decoding process, the attention mechanism is used to focus on key information in the input, improving the relevance and accuracy of the generated content.
[0163] c. Content generation: The decoder generates document chapter content based on the context vector and attention weights. The generated content can include text descriptions, data interpretations, chart explanations, etc., adjusted according to user needs and document types.
[0164] d. Content optimization: Based on user feedback and content verification agent verification results, the generated chapter content is optimized and adjusted. For example, based on user comments on the content, adjust the expression method, data reference, etc. to improve the quality of the content.
[0165] (4) Content verification agent is used to check the syntax, format and content of the generated content to ensure that the document meets user needs and industry standards. The specific implementation is:
[0166] a. Syntax verification: input the generated document content into the BERT model, and through the model's context awareness ability, detect syntax errors in the text (such as sentence structure errors, tense errors, spelling errors, etc.). For example, by analyzing the grammatical relationship between words, identify unreasonable sentence structures.
[0167] b. Format verification: according to user needs and industry standards, define document format rules (such as title format, paragraph format, reference format, etc.). Use the BERT model to check the format of the generated document content to ensure that the document meets the predefined format requirements. For example, check if the title uses the correct font and size, and if the paragraph meets the layout specifications.
[0168] c. Semantic consistency verification: through the BERT model, the semantic analysis of the document content is performed to check whether the content is consistent with the user's needs, whether there are logical contradictions or semantic repetition, etc. For example, by comparing the semantic vector of the user's demand description and the semantic vector of the generated content, the relevance and consistency of the content are evaluated.
[0169] The content verification agent uses online learning strategies such as FTRL to automatically return verification results to related agents, constantly optimizing its own content. The application of online learning strategies enables the system to learn and adjust in real time, constantly improving the accuracy of content verification, ensuring that the generated document meets user needs and industry standards.
[0170] Feedback integration: Adopt online learning strategies such as Follow-the-Regularized-Leader (FTRL) to automatically return the verification results to the demand analysis agent, outline writing agent, chapter writing agent, and data search agent to continuously optimize their content until the document content output is complete. The specific implementation is as follows:
[0171] a. Feedback collection: The content verification agent collects and organizes the verification results (such as syntax errors, format issues, semantic consistency issues, etc.) to form feedback information.
[0172] b. Online learning update: Use the FTRL online learning algorithm to update the model parameters of each agent in real time based on feedback information. For example, for syntax errors, adjust the parameters of the syntax generation model; for format issues, optimize the format generation rules; for semantic consistency issues, adjust the semantic representation of the content generation model.
[0173] c. Iterative optimization: Each agent regenerates content based on the updated model parameters and performs verification again. Through multiple iterations of optimization, the quality of the document content is gradually improved until it meets user needs and industry standards.
[0174] Further, the monitoring feedback module includes an evaluation and feedback agent and a monitoring module; the evaluation and feedback agent automatically performs evaluation on the task scheduling agent execution generation result, if the evaluation passes, the document result is fed back to the user through the user interaction agent, if the evaluation does not pass, the evaluation result is fed back to the task planning agent, realizing self-adjustment of document output; the monitoring module is used to obtain the execution state of each task and maintain the task intelligent manager to the task planning coordination module. The specific implementation of content evaluation is as follows:
[0175] a. Quality evaluation index definition: According to user needs and industry standards, define document quality evaluation indexes (such as content accuracy, completeness, logicality, format specification, etc.). For example, measure the accuracy of the content by the semantic similarity with the user's needs, and evaluate the completeness of the document by checking whether the document contains all necessary parts.
[0176] b. Evaluation model construction: Use the machine learning algorithm SVM to construct a document quality evaluation model. Train the evaluation model so that it can automatically evaluate the document content according to the defined quality evaluation indexes.
[0177] c. Model evaluation: Input the generated document content into the evaluation model, and according to the output result of the evaluation model, judge whether the document meets the quality requirements. For example, if the accuracy score output by the evaluation model is lower than the threshold, it is considered that the document content needs to be further optimized.
[0178] d. Feedback and Adjustment: If the evaluation result does not pass, the evaluation result is fed back to the task planning agent, and the task planning agent adjusts the task planning strategy according to the feedback information to regenerate the document content. If the evaluation result passes, the document result is fed back to the user through the user interaction agent.
[0179] The automated monitoring feedback mechanism improves the self-adjustment ability of the system, ensures the quality and efficiency of the document generation process, and improves the user satisfaction.
[0180] Further, the system also includes an atomic tool layer and a data layer. The atomic tool layer and the data layer module are the key infrastructure supporting the entire document generation system, providing data support for the task scheduling agent. The atomic tool layer includes knowledge base recall tools, word analysis tools, third-party API interface tools, etc. The data layer is responsible for storing, managing and retrieving data and information required for document generation, ensuring data availability and consistency. The atomic tool layer and the data layer module are the key infrastructure supporting the entire document generation system, providing data support for the task scheduling agent.
[0181] The system of the present application realizes efficient generation of documents through the collaborative work of the user interaction agent, the task planning agent, the strategy coordination agent and the task intelligent manager and other modules. The system architecture of the present application improves the flexibility and scalability of the document generation process through modular design, so that the system can adapt to the needs of different users and generate personalized documents.
[0182] The application adopts the above technical scheme, through the cooperative work of the user interaction intelligent agent and the task planning intelligent agent, the high-level semantic information in the text is extracted by using a deep learning model such as a BERT or GPT pre-training model, so that the user's demand can be more accurately understood. Through task analysis and task decomposition, the system can convert the user's demand into specific task steps, and formulate the optimal execution strategy, which significantly improves the individualization and accuracy of document generation. Through the application of the strategy coordination intelligent agent, the shortest path algorithm in graph theory is used to determine the optimal order of task execution, and parallel processing and search algorithms are used to solve potential conflicts in task execution. This strategy coordination mechanism makes task execution more efficient and resource allocation more reasonable, thereby improving the overall efficiency of document generation. Through the introduction of the monitoring feedback module, real-time monitoring and evaluation of the task execution state are realized. The evaluation and feedback intelligent agent can automatically perform evaluation and feed back the results to the task planning intelligent agent, realizing self-adjustment of document output. This closed-loop monitoring feedback mechanism ensures the quality of document generation and improves user satisfaction. Through the use of the data search intelligent agent, combined with search engine algorithms and data mining technology, the data search intelligent agent can quickly and accurately retrieve data and information related to the document theme. The cosine similarity is used to measure the similarity between the demand content and the query data, further improving the accuracy of information retrieval, so that the generated document content is more rich and accurate.
[0183] The application introduces the content verification intelligent agent, uses a BERT-based natural language verification model for syntax and format verification to ensure the accuracy of the document content. At the same time, an online learning strategy such as FTRL is adopted to automatically feed back the verification results to the relevant intelligent agent, and the content is continuously optimized until the document content output is complete, which significantly improves the professionalism and readability of the document.
[0184] Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application is not intended to limit the scope of the claimed application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of protection of the present application.
Claims
1. A document generation method based on multi-agent collaboration, characterized in that: It includes the following steps: Step 1, User Interaction and Requirement Analysis: Using a deep learning model, we understand and extract high-level semantic information from the user's input text, and dynamically generate questions to guide users to clarify their requirements, thereby forming detailed document requirements. Step 2, Task Planning and Strategy Coordination: Identify the subject and key elements of the document from the detailed document requirements; determine the optimal order of task execution based on the shortest path algorithm; predict and resolve potential conflicts in task execution through parallel processing and search algorithms; and form an optimized task plan through a feedback loop. Step 3, Task Arrangement and Execution: Generate a document outline based on user needs, retrieve related content of document chapters based on the document outline to write chapter content; finally, the written chapter content is validated for grammar and format to form a preliminary document; Step 4, Monitoring Feedback and Self-Adjustment: Define document quality assessment indicators based on user needs and industry standards, and conduct a document quality assessment on the initial document; when the assessment passes, provide feedback to the user; when the assessment fails, perform parameter self-adjustment and then execute Step 2 to regenerate the document content; Step 5, Document Generation and Output: Generate the complete final document and present it to the user, completing the document generation process.
2. The document generation method based on multi-agent collaboration according to claim 1, characterized in that: Step 1 specifically includes the following steps: Step 1-1: Based on the user's initial input requirements, select the corresponding preset question template through keyword matching and semantic analysis to generate targeted questions; the preset question template includes information on topic, content scope, format requirements, and word count limits; Steps 1-2: Based on the user's answers, gradually refine the question and guide the user to clarify the document content requirements through multiple rounds of dialogue until the complete document requirements are obtained.
3. The document generation method based on multi-agent collaboration according to claim 1, characterized in that: The specific steps for determining the optimal order of task execution in step 2 are as follows: Step 2-1-1: Decompose the document generation task into multiple subtasks and represent the subtasks as nodes in the graph; construct a task dependency graph based on the dependencies between the subtasks. Step 2-1-2: Define the state of each subtask, including not started, in progress, and completed; the transition of subtask state is triggered by the completion status of the subtask. Step 2-1-3: Set reward values based on the quality and efficiency of task completion; adjust reward values according to the importance and difficulty of the task. Step 2-1-4: Calculate the state transition probability based on historical task data and task dependencies; Step 2-1-5: Using graph theory algorithms combined with rewards and state transition probabilities, calculate the optimal path from the start to the end of the task, forming the optimal order of task execution; the formula for calculating the optimal path is: Where V(s) is the value function of the state, R(s,a) is the reward for performing action a in state s, and P(s) is the reward for performing action a in state s. ′ |s,a) is the state transition probability, γ is the discount factor, and s ′ It is the next state after the action is executed.
4. The document generation method based on multi-agent collaboration according to claim 1, characterized in that: The specific steps for predicting and resolving potential conflicts in task execution in step 2 are as follows: Step 2-2-1, Conflict Detection: During task execution, monitor in real time the resource competition and data dependency conflicts between the agents; Step 2-2-2, Design a heuristic function: Define a heuristic function h(n) to estimate the cost from the current node n to the target node; that is, design a heuristic function based on the priority of tasks and the remaining workload to resolve conflicts of high-priority tasks first. Step 2-2-3, Cost Calculation: Calculate the total estimated cost of the node f(n) = g(n) + h(n), where g(n) is the actual cost from the starting point to node n, and h(n) is the heuristic estimated cost from node n to the target. Step 2-2-4, Conflict Resolution Path Search: Using A * The algorithm searches for the optimal path from the current conflict state to the conflict-free state based on the total estimated cost f(n); Step 2-2-5, Execution of conflict resolution strategy: Execute the conflict resolution strategy according to the optimal path found to ensure the smooth progress of the task.
5. The document generation method based on multi-agent collaboration according to claim 1, characterized in that: Step 3 specifically includes the following steps: Step 3-1: Use a graph neural network model to generate a document outline based on user needs; Step 3-2: Use search engine algorithms combined with data mining techniques to retrieve data and information related to the document topic, and use cosine similarity to measure the similarity between the required content and the query data; Step 3-3: Based on the similarity calculation results, filter out the data most relevant to user needs, and integrate and preprocess the data so that it can be used directly in chapter writing; Steps 3-4: Based on the document outline, use the GPT model and the most relevant search data to write the document chapter content; Steps 3-5 involve validating the generated document outline and chapter content for syntax, format, and content. Based on the validation results, the model parameters are adjusted to regenerate the document, ensuring that it meets user needs and industry standards to form a preliminary document.
6. The document generation method based on multi-agent collaboration according to claim 5, characterized in that: Steps 3-5 specifically include the following steps: Step 3-5-1, Feedback Collection: Collect and organize the results of grammar and format checks to form feedback information; Step 3-5-2, Online Learning and Update: The model parameters of each agent are updated in real time based on feedback information using the FTRL online learning algorithm; Step 3-5-3: Each agent regenerates content based on the updated model parameters and verifies it again. Through multiple iterations and optimizations, the quality of the document content is gradually improved until it meets user needs and industry standards.
7. The document generation method based on multi-agent collaboration according to claim 1, characterized in that: Step 4 specifically includes the following steps: Step 4-1, Define quality assessment indicators: Define document quality assessment indicators based on user needs and industry standards; Step 4-2, Evaluation Model Construction: Utilize the machine learning algorithm SVM to construct a document quality evaluation model; train the evaluation model to automatically evaluate document content based on defined quality evaluation metrics; Step 4-3, Model Evaluation: Input the generated document content into the evaluation model, and determine whether the document meets the quality requirements based on the output of the evaluation model; Step 4-4, Feedback and Adjustment: If the evaluation result is unsatisfactory, adjust the task planning strategy based on the feedback information generated from the evaluation result in order to regenerate the document content; if the evaluation result is satisfactory, provide the document result to the user.
8. A document generation system based on multi-agent collaboration, comprising a document generation method based on multi-agent collaboration according to any one of claims 1 to 7, characterized in that: The system includes the following modules: Task planning and coordination module: It is used to generate detailed document requirements based on needs, transform the document requirements into task steps, and formulate corresponding execution strategies and schedule tasks; while executing tasks synchronously in parallel, it predicts and resolves potential conflicts in task execution. Task orchestration and execution module: Used to call related tools to generate document outlines based on task orchestration, retrieve related content needed to write document chapters; and perform grammar and format checks on the written chapter content to form a preliminary document; Monitoring and feedback module: Define document quality assessment indicators based on user needs and industry standards and conduct document quality assessment on the initial document; when the assessment is passed, the document is fed back to the user; when the assessment is failed, the parameters are adjusted automatically and the document content is regenerated until it meets user needs and industry standards. Document generation and output module: Used to generate a complete final document and present it to the user.
9. A document generation system based on multi-agent collaboration according to claim 8, characterized in that: The task planning and coordination module includes a user interaction agent, a task planning agent, a strategy coordination agent, and a task intelligent manager. The user interaction agent is used to understand and extract high-level semantic information of user input text through a deep learning model, and dynamically generate questions to guide users to clarify their needs and form detailed document requirements. The task planning agent is used to transform user needs into task steps, formulate corresponding execution strategies, and orchestrate tasks. The strategy-cooperative intelligent agent is used to execute tasks synchronously through parallel processing, while predicting and resolving potential conflicts in task execution; the task intelligent manager is used to maintain and manage the execution status of each task. The task scheduling and execution module includes a requirements analysis agent, an outline writing agent, a chapter writing agent, a data search agent, and a content verification agent. The outline writing agent uses a graph neural network model to generate a document outline based on user requirements. The data search agent uses search engine algorithms combined with data mining techniques to retrieve data and information related to the document topic, and uses cosine similarity to measure the similarity between the document's required content and the query data in order to obtain the most relevant related content. The chapter writing agent is used to write document chapter content based on the results obtained by the outline writing agent, using a generative model combined with the related content retrieved by the data search agent; the content validation agent is used to validate the generated content in terms of syntax, format and content to ensure that the document meets user needs and industry standards. The monitoring and feedback module includes an evaluation and feedback agent and a monitoring module. The feedback agent uses an online learning strategy to automatically send back the verification results to each agent in the task orchestration and execution module to continuously optimize its own content until the document content is completely output. The monitoring module is used to obtain the execution status of each task and maintain it in the task intelligent manager of the task planning and coordination module.
10. A document generation system based on multi-agent collaboration according to claim 8, characterized in that: The system also includes an atomic tool layer and a data layer. The atomic tool layer includes a knowledge base retrieval tool, a word analysis tool, and a third-party API interface tool. The data layer is responsible for storing, managing, and retrieving the data and information required for document generation, ensuring data availability and consistency.
Citation Information
Cited By
Intelligent document generation system and method based on generative artificial intelligence
CN121188187A
Intelligent document generation system and method based on generative artificial intelligence
CN121188187B
Demand document collaborative generation method and device
CN121480455A
Automatic bidding document writing method, system and equipment based on multi-agent collaboration
CN121638201A
Technical document writing method, device and system based on intelligent agent
CN121638468A