A smart writing method and system based on multi-role intelligent agent

The multi-role intelligent agent system addresses flexibility and quality issues in writing systems by dynamically selecting agents and integrating user feedback, enhancing adaptability and text quality.

CN118917294BActive Publication Date: 2024-12-20BEIJING FANGCUN WUYOU TECH DEV CO LTD

Patent Information

Application Number
CN202411404816.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2024-12-20
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

Existing intelligent writing systems lack flexibility, stability, and effective mechanisms for integrating multiple writing tasks and user feedback, limiting their adaptability and quality.

Method used

A multi-role intelligent agent system that dynamically selects and configures a combination of agents for text generation, language optimization, and content review, utilizing a scoring matrix and transfer learning to optimize agent templates, and incorporates user feedback for continuous improvement.

Benefits of technology

Enhances adaptability to diverse writing tasks, improves text quality and coherence, and ensures efficient resource utilization through continuous optimization and user feedback integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917294B_ABST
    Figure CN118917294B_ABST
Patent Text Reader

Abstract

The present invention discloses a smart writing method and system based on a multi-role intelligent agent, which relates to the technical field of artificial intelligence and natural language processing, including building an intelligent agent pool; receiving writing parameters input by a user, dynamically selecting and configuring an intelligent agent combination from the intelligent agent pool according to the writing parameters; the intelligent agent combination includes a first intelligent agent, a second intelligent agent and a third intelligent agent; the first intelligent agent generates an initial text based on the writing parameters; the initial text is input into the second intelligent agent, the second intelligent agent performs language optimization on the initial text, and generates an optimized text; the optimized text is transmitted to the third intelligent agent, the third intelligent agent performs content review and supplement on the optimized text, and generates a review text; the review text is provided to the user, user feedback information is collected, and the intelligent agent pool is updated according to the user feedback information. The present invention improves the adaptability of the system to different writing tasks by building an intelligent agent pool and a dynamic selection mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial intelligence and natural language processing, and in particular to an intelligent writing method and system based on multi-role intelligent agents. Background Art

[0002] With the rapid development of artificial intelligence technology, intelligent writing assistance systems have become an important tool for improving writing efficiency and quality. However, existing intelligent writing systems often have the following problems: lack of flexible adaptability to different writing tasks; unstable quality of generated texts, which makes it difficult to meet diverse writing needs; inability to effectively integrate multiple writing links such as text generation, language optimization, and content review; lack of effective mechanism for utilizing user feedback, making it difficult to continuously optimize system performance. These problems limit the effectiveness and promotion of intelligent writing systems in practical applications. Summary of the invention

[0003] In view of the problems existing in the existing intelligent writing system, the present invention is proposed.

[0004] Therefore, the problem to be solved by the present invention is how to design and implement an intelligent writing system based on a multi-role intelligent agent, which can flexibly adapt to various writing tasks, generate high-quality texts, and continuously optimize itself through user feedback.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0006] In the first aspect, an embodiment of the present invention provides an intelligent writing method based on a multi-role intelligent agent, which includes building an intelligent agent pool; receiving writing parameters input by a user, and dynamically selecting and configuring an intelligent agent combination from the intelligent agent pool according to the writing parameters; the intelligent agent combination includes a first intelligent agent, a second intelligent agent and a third intelligent agent; the first intelligent agent generates an initial text based on the writing parameters; the initial text is input into the second intelligent agent, and the second intelligent agent performs language optimization on the initial text to generate an optimized text; the optimized text is passed to the third intelligent agent, and the third intelligent agent performs content review and supplement on the optimized text to generate a reviewed text; the reviewed text is provided to the user, user feedback information is collected, and the intelligent agent pool is updated according to the user feedback information.

[0007] As a preferred solution of the intelligent writing method based on multi-role intelligent agents described in the present invention, wherein: building an intelligent agent pool includes the following steps: obtaining a predefined intelligent agent template library; the intelligent agent template library contains multiple types of intelligent agent templates, each type corresponding to different writing tasks; analyzing historical writing task data, extracting task features and corresponding performance indicators in the historical writing task data; performing multi-dimensional scoring on the intelligent agent templates in the intelligent agent template library according to the task features and performance indicators, and obtaining an intelligent agent template scoring matrix; based on the intelligent agent template scoring matrix, selecting N intelligent agent templates with the highest comprehensive scores to form a candidate intelligent agent pool; using transfer learning technology, performing targeted optimization on the N intelligent agent templates in the candidate intelligent agent pool to generate N intelligent agents; constructing an intelligent agent dynamic expansion mechanism; combining the generated N intelligent agents and the auxiliary intelligent agents generated by the intelligent agent dynamic expansion mechanism to form an intelligent agent pool.

[0008] As a preferred solution of the intelligent writing method based on multi-role intelligent agents described in the present invention, wherein: obtaining the intelligent agent template scoring matrix includes: establishing a multidimensional scoring index system, the multidimensional scoring index system includes six dimensions: task adaptability, text generation ability, language optimization ability, content review and supplement ability, writing innovation ability and resource efficiency; based on performance indicators, calculating the scores of each intelligent agent template in the intelligent agent template library on the six dimensions; based on task characteristics, generating a task vector for each intelligent agent template, and calculating the task vector and the task fitness score of each intelligent agent template in the intelligent agent template library; combining the scores on the six dimensions and the task fitness score to form an intelligent agent template scoring vector; integrating all intelligent agent template scoring vectors into an intelligent agent template scoring matrix.

[0009] As a preferred solution of the intelligent writing method based on multi-role intelligent agents described in the present invention, wherein: the intelligent agent templates in the candidate intelligent agent pool are optimized in a targeted manner to generate N intelligent agents, including the following steps: based on the task characteristics and performance indicators of the intelligent agent templates in the candidate intelligent agent pool, a source domain knowledge graph is constructed; according to the specific requirements of the current writing task, a target domain task graph is generated; the source domain knowledge graph is aligned with the target domain task graph, the common subgraph structure is identified, and the template-task mapping relationship is obtained; based on the template-task mapping relationship, a difference enhancement network is constructed for each intelligent agent template; using the difference enhancement network, the intelligent agent templates in the candidate intelligent agent pool are fine-tuned in a targeted manner to optimize the intelligent agent template parameters; the optimized intelligent agent templates are instantiated to generate N intelligent agents.

[0010] As a preferred solution of the intelligent writing method based on multi-role intelligent agents described in the present invention, wherein: dynamically selecting and configuring an agent combination from an agent pool according to writing parameters includes: receiving and parsing the writing parameters input by the user; generating a task vector for the current writing task based on the writing parameters; calculating a comprehensive score for each agent in the agent pool using a multidimensional scoring index system and an agent template scoring matrix; and selecting the most suitable agent combination from the agent pool based on the comprehensive score and the potential role range of each agent.

[0011] As a preferred solution of the intelligent writing method based on multi-role intelligent agents described in the present invention, wherein: selecting the most suitable intelligent agent combination from the intelligent agent pool includes the following steps: sorting all intelligent agents in the intelligent agent pool in descending order according to the comprehensive scores; selecting the intelligent agent with the highest comprehensive score as the first intelligent agent, responsible for initial text generation; among the remaining intelligent agents, selecting the intelligent agent with the highest language optimization ability score as the second intelligent agent; among the remaining intelligent agents, selecting the intelligent agent with the highest content review and supplement ability score as the third intelligent agent.

[0012] As a preferred solution of the intelligent writing method based on multi-role intelligent agents described in the present invention, the third intelligent agent performs content review and supplement on the optimized text, including the following steps: receiving the optimized text and writing parameters, and constructing a content review task vector; using natural language understanding technology to extract topics and identify key information of the optimized text, and generate a text semantic graph; based on the content review task vector, select an applicable review rule set from a predefined review rule library; match the text semantic graph with the review rule set, and identify content points that need to be reviewed and supplemented; review the identified content points, and generate an audit report and supplementary suggestions based on the audit results; apply the audit report and supplementary suggestions to the optimized text to generate an audit text.

[0013] In the second aspect, an embodiment of the present invention provides an intelligent writing system based on a multi-role intelligent agent, which includes an intelligent agent pool construction module for constructing an intelligent agent pool; an intelligent agent selection and configuration module for receiving writing parameters input by a user, and dynamically selecting and configuring an intelligent agent combination from the intelligent agent pool according to the writing parameters; an initial text generation module for a first intelligent agent to generate an initial text based on the writing parameters; a language optimization module for inputting the initial text into a second intelligent agent, and the second intelligent agent performs language optimization on the initial text to generate an optimized text; a content review module for transmitting the optimized text to a third intelligent agent, and the third intelligent agent performs content review and supplement on the optimized text to generate a review text; a feedback update module for providing the review text to the user, collecting user feedback information, and updating the intelligent agent pool according to the user feedback information.

[0014] The beneficial effects of the present invention are as follows: the present invention improves the system's adaptability to different writing tasks by constructing an agent pool and a dynamic selection mechanism. The introduction of natural language processing technology and a large language model helps to improve the quality and coherence of generated texts. The collaborative mode of multi-role agents integrates writing links such as text generation, language optimization, and content review, which improves writing efficiency to a certain extent. The system's adaptability and optimization mechanism, including user feedback and agent pool updates, provide the possibility for continuous improvement of the writing system. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 This is a framework flowchart of the intelligent writing method based on multi-role intelligent agents.

[0017] Figure 2 Construct a flow chart for the agent pool of the multi-role agent-based intelligent writing method.

[0018] Figure 3 A multi-dimensional scoring flowchart for the intelligent writing method based on multi-role intelligent agents.

[0019] Figure 4 Flowchart for role adaptability verification and optimization of intelligent writing methods based on multi-role agents. DETAILED DESCRIPTION

[0020] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0022] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0023] Example 1, reference Figure 1~Figure 4, which is the first embodiment of the present invention, and provides an intelligent writing method based on a multi-role intelligent agent, as follows Figure 1 As shown, including,

[0024] S1: Build an agent pool.

[0025] Specifically, the process of building an agent pool is as follows: Figure 2 As shown, the following steps are included:

[0026] S1.1: Obtain a predefined agent template library.

[0027] It should be noted that the agent template library contains multiple types of agent templates, each type corresponding to a different writing task.

[0028] S1.2: Analyze the historical writing task data and extract the task features and corresponding performance indicators in the historical writing task data.

[0029] It should be understood that this step is intended to provide a reliable decision-making basis and optimization foundation for the intelligent writing system. By extracting task features, the system can identify and classify different types of writing tasks, providing an important reference for subsequent intelligent agent selection and configuration.

[0030] S1.3: Based on the task characteristics and performance indicators, the agent templates in the agent template library are scored in multiple dimensions to obtain the agent template scoring matrix.

[0031] Specifically, the multi-dimensional scoring flow chart is as follows: Figure 3 As shown, the following steps are included:

[0032] S1.3.1: Establish a multi-dimensional scoring indicator system.

[0033] Among them, the multidimensional scoring index system includes six dimensions: task adaptability, text generation ability, language optimization ability, content review and supplement ability, writing innovation ability and resource efficiency.

[0034] S1.3.2: Based on the performance indicators, calculate the scores of each agent template in the agent template library in six dimensions.

[0035] It should be noted that the scores on the six dimensions include task adaptability score, text generation ability score, language optimization ability score, content review and supplement ability score, innovation ability score and resource efficiency score. The score range for each dimension is 0-10 points.

[0036] Among them, the task adaptability score is obtained by evaluating the agent's performance on a variety of predefined writing tasks and calculating the weighted average; the text generation ability score is based on the weighted sum of completion time and text quality; the language optimization ability score is obtained by comparing the degree of improvement in text quality before and after optimization; the content review and supplementation ability score combines the error detection rate and information supplementation completeness score; the innovation ability score uses the modified BLEU score to evaluate output uniqueness; the resource efficiency score takes into account CPU time and memory usage, and is calculated by taking the inverse value after normalization.

[0037] Preferably, this multi-dimensional scoring method aims to comprehensively evaluate all aspects of the agent's capabilities and provide a reliable basis for subsequent agent selection and task allocation.

[0038] S1.3.3: Based on the task features, generate a task vector for each agent template, and calculate the task fitness score between the task vector and each agent template in the agent template library.

[0039] It should be noted that the task adaptation score is obtained by calculating the cosine similarity between the task vector of the current writing task and the task vector of the agent template. This score reflects the degree of adaptation of the agent template to a specific task, which is different from the task adaptability score.

[0040] S1.3.4: Combine the scores on the six dimensions and the task fitness score to form the agent template score vector.

[0041] S1.3.5: Integrate all agent template score vectors into an agent template score matrix.

[0042] Preferably, this multi-dimensional scoring method aims to comprehensively evaluate the various capabilities of the agent while considering its adaptability to specific tasks, providing a reliable basis for subsequent agent selection and task assignment. By distinguishing between task adaptability and task adaptability, this method not only evaluates the general capabilities of the agent, but also considers its matching degree to specific tasks, thereby improving the accuracy and flexibility of agent selection.

[0043] S1.4: Based on the agent template scoring matrix, select N (N>3) agent templates with the highest comprehensive scores to form a candidate agent pool.

[0044] Specifically, a weighted total score is calculated for each scoring vector in the agent template scoring matrix, where the weight coefficient is dynamically adjusted according to the characteristics of the current writing task; the agent templates are sorted from high to low according to the weighted total score to generate a sorted list of agent templates; the first N agent templates are selected from the top of the sorted list of agent templates to form a candidate agent pool; if there are agent templates with the same weighted total score, the scores of these agent templates on a specific dimension are considered, and the agent template with a higher score on that dimension is selected.

[0045] It should be noted that the determination of the N value is a dynamic process and needs to be adjusted according to specific circumstances and actual results. The initial value of N is set to 20%~30% of the total number of candidate agents, and then fine-tuned according to factors such as task complexity, computing resources, performance thresholds, and diversity requirements.

[0046] S1.5: Use transfer learning technology to optimize the agent templates in the candidate agent pool to generate N agents.

[0047] Specifically, the following steps are included:

[0048] S1.5.1: Construct a source domain knowledge graph based on the task characteristics and performance indicators of the agent templates in the candidate agent pool.

[0049] Preferably, the task feature vector and performance indicator vector of the agent template are extracted from the candidate agent pool, wherein the task feature vector includes the task type, complexity and domain information, and the performance indicator vector includes the scores of six dimensions; the task feature vector and the performance indicator vector are subjected to dimensionality reduction processing, and the principal component analysis method is used to map the high-dimensional features to the low-dimensional space to obtain the reduced-dimensional feature vector; based on the reduced-dimensional feature vector, the agent template is clustered using the self-organizing mapping algorithm to form an agent template cluster cluster; a core capability node is generated for each cluster in the agent template cluster cluster, and the core capability node represents the main characteristics and performance of the cluster cluster; the similarity between the core capability nodes is calculated, and the association relationship between the nodes is determined based on a preset threshold, and the capability association edge is generated; a multi-level knowledge graph structure is constructed, and the core capability nodes are organized according to the hierarchical relationship to form the skeleton of the source domain knowledge graph; the detailed information of the agent template is added as an attribute to the corresponding core capability node to enrich the content of the source domain knowledge graph.

[0050] Preferably, the main innovation of this solution is to use the self-organizing map algorithm to cluster agent templates and construct a multi-level knowledge graph structure. This method can better capture the relationship between agent templates and reflect the hierarchy in the knowledge graph, which is conducive to subsequent transfer learning and agent optimization. At the same time, this solution effectively transforms complex agent template information into a structured knowledge graph through steps such as dimensionality reduction, clustering, and multi-level organization, providing a solid foundation for subsequent task adaptation and agent optimization.

[0051] S1.5.2: Generate a target domain task map based on the specific requirements of the current writing task.

[0052] Specifically, parse the input description of the current writing task, extract keywords and phrases, and construct a task feature vector; use the pre-trained natural language processing model to semantically expand the task feature vector and generate an extended feature set; based on the extended feature set, construct task requirement nodes, each node corresponds to a specific writing requirement or task feature; use graph embedding technology to map the task requirement nodes to a low-dimensional vector space and generate a node embedding representation; calculate the cosine similarity between the node embedding representations, and determine the association strength between nodes based on the dynamic threshold algorithm; generate requirement association edges based on the association strength to connect strongly related task requirement nodes; cluster the connected task requirement nodes to form a task subgraph structure; integrate the task subgraph structure to construct a hierarchical target domain task graph to reflect the overall requirement structure of the writing task.

[0053] S1.5.3: Align the source domain knowledge graph with the target domain task graph, identify the common subgraph structure, and obtain the template-task mapping relationship.

[0054] S1.5.4: Based on the template-task mapping relationship, a difference enhancement network is constructed for each agent template.

[0055] Among them, the difference enhancement network is used to enhance the specific capabilities of the agent template on the target task.

[0056] S1.5.5: Use the difference enhancement network to perform targeted fine-tuning on the agent templates in the candidate agent pool and optimize the agent template parameters.

[0057] S1.5.6: Instantiate the optimized agent templates separately to generate N agents.

[0058] S1.5.7: Evaluate the collaborative capabilities of the N generated agents and define the range of potential roles for each generated agent.

[0059] It should be noted that the purpose of performing collaborative capability assessment is to ensure that the generated agents can cooperate effectively and improve the collaborative efficiency of the overall system. The scope of potential roles includes but is not limited to text generation, language optimization, and content review.

[0060] S1.6: Construct a dynamic expansion mechanism for intelligent agents.

[0061] Among them, the dynamic expansion and adjustment mechanism of the agent is not only used to automatically select and adjust the appropriate agent template from the agent template library to generate auxiliary agents when receiving new writing task types, but also to dynamically adjust the parameters and roles of existing agents.

[0062] S1.7: Combine the generated N intelligent agents and the auxiliary intelligent agents generated by the intelligent agent dynamic expansion mechanism to form an intelligent agent pool.

[0063] S1.8: Establish a maintenance and update mechanism for the agent pool.

[0064] Specifically, the performance indicators of all agents in the agent pool are evaluated regularly. Based on the evaluation results and actual usage, poorly performing agents are optimized, adjusted, or removed from the agent pool. If new types of writing tasks emerge, the dynamic expansion mechanism of agents is triggered to generate auxiliary agents and add them to the agent pool.

[0065] Preferably, the establishment of an agent pool maintenance and update mechanism aims to improve the long-term performance and adaptability of the intelligent writing system. This mechanism effectively solves the problems of performance degradation and demand changes in system operation by regularly evaluating agent performance, optimizing or removing inefficient agents, and dynamically expanding the agent pool in response to new writing tasks. This adaptive approach not only ensures the stability and reliability of the system, but also enhances its ability to cope with diverse writing needs.

[0066] S2: Receive writing parameters input by the user, and dynamically select and configure agent combinations from the agent pool based on the writing parameters.

[0067] Specifically, the following steps are included:

[0068] S2.1: Receive and parse the writing parameters input by the user.

[0069] It should be noted that writing parameters include but are not limited to writing type, target audience, text length and style requirements.

[0070] S2.2: Generate a task vector for the current writing task based on the writing parameters.

[0071] S2.3: Use the multi-dimensional scoring index system and the agent template scoring matrix to calculate the comprehensive score for each agent in the agent pool.

[0072] S2.4: Select the most appropriate combination of agents from the agent pool based on the comprehensive score and the potential role range of each agent.

[0073] Preferably, all agents in the agent pool are sorted in descending order according to their comprehensive scores; the agent with the highest comprehensive score is selected as the first agent, responsible for initial text generation; among the remaining agents, the agent with the highest language optimization ability score is selected as the second agent; among the remaining agents, the agent with the highest content review and supplement ability score is selected as the third agent.

[0074] Further, such as Figure 4 As shown, performing role adaptability verification and optimization includes: retrieving the potential role range of the selected agent; comparing the potential role range of the selected agent with the currently assigned roles to evaluate their adaptability; if a deviation between the role assignment and the potential role range is detected, the role reallocation process is initiated until the role assignments of all agents are within their respective potential role ranges; if a completely matching role assignment scheme cannot be found in the current agent combination, the agent dynamic expansion mechanism is triggered to generate auxiliary agents, incorporate the auxiliary agents into the agent pool, and restart the role reallocation process; in the role reallocation process, the agent with the second highest comprehensive score and matching role range is given priority.

[0075] It should be noted that the agent combination includes the first agent, the second agent and the third agent. Among them, the first agent is responsible for initial text generation, the second agent is responsible for language optimization, and the third agent is responsible for content review and supplementation. This selection and allocation method ensures that the three main agents that are most suitable for the current writing task are selected from N candidate agents.

[0076] S2.5: Based on the writing parameters and the assigned initial roles, configure the collaboration mode of the first agent, the second agent and the third agent.

[0077] Among them, the collaboration mode defines the interaction order, information transmission method and task division among the three agents, allowing role switching or parallel processing when necessary.

[0078] S2.6: Generate an agent combination configuration plan and perform initialization of the agent combination.

[0079] Specifically, the agent combination configuration scheme includes an agent combination member list, a role allocation scheme, a collaboration mode configuration, etc. Among them, the agent combination member list includes a first agent, a second agent, a third agent, and an auxiliary agent generated by an agent dynamic expansion mechanism.

[0080] S3: The first agent generates an initial text based on the writing parameters.

[0081] Specifically, the following steps are included:

[0082] S3.1: The first agent receives writing parameters and uses a pre-trained language model to convert the writing parameters into a task description vector.

[0083] It should be noted that writing parameters include information such as writing type, target audience, text length, style requirements, and topic keywords.

[0084] S3.2: Based on the task description vector, retrieve relevant domain knowledge in the vector database.

[0085] Specifically, a vector database is used to store pre-processed knowledge base entries, and a task description vector is used to perform a K-nearest neighbor search in the vector database to retrieve the top N knowledge entries most relevant to the task.

[0086] S3.3: Use the BERT-based semantic similarity algorithm to sort and filter the retrieved domain knowledge.

[0087] Specifically, the BERT-based semantic similarity calculation is used to sort the retrieved knowledge items, and the top M pieces of knowledge with the highest similarity scores are selected, and the screened knowledge items are merged into a coherent background knowledge text.

[0088] S3.4: Use a large language model to combine the task description vector and the filtered domain knowledge to generate a text outline.

[0089] S3.5: Based on the text outline, use a large language model to generate initial text in segments, and check in real time whether the initial text meets the task requirements.

[0090] Preferably, a segmented generation strategy is adopted to divide the text outline into multiple subtasks; for each subtask, the following operations are performed: the topic, key sentences and previous content (if any) of the current paragraph are input into the large language model; the detailed content of the paragraph is generated using the large language model; a pre-trained classifier is applied to evaluate whether the generated content meets the task requirements; if the generated content does not meet the requirements, local optimization is performed by adjusting the output probability distribution of the large language model or using resampling technology; all generated paragraphs are combined in sequence to form an initial text.

[0091] S3.6: Post-process the generated initial text.

[0092] It should be noted that this step is to check whether the overall structure of the text is consistent with the outline and to ensure that the length of the text meets the original requirements.

[0093] S4: The initial text is input into the second intelligent agent, and the second intelligent agent performs language optimization on the initial text to generate an optimized text.

[0094] Specifically, the initial text and writing parameters are received to construct a language optimization task vector; natural language processing technology is used to perform grammatical analysis, part-of-speech tagging and dependency parsing on the initial text to generate a text structure map; based on the language optimization task vector, the most suitable language model is selected from the pre-trained language model library; the text structure map is input into the language model to generate multiple optimization candidate texts; a text scoring mechanism is used to score the optimization candidate texts, where the text scoring dimensions include grammatical correctness, expression fluency, semantic coherence and style consistency; based on the text scoring results, the text with the highest score is selected as the optimized text; the optimized text is post-processed, including format unification and keyword highlighting.

[0095] Among them, the pre-trained language model library includes large-scale pre-trained language models such as BERT, GPT, T5, RoBERTa and XLNet.

[0096] S5: The optimized text is passed to the third intelligent agent, which reviews and supplements the content of the optimized text to generate a review text.

[0097] Specifically, receive the optimized text and writing parameters, and construct a content review task vector; use natural language understanding technology to extract topics and identify key information of the optimized text, and generate a text semantic graph; based on the content review task vector, select an applicable review rule set from the predefined review rule library; match the text semantic graph with the review rule set to identify content points that need to be reviewed and supplemented; review the identified content points, including fact checking, logic verification, and information supplementation; based on the review results, generate an audit report and supplementary suggestions; apply the audit report and supplementary suggestions to the optimized text to generate an audit text; perform a consistency check on the audit text to ensure that the newly added and modified content is consistent with the style of the original text.

[0098] The review rule base includes content accuracy rules, logical consistency rules, information integrity rules and style adaptability rules. Fact checking uses knowledge graphs for verification, logical verification uses reasoning algorithms for analysis, and information supplementation obtains supplementary content from the knowledge base based on relevance retrieval.

[0099] Preferably, by introducing the matching mechanism of text semantic graph and audit rule set, this solution improves the accuracy and efficiency of content audit. Multi-dimensional audit combined with automated supplementation enables the system to more comprehensively evaluate and optimize text quality. The method of dynamically selecting audit rule sets enhances the system's adaptability to different writing tasks. The automatically generated audit report provides explainability of the audit process, which helps users understand and accept the audit results.

[0100] S6: Provide the review text to the user, collect user feedback information, and update the agent pool based on the user feedback information.

[0101] Furthermore, the present embodiment also provides an intelligent writing system based on a multi-role intelligent agent, including an intelligent agent pool construction module for constructing an intelligent agent pool; an intelligent agent selection and configuration module for receiving writing parameters input by a user, and dynamically selecting and configuring an intelligent agent combination from the intelligent agent pool according to the writing parameters; an initial text generation module for a first intelligent agent to generate an initial text based on the writing parameters; a language optimization module for inputting the initial text into a second intelligent agent, and the second intelligent agent performs language optimization on the initial text to generate an optimized text; a content review module for transmitting the optimized text to a third intelligent agent, and the third intelligent agent performs content review and supplement on the optimized text to generate a review text; a feedback update module for providing the review text to the user, collecting user feedback information, and updating the intelligent agent pool according to the user feedback information.

[0102] In summary, the present invention improves the system's adaptability to different writing tasks by constructing an agent pool and a dynamic selection mechanism. The introduction of natural language processing technology and large language models helps to improve the quality and coherence of generated texts. The collaborative mode of multi-role agents integrates writing links such as text generation, language optimization, and content review, which improves writing efficiency to a certain extent. The system's adaptability and optimization mechanism, including user feedback and agent pool updates, provide the possibility for continuous improvement of the writing system.

[0103] Example 2, reference Figure 1~Figure 4 , which is the second embodiment of the present invention, provides an intelligent writing method based on a multi-role intelligent agent. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0104] To verify the effectiveness of the intelligent writing method based on multi-role agents, the research team conducted a three-month simulation experiment on a large online content platform. The experiment involved multiple stages, including agent pool construction, agent selection configuration, text generation, language optimization, and content review.

[0105] At the initial stage of the experiment, the team built an agent template library containing 200 predefined agent templates, covering six common writing types, including news reports, product descriptions, technical blogs, and marketing copywriting. By analyzing nearly 200,000 historical writing task data on the platform, 10 key task features including task type, target audience, text length, writing style, and five core performance indicators including completion time, user rating, and editing modification rate were extracted.

[0106] In the agent scoring stage, the researchers conducted multi-dimensional scoring of 200 agent templates based on the extracted features and indicators. The scoring dimensions include task adaptability (weight 0.2), text generation ability (weight 0.25), language optimization ability (weight 0.2), content review and supplement ability (weight 0.15), writing innovation ability (weight 0.1) and resource efficiency (weight 0.1). The scoring results show that the average task adaptability score is 7.2 points, the text generation ability score is 7.5 points, the language optimization ability score is 7.3 points, the content review and supplement ability score is 7.0 points, the innovation ability score is 6.8 points, and the resource efficiency score is 7.8 points. Based on the scoring results, the 50 agent templates with the highest comprehensive scores were selected to form the candidate agent pool.

[0107] Using transfer learning technology, the research team optimized the agent templates in the candidate agent pool. By constructing a source domain knowledge graph containing 800 core capability nodes and 3,000 capability-related edges, and a target domain task graph containing 300 task requirement nodes and 1,200 requirement-related edges, the team successfully identified 70% of the common subgraph structures and built a difference enhancement network for each agent template. After optimization, the average performance of the 50 agents improved by 10%, among which the text generation ability improved the most significantly, reaching 15%.

[0108] In the actual writing task test, the system dynamically selects and configures the agent combination according to the writing parameters entered by the user. The research team selected 1,000 writing tasks of different types and lengths for testing, including 300 product descriptions, 250 news reports, 200 technical blogs, and 250 marketing copywriting. Taking a 1,500-word product description writing task as an example, the system selected agent A with a comprehensive score of 8.5 from the agent pool as the first agent (responsible for initial text generation), agent B with a language optimization ability score of 8.7 as the second agent (responsible for language optimization), and agent C with a content review and supplement ability score of 8.3 as the third agent (responsible for content review and supplement).

[0109] The entire writing process takes about 1 minute on average, of which 30 seconds are spent on initial text generation, 18 seconds on language optimization, and 12 seconds on content review and supplementation. The average performance of the system in 1,000 test tasks is shown in Table 1.

[0110]

[0111] The experimental results show that the proposed method has achieved significant improvements in multiple key indicators. In particular, the text generation speed is 33.3% faster than the traditional method, which is mainly due to the collaborative work of multi-role agents and the optimized task allocation mechanism. Language fluency, content accuracy and user satisfaction have also been slightly but significantly improved, by 4.0%, 3.3% and 6.3% respectively.

[0112] It is worth noting that the proposed method performs well in task adaptability and can effectively handle 6 different writing types, while traditional methods can usually only handle 1-2 writing types. This flexibility enables the system to better adapt to different types of writing needs.

[0113] In addition, the resource utilization efficiency of this method reaches 78%, which is 8.3% higher than the traditional method, showing that while improving performance, it also optimizes the use of computing resources.

[0114] In terms of user feedback, 85% of users were satisfied with the generated content, which was 6.3% higher than the traditional single model approach. Especially when dealing with complex technical blogs and news reporting tasks, users gave high marks to the professionalism and logic of the content.

[0115] To further verify the long-term performance of the system, the research team continuously monitored the system performance during the three-month experiment. The results showed that as time went by and the amount of tasks increased, the system's performance remained stable, and some indicators even improved slightly, thanks to the dynamic update mechanism of the agent pool.

[0116] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. An intelligent writing method based on a multi-role agent, characterized in that: include, Build an agent pool; Receiving writing parameters input by a user, dynamically selecting and configuring an agent combination from the agent pool according to the writing parameters; the agent combination includes a first agent, a second agent, and a third agent; The first agent generates an initial text based on the writing parameters; Inputting the initial text into a second agent, and the second agent performs language optimization on the initial text to generate an optimized text; The optimized text is transmitted to a third intelligent agent, and the third intelligent agent reviews and supplements the content of the optimized text to generate a review text; Providing the audit text to the user, collecting user feedback information, and updating the agent pool according to the user feedback information; The construction of the agent pool comprises the following steps: Obtain a predefined agent template library; the agent template library contains multiple types of agent templates, each type corresponding to a different writing task; Analyze the historical writing task data, and extract the task features and corresponding performance indicators in the historical writing task data; According to the task characteristics and the performance indicators, the agent templates in the agent template library are scored in multiple dimensions to obtain an agent template scoring matrix; Based on the agent template scoring matrix, select the N agent templates with the highest comprehensive scores to form a candidate agent pool; Using transfer learning technology, N agent templates in the candidate agent pool are optimized to generate N agents; Build a dynamic expansion mechanism for intelligent agents; Combining the generated N intelligent agents and the auxiliary intelligent agents generated by the intelligent agent dynamic expansion mechanism to form an intelligent agent pool; The obtaining of the agent template scoring matrix comprises: Establish a multi-dimensional scoring index system, which includes six dimensions: task adaptability, text generation ability, language optimization ability, content review and supplementation ability, writing innovation ability, and resource efficiency; Based on the performance indicators, the scores of each agent template in the agent template library on six dimensions are calculated; Based on the task features, a task vector is generated for each agent template, and a task fitness score between the task vector and each agent template in the agent template library is calculated; Combine the scores on the six dimensions and the task fitness score to form the agent template score vector; Integrate all agent template score vectors into an agent template score matrix; The dynamically selecting and configuring an agent combination from the agent pool according to the writing parameters includes: Receive and parse writing parameters input by users; Based on the writing parameters, generate a task vector for the current writing task; Using the multi-dimensional scoring index system and the agent template scoring matrix, a comprehensive score is calculated for each agent in the agent pool; Based on the comprehensive score and the potential role range of each agent, the most suitable combination of agents is selected from the agent pool, specifically: Sort all agents in the agent pool in descending order according to their comprehensive scores; Select the agent with the highest comprehensive score as the first agent, responsible for initial text generation; Among the remaining agents, the agent with the highest language optimization ability score is selected as the second agent; Among the remaining agents, the agent with the highest score in content review and supplementation ability is selected as the third agent.

2. The intelligent writing method based on multi-role agents as claimed in claim 1, characterized in that: The targeted optimization of the agent templates in the candidate agent pool to generate N agents includes the following steps: Based on the task characteristics and performance indicators of the agent templates in the candidate agent pool, a source domain knowledge graph is constructed; Generate a target domain task map based on the specific requirements of the current writing task; Aligning the source domain knowledge graph with the target domain task graph, identifying the common subgraph structure, and obtaining a template-task mapping relationship; Based on the template-task mapping relationship, construct a difference enhancement network for each agent template; Using the difference enhancement network, the agent templates in the candidate agent pool are fine-tuned to optimize the parameters of the agent templates; The optimized agent template is instantiated to generate N agents.

3. The intelligent writing method based on multi-role agents as claimed in claim 1, characterized in that: The third intelligent agent performs content review and supplementation on the optimized text, including the following steps: Receive optimized text and writing parameters, and build content review task vectors; Using natural language understanding technology, extract topics and identify key information from the optimized text to generate a text semantic graph; Based on the content audit task vector, selecting an applicable audit rule set from a predefined audit rule library; Matching the text semantic graph with the review rule set to identify content points that need to be reviewed and supplemented; Review the identified content points and generate review reports and additional suggestions based on the review results; Apply the audit report and supplementary suggestions to the optimized text to generate an audit text.

4. A smart writing system based on a multi-role agent, based on the smart writing method based on a multi-role agent according to any one of claims 1 to 3, characterized in that: Also includes, Agent pool building module, used to build an agent pool; An agent selection and configuration module, used to receive writing parameters input by a user, and dynamically select and configure an agent combination from the agent pool according to the writing parameters; An initial text generation module, used for the first agent to generate an initial text based on the writing parameters; A language optimization module, used for inputting the initial text into a second agent, and the second agent performs language optimization on the initial text to generate an optimized text; A content review module, used for transmitting the optimized text to a third intelligent agent, and the third intelligent agent reviews and supplements the content of the optimized text to generate a review text; A feedback update module is used to provide the review text to the user, collect user feedback information, and update the agent pool according to the user feedback information.

Citation Information

Patent Citations

  • Personalized complex report generation method based on multi-agent system

    CN118569237A

  • Method for chatbot conversation that allows different artificial intelligence to answer questions by type

    KR102671570B1

Cited By

  • An intelligent writing method based on multi-agent cooperation

    CN120632092B

  • Multi-agent collaborative end-to-end text and image generation method and system

    CN122820897A