Intelligent customer service main structured reply generation and dynamic optimization method based on Agent
By using a multi-agent system architecture, customer service tasks are decomposed into multiple agents working collaboratively, which solves the problems of rigidity and low efficiency of inter-module collaboration in existing intelligent customer service systems. It enables autonomous generation of high-quality responses and dynamic optimization, improving the system's adaptability and controllability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI CAIJIANG INTELLIGENT TECH CO LTD
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-21
AI Technical Summary
Existing intelligent customer service systems suffer from rigid architecture, lack of online learning capabilities, and simplistic and uncontrollable response strategies. They struggle to adapt to complex and ever-changing dialogue scenarios, exhibit low efficiency in inter-module collaboration, and have difficulty in finely controlling response quality.
A multi-agent system architecture is adopted, which decomposes customer service tasks into multiple agents with specialized functions. Through shared memory and message passing collaboration, autonomous decision-making and dynamic optimization are achieved. The optimization agent continuously observes the interaction effect and adjusts the strategy.
Improve the accuracy and applicability of responses, enable the system to adapt online and evolve continuously, enhance interpretability and controllability, improve robustness and flexibility, and promote human-machine collaboration.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of artificial intelligence and software engineering, specifically relating to a core method for a next-generation intelligent customer service system employing an agent architecture. This method focuses on utilizing multi-agent collaborative technology to achieve autonomous and structured generation of responses in customer service dialogues, possessing the ability to continuously and dynamically self-optimize during operation. It is applicable to various scenarios requiring highly intelligent and adaptive customer service, such as e-commerce, finance, government affairs, and enterprise IT support. Background Technology
[0002] Current mainstream intelligent customer service systems, whether retrieval-based question-and-answer systems or generative large-scale model-based dialogue systems, generally suffer from the following architectural bottlenecks: 1. Rigid Processes and "Black Box" Decision-Making: Systems are typically built as monoliths or pipelines, with steps such as intent recognition, dialogue management, and response generation hard-coded and linked together. This structure leads to opaque decision-making logic, making it difficult to flexibly adjust and optimize for complex and ever-changing dialogue scenarios. Response strategies are often static or based on simple rules.
[0003] 2. Lack of continuous learning and evolution capabilities: After deployment, the core models and strategies of most systems become fixed. Optimization relies on periodic, offline data retraining, making it impossible to quickly learn and adjust from real-time interaction streams. The system adapts slowly to new user queries, new business problems, or unexpected service events.
[0004] 3. Difficulty in fine-grained control over response quality and strategy: Generative models may produce factual errors or responses that do not conform to business requirements; retrieval models are limited by the coverage of the knowledge base. More importantly, the system struggles to autonomously decide in what context to use what tone (e.g., reassuring or professional), what level of information granularity to provide (e.g., overview or detailed description), and whether to proactively recommend or ask questions.
[0005] 4. Low inter-module collaboration efficiency: In traditional pipelines, errors in upstream modules are directly propagated and amplified to downstream modules. Each module focuses on its own task, lacking a global perspective and a collaborative mechanism based on common goals, resulting in a fragmented overall experience. Therefore, a new architecture and methodology are urgently needed to build the customer service system into a collaborative society composed of multiple "intelligent agents" with specific cognitive abilities. Each intelligent agent works autonomously and collaborates closely, continuously learning from the environment to achieve a higher level of autonomy, adaptability, and controllability. Summary of the Invention
[0006] The technical problem this invention aims to solve is to overcome the core defects of existing intelligent customer service systems, such as rigid architecture, lack of online learning capabilities, and single and uncontrollable response strategies, and to provide a new paradigm of intelligent customer service that can autonomously generate high-quality structured responses and achieve dynamic self-optimization.
[0007] To address the aforementioned technical problems, this invention proposes an agent-based intelligent customer service autonomous structured response generation and dynamic optimization method. The core idea of this method is to adopt a multi-agent system architecture philosophy, decomposing complex customer service interaction tasks into sub-tasks undertaken by multiple agents with specialized functions and a certain degree of autonomy. These agents collaborate through shared memory and message passing, jointly maintaining a unified dialogue state and autonomously making decisions and taking actions around the macro-goal of "achieving the best service experience." More importantly, a dedicated optimization agent in the system acts as an "internal coach," continuously observing the interaction effects and dynamically adjusting the behavioral strategies of other agents using machine learning methods, driving the continuous evolution of the entire system. Another objective of this invention is to provide a loosely coupled, highly cohesive intelligent customer service system implementation framework that implements the above method. The beneficial technical effects of this invention are: 1. Improve the accuracy and applicability of responses: Through the refined decision-making of the strategy agent, the most suitable response strategy (content + format) can be generated for different scenarios and different users, rather than a one-size-fits-all answer.
[0008] 2. Achieve online self-adaptation and continuous evolution of the system: Optimize the agent so that the system can learn from each interaction, quickly adapt to new questions and new language, and correct bad strategies, thus becoming "smarter with use".
[0009] 3. Enhance the interpretability and controllability of the system: Since the decision-making process is broken down into explicit actions of different agents (such as "understanding agent identifies the intention of the complaint" and "strategy agent decides to adopt a reassurance strategy"), the entire response generation process is more transparent and facilitates manual review, intervention and optimization.
[0010] 4. Improve system robustness and flexibility: The multi-agent architecture has redundancy, and the temporary failure or performance degradation of a single agent is unlikely to paralyze the entire system. At the same time, new capabilities (such as new modal processing and new business rules) can be easily introduced by adding or updating specific agents.
[0011] 5. Promote human-machine collaboration: The agent can clearly expose the uncertainty of its decision-making or the key points that require human confirmation, which facilitates timely and accurate intervention by human customer service or administrators, forming an efficient human-machine collaborative workflow. Attached Figure Description
[0012] Appendix Figure 1 This is a schematic diagram of the overall architecture and data flow of an Agent-based intelligent customer service system in one embodiment of the present invention.
[0013] Appendix Figure 2 This is a flowchart illustrating the multi-Agent collaborative workflow of the method described in one embodiment of the present invention during a typical customer service interaction.
[0014] Appendix Figure 3 This is a schematic diagram of a closed-loop mechanism for optimizing the dynamic learning of an agent-driven system in one embodiment of the present invention. Detailed Implementation To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0015] I. Overall System Architecture refer to Figure 1 This system is a distributed cognitive system composed of multiple software agents. Its core components include: Functional Agent Group: Perception Agent: Acting as the system's "sensors," it resides at the interaction front end or near the data source. It is responsible for the initial processing and standardization of raw data.
[0016] Understanding Agent, Policy Agent, Generation Agent, and Optimization Agent: As the core "brain," they are typically deployed on a cloud server cluster. Each Agent is an independent microservice, encapsulating specific models, algorithms, and logic.
[0017] Collaborative infrastructure: Message queue / event bus: Employing a publish-subscribe pattern, it serves as the backbone for asynchronous communication between agents. For example, after processing user input, the sensing agent will publish a "UserInputProcessed" event to the bus, along with structured state data.
[0018] Shared state storage: Employing a distributed database such as Redis, this stores session state (current dialogue turn, confirmed information), user context (history of this session), user profile (long-term preferences), etc. All agents can read and update relevant parts, which is crucial for maintaining dialogue consistency.
[0019] Agent Registration and Discovery Center: Manages metadata about all agents in the system, and supports dynamic scaling up and down.
[0020] Management and support platform: Provides agent lifecycle management, resource configuration, link tracing, and visualization dashboards to monitor the load, time consumption, and collaboration graph of each agent.
[0021] II. Multi-Agent Collaboration Workflow refer to Figure 2 We will use a typical scenario—a user inquiring about "how to change the order's shipping address"—to illustrate how the various agents work together: Step 1: Perception and Understanding 1. A user sends a message: "I want to change the delivery location." 2. The perception agent is triggered. Its speech recognition module (if it is speech) converts it into the text "I want to change the delivery location".
[0022] The text parsing module performs basic word segmentation. It then packages the text and metadata such as the user ID into a structured object. {userId: “U123”, text: “I want to change the delivery location”, modality: “text”, timestamp: “…”}, publish the “UserInputReceived” event, and write the object to the current session state in shared storage.
[0023] 3. Understand that the agent subscribes to relevant events. After listening for an event, it reads the latest user input and session history from shared storage.
[0024] Its intent recognition module, combined with a knowledge graph from the e-commerce domain, determines the deeper intent of the sentence as follows: Set “MODIFY_ORDER_SHIPPING_ADDRESS” and fill the slot {action: “modify”,object:“shipping_address”}.
[0025] The sentiment analysis module determined the user's emotion to be "neutral".
[0026] The context management module detected that this was the first sentence of the session, without any special context.
[0027] The understanding agent integrates the analysis results into a structured representation, such as: {intent: “MODIFY_ORDER”, slots: {…}, emotion: “neutral”, confidence: 0.95, dialog_stage:“initiation”}. It updates the “understanding state” in shared memory and publishes an “IntentIdentified” event.
[0028] Step Two: Strategy Planning 1. The policy agent subscribes to the "IntentIdentified" event. When it is awakened, it reads the output of the understanding agent and retrieves the user profile from shared memory (e.g., the history shows that the user is an "active user" but has made mistakes due to unfamiliarity with the operation).
[0029] 2. The strategy decision-making model within the strategy agent begins to work. The model inputs include: current intent, user profile, and business rules (e.g., "Verification is required to change the address").
[0030] 3. The model performs reasoning. Considering that the intent is clear but the user may have difficulty operating the system, it decides on a strategy that balances efficiency and accuracy. For example, it outputs a structured strategy: { "primary_action": "guide_to_self_service", "content_focus": "clear_step_by_step_instruction", “tone”: “helpful_and_patient”, "risk_control": "must_verify_identity_before_proceeding", “fallback_action”: “transfer_to_human_if_failed” } 4. The policy agent writes this policy to the shared storage and publishes the "ResponseStrategyDecided" event.
[0031] Step 3: Content Generation and Response 1. Generate Agent listening policy events. After reading the policy, it determines the action based on "primary_action": “guide_to_self_service” and “content_focus”: The "clear_step_by_step_instruction" option determines that a response will be generated using a combination of template filling and knowledge base retrieval.
[0032] 2. It selects a "guided process" template from the template library and retrieves the latest screenshots and text of the "modify order address" operation steps from the knowledge base.
[0033] 3. Generate Agent to construct the final reply content: "Hello, changing your shipping address is very convenient. Please log in to your account first, and then follow these steps: [Step 1 (with pictures)] [Step 2 (with pictures)]... To ensure account security, you may need to verify your mobile phone number before proceeding."
[0034] 4. The agent generates an agent that writes the response content to shared storage and publishes a "ResponseContentReady" event. The front-end service listens for this event, renders the content, and sends it to the user.
[0035] Step 4: Interaction Optimization and Learning 1. The user received a reply. The optimized agent remained silently monitoring the situation in the background.
[0036] 2. Possible user behavior paths: Path A (Success): The user successfully modified the address as instructed and clicked the "Satisfied" rating at the end of the session. The agent optimization performance evaluator recorded positive feedback: {session_id: "S456", outcome: "resolved", satisfaction: "high", steps_taken: 3}.
[0037] Path B (Failure / Hesitation): The user replies "I don't understand" or remains inactive for an extended period. The optimized agent detected a negative signal.
[0038] 3. The agent's learner is optimized through periodic or event-triggered processes. For path A, it reinforces the policy decision path that led to the successful interaction (e.g., "For active but unfamiliar users, using the 'detailed text and image guidance' strategy is effective under the 'modify address' intent"). For path B, it attempts to adjust the strategy; for example, the policy agent might add options like "proactively ask which step is unclear" or "provide a shortcut link in advance" when encountering a similar scenario next time.
[0039] 4. In addition, if the step diagram provided by the Agent is outdated (user feedback screenshot is incorrect), the knowledge updater for optimizing the Agent will trigger a knowledge base correction ticket.
[0040] Through the above process, the system completes a full closed loop from perception to generation to optimization. Each agent performs its own function, collaborating loosely through event-driven processes and shared state, while the optimization agent ensures that the entire collaborative network continuously evolves towards better service quality.
Claims
1. A method for autonomous structured response generation and dynamic optimization of intelligent customer service based on agent, characterized in that, Includes the following steps: S1: The perception agent receives and processes the user's multimodal input, converting it into a unified, structured representation of the user's state. S2: The understanding agent parses the user state representation, combines the domain knowledge graph and dialogue history to identify the user's deep intent, emotions and the current problem-solving stage, and outputs structured intent analysis results; S3: Based on the structured intent analysis results, user profiles, and preset business objectives, the strategy agent autonomously plans and generates a structured response strategy that includes the core content of the response, expression style, recommended actions, and emotional strategies. S4: The generating agent, based on the structured response strategy, autonomously selects to call a preset response template, knowledge base retrieval, or large-scale language model generation technology to construct the final multimodal response content for the user; S5: The optimization agent collects explicit user feedback and implicit behavioral data in real time during and after the interaction to evaluate the effect of the interaction. It also uses reinforcement learning or online learning mechanisms to dynamically adjust the internal models and collaborative strategies of each agent to achieve continuous autonomous optimization of system performance.
2. The method according to claim 1, characterized in that, The sensing agent in step S1 specifically includes: A speech recognition module is used to convert user speech into text; The text parsing module is used to process the text information input by the user; The visual understanding module is used to analyze image or video information uploaded by users; The multimodal fusion module is used to perform feature matching and fusion of information from the different modalities mentioned above to form a unified state vector that includes semantics, sentiment, user identity and other dimensions.
3. The method according to claim 1, characterized in that, The understanding of the Agent in step S2 specifically includes: The intent recognition module, based on deep learning models and knowledge graphs, performs fine-grained intent classification and slot filling for user questions; The context management module maintains and understands the contextual logical relationships in multi-turn dialogues; The sentiment analysis module determines the user's current emotional state and its changing trends; The stage determination module identifies the specific stage of a user's problem within the standard problem-solving process (such as consultation, reporting a problem, or inquiry).
4. The method according to claim 1, characterized in that, The core of the strategy agent in step S3 is: Strategic Decision Model: This model receives the output of the Understanding Agent and, based on user profiles (such as novice / expert, historical preferences) and business rules (such as service SLA, conversion rate targets), outputs a structured "action-content" strategy tuple through pre-training or online inference. For example, (action: step-by-step guidance, core content: explanation of principles + operation steps, style: concise and professional, emotion: reassurance); Multi-objective optimization: The strategic decision-making process needs to dynamically weigh and optimize multiple objectives such as accuracy of answers, user satisfaction, solution efficiency, and achievement of business goals.
5. The method according to claim 1, characterized in that, The working mechanism of the optimized Agent in step S5 includes: The performance evaluator defines and calculates key metrics such as "problem resolution rate," "user satisfaction score," "session duration," and "subsequent negative feedback rate." The learner, based on the evaluation results and historical interaction data, uses methods such as deep reinforcement learning and Yeats optimization to update the decision model parameters of the policy agent, optimize the content selection strategy of the generated agent, and even adjust the intent classification threshold of the understanding agent. The knowledge updater automatically converts successful interaction cases into structured knowledge entries or corrects erroneous associations in the knowledge graph, realizing the automatic growth and error correction of the knowledge base.
6. An agent-based intelligent customer service system for implementing the method of any one of claims 1-5, characterized in that, This includes: Agent container: providing an independent operating environment and resource scheduling for each functional agent (perception, understanding, policy, generation, optimization); Coordination bus: providing a communication mechanism for message passing, event publishing / subscription, and collaborative work between agents; Shared memory: storing shared information such as dialogue context, user profiles, and session states for each agent to read and update; Management and monitoring platform: providing visual monitoring and management of the health status, performance indicators, and collaborative processes of all agents in the system.