Search

CN-121009985-B - Multi-module collaboration-based multi-round interactive AI Agent intelligent Agent and implementation method thereof

CN121009985BCN 121009985 BCN121009985 BCN 121009985BCN-121009985-B

Abstract

The invention discloses a multi-module collaboration-based multi-wheel interactive AIAgent intelligent agent and an implementation method thereof, and relates to the field of artificial intelligence. The intelligent agent comprises an information acquisition module, a dialogue state judgment module, an intention recognition module, a parameter extraction module, a rule engine and a dialogue strategy module, wherein the modules work cooperatively. The information acquisition module maintains tool structured information and a history dialogue library, the dialogue state judging module distinguishes task continuation and new task, the intention identifying module identifies user intention, the parameter extracting module extracts structured parameters, the rule engine module verifies parameter integrity and validity, and the dialogue strategy module guides user to supplement input. The realization method completes multiple rounds of interaction through multiple steps. The invention adopts a modularized design, avoids model 'illusion', realizes multi-round dialogue management, enhances system expansibility, and improves tool calling accuracy and user experience.

Inventors

  • HAN SHILONG
  • LI GUOLIANG
  • GE YIWEI

Assignees

  • 易智唯思(北京)智能科技有限公司

Dates

Publication Date
20260508
Application Date
20250731

Claims (4)

  1. 1. Multi-module collaboration-based multi-wheel interactive AIAgent agent, which is characterized by comprising: The system comprises an information acquisition module, an intention recognition and parameter extraction module, a history dialogue knowledge base, a template engine and a template engine, wherein the information acquisition module is used as a knowledge support center of the system and is responsible for maintaining structural definition information of all tools, and the tool structural definition information maintained by the information acquisition module comprises a tool name, a function description, a parameter field, a constraint rule and a return format; The dialogue state judging module is used for judging whether the current input of the user is the continuation of the previous round of task, is connected with the information acquisition module, and is used for judging whether the previous round of dialogue information and the historical dialogue knowledge base are 'original task supplement' or 'new task start' according to the previous round of dialogue information and the historical dialogue knowledge base and the semantic similarity of a large model; The intention recognition module is used for recognizing the intention input by the user by utilizing the large language model, dynamically constructing a prompt word by combining the tool description and the task example provided by the information acquisition module, and generating a structured intention result, such as { "intention _name": ","; The parameter extraction module is used for generating an extraction prompt word according to the parameter definition of the tool after the intention recognition module finishes the intention recognition, extracting the structural parameters from the user input, automatically generating the extraction prompt word according to the parameter definition of the tool by the system after the intention recognition module finishes, and extracting the structural information of the large language model input by the user, wherein the result is usually in a key value pair format; The rule engine module is connected with the parameter extraction module and the information acquisition module and used for carrying out integrity and legality verification on the structured parameters extracted by the parameter extraction module according to tool parameter constraint rules provided by the information acquisition module, and is used for carrying out integrity and legality verification on the extracted parameters, binding a group of rules for each tool, wherein the rules comprise field filling, enumeration constraint and regular format; And the dialogue strategy module generates natural language prompt according to the missing or illegal field when the parameter verification fails, guides the user to supplement input, and generates the prompt content by constructing a large guide type prompt word and transmitting the guide type prompt word into the large model so as to ensure the nature and the concrete prompt.
  2. 2. The implementation method of the multi-module cooperation-based multi-round interactive AI Agent is applied to the multi-module cooperation-based multi-round interactive AI Agent disclosed in claim 1, and is characterized by comprising the following steps: s1, information acquisition, namely maintaining a structured definition information and a historical dialogue knowledge base of a tool through an information acquisition module, and dynamically generating a prompt word according to a specific task; S2, judging whether the current input of the user is the continuation of the previous round of task or not through a dialogue state judging module based on the previous round of dialogue information and a historical dialogue knowledge base, if so, executing a step S4, and if so, executing a step S3; S3, intention recognition, namely dynamically constructing a prompt word through an intention recognition module in combination with the tool description provided in the step S1, recognizing the intention input by a user and generating a structured intention result; s4, parameter extraction, namely generating an extraction prompt word according to tool parameter definition corresponding to the intention identified in the step S3 through a parameter extraction module, and extracting structural parameters from user input; s5, parameter verification, namely carrying out integrity and legality verification on the structural parameters extracted in the step S4 based on the tool parameter constraint rules in the step S1 through a rule engine module; and S6, dialogue guidance, namely if the verification in the step S5 is not passed, generating natural language prompts according to the missing or illegal fields through a dialogue strategy module, guiding a user to supplement input, and if the verification is passed, executing tool call.
  3. 3. The method for implementing the multi-module collaboration-based multi-round interactive AI Agent as claimed in claim 2, wherein the parameter verification in step S5 comprises checking whether the parameter contains a mandatory field, accords with an enumeration value range, and matches a regular format, and the generated verification result contains missing field, illegal field and default complement field information.
  4. 4. The method for implementing multi-module collaboration-based multi-round interactive AIAgent agent as claimed in claim 2, wherein the step S6 of generating natural language prompts includes constructing guide class prompt words based on missing fields, illegal fields and corresponding parameter descriptions, and transmitting the guide class prompt words into a large language model to generate natural language texts, wherein the texts comprise field meanings, example values and legal range descriptions.

Description

Multi-module collaboration-based multi-round interactive AI Agent intelligent Agent and implementation method thereof Technical Field The invention relates to the field of artificial intelligence, in particular to a multi-module collaboration-based multi-round interactive AI Agent and an implementation method thereof. Background In recent years, agent architecture-based Agent systems have been rapidly developed in various task-based automation applications with the enhancement of the capabilities of large language models (Large Language Models, LLMs). Typical Agent systems have "sense-decision-action-memory" capabilities that can accomplish complex tasks by invoking external tools (e.g., anomaly detection, timing prediction, SPC process quality analysis, capability analysis, etc.) that are specialized in the industry, driven by the user's natural language. For example: the method comprises the steps of completing the calling of an abnormality detection tool through natural language to detect whether the specified production line and the process have abnormal conditions in a certain period of time; The technical problems of parameter extraction in the current Agent system are as follows: 1. Model "illusion" caused by task mixing " The existing system integrates tasks such as intention recognition, parameter extraction, missing parameter guidance and the like into a single natural language understanding module, and particularly when a small-size large language model (such as Qwen 2.5-14B) is adopted, the model is easy to generate illusion due to the fact that the complexity of the task exceeds the processing capacity of the model, for example, a user inquires about 'detecting L500 production line pressure', the model can misjudge the intention as 'equipment maintenance', or the imaginary 'temperature parameter' causes tool call errors. 2. The traditional dialogue system can not judge whether the current input of the user is the continuation of the previous task, which often causes the loss of context, repeated input of parameters and interruption of tasks, and influences the interaction efficiency and experience. 3. The traditional system uses a static prompt word template, cannot adapt to the context change and various semantic requirements caused by newly added tasks/tools, and expands the new tools to manually modify codes and the prompt word template, so that the maintenance cost is high and the response is not timely Based on the above, we provide a multi-module collaboration-based multi-round interactive AI Agent and an implementation method thereof. Disclosure of Invention The invention provides a multi-module collaboration-based multi-round interactive AI Agent intelligent Agent and an implementation method thereof, aiming at solving the technical problems of illusion phenomenon, stability, accuracy reduction and the like existing in the process of complex parameter extraction and multi-round dialogue of a small-size large language model (such as Qwen 2.5-14B). In order to solve the problems, the invention provides a multi-module cooperation-based multi-round interactive AI Agent intelligent Agent and an implementation method thereof, and the decoupling and cooperation of each function are realized through a modularized design, and the specific technical scheme is as follows: The intelligent agent comprises an information acquisition module, a dialogue state judging module, an intention identifying module, a parameter extracting module, a rule engine module and a dialogue strategy module, wherein the collaborative work flow of each module is as follows: The information acquisition module serves as a knowledge support center, maintains structural definition information (including names, functions, parameters, constraint rules and the like) of the tool and a historical dialogue knowledge base, dynamically generates prompt words, and provides real-time data support for other modules. The dialogue state judging module is used for judging whether the current input of the user is the continuation of the previous round of task or not; an intention recognition module that recognizes an intention input by a user using the large language model; The parameter extraction module is connected with the information acquisition module and the intention recognition module and is used for generating an extraction prompt word according to the parameter definition of the tool after the intention recognition module finishes intention recognition and extracting the structural parameters from the user input; The rule engine module is connected with the parameter extraction module and the information acquisition module and is used for carrying out integrity and validity check on the structured parameters extracted by the parameter extraction module according to the tool parameter constraint rule provided by the information acquisition module; and the dialogue strategy module is used for generating natural language prompts acc