Agent-based tool combination and task processing method, device, equipment and medium
By pre-training the language model and the Agent agent dynamically match the tool nodes, the tool combination logic is generated and optimized, and the problem of tool combination relying on fixed rules is solved, achieving efficient and intelligent task processing.
Patent Information
- Application Number
- CN202510772011.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-11
AI Technical Summary
In the prior art, tool combinations rely on fixed rules and lack intelligent adaptability, resulting in users needing to manually call or orchestrate tools to operate in complex and inefficiently, and unable to cope with complex and changing task requirements.
Structured semantic vectors are generated through pre-trained language models, match candidate tool nodes based on the Agent agent and the knowledge base, dynamically prioritize and convert them into a tree flowchart, and adjust tool nodes in combination with external feedback and optimization strategies, and generate and optimize tool combination logic.
It significantly lowers the threshold for users to manually combine tools, improves task processing efficiency and accuracy, and the system has the ability to continuously learn and optimize, which can better cope with complex and changeable task needs.
Smart Images

Figure CN120276875B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Agent intelligent body technology, and in particular to an Agent-based tool combination and task processing method, device, equipment and medium. Background Art
[0002] In recent years, users have needed to manually invoke or orchestrate tools to solve problems, resulting in complex and inefficient operations. For example, while RPA tools can automate processes, they cannot dynamically adjust tool combinations based on tasks. Furthermore, existing systems lack the ability to automatically generate tool combination logic, accumulate historical experience, and reuse it, making them unable to cope with complex and changing task requirements. This proposal introduces pre-trained language models, knowledge graphs, reinforcement learning, and other technologies to enable dynamic tool combination, the generation and optimization of thought chains, and the incremental update of the knowledge base, significantly improving the system's intelligence and task processing efficiency. Summary of the Invention
[0003] The purpose of this application is to provide an agent-based tool combination and task processing method, device, equipment and medium to at least solve the problem in the prior art that tool combinations rely on fixed rules and lack intelligent self-adaptation capabilities.
[0004] To solve the above technical problems, this application provides an agent-based tool combination and task processing method, including:
[0005] Performing natural language processing on task instructions input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, wherein the task semantics includes intent, entity, and context parameters;
[0006] Based on the agent, the structured semantic vector is matched with the semantic labels of tool nodes predefined in the knowledge base, and a set of candidate tool nodes related to the current task is output;
[0007] Based on the context parameters, dynamically prioritize the candidate tool node set to generate an initial thinking chain;
[0008] Automatically convert the initial thought chain into a tree-shaped flowchart structure, and dynamically add, delete, or adjust parameters of tool nodes in the flowchart based on external tool execution feedback or preset optimization strategies;
[0009] The tool combination logic is updated according to the adjusted thinking chain, the task instruction is processed based on the updated tool combination logic, and the task processing result is output.
[0010] Optionally, after generating the initial thought chain, the process further includes:
[0011] Verify the logical feasibility of the initial thinking chain through a sandbox environment;
[0012] If the verification is passed, the verified initial thought chain is automatically converted into a tree-shaped flow chart structure.
[0013] Optionally, dynamically prioritizing the candidate tool node set based on the context parameters to generate an initial thought chain includes:
[0014] Perform dynamic weighting based on the context parameters to calculate the priority weight of each candidate tool node;
[0015] Dependency constraint verification: Based on the dependency rules of tool nodes in the knowledge graph, logical conflict detection is performed on the prioritized candidate tool nodes;
[0016] The Monte Carlo tree search algorithm is used to simulate the execution paths of different node combinations, and the sorting scheme with the highest success rate is selected to generate the initial thinking chain.
[0017] Optionally, the agent-based intelligent agent performs similarity matching on the structured semantic vector and the semantic labels of tool nodes predefined in the knowledge base, and outputs a set of candidate tool nodes related to the current task, including:
[0018] Superimposing a dedicated feature vector on the structured semantic vector based on the domain label in the task instruction, and performing domain feature enhancement on the structured semantic vector;
[0019] Using a dynamic weighting algorithm to perform vector similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base;
[0020] The candidate tool nodes are filtered through multi-dimensional screening conditions, and a set of the candidate tool nodes related to the current task is output.
[0021] Optionally, dynamically adding, deleting, or adjusting parameters of tool nodes in the flowchart according to external tool execution feedback or preset optimization strategies may include:
[0022] When external feedback indicates that a node has failed to execute, it automatically backtracks to the predecessor node of the failed node and calls the alternative tool in the knowledge base to replace it;
[0023] Dynamically adjust the number of parallel executions and parameter configurations of the tool nodes according to the energy consumption constraints in the preset optimization strategy;
[0024] The semantic consistency checking module is used to verify whether the adjusted flowchart matches the original task intent.
[0025] Optionally, after updating the tool combination logic according to the adjusted thinking chain, the method further includes:
[0026] Decompose the adjusted thought chain into atomic operation units, annotate them with domain labels, execution environment, and version numbers, and store them in the knowledge base;
[0027] Build a reward function based on the reinforcement learning framework and optimize the agent's node mapping strategy based on the accuracy and time consumption of task processing results;
[0028] When a new tool node is added to the database, the associated semantic labels and dependencies are automatically generated, and the knowledge graph topology is updated.
[0029] Optionally, the method further includes:
[0030] Obtain execution logs of each tool in real time, extract key indicators and generate feedback vectors;
[0031] By comparing the deviation between the feedback vector and the prediction vector, the weak nodes in the thinking chain are located, and the incremental update of the knowledge base is triggered;
[0032] When the execution failure rate of the thought chain exceeds a threshold, it automatically rolls back to the historical stable version.
[0033] To solve the above technical problems, the present application also provides an agent-based tool combination and task processing device, including:
[0034] A task parsing module is used to perform natural language processing on task instructions input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, wherein the task semantics includes intent, entity, and context parameters;
[0035] A tool matching module is used to perform similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base based on an agent intelligent agent, and output a set of candidate tool nodes related to the current task;
[0036] A thought chain generation module, configured to dynamically prioritize the candidate tool node set based on the context parameters to generate an initial thought chain;
[0037] A parameter adjustment module is used to automatically convert the initial thought chain into a tree-shaped flowchart structure, and dynamically add or delete tool nodes in the flowchart or adjust parameters according to external tool execution feedback or preset optimization strategies;
[0038] The processing output module is used to update the tool combination logic according to the adjusted thinking chain, process the task instructions based on the updated tool combination logic, and output the task processing results.
[0039] To solve the above technical problems, the present application also provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the above-mentioned agent-based tool combination and task processing method.
[0040] To solve the above technical problems, the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the above-mentioned agent-based tool combination and task processing method.
[0041] The beneficial effects of the embodiments created by the present application are as follows: natural language processing of the task instructions input by the user is performed through a pre-trained language model to generate a structured semantic vector containing task semantics, wherein the task semantics include intent, entity and context parameters; based on the Agent intelligent body, the structured semantic vector is matched with the semantic labels of the tool nodes predefined in the knowledge base for similarity, and a set of candidate tool nodes related to the current task is output; based on the context parameters, the candidate tool node set is dynamically prioritized to generate an initial thought chain; the initial thought chain is automatically converted into a tree-shaped flowchart structure, and the tool nodes in the flowchart are dynamically added or deleted or the parameters are adjusted according to the external tool execution feedback or preset optimization strategy; the tool combination logic is updated according to the adjusted thought chain, the task instructions are processed based on the updated tool combination logic, and the task processing results are output. The user's task instructions are semantically parsed and represented by vectors through a pre-trained language model, tool nodes are matched in combination with the knowledge graph and dynamically sorted to generate a thought chain, which is further visualized in a tree-shaped flowchart and supports user interactive adjustment. Finally, the task is processed according to the optimized thought chain and the result is output. The threshold for users to manually combine tools is significantly reduced, and the task processing efficiency and accuracy are improved. At the same time, the system continuously learns and optimizes through a feedback mechanism, has the ability to continuously improve, can better cope with complex and changing task requirements, and solve the problem in existing technologies that tool combinations rely on fixed rules and lack intelligent adaptive capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0043] Figure 1 This is a basic flow chart of an Agent-based tool combination and task processing method according to a specific embodiment of the present application;
[0044] Figure 2 This is a basic structural diagram of an Agent-based tool combination and task processing device according to a specific embodiment of the present application;
[0045] Figure 3 This is a basic structural block diagram of a computer device according to a specific embodiment of the present application. DETAILED DESCRIPTION
[0046] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limiting the present application.
[0047] Those skilled in the art will understand that, unless otherwise stated, the singular forms "a," "an," "said," and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of this application refers to the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0048] Those skilled in the art will understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and, unless specifically defined as such, will not be interpreted in an idealized or overly formal sense.
[0049] Those skilled in the art will appreciate that the term "terminal" as used herein includes both devices that are wireless signal receivers, i.e., devices that only have wireless signal receivers without transmission capabilities, and devices that have receiving and transmitting hardware capable of performing two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices with single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service) devices that may combine voice, data processing, fax, and / or data communication capabilities; PDAs (Personal Digital Assistants) that may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; and conventional laptop and / or palmtop computers or other devices that have and / or include a radio frequency receiver. As used herein, a "terminal" can be portable, transportable, installed in a vehicle (air, sea, and / or land), or adapted and / or configured to operate locally and / or in a distributed manner at any other location on Earth and / or in space. A "terminal" as used herein can also refer to a communication terminal, an Internet access terminal, or a music / video playback terminal, such as a PDA, a mobile internet device (MID), and / or a mobile phone with music / video playback capabilities, as well as devices such as smart televisions and set-top boxes.
[0050] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with capabilities equivalent to those of a personal computer. It is a hardware device that has the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. Computer programs are stored in its memory, and the central processing unit loads the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0051] It should be noted that the concept of "server" referred to in this application can also be extended to server clusters. Based on the network deployment principles understood by those skilled in the art, the servers described should be logically divided. In physical space, these servers can be independent of each other but callable through interfaces, or integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method of this application.
[0052] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for implementation.
[0053] Unless explicitly specified, the AI models referenced or may be referenced in this application can be deployed on a remote server and remotely called on the client, or can be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence can be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.
[0054] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as they are suitable for being called by the technical solution of this application.
[0055] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus exhibit commonality, unless otherwise specified, these methods can be independently executed. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept. Therefore, concepts with the same expression, as well as concepts that are appropriately transformed for convenience despite different expression, should be understood as equivalent.
[0056] Unless expressly stated to be mutually exclusive, the various embodiments disclosed in this application may be cross-combined with the relevant technical features of the various embodiments to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or resolve certain deficiencies in the prior art. Those skilled in the art should be aware of such flexibility.
[0057] See also Figure 1 , Figure 1 The figure is a basic flow chart of the agent-based tool combination and task processing method of this embodiment.
[0058] like Figure 1 As shown, including:
[0059] S1100, performing natural language processing on a task instruction input by a user using a pre-trained language model to generate a structured semantic vector containing task semantics, wherein the task semantics includes intent, entity, and context parameters;
[0060] This embodiment is applicable to task processing scenarios involving agents in various fields, such as finance, e-commerce, insurance, education, healthcare, and law. In this embodiment, a task processing system is configured to automatically combine and process tools for tasks. Specifically, the task processing system (hereinafter referred to as the "system") receives user task instructions, parses the instructions, and then combines the corresponding task processing tools to process the task. Upon receiving a user's task processing instruction, a pre-trained language model performs natural language processing on the user-entered task instruction to generate a structured semantic vector containing the task semantics, which includes intent, entities, and context parameters. Specifically, a user enters the task instruction "Analyze the past week's sales data and generate a visual report." The system performs natural language processing on the instruction using a pre-trained language model (e.g., an LLM language model). First, the LLM language model identifies the intent of the instruction and classifies it into "data analysis" and "report generation." Next, the model identifies key entities, including the time range "past week," the data type "sales data," and the target tool "visualization tool." Furthermore, the LLM language model extracts context parameters, such as the user's historical task history and the context of the current task. Finally, LLM transforms this semantic information into a high-dimensional structured semantic vector, where each dimension represents a different semantic feature, such as intent strength, entity type, and contextual relevance. The resulting structured semantic vector will serve as the basis for subsequent tool matching.
[0061] It should be pointed out that in certain specific fields (such as finance or healthcare), general pre-trained language models may not be able to accurately understand domain-specific terminology and semantics. For this reason, this embodiment introduces a domain adaptation layer based on the pre-trained language model. For example, in the financial field, when the user enters "analyze the balance sheet", the domain adaptation layer will map the term "balance sheet" to the specific semantic space in the financial field, ensuring that its semantic vector accurately matches the tool nodes in the financial field (such as financial analysis tools). Through the domain adaptation layer, the system can more accurately parse domain-specific task instructions and avoid semantic deviation caused by general models.
[0062] It should be noted that in order to support multilingual input, this embodiment extends the pre-trained language model to multiple languages. For example, a user can input "analyze the sales data of the past week" in Chinese, and the system uses the multilingual model to align its semantic vector with the semantic label of the English tool node in the knowledge base. The semantic alignment process is optimized through comparative learning to ensure that instructions in different languages can be accurately mapped to the same tool node. For example, the Chinese "data cleaning" and the English "data cleaning" have a high degree of similarity in the semantic vector space, thus enabling cross-language task processing.
[0063] It should be pointed out that when processing user tasks in this embodiment, the system not only pays attention to the current instruction, but also combines context associations and historical task records. For example, if the user has completed a similar task before (such as "analyzing last week's sales data"), the system will use the context information of the historical task to optimize the semantic parsing of the current task. When the user enters "analyze the sales data of the past week" again, the system will refer to the semantic vectors of the historical tasks, quickly identify repeated intentions and entities, and make adjustments based on the nuances of the current task (such as changes in the time range). This method of context association and historical task utilization can significantly improve the efficiency and accuracy of task parsing.
[0064] S1200, performing similarity matching between the structured semantic vector and predefined tool node semantic labels in a knowledge base based on an Agent intelligent agent, and outputting a set of candidate tool nodes related to the current task;
[0065] After natural language processing of the user-entered task instructions using a pre-trained language model to generate a structured semantic vector containing the task semantics, the agent-based system performs similarity matching on the structured semantic vector with pre-defined semantic labels for tool nodes in the knowledge base, outputting a set of candidate tool nodes relevant to the current task. In this embodiment, the system matches the structured semantic vector generated by the pre-trained language model (LLM) with the semantic labels for tool nodes in the knowledge base. Each tool node in the knowledge base contains detailed metadata and semantic labels. For example, the metadata for a "Data Cleaning Tool" node includes a description of its function (removing duplicate and null values), input and output formats (input is the original dataset, output is the cleaned dataset), and dependencies (requiring a dataset as input). The semantic label describes the tool's function in natural language, such as "Data Cleaning Tool: used to remove duplicate and null values." Using the LLM, the system calculates similarity between the semantic vector of the user's task and these semantic labels, outputting a set of candidate tool nodes relevant to the current task. For example, if the user inputs "analyze the sales data of the past week and generate a visual report", the system will match candidate nodes such as "data cleaning tool", "data analysis tool" and "visualization tool".
[0066] It should be noted that in certain specific fields (such as finance or healthcare), the semantic labels and functional descriptions of tool nodes may be domain-specific. To this end, the system introduces domain knowledge graphs and builds dedicated knowledge bases for different fields. For example, in the financial field, the knowledge base will include tool nodes related to financial analysis, such as "balance sheet analysis tools" and "financial report generation tools." When a user enters a task instruction in the financial field, the system will prioritize calling the knowledge graph in the financial field to ensure a more accurate matching of tool nodes. Through the domain knowledge graph, the system can better understand domain-specific task requirements and provide a tool combination that is more in line with domain habits.
[0067] It's important to note that in some complex tasks, the task instructions entered by the user may include multiple subtasks, requiring the invocation of multiple tool nodes. To improve matching efficiency, the system incorporates a context-aware mechanism that filters candidate tool nodes based on the current task's context (such as task type, data size, and computing resources). For example, if the user's task involves large-scale data analysis, the system prioritizes tool nodes suitable for processing large data volumes, such as distributed data analysis tools. This context-aware tool node filtering allows the system to quickly narrow down the candidate tool nodes, improving matching efficiency and accuracy.
[0068] S1300: Based on the context parameters, dynamically prioritize the candidate tool node set to generate an initial thinking chain;
[0069] After the agent-based intelligent agent performs similarity matching between the structured semantic vector and predefined tool node semantic labels in the knowledge base, outputting a set of candidate tool nodes relevant to the current task, the system dynamically prioritizes the candidate tool nodes based on the context parameters to generate an initial thought chain. Specifically, in this embodiment, the system dynamically prioritizes the candidate tool nodes based on the context parameters. Assume that the user inputs the task instruction "Analyze the sales data of the past week and generate a visual report." In the above steps, the system has already matched a set of relevant candidate tool nodes, including "Data Cleaning Tool," "Data Analysis Tool," and "Visualization Tool." The system then ranks these candidate nodes based on context parameters (such as data size, computing resources, and historical success rate). For example, if computing resources are limited in the current environment, the system may prioritize lightweight data analysis tools over resource-intensive advanced analysis tools. Furthermore, the system also considers the success rates of historical tasks and prioritizes tool nodes that have performed well in similar tasks. Finally, the system generates an initial thought chain, arranging the tool nodes in order of priority, for example, "Data Cleaning Tool" → "Data Analysis Tool" → "Visualization Tool," and prepares to proceed to the next step.
[0070] It's important to note that in some scenarios, the urgency of the task is an important contextual parameter. For example, a user may need to complete an urgent data analysis task within a short period of time. In this case, the system will prioritize candidate tool nodes based on the urgency of the task. Specifically, the system will prioritize tool nodes that can be executed quickly, even if these tools may be less powerful. For example, for an urgent task, the system may prioritize a lightweight data cleaning tool over a powerful tool that takes a long time to execute. In this way, the system can complete the task as efficiently as possible within a limited time, meeting the user's urgent needs.
[0071] It's important to note that in a multi-user environment, the availability of computing resources is a significant factor influencing tool node selection. The system monitors resource usage in the current environment in real time and dynamically schedules candidate tool nodes based on resource availability. For example, if the current server's memory resources are limited, the system may prioritize tool nodes with lower memory usage. Furthermore, the system can adjust the priority of tool nodes based on dynamic resource changes. For example, when the resources corresponding to a high-performance tool node are released, the system can readjust its priority and include it in the execution sequence of the current task. In this way, the system can efficiently allocate and utilize resources in resource-constrained environments, ensuring smooth task execution.
[0072] S1400, automatically converting the initial thought chain into a tree-shaped flowchart structure, and dynamically adding or deleting tool nodes in the flowchart or adjusting parameters based on external tool execution feedback or preset optimization strategies;
[0073] After dynamically prioritizing the candidate tool node set based on the contextual parameters and generating an initial thought chain, the initial thought chain is automatically converted into a tree-like flowchart structure. Tool nodes in the flowchart are dynamically added, deleted, or parameterized based on external tool execution feedback or preset optimization strategies. Specifically, in this embodiment, the system automatically converts the generated initial thought chain into a tree-like flowchart structure for intuitive user viewing and editing. Suppose the user enters the task instruction "Analyze the sales data of the past week and generate a visual report." The system generates the initial thought chain "Data Cleaning Tool" → "Data Analysis Tool" → "Visualization Tool." The system converts this thought chain into a tree-like flowchart, where each tool node is a node in the diagram, and the connecting lines between nodes represent the call order. Users can view and edit the flowchart through a visual interface. For example, if a user finds that the "Data Cleaning Tool" execution time is too long, they can directly delete the node through the interface and add a "Data Preprocessing Tool" node. The system updates the thought chain in real time based on the user's editing operations and simulates execution in a sandbox environment to verify the logical feasibility of the flowchart. If a simulation fails, the system prompts the user and suggests possible solutions, such as adjusting the node order or modifying parameters.
[0074] It should be noted that in this embodiment, when the user edits the tree-shaped flowchart, the system will collect user feedback in real time and make dynamic adjustments. For example, if the user finds that the output result of a tool node does not meet expectations during operation, the user can directly feedback the problem through the interface. The system will automatically analyze the problem based on user feedback and provide adjustment suggestions. For example, if the user feedbacks that the output data format of a "data analysis tool" is incorrect, the system may suggest that the user adjust the parameters of the tool or replace it with another more suitable tool node. The system will also record user feedback and adjustment operations to optimize the selection and configuration of tool nodes in subsequent tasks.
[0075] It should be noted that in addition to adjustments driven by user feedback, the system can also automatically optimize the tree-like flowchart according to preset optimization strategies. For example, the system can introduce a performance optimization strategy to automatically detect bottleneck nodes in the flowchart (such as tool nodes that take too long to execute) and try to optimize performance by replacing tools or adjusting parameters. In addition, the system can also introduce a resource optimization strategy to automatically adjust the resource allocation of tool nodes to ensure that task execution efficiency is maximized under limited computing resources. For example, the system may automatically replace a tool node with high resource consumption with a lightweight alternative tool, or adjust the tool's parallel execution strategy to optimize resource utilization.
[0076] It should be pointed out that during the simulation execution of the tree flowchart, the system will monitor the execution results in real time and automatically backtrack and adjust when problems are found. For example, if during the simulation execution, it is found that the output data of a certain "data cleaning tool" node does not meet the input requirements of the subsequent "data analysis tool", the system will automatically backtrack to the "data cleaning tool" node to analyze the cause of the problem. If the problem is caused by improper tool parameter settings, the system will automatically adjust the parameters and re-execute; if the problem is because the tool itself is not suitable for the current task, the system will automatically replace it with another more suitable tool node. In this way, the system can promptly detect problems and make adjustments during the simulation execution stage to ensure that the final generated thinking chain logic is correct and efficient.
[0077] S1500. Update the tool combination logic according to the adjusted thinking chain, process the task instruction based on the updated tool combination logic, and output the task processing result.
[0078] After automatically converting the initial thought chain into a tree-like flowchart structure and dynamically adding, deleting, or adjusting parameters of tool nodes in the flowchart based on external tool execution feedback or preset optimization strategies, the system updates the tool combination logic based on the adjusted thought chain, processes the task instruction based on the updated tool combination logic, and outputs the task processing result. Specifically, in this embodiment, the system updates the tool combination logic based on the adjusted thought chain and processes the task instruction input by the user. Suppose the user inputs the task instruction "analyze the sales data of the past week and generate a visual report." After the previous steps, the system has generated and adjusted the thought chain, resulting in a tree-like flowchart consisting of "Data Preprocessing Tool" → "Data Analysis Tool" → "Visualization Tool." Following this thought chain logic, the system sequentially calls each tool node. First, the data preprocessing tool formats the raw sales data; then, the data analysis tool analyzes the processed data and extracts key indicators; finally, the visualization tool generates a visual report based on the analysis results. The system outputs the final visual report to the user as the task processing result and stores the entire thought chain and its execution results in the knowledge base for subsequent reuse and optimization.
[0079] It should be noted that users may need task results to be output in multiple formats. For example, users may need a visual report and a detailed analysis report at the same time. To this end, the system is also configured to support multi-format output of task results. While generating the visual report, the system will call a "report generation tool" to organize the analysis results into a detailed text report. The report includes not only screenshots of the visual charts, but also a detailed description of the data analysis and an explanation of key indicators. Users can select the desired output format through the system interface, and the system will generate the corresponding task results based on the user's selection. This multi-format output method can meet the needs of different users and enhance the flexibility and practicality of the system.
[0080] Furthermore, after completing a task, the system can provide users with intelligent recommendations based on the task results. For example, if a user completes a sales data analysis task, the system can recommend relevant follow-up actions based on the analysis results. If the analysis results show that a certain product's sales performance is poor, the system can recommend that the user further analyze the product's market feedback or suggest that the user adjust the marketing strategy. Furthermore, the system can also recommend relevant tools or resources based on the task results. For example, if the user requires further in-depth analysis of a data dimension, the system can recommend advanced tool nodes suitable for analyzing that dimension. In this way, the system not only completes the current task but also provides users with more value and helps them better utilize the task results.
[0081] In the above-described embodiment, a pre-trained language model is used to perform natural language processing on task instructions input by the user to generate a structured semantic vector containing task semantics, including intent, entity, and context parameters. An agent-based intelligent agent then performs similarity matching on the structured semantic vector with pre-defined semantic labels for tool nodes in a knowledge base, outputting a set of candidate tool nodes relevant to the current task. Based on the context parameters, the candidate tool nodes are dynamically prioritized to generate an initial thought chain. This initial thought chain is automatically converted into a tree-like flowchart structure, and tool nodes in the flowchart are dynamically added, deleted, or parameterized based on external tool execution feedback or preset optimization strategies. The tool combination logic is updated based on the adjusted thought chain, and the task instruction is processed based on the updated tool combination logic, outputting the task processing result. The pre-trained language model is used to perform semantic parsing and vector representation of the user's task instruction. Tool nodes are matched and dynamically sorted in conjunction with the knowledge graph to generate a thought chain, which is further visualized as a tree-like flowchart and supports user interactive adjustment. Finally, the task is processed and the result is output based on the optimized thought chain. This significantly reduces the threshold for users to manually combine tools, improving task processing efficiency and accuracy. At the same time, the system continuously learns and optimizes through the feedback mechanism, has the ability to continuously improve, and can better cope with complex and changing task requirements.
[0082] In some implementations, after S1300 generates the initial thought chain, the process further includes:
[0083] S1311. Verify the logical feasibility of the initial thinking chain in a sandbox environment;
[0084] In this embodiment, after generating the initial chain of thought, the system verifies the logical feasibility of the initial chain of thought through a sandbox environment. Assuming that the task instruction input by the user is "analyze the sales data of the past week and generate a visual report", the initial chain of thought generated by the system includes "data cleaning tool" → "data analysis tool" → "visualization tool". In the sandbox environment, the system simulates the execution of this chain of thought and calls each tool node step by step. First, the data cleaning tool cleans the simulated data, and the system checks whether the output meets expectations (such as whether duplicate values and null values are removed). Next, the data analysis tool analyzes the cleaned data, and the system verifies whether the analysis results contain the required key indicators. Finally, the visualization tool generates a chart based on the analysis results, and the system checks whether the chart correctly reflects the data trend. If the output of all tool nodes meets expectations and the verification is passed, the system will convert the verified initial chain of thought into a tree-shaped flowchart structure for further viewing and editing by the user.
[0085] It should be pointed out that in some tasks, the user may not provide complete actual data, or the data volume may be too large to be directly used for verification. For this reason, the system introduces simulated data in the sandbox environment for verification. For example, for data analysis tasks, the system generates simulated data sets that are similar to actual data in structure and distribution, but with a smaller data volume. By running the initial thinking chain on the simulated data, the system can quickly verify whether the logical relationship between the tool nodes is correct. For example, if the "data cleaning tool" does not work properly on the simulated data, the system will immediately detect the problem and prompt the user, avoiding wasting time and resources on the actual data. This approach not only improves verification efficiency, but also reduces dependence on actual data.
[0086] It should be noted that in complex tasks, the initial thought chain may include multiple tool nodes, and directly verifying the entire thought chain may make it difficult to locate the problem. To this end, the system adopts a step-by-step verification approach, gradually checking the output of each tool node. For example, when verifying a "data analysis tool", the system first checks whether its input meets expectations, and then checks whether its output contains the required key indicators. If the output of a tool node does not meet expectations, the system will record an error message and pause the verification process. Users can quickly locate the problem based on the error prompt, modify the tool parameters, or replace the tool node. In this way, the system can more accurately identify problems and improve the accuracy and efficiency of verification.
[0087] It should be noted that the focus of verification may vary in different task scenarios. To this end, the system dynamically adjusts the verification strategy based on the task type and context. For example, in tasks that process real-time data streams, the system will focus on the real-time performance and response speed of tool nodes; in tasks that process large-scale data, the system will focus on the resource consumption and execution efficiency of tool nodes. By dynamically adjusting the verification strategy, the system can better adapt to the needs of different tasks and ensure that the verification process is both efficient and accurate. For example, in resource-constrained environments, the system may prioritize verifying the performance of lightweight tool nodes to ensure that they can work properly under limited resources.
[0088] S1312: If the verification is successful, the verified initial thought chain is automatically converted into a tree-shaped flowchart structure.
[0089] Furthermore, the system determines that the logical feasibility of the initial thought chain is passed, and automatically converts the verified initial thought chain into a tree-like flowchart structure. In this embodiment, the initial thought chain that has passed the sandbox environment verification is automatically converted into a tree-like flowchart structure. Suppose the task instruction entered by the user is "Analyze the sales data of the past week and generate a visual report", and the verified initial thought chain is "Data Cleaning Tool" → "Data Analysis Tool" → "Visualization Tool". The system displays these tool nodes and their calling sequence in the form of a tree-like flowchart. The root node of the tree-like flowchart is the starting point of the task, and each tool node is a child node. The connecting lines between the nodes represent the calling sequence. For example, "Data Cleaning Tool" is the first child node, "Data Analysis Tool" is its child node, and "Visualization Tool" is the child node of "Data Analysis Tool". Users can intuitively view the functional description, input and output format, and logical relationship between each tool node through the visual interface. In addition, users can also edit the flowchart by dragging nodes, modifying node parameters, etc., and the system will update the logical structure of the thought chain in real time.
[0090] It should be pointed out that in actual applications, users may need to modify and optimize the tree flowchart multiple times. For this purpose, the system introduces a version management mechanism. Every time a user edits the tree flowchart, the system automatically saves a version. Users can view historical versions through the version management interface, compare the differences between different versions, and restore to the previous version as needed. For example, after the user modifies the parameters of the "Data Analysis Tool" and finds that the new parameter settings cause inaccurate analysis results, they can restore to the previous parameter settings through version management. The version management mechanism not only makes it convenient for users to optimize task processes, but also provides users with data security protection, avoiding the irreversibility of task processes due to misoperation.
[0091] It should be noted that in order to improve the efficiency of task processing, the system supports saving verified tree flowcharts as templates for users to reuse in similar tasks. For example, after a user completes a "sales data analysis and visualization" task, the system saves the tree flowchart of that task as a template. When the user needs to perform a similar sales data analysis task again, they can directly call the template, and the system will automatically load the tool nodes and parameter settings in the template. Users can fine-tune the template according to new task requirements without having to build the task process from scratch. This template-based reuse mechanism not only saves users time and energy, but also improves the system's efficiency in processing repetitive tasks, while also accumulating rich task processing experience for users.
[0092] This embodiment further improves the system reliability and user experience by introducing a sandbox environment to verify the logical feasibility of the initial thought chain and automatically converting the verified thought chain into a tree-shaped flowchart structure. Sandbox verification can detect and correct logical errors in the thought chain in advance, avoiding resource waste and task failure. The visual display and interactive editing function of the tree-shaped flowchart enable users to intuitively understand and adjust the task process, lowering the operational threshold. At the same time, version management and template reuse mechanisms further improve the efficiency and flexibility of task processing, enhancing the practicality and scalability of the system.
[0093] In some implementations, dynamically prioritizing the candidate tool node set based on the context parameters to generate an initial thought chain includes:
[0094] S1321. Perform dynamic weighting based on the context parameters to calculate the priority weight of each candidate tool node;
[0095] In this embodiment, during the dynamic prioritization of the candidate tool node set based on the contextual parameters and the generation of the initial thought chain, the system dynamically weights the contextual parameters to calculate the priority weight of each candidate tool node. Specifically, the system calculates the priority weight of each candidate tool node through dynamic weighting. Assuming the user enters the task instruction "Analyze the sales data of the past week and generate a visual report," the system weights the candidate tool nodes based on contextual parameters (such as task urgency, data size, and computing resources). For example, if the task urgency is high, the system assigns a higher weight to tool nodes with shorter execution times; if the data size is large, the system prioritizes tool nodes with lower resource consumption. Specifically, the system assigns a base weight to each candidate tool node and dynamically adjusts the weight based on the contextual parameters. For example, for "Data Cleansing Tool," its base weight is 1.0. If the task urgency is high, the weight is increased by 0.5; if the data size is large, the weight is decreased by 0.3. Finally, the system ranks the candidate tool nodes based on the adjusted weights to generate the initial thought chain.
[0096] It's important to note that in resource-constrained environments, the availability of computing resources is a crucial contextual parameter. The system dynamically weights candidate tool nodes based on the current environment's resource availability (e.g., memory, CPU usage, etc.). For example, if the current server's memory resources are limited, the system prioritizes tool nodes with lower memory consumption. Specifically, the system assigns each tool node a resource consumption weight. For example, for a "data cleaning tool" with high memory consumption and a base weight of 1.0, the system reduces its weight by 0.3 based on current memory usage. This allows the system to efficiently allocate and utilize resources in resource-constrained environments, ensuring smooth task execution.
[0097] S1322, dependency constraint verification, based on the dependency rules of tool nodes in the knowledge graph, performs logical conflict detection on the prioritized candidate tool nodes;
[0098] In this embodiment, after dynamically weighting the candidate tool nodes based on the contextual parameters and calculating their priority weights, dependency constraints are checked. Based on the dependency rules of the tool nodes in the knowledge graph, the prioritized candidate tool nodes are checked for logical conflicts. Specifically, the system first assumes that the user inputs a task instruction, "Analyze the sales data of the past week and generate a visual report." After dynamic priority sorting, the order of the candidate tool nodes is "Data Cleaning Tool" → "Data Analysis Tool" → "Visualization Tool." The system then checks the dependencies between these tool nodes using the knowledge graph. For example, "Data Analysis Tool" depends on the output of "Data Cleaning Tool," while "Visualization Tool" depends on the results of "Data Analysis Tool." The system verifies whether these dependencies are satisfied in the sorted node sequence. If a logical conflict is found, such as "Data Analysis Tool" being ranked before "Data Cleaning Tool," the system automatically adjusts the node order to ensure the correctness of the dependency relationship. In this way, the system can effectively avoid task failures due to incorrect dependencies and ensure that the generated initial thought chain is logically feasible.
[0099] It should be pointed out that in some tasks, the dependency between tool nodes is mainly reflected in the data flow. For example, the output of a "data cleaning tool" is the input of a "data analysis tool", and the output of the "data analysis tool" is the input of a "visualization tool". The system verifies the dependency by checking the consistency of the data flow. Specifically, the system verifies whether the output format of each tool node matches the input format of the next tool node. For example, if the output of the "data cleaning tool" is the cleaned data set, and the input required by the "data analysis tool" is a statistical summary of the data set, the system will detect this mismatch and prompt the user or automatically adjust the parameters of the tool node to ensure the consistency of the data flow. In this way, the system can ensure that the data interaction between tool nodes is smooth and avoid task failures due to data format mismatch.
[0100] It should be pointed out that in complex tasks, the dependencies of tool nodes may be related to the stages of the task. For example, some tool nodes can only be used in specific stages of the task. The system will verify the dependencies of tool nodes based on the stage information of the task. For example, in a data analysis task, the "data preprocessing tool" can only be used in the initial stage of the task, while the "result evaluation tool" can only be used in the final stage of the task. The system will check whether the sorting of candidate tool nodes conforms to the logical order of the task stages. If a tool node is found to be placed in the wrong stage, the system will automatically adjust its position. In this way, the system can ensure that the order of use of tool nodes conforms to the overall logic of the task and avoid task failure due to stage errors.
[0101] S1323. Use the Monte Carlo tree search algorithm to simulate the execution paths of different node combinations, and select the sorting scheme with the highest success rate to generate the initial thinking chain.
[0102] In this embodiment, after logical conflict detection is performed on the priority-sorted candidate tool nodes, the execution paths of different node combinations are simulated through the Monte Carlo Tree Search algorithm, and the sorting scheme with the highest success rate is selected to generate the initial thought chain. Specifically, the system simulates the execution paths of different node combinations through the Monte Carlo Tree Search (MCTS) algorithm to select the sorting scheme with the highest success rate to generate the initial thought chain. Assuming that the task instruction entered by the user is "analyze the sales data of the past week and generate a visual report", after dynamic priority sorting and dependency verification, the order of the candidate tool nodes is "data cleaning tool" → "data analysis tool" → "visualization tool". The system uses the MCTS algorithm to simulate multiple possible node combination paths, for example:
[0103] Path 1: "Data cleaning tools" → "Data analysis tools" → "Visualization tools"
[0104] Path 2: "Data cleaning tool" → "Data preprocessing tool" → "Data analysis tool" → "Visualization tool"
[0105] Path 3: “Data cleaning tool” → “Data analysis tool” → “Data visualization tool” → “Result evaluation tool”
[0106] The system simulates the execution of these paths and calculates the success rate of each path. For example, if the success rate of path 1 is 80%, the success rate of path 2 is 85%, and the success rate of path 3 is 75%. The system ultimately selects path 2 as the initial thinking chain because it has the highest success rate. In this way, the system can dynamically optimize the combination order of tool nodes, ensuring that the generated thinking chain has a higher success rate in actual execution.
[0107] It should be pointed out that in actual applications, the system can use historical task data to optimize the Monte Carlo tree search algorithm. For example, the system can record the performance of each tool node in past tasks, including execution time, success rate, resource consumption, etc. When simulating different node combination paths, the system will give priority to those tool node combinations that have performed well in historical tasks. For example, if "data cleaning tools" and "data analysis tools" are often successfully combined in past tasks, the system will give priority to paths containing these two tools when simulating paths. In this way, the system can use historical experience to improve the efficiency and accuracy of simulations, reduce unnecessary path exploration, and thus find the optimal node combination solution more quickly.
[0108] This implementation optimizes the priority sorting and combination logic of tool nodes through dynamic weighting, dependency verification, and the Monte Carlo tree search algorithm, generating an efficient initial thought chain. Dynamic weighting flexibly adjusts tool node weights based on contextual parameters (such as urgency and resource consumption), ensuring efficient and adaptable task execution. Dependency verification, based on the knowledge graph, ensures the logical coherence of tool nodes and avoids task failures due to dependency conflicts. The Monte Carlo tree search algorithm simulates different paths and selects the combination with the highest success rate, further improving the success rate and efficiency of task execution. The combination of these methods significantly enhances the system's intelligence and task processing capabilities.
[0109] In some embodiments, S1200 performs similarity matching on the structured semantic vector and predefined tool node semantic labels in the knowledge base, and outputs a set of candidate tool nodes related to the current task, including:
[0110] S1211: superimposing a dedicated feature vector on the structured semantic vector based on the domain label in the task instruction, thereby enhancing the domain features of the structured semantic vector;
[0111] In this embodiment, when similarity matching is performed between the structured semantic vector and predefined tool node semantic labels in the knowledge base, a dedicated feature vector is superimposed on the structured semantic vector based on the domain label in the task instruction, thereby enhancing the domain features of the structured semantic vector. Specifically, the system optimizes the tool node matching process through domain feature enhancement. Suppose the task instruction entered by the user is "Analyze the sales data of the past week and generate a visual report," and the task instruction contains the domain label "finance." The system first generates a structured semantic vector using a pre-trained language model. This vector contains the task intent, entities, and context parameters. Then, based on the domain label "finance," the system extracts the corresponding dedicated feature vector from the domain feature library. The dedicated feature vector contains semantic information specific to the financial domain, such as features related to "balance sheet" and "financial analysis." The system superimposes the dedicated feature vector on the structured semantic vector to enhance the feature dimensions in the vector that are relevant to the financial domain. For example, for the intent "report generation," the enhanced vector will be more inclined towards report generation tools in the financial domain, rather than general reporting tools. In this way, the system can more accurately match tool nodes suitable for the financial field, improving the accuracy and efficiency of task processing.
[0112] It should be pointed out that in actual applications, users may need to switch tasks between multiple fields. For example, a user may first process a data analysis task in the financial field, and then switch to a data analysis task in the medical field. To this end, the system supports dynamic switching of multi-field feature vectors. When the domain label of a task instruction changes, the system will automatically extract the dedicated feature vector of the corresponding field from the domain feature library and superimpose it with the structured semantic vector. For example, when the domain label of a task instruction switches from "finance" to "medical", the system will replace the dedicated feature vector of the financial field with the dedicated feature vector of the medical field. In this way, the system can quickly adapt to the task requirements of different fields and ensure the accuracy of tool node matching.
[0113] It should be noted that the domain feature vectors of this embodiment are also adjusted and optimized according to actual tasks. For example, businesses in the financial field may be constantly updated as the market changes, resulting in the existing domain feature vectors being unable to fully cover new business needs. To this end, the system introduces an adaptive learning mechanism for domain feature vectors. The system dynamically adjusts the domain feature vectors based on the user's historical task data and feedback information. For example, if a user frequently uses a new analysis tool in the financial field, the system will add the feature information of the tool to the dedicated feature vector for the financial field. In this way, the system can continuously optimize the domain feature vector to better adapt to changes in the field and user needs.
[0114] S1212, using a dynamic weighting algorithm to perform vector similarity matching between the structured semantic vector and the semantic labels of tool nodes predefined in the knowledge base;
[0115] After domain-enhanced domain features are added to the structured semantic vector based on the domain tag in the task instruction, the system then uses a dynamic weighting algorithm to perform vector similarity matching between the structured semantic vector and predefined tool node semantic tags in the knowledge base. Specifically, the system uses a dynamic weighting algorithm to perform vector similarity matching between the structured semantic vector and predefined tool node semantic tags in the knowledge base. For example, if the user enters the task instruction "Analyze the sales data of the past week and generate a visual report," the structured semantic vector, after domain-enhanced features, contains the task intent, entities, contextual parameters, and domain features. The system extracts the semantic label vector for each tool node from the knowledge base. These vectors also contain information such as the tool's functional description and input and output formats. The dynamic weighting algorithm assigns weights to each dimension based on contextual parameters such as task urgency, data size, and resource consumption. For example, if the task urgency is high, the system increases the weight of dimensions related to execution time; if the data size is large, the system increases the weight of dimensions related to resource consumption. Through this weighted vector similarity calculation, the system can more accurately match candidate tool nodes relevant to the current task. For example, “data analysis tools” and “visualization tools” stand out in the weighted similarity calculation and are selected as candidate tool nodes.
[0116] It's important to note that task type is a key factor influencing tool node matching. For example, a data analysis task might focus more on the tool's functional description and output format, while a text processing task might prioritize the tool's input format and processing speed. To this end, the system dynamically adjusts its weighting algorithm based on the task type. For example, if the user enters the task instruction "Generate a sales report," the system identifies the task type as "text processing." In this case, the system increases the weights of dimensions related to input format (such as text format) and processing speed, and decreases the weights of dimensions related to output format (such as visual charts). In this way, the system can more accurately match appropriate tool nodes based on the characteristics of the task type.
[0117] S1213 , filtering the candidate tool nodes through multi-dimensional screening conditions, and outputting a set of the candidate tool nodes related to the current task.
[0118] After using a dynamic weighting algorithm to match the structured semantic vector with the predefined tool node semantic labels in the knowledge base for vector similarity, the candidate tool nodes are filtered through multidimensional screening conditions, and the set of candidate tool nodes related to the current task is output. Specifically, the system further filters the matched candidate tool nodes through multidimensional screening conditions to output the set of tool nodes most relevant to the current task. Assuming that the task instruction entered by the user is "analyze the sales data of the past week and generate a visual report", after matching with the dynamic weighting algorithm, the system obtains a candidate set containing multiple tool nodes. Next, the system filters these candidate nodes according to the multidimensional screening conditions. These screening conditions include but are not limited to:
[0119] Tool Functionality: Ensure that the functionality of the tool node is highly relevant to the task. For example, select tool nodes that can process sales data and generate visual reports.
[0120] Resource consumption: Based on the current environment's resource situation (such as CPU, memory, network bandwidth, etc.), the system selects tool nodes with moderate resource consumption. For example, if the current server has limited memory, the system will prioritize tool nodes with low memory usage.
[0121] Historical success rate: Refer to the success rate of tool nodes in similar tasks in the past and give priority to tool nodes with good performance. For example, filter out tool nodes with a success rate of over 80% in past tasks.
[0122] Through these multi-dimensional screening criteria, the system ultimately outputs a set of candidate tool nodes most relevant to the current task, such as "data cleaning tools," "data analysis tools," and "visualization tools." This approach effectively reduces the number of candidate tool nodes and improves the efficiency and accuracy of task processing.
[0123] This implementation significantly improves the system's adaptability and accuracy in complex tasks by optimizing the tool node matching process through domain feature enhancement, a dynamic weighting algorithm, and multi-dimensional screening conditions. Domain feature enhancement can provide more accurate tool matching for specific domain tasks, and the dynamic weighting algorithm flexibly adjusts the matching strategy based on contextual parameters to ensure that tool nodes are highly consistent with task requirements. Multi-dimensional screening conditions further filter candidate tool nodes, eliminating options that do not meet task requirements, and ultimately outputting the set of tool nodes most relevant to the current task, improving the efficiency and success rate of task processing.
[0124] In some embodiments, S1400 is an agent-based tool combination and task processing method, characterized in that the tool nodes in the flowchart are dynamically added or deleted or parameter adjusted according to the external tool execution feedback or preset optimization strategy, including:
[0125] S1411: When external feedback indicates that a node has failed to execute, it automatically backtracks to the predecessor node of the failed node and calls an alternative tool in the knowledge base to replace it;
[0126] In this embodiment, the system monitors the execution of tool nodes through external feedback. Assuming that the task instruction input by the user is "analyze the sales data of the past week and generate a visual report", the thinking chain generated by the system includes "data cleaning tool" → "data analysis tool" → "visualization tool". During the execution process, the system discovered through external tool execution feedback that the "data analysis tool" node failed to execute. The feedback prompts that this may be due to the data format not meeting expectations. The system automatically traces back to the predecessor node "data cleaning tool" of the "data analysis tool" and calls an alternative "data preprocessing tool" from the knowledge base for replacement. The alternative tool can handle more complex data formats, thereby solving the problem of execution failure. The system re-executes the adjusted thinking chain and continues to monitor the execution to ensure the smooth completion of the task.
[0127] In some cases, tool node execution failures may be caused by specific error types, such as data format errors, insufficient resources, or logical errors. The system can select the most appropriate alternative tool based on the error type. For example, if the "Data Analysis Tool" fails due to a data format error, the system will call an alternative tool specifically for data format conversion; if the failure is caused by insufficient resources, the system will call a lightweight alternative tool. In this way, the system can more accurately solve problems and improve the efficiency and success rate of task processing.
[0128] Complex tasks may require multiple alternative tools to resolve execution failures. To address this, the system incorporates a multi-level alternative tool strategy. For example, when a "data analysis tool" fails to execute, the system first attempts to call an alternative tool with similar functionality. If the alternative tool still fails to resolve the issue, the system further calls a more basic tool node, gradually reducing the complexity of the tool. In this way, the system can gradually troubleshoot the problem and ultimately find a tool node that can successfully execute, ensuring the smooth progress of the task.
[0129] S1412: Dynamically adjust the number of parallel executions and parameter configurations of the tool nodes according to the energy consumption constraint in the preset optimization strategy;
[0130] In this embodiment, the system dynamically adjusts the number of parallel executions and parameter configurations of the tool nodes according to the energy consumption constraints in the preset optimization strategy. Assuming that the task instruction input by the user is "analyze the sales data of the past week and generate a visual report", the thought chain generated by the system includes "data cleaning tool" → "data analysis tool" → "visualization tool". During the execution process, the system monitors the resource status of the current environment and finds that the CPU and memory resources of the current server are limited. In order to meet the energy consumption constraints, the system dynamically adjusts the number of parallel executions of the tool nodes. For example, the "data analysis tool" and "data cleaning tool" that were originally planned to be executed in parallel are adjusted to serial execution to reduce resource competition. At the same time, the system adjusts the parameter configuration of the tool nodes according to the energy consumption constraints. For example, the calculation accuracy of the "data analysis tool" is adjusted from "high" to "medium" to reduce resource consumption. In this way, the system optimizes task execution under limited resource conditions to ensure the smooth completion of the task.
[0131] In a multitasking environment, different tasks may have different priorities. The system dynamically adjusts the number of parallel execution tool nodes and parameter configurations based on task priority. For example, for high-priority tasks, the system prioritizes resource allocation and allows more tool nodes to execute in parallel. For low-priority tasks, the system reduces the number of parallel execution tool nodes or even adjusts them to serial execution. Furthermore, the system adjusts the parameter configurations of tool nodes based on task priority. For example, for high-priority tasks, the system configures higher computational precision; for low-priority tasks, the system reduces computational precision to conserve resources. In this way, the system can better manage multitasking execution and ensure the smooth progress of high-priority tasks.
[0132] S1413: Verify whether the adjusted flowchart matches the original task intent through the semantic consistency check module.
[0133] In this embodiment, the system uses a semantic consistency check module to verify whether the adjusted flowchart matches the original task intent. Assuming the task instruction entered by the user is "Analyze the sales data of the past week and generate a visual report," the system generates and adjusts the thought chain to include "Data Cleaning Tool" → "Data Analysis Tool" → "Visualization Tool." During the adjustment process, the system may replace or adjust parameters of certain tool nodes. To ensure that the adjusted flowchart still meets the user's original intent, the system uses a semantic consistency check module for verification. This module compares the semantic vectors of the flowcharts before and after adjustment to check whether key intents (such as "data analysis" and "visualization") and entities (such as "sales data") remain consistent. For example, if the original task intent is to generate a "visual report," and "Visualization Tool" is mistakenly replaced with "Text Report Generation Tool" in the adjusted flowchart, the semantic consistency check module will detect this inconsistency and prompt the system to make a correction. In this way, the system can ensure that the adjusted flowchart still meets the user's original requirements and avoid the task deviating from the intended goal due to adjustments.
[0134] In practical applications, user feedback is an important basis for verifying semantic consistency. After adjusting the flowchart, the system will prompt the user to confirm whether the adjustment is in line with expectations. For example, after replacing the "Data Analysis Tool", the system will show the user the adjusted flowchart and ask the user whether they are satisfied. If the user feedback is that the adjusted tool does not meet the needs, the system will further analyze the specific content of the user feedback. For example, if the user points out that "the visualization effect does not meet expectations", the system will readjust the tool nodes to ensure that the final result is in line with the user's expectations. Figure 1 In this way, the system can dynamically optimize the flowchart based on real-time user feedback and improve user satisfaction.
[0135] This implementation significantly improves the flexibility, reliability, and resource utilization efficiency of task processing by dynamically adjusting the execution strategies of tool nodes and verifying the semantic consistency of flowcharts. When a node fails, the system automatically backtracks and replaces an alternative tool to ensure task continuity. It dynamically adjusts the number of parallel executions and parameter configurations based on energy constraints to optimize resource utilization. Semantic consistency checks verify that the adjusted flowcharts adhere to the original task intent, preventing deviations from the task's objectives. These mechanisms collectively enhance the system's adaptability and task success rate, while ensuring that task results meet user expectations.
[0136] In some implementations, after updating the tool combination logic according to the adjusted thought chain, S1500 includes:
[0137] S1511: Decompose the adjusted thought chain into atomic operation units, annotate them with domain labels, execution environment, and version numbers, and store them in the knowledge base;
[0138] In this embodiment, the system breaks down the adjusted thinking chain into atomic operation units, and annotates them with domain labels, execution environments, and version numbers and stores them in the knowledge base. Assuming that the task instruction entered by the user is "analyze the sales data of the past week and generate a visual report", the adjusted thinking chain includes "data cleaning tool" → "data analysis tool" → "visualization tool". The system breaks down this thinking chain into three atomic operation units: data cleaning, data analysis, and visualization. Each atomic operation unit is annotated with a domain label (such as "finance"), an execution environment (such as "server A"), and a version number (such as "v1.0"). For example, "data cleaning tool" is annotated with the domain label "finance", the execution environment "server A", and the version number "v1.0". This information is stored in the knowledge base for subsequent retrieval and reuse. In this way, the system can better manage and utilize the adjusted thinking chain and provide a reference for similar tasks.
[0139] In actual applications, tasks may involve multiple fields. The system supports breaking down the adjusted thought chain into atomic operation units and labeling each unit with multiple field labels. For example, a task may involve both "finance" and "data analysis". The system will label each atomic operation unit as "finance + data analysis" and store it in the knowledge base. In this way, the system can better support cross-domain tasks and improve the versatility and flexibility of the knowledge base. For example, when a user enters a task instruction involving multiple fields, the system can quickly retrieve the relevant atomic operation units from the knowledge base and quickly generate a suitable thought chain.
[0140] S1512: Build a reward function based on the reinforcement learning framework and optimize the agent's node mapping strategy based on the accuracy and time of task processing results;
[0141] In this embodiment, the system optimizes the agent's node mapping strategy through a reinforcement learning framework. Suppose the user enters the task instruction "Analyze the sales data of the past week and generate a visual report." The system executes the task according to the adjusted thought chain and collects the accuracy and time consumption data of the task processing results. Based on this data, the system constructs a reward function, where higher accuracy and shorter processing time result in higher rewards. For example, if the task accuracy reaches 90% and the processing time is within the expected range, the agent will receive a higher reward. The system updates the agent's strategy through a reinforcement learning algorithm (such as Q-learning or policy gradient method), making it more likely to select tool node combinations with high accuracy and short processing time in subsequent tasks. In this way, the agent can continuously learn and optimize, improving the overall efficiency and quality of task processing.
[0142] In real-world tasks, in addition to accuracy and time consumption, other optimization objectives may also exist, such as resource consumption and user satisfaction. To address this, the system can construct a multi-objective reward function that comprehensively considers multiple optimization objectives. For example, the reward function can simultaneously consider task accuracy, time consumption, resource consumption, and user satisfaction. The system uses reinforcement learning algorithms to optimize the agent's strategy, achieving a balance between these multiple objectives. For example, if a tool node combination has high accuracy but excessive resource consumption, the agent might choose a combination with slightly lower accuracy but more reasonable resource consumption. In this way, the system can better meet the diverse needs of complex tasks.
[0143] S1513: When a new tool node is added to the database, the associated semantic labels and dependencies are automatically generated, and the knowledge graph topology is updated.
[0144] In this embodiment, when a new tool node is added to the database, the system automatically generates semantic labels and dependencies associated with it, and updates the topological structure of the knowledge graph. Suppose the system introduces a new "data mining tool" to extract valuable information from large-scale data. The system first analyzes the functional description and input and output formats of the tool, and automatically generates semantic labels, such as "data mining" and "large-scale data analysis". At the same time, the system identifies the dependencies between the tool and other tool nodes. For example, the "data mining tool" depends on the output of the "data cleaning tool", and its output can be used as the input of the "visualization tool". The system updates this information to the knowledge graph to ensure that the topological structure of the knowledge graph can accurately reflect the relationship between the tool nodes. In this way, the system can quickly adapt to the addition of new tools, ensure the integrity and accuracy of the knowledge graph, and provide a richer selection of tools for subsequent tasks.
[0145] In practical applications, the functional description of a new tool node is an important basis for generating semantic labels. The system uses natural language processing techniques to analyze the tool's functional description, extract key information, and generate semantic labels. For example, if the functional description of a new tool mentions "processing large-scale text data and extracting key information," the system will generate semantic labels such as "text processing" and "information extraction." Furthermore, the system further refines the label based on keywords in the functional description (such as "large-scale" and "text"), such as "large-scale text processing." In this way, the system can generate accurate and detailed semantic labels for new tools, improving the tools' searchability and reusability within the knowledge graph.
[0146] This implementation further enhances the system's adaptability and intelligence through knowledge management and intelligent optimization mechanisms. Adjusted thought chains are broken down into atomic operation units and stored in a knowledge base for subsequent reuse and optimization. The agent's node mapping strategy is optimized based on a reinforcement learning framework, dynamically adjusted based on task processing results, improving task success rates and efficiency. The knowledge graph is automatically updated when new tool nodes are added to the database, ensuring the dynamic and complete nature of the knowledge base. These mechanisms collectively enhance the system's flexibility, scalability, and intelligence, providing more efficient support for complex task processing.
[0147] In some embodiments, the method further comprises:
[0148] S1611. Obtain the execution logs of each tool in real time, extract key indicators and generate feedback vectors.
[0149] In this embodiment, the system monitors the execution logs of each tool in real time, extracts key indicators and generates feedback vectors. Assuming that the task instruction entered by the user is "analyze the sales data of the past week and generate a visual report", the thought chain generated by the system includes "data cleaning tool" → "data analysis tool" → "visualization tool". During the execution of each tool, the system collects execution logs in real time and extracts key indicators such as execution time, resource consumption, output data quality, etc. For example, the execution log of the "data cleaning tool" shows that its execution time is 10 seconds, memory usage is 50MB, and output data quality is 95%. The system converts these key indicators into feedback vectors, such as [10,50,0.95]. In this way, the system can grasp the execution status of each tool node in real time and provide data support for subsequent optimization and adjustment.
[0150] In practical applications, tool performance can be evaluated from multiple dimensions. The system not only monitors execution time, resource consumption, and output data quality, but also extracts key indicators from multiple dimensions, such as error rate, response time, and user satisfaction. For example, for a "data analysis tool," the system can monitor the accuracy of its analysis results and user satisfaction with the results. By extracting key indicators from multiple dimensions, the system can more comprehensively evaluate tool performance and generate richer feedback vectors. For example, the feedback vector can be expanded to [10, 50, 0.95, 0.05, 0.9], where 0.05 represents the error rate and 0.9 represents user satisfaction. In this way, the system can more accurately identify problems and implement optimizations.
[0151] S1612. By comparing the deviation between the feedback vector and the prediction vector, the weak nodes in the thinking chain are located, and the incremental update of the knowledge base is triggered.
[0152] In this embodiment, the system compares the deviation between the feedback vector and the prediction vector to identify weak nodes in the thought chain and trigger an incremental update of the knowledge base. Suppose the user enters the task instruction "Analyze the sales data of the past week and generate a visual report." The system generates a thought chain consisting of "Data Cleaning Tool" → "Data Analysis Tool" → "Visualization Tool." During task execution, the system monitors the execution log of each tool in real time and generates feedback vectors. For example, the feedback vector for the "Data Cleaning Tool" is [10, 50, 0.95] (execution time 10 seconds, memory usage 50MB, output data quality 95%). Simultaneously, the system generates a prediction vector based on historical data and model predictions, such as [8, 40, 0.98]. By calculating the deviation between the feedback vector and the prediction vector, the system finds that the "Data Cleaning Tool" execution time is 2 seconds longer than predicted, memory usage is 10MB higher than predicted, and output data quality is 3% lower than predicted. Based on this, the system identifies the "Data Cleaning Tool" as a weak node and triggers an incremental update of the knowledge base, recording the tool's performance in the current task for subsequent optimization.
[0153] Furthermore, the system can dynamically adjust the parameters of tool nodes or replace nodes based on preset deviation thresholds. For example, if the deviation between the feedback vector and the prediction vector exceeds a set threshold (such as an execution time deviation of more than 5 seconds or a memory usage deviation of more than 20MB), the system will automatically adjust the parameters of the tool node or select an alternative tool from the knowledge base for replacement. For example, if the execution time deviation of the "data analysis tool" exceeds a threshold, the system may lower its calculation accuracy parameters or replace it with a more efficient analysis tool. In this way, the system can optimize the performance of tool nodes in real time to ensure the efficient execution of tasks.
[0154] S1613. When the execution failure rate of the thought chain exceeds a threshold, it automatically rolls back to the historical stable version.
[0155] In this embodiment, the system ensures the stability of the task by monitoring the execution failure rate of the thinking chain. Assuming that the task instruction input by the user is "analyze the sales data of the past week and generate a visual report", the thinking chain generated by the system includes "data cleaning tool" → "data analysis tool" → "visualization tool". During the execution of the task, the system monitors the execution status of each tool node in real time and calculates the failure rate. If the execution failure rate of a tool node exceeds the preset threshold (for example, the failure rate reaches 30%), the system will automatically trigger the rollback mechanism and roll back the current thinking chain to the historical stable version. For example, if the failure rate of the "data analysis tool" in the current task is too high, the system will roll back to the previously verified successful version and re-execute the task. In this way, the system can quickly restore the normal execution of the task and avoid task failure due to the instability of the tool node.
[0156] Furthermore, in complex tasks, a thought chain may include multiple stages, and the failure rate of each stage may be different. The system can monitor the failure rate in stages and trigger a rollback mechanism based on the failure rate of each stage. For example, the failure rate threshold for the data cleaning stage may be set to 20%, and the failure rate threshold for the data analysis stage may be set to 15%. If the failure rate of a stage exceeds the threshold, the system will roll back to the historical stable version of that stage instead of the entire thought chain. In this way, the system can manage the execution process of the task more finely, reduce unnecessary rollback operations, and improve the overall efficiency of the task.
[0157] This implementation significantly improves the system's stability and adaptability by monitoring tool execution logs in real time, comparing feedback and prediction vector deviations, and monitoring execution failure rates. Real-time monitoring and feedback vector generation quickly capture anomalies during tool execution, while comparing deviations accurately locates weak nodes and triggers incremental updates to the knowledge base, optimizing subsequent task processing. When the task failure rate becomes excessive, an automatic fallback mechanism quickly restores to a stable version, ensuring task continuity. These mechanisms collectively enhance system reliability, efficiency, and user experience.
[0158] Please refer to the following for details: Figure 2 , Figure 2 Schematic diagram of the basic structure of the Agent-based tool combination and task processing device in this embodiment.
[0159] like Figure 2 As shown, an agent-based tool combination and task processing device includes: a task parsing module 1100, which is used to perform natural language processing on the task instructions input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, wherein the task semantics include intention, entity and context parameters; a tool matching module 1200, which is used to perform similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base based on the agent intelligent body, and output a set of candidate tool nodes related to the current task; a thinking chain generation module 1300, which is used to dynamically prioritize the candidate tool node set based on the context parameters to generate an initial thinking chain; a parameter adjustment module 1400, which is used to automatically convert the initial thinking chain into a tree-shaped flowchart structure, and dynamically add, delete or adjust the parameters of the tool nodes in the flowchart according to the external tool execution feedback or preset optimization strategy; a processing output module 1500, which is used to update the tool combination logic according to the adjusted thinking chain, process the task instructions based on the updated tool combination logic, and output the task processing result.
[0160] The agent-based tool combination and task processing device described above uses a pre-trained language model to perform semantic parsing and vector representation of user task instructions. It then combines this with a knowledge graph to match tool nodes and dynamically sort them to generate a thought chain. This is further visualized as a tree-like flowchart and supports user interactive adjustments. Ultimately, tasks are processed and results are output based on the optimized thought chain. This significantly reduces the barrier to entry for users to manually combine tools, improving task processing efficiency and accuracy. Furthermore, the system continuously learns and optimizes through a feedback mechanism, possessing the ability for continuous improvement. This allows it to better cope with complex and changing task requirements, resolving the existing problem of tool combination relying on fixed rules and lacking intelligent adaptive capabilities.
[0161] To solve the above technical problems, the present application also provides a computer device. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.
[0162] like Figure 3 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a non-volatile storage medium, a memory and a network interface connected via a system bus. Among them, the non-volatile storage medium of the computer device stores an operating system, a database and computer-readable instructions, and the database may store a control information sequence. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor may execute an Agent-based tool combination and task processing method. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0163] In this embodiment, the processor is used to execute Figure 2The system comprises a task parsing module 1100, a tool matching module 1200, a thought chain generation module 1300, a parameter adjustment module 1400, and a processing and output module 1500. The system performs natural language processing on the task instructions input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, which includes intent, entities, and context parameters. The system then performs similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base, outputting a set of candidate tool nodes related to the current task. Based on the context parameters, the set of candidate tool nodes is dynamically prioritized to generate an initial thought chain. The initial thought chain is automatically converted into a tree-like flowchart structure, and tool nodes in the flowchart are dynamically added, deleted, or parameterized based on external tool execution feedback or preset optimization strategies. The tool combination logic is updated based on the adjusted thought chain, and the task instruction is processed based on the updated tool combination logic, outputting the task processing result. The system uses a pre-trained language model to perform semantic parsing and vector representation of user task instructions. It then combines this with a knowledge graph to match tool nodes and dynamically sort them to generate a thought chain. This is further visualized in a tree-like flowchart and supports user interaction and adjustment. Ultimately, tasks are processed and results are output based on the optimized thought chain. This significantly reduces the barrier for users to manually combine tools, improving task processing efficiency and accuracy. Furthermore, the system continuously learns and optimizes through a feedback mechanism, possessing the ability for continuous improvement. This allows it to better cope with complex and changing task requirements, resolving the problem of existing technologies where tool combinations rely on fixed rules and lack intelligent adaptive capabilities.
[0164] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the agent-based tool combination and task processing method described in any of the above embodiments.
[0165] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0166] Those skilled in the art will appreciate that the steps, measures, and schemes in the various operations, methods, and processes discussed in this application may be interchanged, modified, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be interchanged, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be interchanged, modified, rearranged, decomposed, combined, or deleted.
[0167] The above description is only part of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An agent-based tool combination and task processing method, characterized in that: include: Performing natural language processing on task instructions input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, wherein the task semantics include intent, entity, and context parameters. Based on the domain label in the task instruction, a corresponding dedicated feature vector is extracted from a domain feature library, and the structured semantic vector is superimposed with the dedicated feature vector to perform domain feature enhancement; The agent-based intelligent agent performs similarity matching on the structured semantic vector and the semantic labels of tool nodes predefined in the knowledge base. A dynamic weighting algorithm is used to dynamically assign weights of each dimension based on the context parameters. The structured semantic vector and the semantic labels of tool nodes predefined in a dedicated knowledge base built for different fields are matched for vector similarity, and a set of candidate tool nodes related to the current task is output. Based on the context parameters, the candidate tool node set is dynamically prioritized to generate an initial thought chain, wherein the execution paths of different candidate tool node combinations are simulated by a Monte Carlo tree search algorithm, and the combination with the highest success rate is selected to generate the initial thought chain; Automatically convert the initial thought chain into a tree-shaped flowchart structure, and dynamically add or delete tool nodes or adjust parameters in the flowchart based on external tool execution feedback or preset optimization strategies, and verify whether the adjusted flowchart matches the task instructions through semantic consistency; If the key intentions and entities corresponding to the adjusted flowchart match the key intentions and entities corresponding to the task instructions, output the adjusted thinking chain; update the tool combination logic according to the adjusted thinking chain, process the task instructions based on the updated tool combination logic, and output the task processing results.
2. The agent-based tool combination and task processing method according to claim 1, characterized in that: After generating the initial thought chain, it also includes: Verify the logical feasibility of the initial thinking chain through a sandbox environment; If the verification is passed, the verified initial thought chain is automatically converted into a tree-shaped flow chart structure.
3. The agent-based tool combination and task processing method according to claim 1, characterized in that: The dynamically prioritizing the candidate tool node set based on the context parameters to generate an initial thought chain includes: Perform dynamic weighting based on the context parameters to calculate the priority weight of each candidate tool node; Dependency constraint verification: Based on the dependency rules of tool nodes in the knowledge graph, logical conflict detection is performed on the prioritized candidate tool nodes; The Monte Carlo tree search algorithm is used to simulate the execution paths of different node combinations, and the sorting scheme with the highest success rate is selected to generate the initial thinking chain.
4. The agent-based tool combination and task processing method according to claim 1, characterized in that: The agent-based intelligent agent performs similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base, and outputs a set of candidate tool nodes related to the current task, including: Superimposing a dedicated feature vector on the structured semantic vector based on the domain label in the task instruction, and performing domain feature enhancement on the structured semantic vector; Using a dynamic weighting algorithm to perform vector similarity matching between the structured semantic vector and the predefined tool node semantic labels in the knowledge base; The candidate tool nodes are filtered through multi-dimensional screening conditions, and a set of the candidate tool nodes related to the current task is output.
5. The agent-based tool combination and task processing method according to claim 1, characterized in that: The dynamic addition, deletion or parameter adjustment of tool nodes in the flowchart based on external tool execution feedback or preset optimization strategies includes: When external feedback indicates that a node has failed to execute, it automatically backtracks to the predecessor node of the failed node and calls the alternative tool in the knowledge base to replace it; Dynamically adjust the number of parallel executions and parameter configurations of the tool nodes according to the energy consumption constraints in the preset optimization strategy; The semantic consistency checking module is used to verify whether the adjusted flowchart matches the original task intent.
6. The agent-based tool combination and task processing method according to claim 1, characterized in that: After updating the tool combination logic according to the adjusted thinking chain, it also includes: Decompose the adjusted thought chain into atomic operation units, annotate them with domain labels, execution environment, and version numbers, and store them in the knowledge base; Build a reward function based on the reinforcement learning framework and optimize the agent's node mapping strategy based on the accuracy and time consumption of task processing results; When a new tool node is added to the database, the associated semantic labels and dependencies are automatically generated, and the knowledge graph topology is updated.
7. The agent-based tool combination and task processing method according to claim 1, characterized in that: The method further comprises: Obtain execution logs of each tool in real time, extract key indicators and generate feedback vectors; By comparing the deviation between the feedback vector and the prediction vector, the weak nodes in the thinking chain are located, and the incremental update of the knowledge base is triggered; When the execution failure rate of the thought chain exceeds a threshold, it automatically rolls back to the historical stable version.
8. An Agent-based tool combination and task processing device, characterized in that: include: A task parsing module is used to perform natural language processing on task instructions input by the user through a pre-trained language model to generate a structured semantic vector containing task semantics, wherein the task semantics include intent, entity, and context parameters. The corresponding dedicated feature vector is extracted from the domain feature library based on the domain label in the task instruction, and the dedicated feature vector is superimposed on the structured semantic vector to perform domain feature enhancement; A tool matching module is configured to perform similarity matching between the structured semantic vector and predefined tool node semantic labels in a knowledge base based on an agent. A dynamic weighting algorithm is used to perform vector similarity matching between the structured semantic vector and predefined tool node semantic labels in a specialized knowledge base constructed for different fields based on the weights of each dimension dynamically assigned by the context parameters, and the module outputs a set of candidate tool nodes related to the current task. A thought chain generation module is used to dynamically prioritize the candidate tool node set based on the context parameters to generate an initial thought chain, wherein the execution paths of different candidate tool node combinations are simulated by a Monte Carlo tree search algorithm, and the combination with the highest success rate is selected to generate the initial thought chain; A parameter adjustment module is used to automatically convert the initial thought chain into a tree-shaped flowchart structure, and dynamically add or delete tool nodes in the flowchart or adjust parameters based on external tool execution feedback or preset optimization strategies, and verify whether the adjusted flowchart matches the task instructions through semantic consistency; The processing output module is used to output the adjusted thinking chain if the key intentions and entities corresponding to the adjusted flowchart match the key intentions and entities corresponding to the task instructions; update the tool combination logic according to the adjusted thinking chain, process the task instructions based on the updated tool combination logic, and output the task processing results.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the agent-based tool combination and task processing method according to any one of claims 1 to 7.
10. A storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the steps of the agent-based tool combination and task processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Construction method and device of multi-component data agent
CN119398092A