Domain-level agent system construction method and system and intelligent question answering method and system
By constructing a four-layer progressive framework and storing graph databases, and embedding private domain knowledge, the problem of chaotic tool invocation and inaccurate task decomposition in general intelligent agents in specific domains is solved, and efficient and accurate execution of complex tasks is achieved.
Patent Information
- Application Number
- CN202511254238.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-04
AI Technical Summary
When faced with complex tasks in specific domains, general-purpose large-scale intelligent agents suffer from insufficient depth of domain knowledge, leading to problems such as chaotic tool invocation, inaccurate task decomposition, and low execution efficiency.
A four-layer progressive construction framework is adopted, consisting of tools, toolsets, agent roles, and agent role groups. Through semantic description and label association, combined with graph database storage and large model learning, private domain knowledge is embedded to form executable constraint logic, avoiding tool binding chaos and agent function conflicts.
It significantly improves the accuracy and stability of task processing, reduces the error rate of tool calls, and increases the success rate and efficiency of complex task execution.
Smart Images

Figure CN120804373A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of natural language processing, and particularly relates to a domain-level intelligent agent system construction method and system and an intelligent question answering method and system. BACKGROUND
[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute prior art.
[0003] In the field of artificial intelligence, large model intelligent agent technology has evolved from a simple rule engine to a complex system with perception, understanding, decision-making and execution capabilities. With the continuous improvement of large language model (LLM) capabilities, especially in the breakthroughs in complex task decomposition and tool usage, intelligent agents can complete the entire process of work from information query to complex task execution.
[0004] Although general large model intelligent agents have strong language generation capabilities, they have problems with insufficient domain knowledge when facing complex tasks in specific fields such as medical diagnosis, financial risk control and industrial internet. This is because the training data of general models covers a wide range but lacks domain expertise, resulting in low accuracy in understanding specialized terminology, logical rules and deep requirements in subfields. For example, for complex tasks such as water plant pump group maintenance, general intelligent agents have difficulty accurately decomposing the task into: first, assessing the health, capacity and security of each pump group, and then calling a scheduling optimization algorithm to provide recommendations.
[0005] The current mainstream intelligent agent construction method is to create a general intelligent agent, write a description and prompt words, bind a series of tools to the intelligent agent, and then start using it. When encountering complex problems, the task steps are decomposed by the knowledge of the general large model itself.
[0006] The general intelligent agent construction mode, i.e., the intelligent agent selection tool mode, is not suitable for domain intelligent agent construction: Firstly, in some intelligent agent systems built on LLM, the intelligent agent autonomously selects and calls from a series of tools based on its own algorithm and understanding of the task, such as by comparing the matching degree of tool descriptions and task requirement keywords. This approach lacks strong constraints and is prone to tool calling chaos, resulting in high error rates in complex task scenarios. In addition, relying on the large language model to understand natural language descriptions of tasks and generate decomposition steps often results in step redundancy, omission or sequence errors due to the large language model's insufficient understanding of complex tasks, leading to low task execution efficiency and low success rate in completing complex tasks. Secondly, when the tool is described by MCP (Manufacturing Communication Protocol) exposure or Function calls, the description of the result and the usage instruction (such as the usage scenario of the tool, etc.) are lacking, so that the large model cannot give the correct tool call selection and call parameters. SUMMARY
[0007] In order to solve the technical problems existing in the above background art, the present application provides a field-level agent system construction method and system and an intelligent question and answer method and system, which creatively constructs a four-layer progressive construction framework of tool-tool set-agent role-agent role group, learns the complex task execution steps to the agent group, does not need the user to create the execution steps manually, only needs to fine-tune the learned execution steps, embeds the private domain knowledge into the core elements of each level, and this structured design converts the originally scattered private domain knowledge into executable constraint logic, avoids the problems of tool binding confusion and agent function conflict in the ruleless system, greatly reduces the tool call error rate, and greatly improves the task processing accuracy and stability.
[0008] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows: The first aspect of the present application provides a field-level agent system construction method, which comprises: acquiring semantic descriptions and labels of tools and storing them into a graph database; in response to a tool set creation instruction, associating tools with the same label to obtain a tool set; in response to a learning instruction, a large model calls the semantic descriptions of tools with the same label to generate tool set information; and storing the tool set and the tool into the graph database; in response to an agent role creation instruction, binding a plurality of tool sets to a created agent role; in response to a learning instruction, a large model calls the tool set information of the binding to generate agent role information; and storing the agent role and the tool set into the graph database; in response to an agent group creation instruction, binding a plurality of agent roles to a created agent group; in response to a learning instruction, a large model calls the agent role information of the binding to generate agent group information; and storing the agent role and the agent group into the graph database.
[0009] Further, it further comprises: calculating the correlation degree of each semantic description, and reminding the technical personnel to correct when the average correlation degree of a certain semantic description and the remaining semantic descriptions is lower than a threshold value.
[0010] Further, the correlation degree is: ; wherein, TF-IDF vector of the i-th semantic description, TF-IDF vector for the jth semantic description, length bias factor ; ϵ is a smoothing term; adjustment factor ; λ 0 is a base adjustment factor; entropy value , M is the number of semantic descriptions, probability value , maximum entropy value , N i Total number of words of the ith semantic description.
[0011] Further, the tool set information, agent role information and agent group information each include functions, targets and calling steps.
[0012] Further, the semantic description includes functions of tools, input parameters, output result formats, output semantics and applicable scenarios.
[0013] Further, the learning trigger timing is at creation or when the associated object is updated.
[0014] The second aspect of the application provides a domain-level agent system construction system, comprising: A data acquisition module configured to acquire semantic descriptions and labels of tools and store them in a graph database; A tool set creation module configured to associate tools with the same label to obtain a tool set in response to a tool set creation instruction, and to generate tool set information by calling semantic descriptions of tools with the same label using a large model in response to a learning instruction; and to bind the tool set with the tools and store them in the graph database; A role creation module configured to bind a plurality of tool sets to a created agent role in response to an agent role creation instruction, and to generate agent role information by calling the bound tool set information using a large model in response to a learning instruction; and to bind the agent role with the tool set and store them in the graph database; An agent group creation module configured to bind a plurality of agent roles to a created agent group in response to an agent group creation instruction, and to generate agent group information by calling the bound agent role information using a large model in response to a learning instruction; and to bind the agent role with the agent group and store them in the graph database.
[0015] The third aspect of the application provides an intelligent question and answer method based on a domain-level agent system constructed by the first aspect of the domain-level agent system construction method, comprising: Acquiring an input question, a large model performing intent recognition and matching an agent group; The information of the matched agent group is called, the input question is combined, a large model is passed through, the agent group is distributed, and an instantiation process is generated; based on the instantiation process, agent roles, tool sets and tools are distributed in sequence, and a result is generated.
[0016] Further, the result generation process is based on the reasoning-action mode.
[0017] The fourth aspect of the application provides an intelligent question and answer system, comprising: A domain-level agent system construction system as described above, and An intent recognition module configured to: acquire an input question, perform intent recognition by a large model, and match an agent group; A result generation module configured to: call the information of the matched agent group, combine the input question, pass through a large model, distribute the agent group, generate an instantiation process; based on the instantiation process, distribute agent roles, tool sets and tools in sequence, and generate a result.
[0018] Compared with the prior art, the application has the following beneficial effects: The application initiates a four-layer progressive construction framework of tool-tool set-agent role-agent role group, learns complex task execution steps to the agent group, does not need the user to create the execution steps manually, only needs to fine-tune the learned execution steps, embeds private domain knowledge into the core elements of each level, and this structured design converts the originally scattered private domain knowledge into executable constraint logic, avoids the problems of tool binding confusion and agent function conflict in a ruleless system, greatly reduces the tool calling error rate, and greatly improves the task processing accuracy and stability.
[0019] The application adds a "result semantic description" structure field, splits tool description into function, input parameter, output result format, output semantic and applicable scene, and realizes the association annotation of the tool return result and the task target. The application calculates the correlation of each semantic description, reminds the technical personnel to correct when the average correlation of a certain semantic description and the remaining semantic descriptions is lower than a threshold value, thereby avoiding the input of incorrect semantic description by the technical personnel; moreover, the length difference of different semantic descriptions is large, the length deviation factor is used to amplify the difference, auxiliary identification of the structure incompatible but semantically similar semantic descriptions is realized; moreover, the influence of the entropy value is added, the smaller the entropy value, the more uneven the sentence length distribution, in this case, the larger the length deviation factor, thereby further increasing the influence of the length deviation on the similarity calculation in the case of uneven sentence length distribution. BRIEF DESCRIPTION OF DRAWINGS
[0020] The accompanying drawings, which form a part of this specification, are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification. The embodiments of these drawings are of illustrative embodiments of the application and, as such, are not intended to limit or restrict the scope of the application to the specific embodi ments presented in the drawings.
[0021] Figure 1 is a flow chart of a domain-level agent system construction method according to an embodiment of the present application; Figure 2 is a flow chart of an intelligent question and answer method according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.
[0023] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as generally understood by those skilled in the art to which the present application belongs.
[0024] Embodiment One The present embodiment provides a domain-level agent system construction method.
[0025] The domain-level agent system construction method provided by the present embodiment improves the accuracy of the agent in processing complex problems in the domain through the dual mechanism of structured construction process and deep integration of private domain knowledge, mainly solving the core problems of tool calling confusion, task disassembly error, and low efficiency of React process caused by constraint loss in complex task processing.
[0026] The domain-level agent system construction method provided by the present embodiment creates a four-layer progressive construction framework of tool-tool set-agent role-agent role group, learns the complex task execution steps to the agent group, does not need the user to create the execution steps manually, only needs to fine-tune the learned execution steps, which is equivalent to telling the large model the private domain knowledge and a series of steps, i.e. embedding the private domain knowledge (such as domain-specific rules, task logic, tool association relationship, etc.) into the core elements of each level. This structured design converts the originally scattered private domain knowledge into executable constraint logic, avoiding the problems of tool binding confusion and agent function conflict in the ruleless system. The domain-level agent system construction method provided by the present embodiment fundamentally solves the problem of tool calling confusion through the strong binding relationship between the tool set and the agent role. The tool set is pre-combined with specific tools according to the domain knowledge and task logic, and the calling rules are defined. The agent role can only call the tools in the bound tool set and follow the preset order. The tool calling error rate will be greatly reduced, greatly improving the accuracy and stability of task processing.
[0027] This embodiment provides a method for constructing a domain-level intelligent agent system. It integrates private domain knowledge within the domain into the basic data construction of the intelligent agent system, writes tools and steps for dealing with problems within the domain into the basic data, and then uses them as knowledge participation prompt words in the knowledge graph to enable the large model to fully understand private domain knowledge, improve the accuracy of giving reasonable steps for complex problems and the success rate of selecting and calling tools.
[0028] This embodiment provides a method for constructing a domain-level intelligent agent system, such as Figure 1 As shown, the following steps are included: Step 1: Build the tool layer.
[0029] Step 101: Technical personnel develop basic tools. When a new basic tool is released, the technical personnel will add a detailed semantic description for the tool, including the tool's functions, input parameters, output result format, output semantics, applicable scenarios, etc.
[0030] For example, for the tool for obtaining device attribute information: the tool's function (such as "obtain device attribute list information"), input parameters (such as device code), output result format (such as device attribute list information in JSON array format), output semantics (this tool returns xx device attribute list information, the result is as follows:, each field is translated as:), applicable scenarios (such as when obtaining device attribute data, if the user passes in the attribute name, it is necessary to call this tool or the correspondence between the device attribute code and the name).
[0031] For example, for the normalization tool: the function of the tool (such as "normalize the input data"), input parameters (such as data after outlier correction), output result format (such as normalized data in JSON array format), output semantics (this tool returns the data normalized by the input parameters, the result is as follows:), applicable scenarios (for example, during normalization, if the user inputs data after outlier correction, this tool needs to be called).
[0032] Step 102: Calculate the relevance of each semantic description. When the average relevance of a semantic description (e.g., input parameter) with the remaining semantic descriptions is lower than a threshold, remind the technician to make corrections, thereby preventing the technician from inputting an incorrect semantic description.
[0033] The specific steps of correlation calculation are: (1) Word segmentation: Segment each sentence (i.e., semantic description) to obtain a word set: The word segmentation result of the i-th semantic description: (m is the number of words in the i-th semantic description); Build global vocabulary: merge all sentence (5 semantic descriptions) word segmentation results, and get global unique vocabulary after deduplication , where k is the total number of unique words in the vocabulary, and the vector dimension of all subsequent sentences is k.
[0034] (2) Calculate the term frequency (TF).
[0035] For any word in the vocabulary V v t (t=1, 2,..., k), its original term frequency in sentence A TF i,t is defined as: ; where count ( v t , i ) represents the number of times the word v t appears in the i-th semantic description.
[0036] The total number of words in the i-th semantic description: ; The normalized TF of the word v t in the i-th semantic description is: .
[0037] (3) Calculate the inverse document frequency (IDF).
[0038] For the word v t in the vocabulary V, the IDF value formula is: ; where |D| is the total number of sentences (in this embodiment, since there are 5 semantic descriptions of tool functions, input parameters, output result formats, output semantics, and applicable scenarios, |D|=5); DF t represents the number of sentences containing the word v t .
[0039] (4) Calculate the TF-IDF vector.
[0040] The TF-IDF value of the word v t in the i-th semantic description is: ; The TF-IDF vector of the i-th semantic description is: .
[0041] (5) Calculate the cosine similarity between two sentences (the i-th semantic description and the j-th semantic description): ; where, TF-IDF vector of the ith semantic description, TF-IDF vector of the jth semantic description, length bias factor ; ϵ is a smoothing term; adjustment factor ; λ 0 is a base adjustment factor; the entropy value H measures the uniformity of the length distribution, M is the number of semantic descriptions (5 in this embodiment), the maximum entropy value Because the lengths of different semantic descriptions differ greatly (for example, the output result format and the applicable scenario), the sentence length implies structural differences, and the length bias factor amplifies these differences to assist in identifying structurally incompatible but semantically similar semantic descriptions; moreover, the influence of the entropy value is added, and the smaller the entropy value, the less uniform the sentence length distribution, and in this case, the larger the length bias factor, thereby further increasing the influence of the length bias on the similarity calculation in the case of uneven sentence length distribution.
[0042] (6) The entropy value H is used to quantify the degree of distribution disorder of the global sentence length, and the higher H is, the more uniform the length distribution, and the smaller λ is, thereby weakening the length reinforcement and avoiding excessive interference of the length difference with the semantics in the case of uniform length distribution of different semantic descriptions.
[0043] Step 103, the tool is associated with a tag when it is released, which is used to match the tool set.
[0044] The tag here can be data acquisition, data preprocessing, fault detection, etc.
[0045] These semantic descriptions and tool information such as tags are stored in a graph database to provide a basis for the generation of the upper tool set layer. At this time, the nodes in the graph database are tool IDs and tags, and there is no association and no edge.
[0046] Step 2, tool set layer construction.
[0047] Step 201, in response to a tool set creation instruction, tools with the same tag are associated to obtain a tool set.
[0048] Step 202, in response to a learning instruction, the large model calls the semantic descriptions of the tools with the same tag, and the large model generates tool set information.
[0049] There are two learning opportunities for the tool set: (1) When the tool set is created, the “learn” button can be clicked to learn; (2) When a new tool is released, the user is prompted to click the “learn” button to learn.
[0050] The tool set information includes the function, the target, and the tool calling sequence (step).
[0051] When learning (i.e., generating the description of the tool set), the large model combines the functions of the same label tools to explicitly determine the overall function of the tool set; when generating the target, the large model sets the target of the tool set according to the requirements of the subdivided task scene; when generating the execution steps, the large model determines the calling sequence of each tool in the tool set according to the calling logic and sequence of the basic tools.
[0052] After generation, the user can edit and modify the description, target, and execution steps of the tool set to adapt to actual business requirements.
[0053] For example, for a data preprocessing tool set, the function is to complete the preprocessing of raw data; the target is to complete preprocessing through outlier detection, outlier correction, and normalization; and the tool calling sequence is: 1. Obtain the data of [xx period] [xx device] as raw data; 2. First call the outlier detection tool to detect outliers in the raw data; 3. Call the outlier correction tool to correct outliers in the raw data, and then call the normalization tool to normalize the data and output the normalized data.
[0054] Finally, the tool set and the tools are bound and stored in the graph database, at which time the node adds a tool set ID, and the relationship between the tool set ID and the tool ID is "contains", for example, tool set 1 contains tools A, B, and C.
[0055] Step 3, build the agent role layer.
[0056] Step 301, in response to an agent role (agent for short) creation instruction, bind several tool sets to the created agent role.
[0057] For example, for a newly created fault diagnosis agent, bind the data preprocessing tool set and the fault recognition tool set.
[0058] Step 302, in response to a learning instruction, the large model calls the information of the bound tool set, and the large model generates agent role information.
[0059] Like the tool set, the learning timing of the agent role has two: (1) when the agent role is created, when the role is determined, the tool set can be bound, and then the "learn" button is clicked to learn; (2) when receiving a signal that the bound tool set is updated, the user is prompted to click the "learn" button to learn.
[0060] Among them, the agent role information includes description, target, and tool set execution steps.
[0061] When learning, the description of the agent role is generated based on the function of the tool set; the target is determined according to the target of the tool set; and the execution steps are formulated according to the execution steps of the tool set.
[0062] After generation, the user can also edit and modify the description, goal, and execution steps of the agent role.
[0063] For example, for a newly created fault diagnosis agent, the function is to complete the fault diagnosis of xx equipment; the goal is to realize the fault diagnosis of the equipment based on the raw data through data preprocessing and fault identification; the tool set execution steps are: 1. Obtain the data of [xx period] [xx equipment] as raw data; 2. First, call the data preprocessing tool set to preprocess the raw data; 3. Call the fault identification tool set to identify faults based on the data after preprocessing, and give fault reasons and maintenance suggestions.
[0064] Finally, the agent role and the tool set are bound and stored in the graph database, and the node adds an agent role ID. The relationship between the tool set ID and the agent role ID is "dependence", for example, agent role 1 depends on tool set 1 and 2.
[0065] Step 4, construct the agent role group layer.
[0066] Step 401, in response to the agent role group (agent group for short) creation instruction, bind several agent roles to the created agent role group.
[0067] For example, for a newly created device operation and maintenance agent group, bind the fault diagnosis agent, health assessment agent, professional report agent, and condensed time playback agent.
[0068] Step 402, in response to the learning instruction, the large model calls the information of the bound agent role, and the large model generates agent role group information.
[0069] Among them, the agent role group information includes function, goal, and agent role execution steps.
[0070] Like the tool set and the agent role, the agent group has two learning opportunities: (1) When the agent group is created, when the domain is determined, the agent role is bound, and then the "learn" button is clicked to learn; (2) When receiving the signal of the bound agent role update, the user will be prompted to click the "learn" button to learn.
[0071] The description of the agent role group will combine the functions of each agent role to clearly define the complex tasks it can handle; the goal will be set according to the needs of the complex task; and the execution steps will be formulated according to the execution steps of each agent role and the coordination logic.
[0072] The user can edit and modify the description, goal, and execution steps of the agent role group to meet the processing needs of different complex tasks.
[0073] For example, for a newly created device operation and maintenance agent group, the function is to perform the operation and maintenance of xx device; the goal is to realize the operation and maintenance of the device based on the original data through the fault diagnosis agent, the health degree evaluation agent, the professional report agent and the condensed time playback agent; the execution steps are: 1. calling the condensed time playback agent, using the condensed time playback algorithm to backtrack the abnormal shutdown period data of [xx device]; 2. calling the device anomaly detection agent to perform device anomaly detection on the data of [xx period] [xx device]; 3. calling the device fault diagnosis agent to perform device fault diagnosis on the data of [xx period] [xx device] and giving fault reasons and maintenance suggestions; 4. calling the health degree evaluation agent to evaluate the health degree of [xx device] and predict the subsequent operation trend; 5. calling the professional report agent to give a detailed analysis report.
[0074] Finally, the agent role and the agent role group are bound and stored in the graph database, and the node adds the agent role group ID at this time. The relationship between the agent role ID and the agent role group ID is "contains", for example, the agent role group A contains the agent roles 1 and 2.
[0075] The field-level agent system construction method provided in this embodiment focuses on the construction of a field-level agent system, aims to solve the core problems of "insufficient knowledge, chaotic tool calling, and inaccurate task decomposition" of general agents in complex task processing in a specific field, and realizes the dynamic construction and efficient operation of the field-level agent system through the technical path of "four-layer architecture construction-privately-owned domain knowledge integration-optimized MCP protocol-graph database storage and retrieval".
[0076] The field-level agent system construction method provided in this embodiment constructs the field-level agent system foundation in a four-layer progressive framework of "tool-tool set-agent role-agent role group", and each layer is generated by a large model combined with field privately-owned domain knowledge to generate functions, goals and execution steps through a learning mechanism (triggered when created / associated object is updated), which can be edited and optimized by users as needed.
[0077] The field-level agent system construction method provided in this embodiment embeds field privately-owned domain knowledge (such as exclusive rules, task logic, and tool association relationship) into the core elements of each layer of the four-layer architecture, such as binding field terminology labels at the tool layer and embedding scene execution standards at the agent role layer, so that privately-owned domain knowledge is converted into executable constraint logic.
[0078] The field-level agent system construction method provided in this embodiment adds a "result semantic description" structure field to solve the problem of missing semantic interpretation of the general MCP protocol, splits the tool description into function, input parameter, output result format, output semantic and applicable scene, and realizes the association annotation of the tool return result and the task target.
[0079] The field-level agent system construction method provided in this embodiment maps four-layer architecture information and relationships into graph nodes and edges and stores them in a graph database (such as memgraph), thereby realizing multi-hop association query (such as agent group-agent role-tool set-tool link tracing) in combination with a knowledge graph, and quickly retrieving private domain knowledge to construct accurate prompt words.
[0080] The field-level agent system construction method provided in this embodiment has the core advantage of deeply coupling the structured private domain knowledge with the dynamic construction of the agent system, solving the confusion of tool and agent collaboration in an unconstrained system and realizing the precision leap of the whole process of a large model from task decomposition to execution feedback through accurate empowerment of domain knowledge, thereby providing a reusable technical paradigm for the intelligent processing of field-level complex tasks.
[0081] The field-level agent system construction method provided in this embodiment significantly improves the whole process precision of a large model in processing complex tasks: in the task decomposition phase, the agent group can decompose complex problems into a sub-task chain with clear steps and clear responsibilities based on the pre-set task decomposition logic in the private domain knowledge, avoiding the problems of redundant or missing decomposition steps in traditional systems; in the tool calling phase, the agent role can accurately identify the user's intention through the tool application scenarios annotated by the private domain knowledge, greatly reducing the tool calling error rate; in the React process, based on the task completion standards defined in the private domain knowledge, it can accurately determine whether the current step has achieved the goal, avoiding meaningless loop execution or premature termination, and making the efficiency of the React process improved by more than 40%. Embodiment Two The field-level agent system construction system provided in this embodiment specifically includes: A data acquisition module configured to acquire semantic descriptions and labels of tools and store them in a graph database; A tool set creation module configured to: in response to a tool set creation instruction, associate tools with the same label to obtain a tool set; in response to a learning instruction, a large model calls semantic descriptions of tools with the same label to generate tool set information; and store the tool set and the tools in the graph database in a bound manner; A role creation module configured to: in response to an agent role creation instruction, bind a plurality of tool sets to a created agent role; in response to a learning instruction, a large model calls tool set information of the bound tool sets to generate agent role information; and store the agent role and the tool sets in the graph database in a bound manner; An agent group creation module configured to: bind a plurality of agent roles to a created agent group in response to an agent group creation instruction; and generate agent group information by calling the bound agent role information by the large model in response to a learning instruction; and store the binding of the agent role and the agent group into a graph database.
[0082] It should be noted that each module in the embodiment corresponds to each step in Embodiment One, and the specific implementation process is the same, which will not be repeated here.
[0083] Embodiment Three The embodiment provides an intelligent question answering method, as shown in Figure 2 The embodiment provides an intelligent question answering method, as shown in Step A, the user inputs a question, and after the question in the field arrives, the large model first performs intent recognition to identify which agent group can solve the problem.
[0084] Suppose the user inputs the question: "No. 1 water pump has been abnormally stopped for nearly 3 days, please analyze the cause and evaluate the subsequent running trend"; the large model in the field agent system identifies that this is a complex task that needs to combine device historical operation data for fault analysis and risk assessment, and matches to the "device operation and maintenance agent group" to solve it.
[0085] Step B, the description of the agent group has a fixed process template for solving the problem, which allows the large model to reference this fixed process template to instantiate a process for solving complex problems according to the actual device in the user's question when the task is decomposed, and then allows the user to delete the steps not needed for this task.
[0086] For example, the fixed process for solving problems by the "device operation and maintenance agent group" is: 1. Call the condensed playback agent, use the condensed playback algorithm, backtrack the data of the [xx device] abnormal downtime period, analyze the data, and analyze the data; 2. Call the device anomaly detection agent, perform device anomaly detection on the data of [xx period] [xx device]; 3. Call the device fault diagnosis agent, perform device fault diagnosis on the data of [xx period] [xx device], and give fault reasons and maintenance suggestions; 4. Call the health assessment agent, perform health assessment on [xx device], and predict the subsequent running trend; 5. Call the professional report agent to give a detailed analysis report.
[0087] The process is incorporated into the prompt word, and the large model will give the following instantiation process: 1. Call the condensed playback agent, use the condensed playback algorithm, backtrack the 1st pump abnormal shutdown period data, analyze the data in time sequence, and analyze the data; 2. Call the device anomaly detection agent, and perform device anomaly detection on the data of the 1st pump in the last three days; 3. Call the device fault diagnosis agent, and perform device fault diagnosis on the data of the 1st pump in the last three days, and give the fault reason and maintenance suggestion; 4. Call the health degree evaluation agent to evaluate the health degree of the 1st pump and predict the future running trend; 5. Call the professional report agent to give a detailed analysis report.
[0088] The large model deletes step 5 according to the user input question, and then the agent group starts to execute the problem solving.
[0089] Step C, the agent group assigns the agent role to solve the problem according to the planned steps, and the agent role also determines its target range and the tool set usage order involved in each target range when it is constructed. The agent role will match the step content according to its target range, select a target to participate in the construction of the prompt word, and use the tool set usage order reference template to participate in the construction of the prompt word, so that the large model can achieve the target according to the reference order; The tool set also determines its target range and the tool usage order involved in each target range when it is constructed. The tool set will match the step content according to its target range, select a target to participate in the construction of the prompt word, and use the tool usage order reference template to participate in the construction of the prompt word, so that the large model can achieve the target according to the reference order.
[0090] The above process is a react (reasoning-action) mode, the tool returns a result with semantic information, the large model judges whether each tool returns the correct result and selects the next tool to approach the target step by step, and finally judges whether the target has been reached, exits the react process, and gives the answer. The whole process will be shown to the user, and the user can terminate or participate in the calling of the tool that needs human confirmation in time.
[0091] For example: the target range of the health degree evaluation agent role is to obtain the health degree index of a certain device, obtain the health degree score of the device, calculate the latest device health degree, and predict the trend of the device health degree. When the user question mentioned above arrives, the health degree evaluation agent thinks that it matches the latest device health degree target, and the steps to complete this target are: 1. Call the health degree evaluation tool set to give the latest health degree score of the device; 2. Call the health degree score prediction tool set to give the device health degree prediction for the next day.
[0092] For the health evaluation tool set, the steps are: 1. Call the health index value acquisition tool to acquire the health index value of the device; 2. Call the health evaluation tool to give the latest health score of the device.
[0093] For the health score prediction tool set, the steps are: 1. Call the historical device health score acquisition tool to acquire the historical device health score; 2. Call the health score prediction tool to give the device health prediction for the next day.
[0094] These knowledge participate in constructing the prompt word, and the large model calls the tools in the tool set bound to the agent role to complete the target.
[0095] For example: first call the health index value acquisition tool (tool 1), input the device code of No. 1 water pump, and the health index value acquisition tool returns: the health index value of No. 1 water pump has been acquired, and the result is as follows: motor score: 95 points, pump body: 82 points; the large model judges that the result is valid and considers that the result has been returned; call the health evaluation tool (tool 2), input the health index data of No. 1 water pump, and the health evaluation tool returns: the health score of No. 1 water pump has been acquired, and the result is as follows: the current score is 88 points; the large model judges that the result is valid and considers that the result has been returned; …; call the health score prediction tool (tool 4), input the current score and historical data of No. 1 water pump, and the health score prediction tool returns: the health score of No. 1 water pump has been predicted, and the result is as follows: it may drop to 80 points in the next day; the large model judges that the result is valid and considers that the result has been returned; the target is achieved, and the role result (health score and device health prediction for the next day) is output.
[0096] Similarly, the fault diagnosis agent outputs the fault reason and the maintenance suggestion.
[0097] Finally, the results of each role are summarized and displayed to the user; the user operates; the task is terminated; if the confirmation or misoperation is confirmed, the final analysis report is output.
[0098] The embodiment provides an intelligent question and answer method, after a user inputs a complex problem in a field, a large model first matches a corresponding intelligent agent group, the intelligent agent group calls out a fixed process template and instantiates, after redundant steps are deleted, a task is distributed to a corresponding intelligent agent role; the intelligent agent role calls tools in a bound tool set in a React mode according to a preset target and tool use order, the tools return results with semantic information, the large model judges the validity of the results and gradually promotes the task, finally, a report is generated by summarizing the results, and the whole process is displayed to the user.
[0099] Embodiment four The embodiment provides an intelligent question and answer system, which comprises: The embodiment two provides a field-level intelligent agent system construction system, and An intention recognition module is configured to: acquire an input question, a large model performs intention recognition, and a matched agent group is matched out; A result generation module is configured to: call information of the matched agent group, combine the input question, assign the agent group through the large model, and generate an instantiated process; and based on the instantiated process, sequentially assign an agent role, a tool set and a tool to generate a result.
[0100] It should be noted that each module in the embodiment corresponds to each step in Embodiment Three one by one, and the specific implementation process is the same, which will not be repeated here.
[0101] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for constructing a domain-level intelligent agent system, characterized in that: include: Obtain semantic descriptions and tags of tools and store them in a graph database; In response to a toolset creation instruction, tools with the same label are associated to obtain a toolset; In response to learning instructions, the large model calls the semantic description of the tools with the same label to generate tool set information; the toolset and the tools are bound and stored in the graph database; In response to an agent role creation instruction, binding a plurality of tool sets to the created agent role; In response to the learning instruction, the large model calls the bound toolset information to generate the agent role information; Bind the agent roles and tool sets into the graph database; In response to an agent group creation instruction, binding a plurality of agent roles to the created agent group; In response to the learning instruction, the large model calls the bound agent role information to generate agent group information; the agent role and the agent group are bound and stored in the graph database.
2. A method for constructing a domain-level intelligent agent system according to claim 1, characterized in that: Also includes: Calculate the relevance of each semantic description. When the average relevance of a semantic description with the rest of the semantic descriptions is lower than a threshold, remind the technicians to make corrections.
3. A method for constructing a domain-level intelligent agent system according to claim 2, characterized in that: The correlation is: ; in, is the TF-IDF vector of the i-th semantic description, is the TF-IDF vector of the jth semantic description, length deviation factor ; ϵ is the smoothing term; the adjustment factor ; λ 0 is the basic adjustment factor; entropy value , M is the number of semantic descriptions, the probability value , maximum entropy , N i Represents the total number of words in the i-th semantic description.
4. A method for constructing a domain-level intelligent agent system according to claim 1, characterized in that: The toolset information, agent role information and agent group information all include functions, goals and calling steps.
5. A method for constructing a domain-level intelligent agent system according to claim 1, characterized in that: The semantic description includes the tool's functions, input parameters, output result format, output semantics, and applicable scenarios.
6. A method for constructing a domain-level intelligent agent system according to claim 1, characterized in that: The learning is triggered when the object is created or updated.
7. A domain-level intelligent agent system construction system, characterized in that: include: A data acquisition module is configured to: acquire semantic descriptions and tags of tools and store them in a graph database; The toolset creation module is configured to: in response to a toolset creation instruction, associate tools with the same tag to obtain a toolset; in response to a learning instruction, the large model calls the semantic description of the tools with the same tag to generate toolset information; and bind the toolset and the tools into a graph database; A role creation module is configured to: in response to an agent role creation instruction, bind a plurality of tool sets to the created agent role; In response to the learning instruction, the large model calls the bound toolset information to generate the agent role information; Bind the agent roles and tool sets into the graph database; An agent group creation module is configured to: in response to an agent group creation instruction, bind a plurality of agent roles to the created agent group; in response to a learning instruction, the large model calls the bound agent role information to generate agent group information; Bind agent roles and agent groups and store them in the graph database.
8. An intelligent question-answering method, characterized in that: A domain-level agent system constructed based on a domain-level agent system construction method according to any one of claims 1 to 6, comprising: After receiving the input question, the large model performs intent recognition and matches the agent group; Retrieve the information of the matched agent group, combine it with the input problem, and use the big model to assign the agent group and generate an instantiation process; based on the instantiation process, assign the agent role, tool set and tools in turn to generate the result.
9. An intelligent question-answering method according to claim 8, characterized in that: The result generation process is based on the reasoning-action model.
10. An intelligent question-answering system, characterized in that: include: A domain-level agent system construction system as claimed in claim 7, and The intent recognition module is configured to: obtain input questions, perform intent recognition on the large model, and match the agent groups; The result generation module is configured to: retrieve the information of the matched agent groups, combine it with the input problem, assign the agent groups through the large model, and generate an instantiation process; Based on the instantiation process, agent roles, tool sets and tools are assigned in sequence to generate results.
Citation Information
Patent Citations
Question answering system based on large language model and knowledge graph, construction method of question answering system and intelligent data governance platform
CN117609470A
Nuclear power DCS intelligent question and answer method and system based on large language model
CN118627613A
Question and answer method and system based on general table large model and data agent
CN119003535A
Power transmission and distribution production task cooperation system and method based on intelligent agent
CN120338452A
Information generation and retrieval method based on standardized format of sentence structure and semantic structure and system using the same
US20020107844A1
Cited By
Distributed industrial group intelligent cooperation system and method based on OPC UA Robotics
CN121239712A