A general-purpose intelligent agent reflection system based on large-scale model multi-path fusion and gating mechanism
The general intelligent agent reflection system, which uses large-scale model multi-path fusion and gating mechanisms, solves the problems of high computational resource consumption, cognitive bias and weak security controllability, and realizes a more accurate, economical and controllable reflection process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 浙江实在智能科技有限公司
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-30
AI Technical Summary
Existing general-purpose intelligent agent reflection methods suffer from problems such as high computational resource consumption, biased reflection cognition, and weak security and controllability.
A general intelligent agent reflection system based on large model multi-path fusion and gating mechanism is adopted, including an input module, a task routing module, a large model multi-path fusion reflection module, a reflection result gating module, and a safety and timeout control module. Through sub-task classification, fusion of different types of large models, and combination of verification rules, the system achieves accurate evaluation and safety control of the intelligent agent.
It reduces computational resource consumption, minimizes cognitive biases, enhances the security and controllability of the reflection system, and enables a more accurate and economical reflection process.
Smart Images

Figure CN121882219B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to a general intelligent agent reflection system based on large model multi-path fusion and gating mechanism. Background Technology
[0002] Existing methods, technologies, and systems for reflecting on general-purpose intelligent agents are generally classified into the following three categories according to their implementation:
[0003] 1. A reflective method based on a general large-scale model thinking framework;
[0004] 2. A reflective approach based on domain fine-tuning and training large models;
[0005] 3. A reflective approach based on multi-agent combination mechanisms.
[0006] However, existing general-purpose agent reflection methods and techniques, whether the most commonly used approach based on a general large model combined with a thinking framework, the method of using a large model fine-tuned for the domain as a reflection module, or the scheme of multi-agent joint decision-making, generally suffer from drawbacks such as high computational resource consumption, biases in reflective cognition, and weak security and controllability. Specifically:
[0007] 1. High computational resource consumption
[0008] First, it is well known that the training and inference of large language models and multimodal large models consume enormous amounts of computing resources. Whether it's the computing-related devices such as CPUs, memory, and GPUs, or the supporting components like power supplies and cooling systems, they all require far higher specifications and larger scale configurations and consume significantly more power than traditional computing tasks. The application of large models is actually supported by a high-performance computing cluster. However, as mentioned earlier, existing agent reflection methods generally use large language models or multimodal large models as the core engine of the reflection module or reflective agent. Based on the large model's own reasoning and world knowledge, they apply a paradigm-consistent result evaluation, reflection, and repair suggestions for all task steps of the general agent system. This involves converting the agent's inputs, plans, actions, and results into textual descriptions and providing them to the large model for evaluation, reflection, and suggestions. This approach actually introduces multiple calls to the large model during the agent's execution process, leading to an overall increase in the agent's computing resource consumption. In particular, the aforementioned reflection scheme based on the multi-agent combination mechanism requires multiple expert agents (actually large models) to be called for discussion and voting at each step of the reflection process. Therefore, the number of large model calls and the number of input and output tokens in the entire execution process need to be multiplied several times, which further exacerbates the amount of computing resources consumed by the agent to complete a task.
[0009] 2. Reflecting on cognitive biases
[0010] Secondly, existing methods suffer from a common cognitive bias regarding task execution steps. This bias manifests in the inability to make reasonable assessments and recommendations regarding task execution actions and results; this is particularly evident in the construction of general intelligent agents. For example, some task steps may have actually been successfully completed, but the inherent illusion problem of large models may cause the reflection module to judge them as execution failures; conversely, task steps that were actually not successfully executed or deviated from user instructions may be judged as successful executions. Cognitive biases mainly stem from two aspects:
[0011] On the one hand, whether it is the general large model + thinking framework approach or the domain-specific fine-tuning large model approach, it is actually difficult to capture the differences between different types and modal tasks.
[0012] On the other hand, the real-world scenario faced by general intelligent agents is that even within the same user instruction, there are different types of subtasks.
[0013] 3. Weak security and controllability
[0014] Furthermore, existing agent reflection methods generally neglect research and consideration of the security and controllability of the reflection process. Large models, in addition to the inherent illusion problem, are prone to introducing information that does not conform to human intentions and values, leading to harmful, sensitive, and uncontrollable output. This is particularly prone to occur during agent reflection, because the agent's reflection module needs to comprehensively evaluate and consider almost all information from a single task execution, including user input, the overall task plan, all available tools, environmental feedback, and previous historical execution results. Therefore, sensitive user information, system tool information, and system environment vulnerabilities are more fully revealed and exposed during the reflection process. Without control, these can easily be intercepted and stolen through reverse engineering or other technical means, thus affecting system security.
[0015] Therefore, it is very important to design a more accurate, economical, and controllable general intelligent agent reflection system based on large model multi-path fusion and gating mechanism. Summary of the Invention
[0016] This invention aims to overcome the problems of existing general intelligent agent reflection methods, such as high computational resource consumption, bias in reflection cognition, and weak reflection security and controllability. It provides a more accurate, economical, and controllable general intelligent agent reflection system based on large model multi-path fusion and gating mechanism.
[0017] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0018] A general-purpose intelligent agent reflection system based on large-scale model multi-path fusion and gating mechanisms includes:
[0019] The input module is used to receive the set of input information from the agent after completing a single-step subtask.
[0020] The task routing module is used to classify the current action into task types based on the input information set and output the classification results;
[0021] The large model multi-path fusion reflection module is used to evaluate and reflect on the current action and corresponding execution results in multiple dimensions based on the classification results and a combination of reflection strategies adapted to the task type.
[0022] The reflection result gating module is used to integrate the reflection sub-results of multiple dimensions output by the large model multi-path fusion reflection module, generate and output the final reflection conclusion and comprehensive evaluation score;
[0023] The safety and timeout control module is used to monitor safety risks and control resource consumption during the reflection process.
[0024] The output module is used to output the final reflection conclusion and comprehensive evaluation score to determine the subsequent execution process of the agent.
[0025] Preferably, the set of input information includes: the user's original task description, historical action sequence, historical action execution results, historical reflection description, current action description, and current action execution result.
[0026] Preferably, the task routing module includes a routing classification engine, which is configured to receive the user's original task description, historical action sequence and current action description, and map them to a preset set of subtask types; the set of subtask types includes at least knowledge question answering, application operation, file operation, numerical calculation and network search.
[0027] Preferably, in the large model multi-path fusion reflection module, the reflection strategy combination includes: the combination of calling different types of large models, the combination of calling large models and preset verification rule bases, and the combination of calling large models and external tool interfaces.
[0028] Preferably, the large model multi-path fusion reflection module includes:
[0029] The model scheduling unit is used to schedule at least two different types of large models from the model pool based on the classification results; the model pool includes a general large language model, a multimodal large model, a graphical user interface multimodal large model, and a code large model;
[0030] A rule execution engine is used to match and execute corresponding programmable verification rules from the verification rule base based on the classification results;
[0031] The fusion processing unit is used to fuse the output of the large scheduling model and the execution verification rules through serial, parallel or serial-parallel processing to generate the reflection sub-results of the multiple dimensions.
[0032] Preferably, when the classification result is an application operation task, the model scheduling unit operates as follows:
[0033] Based on the user's original task description, historical action sequence, historical reflection description and current action description, a logical self-consistency evaluation is performed to generate the first reflection sub-result;
[0034] Parallel scheduling of a large multimodal model with a graphical user interface (GUI) is performed, executing the following two evaluation branches:
[0035] Branch 1: Based on the expected conformity assessment of the user's original task description, current action description, and current action execution result, generate a second reflection sub-result;
[0036] Branch 2: Based on the trajectory coherence evaluation of the user's original task description, historical action sequence, historical action execution results, and current action execution results, a third reflection sub-result is generated;
[0037] The fusion processing unit performs a comprehensive analysis on the first reflection sub-result, the second reflection sub-result, and the third reflection sub-result, and outputs a reflection process description text, a reflection conclusion text, and a pass / fail score.
[0038] Preferably, the verification rule base in the large model multi-path fusion reflection module stores verification rules for each type of subtask; the verification rule base is implemented through a knowledge base + code script, and the knowledge base stores several rules represented in the form of code scripts and code functions;
[0039] Once different validation rules are matched based on the type of subtask, the corresponding validation rules are executed by the code compiler, and the final reflection result score is output.
[0040] Preferably, the reflection result gating module specifically includes the following process:
[0041] The evaluation scores corresponding to the reflection sub-results of the multiple dimensions are received, and the comprehensive evaluation score is calculated using a weighted average algorithm; wherein the weight of each dimension is a preset value or a value given by the large language model;
[0042] The system receives the textual conclusions corresponding to the reflection sub-results from the multiple dimensions, and then uses a large language model to summarize and aggregate them to generate the final reflection conclusion.
[0043] Preferably, the safety and timeout control module specifically includes the following process:
[0044] Based on a pre-defined sensitive word database or security discrimination model, unsafe and sensitive information is identified and filtered in the text content circulating during the reflection process; the security discrimination model includes a large language model or a small text classification model.
[0045] The system monitors the execution time and input / output data volume of the large model multi-path fusion reflection module and the reflection result gating module, and triggers an interruption or retry mechanism when the preset time threshold or length threshold is exceeded.
[0046] Preferably, the set of input information received by the input module is encapsulated and transmitted in a structured data format;
[0047] The output module outputs a reflection conclusion text, which is used to interact with the planning and execution engine of the agent to trigger subsequent operations such as continuing execution, retrying the current step, or terminating the task process; the reflection conclusion text includes the final reflection conclusion and the comprehensive evaluation score.
[0048] Compared with the prior art, the beneficial effects of this invention are: (1) In the core part, this invention adopts a sub-task classification routing and large model multi-path fusion scheme. Through the fusion between different types of large models, the combination of large models and simple verification rules, and the fusion between large models and different tools and interfaces, different reflection tools are called for result evaluation and reflection for different types of sub-tasks of the agent, thereby reducing the cognitive bias of the agent's reflection process. Furthermore, through the introduction of the gating module, the weighted average method is used to integrate different reflection tools on the pass / fail score of the final reflection result, thereby giving the judgment of whether the final agent's execution steps are successful in a soft constraint manner, avoiding the influence of a single reflection tool on the final evaluation result, and more effectively alleviating the limitations and problems of existing reflection methods and systems when facing diverse sub-tasks of general agents; (2) This invention uses the sub-task classification routing method to classify the sub-tasks of general agents into different types of sub-tasks of the agent. The system is divided into categories according to type, and simple tasks are directly called by the verification rules and external tools, instead of going through the large model reflection in a unified manner, thereby reducing the call to the large model and reducing the consumption of computational resources in the reflection process; at the same time, the timeout control module also adopts strategies such as timeout truncation and long truncation to control the divergence of the reflection process, further reducing unnecessary calls to the large model and the consumption of computational resources; (3) In the reflection system, the present invention introduces a security control and timeout control module to handle security risks within the system and control the illusion and meaningless divergence of the large model, thereby improving the controllability of the reflection system and the general intelligent agent; (4) The reflection method and system of the present invention can naturally be combined with existing reflection frameworks such as ReAct and Reflexion. Combining the above reflection frameworks in the large model multi-path fusion reflection module can achieve better reflection effects. Therefore, the method of the present invention and the existing reflection framework are orthogonal. Attached Figure Description
[0049] Figure 1 This is a schematic diagram of the functional architecture of a general intelligent agent reflection system based on large model multi-path fusion and gating mechanism according to the present invention;
[0050] Figure 2 This is a schematic diagram of a functional architecture of the task routing module in this invention;
[0051] Figure 3 This is a schematic diagram of a process for reflecting on the multi-path fusion of different types of large models in this invention;
[0052] Figure 4 This is a schematic diagram of a functional architecture of the reflection result gating module in this invention;
[0053] Figure 5 This is a flowchart illustrating a practical application of the general intelligent agent reflection system based on large model multi-path fusion and gating mechanism provided in this embodiment of the invention. Detailed Implementation
[0054] To more clearly illustrate the embodiments of the present invention, specific implementation methods will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.
[0055] This invention proposes a general-purpose intelligent agent reflection system based on large-scale model multi-path fusion and gating mechanisms. Through the design of task routing, large-scale model multi-path fusion, gating modules, and safety timeout control modules, it achieves innovative design of the reflection method and system within the general-purpose intelligent agent system, ensuring that the general-purpose intelligent agent can achieve efficient, unbiased, safe, and controllable reflection for different users and tasks. The functional module design of the entire reflection system is as follows: Figure 1 As shown, it mainly consists of six parts: input, task routing module, large model multi-path fusion reflection module, reflection result gating module, safety and timeout control module, and output. The functions of each module are as follows:
[0056] Input module: such as Figure 1 As shown, the general intelligent agent reflection system proposed in this invention intervenes to evaluate and reflect after each action performed by the intelligent agent; assuming the current action is step t, the information input to the reflection system includes:
[0057] 1. The original task description or task instructions provided by the user, express;
[0058] 2. Each sub-task or action sequence preceding the current step. Each action is a data structure that includes information such as action description, action object, action type (e.g., text generation, image editing, screen operation), and action parameters (especially those related to interface operations).
[0059] 3. The execution results of each step preceding the current step are obtained by observing the state of the execution environment. Similarly, the execution result of each step is also a structure, which, depending on the action type, will include generated text, generated code scripts, collected structured data, modified file content, application page redirects, etc. express;
[0060] 4. The reasoning and reflection process preceding each step is primarily described in words, focusing on the reasoning, thinking, and reflection involved. express;
[0061] 5. The action to be performed in the current step ;
[0062] 6. Execution result of the current step ;
[0063] 7. Preset subtask types, It means that, among them This refers to the number of subtask types.
[0064] 8. Pre-set safety rules, timeout controls, and other control logic, to... express, It refers to the number of rules.
[0065] It should be noted that the above input information is transmitted in a specified format (such as XML, JSON, etc.).
[0066] Task routing module: This module primarily categorizes and routes each step's subtasks or actions to a specified subtask type, thereby matching different reflection logic, safety rules, and timeout control rules. Subtask types include... Figure 1 The types shown can be categorized as follows:
[0067] Knowledge-based question-answering tasks: the most common subtasks for intelligent agents, mainly involving answering user questions;
[0068] Application operation tasks: A relatively practical sub-task type in general intelligent agents, which can operate on browsers, application software, etc., including page clicking, text input, screen scrolling, etc.
[0069] File operation tasks: mainly involve operations on various types of files and documents, including content-based question answering and retrieval augmented generation (RAG), as well as creating, modifying, and deleting files themselves;
[0070] Numerical computation tasks: This refers to various numerical computation, statistical classification, and other tasks. It includes complex tasks such as trend analysis and regression prediction through code generation, as well as simple tasks such as merging results and solving equations using a calculator.
[0071] Network search tasks: A common sub-task type in general intelligent agents, which involves obtaining external information from a large model through a search engine and summarizing and analyzing the information obtained from the search.
[0072] Other types of tasks: Various other types of subtasks can be instantiated in real-world scenarios, such as image generation, video generation, and image manipulation.
[0073] like Figure 2As shown, the core of the task routing module is a routing classification engine. This engine can be implemented using a general large language model, a large model fine-tuned with instructions, or a small text classification model. The engine is based on the user's original task description. The sequence of subtasks preceding the current step and the subtask execution action of the current step For input, create a set of subtask types. mapping relationship The final output includes the task category and score.
[0074] Large-Model Multi-Path Fusion Reflection Module: As the core component of the general intelligent agent reflection system of this invention, this module mainly utilizes large-model multi-path fusion technology to call different reflection logics for different types of intelligent agent subtasks, achieving more accurate and targeted evaluation and reflection, thereby realizing fine-grained control in intelligent agent reflection. The large-model multi-path fusion technology includes two levels: first, the results of different types of large models are fused through serial, parallel, and other methods, enabling the invocation of different large models for specific subtask types and reflection on different dimensions of the execution results, such as... Figure 1 The first aspect involves the fusion and invocation of the general large model and the GUI multimodal large model; the second aspect involves the fusion and splitting of large models and simple validation rules to avoid overusing the capabilities of large models for simple tasks, which would result in excessive consumption of computing resources. Figure 1 The settings for the verification rule base and rule execution engine are shown.
[0075] The multi-path fusion of different types of large models achieves the fusion of evaluation and reflection results through serial, parallel, or alternating serial-parallel methods. Taking application operation tasks as an example, this invention designs a large model fusion scheme combining serial and parallel methods for this type of task, such as... Figure 3 The image shown is for Figure 1 The functional refinement and instantiation demonstrate the reflection process of application operation tasks.
[0076] Branch 1 uses a large language model, fine-tuned with instructions and trained through reinforcement learning, to reflect on the actions of the current subtask, evaluating whether they adhere to the original task objective and whether they are logically consistent with the preceding action sequence and reasoning chain. Its input is the user's original task description. Preceding subtask sequence Precedence reasoning, reflection, description and current subtask description Formalized, it can be expressed as follows: Indicate the results of the reflection:
[0077] ;
[0078] Branch two uses a similarly fine-tuned GUI multimodal large model to reflect on the execution result of the current subtask. This reflection includes two parts: 1) After understanding the execution result of the current subtask, i.e., the page state after the task is completed, using the GUI multimodal large model, evaluate whether it meets the original task objective and the expectation of the current subtask action, i.e., whether the current step was correctly executed. The input includes the user's original task description. Current subtask description and the result of the current subtask execution 2) For the execution result of the current subtask, focus on evaluating and reflecting on whether it forms a coherent trajectory with the previous subtask sequence and its execution result, i.e., whether there are any instances of skipped execution or deviation from the original trajectory. Input includes task description. Preceding subtask sequence Result of the preceding subtask and the result of the current subtask execution The two parts of the reflection can be formally expressed as follows: and It is the result of reflection;
[0079] ;
[0080] ;
[0081] Finally, the previously trained large language model is used to merge the reflection results of the two parallel branches, comprehensively evaluating the rationality, coherence, and unbiasedness of the current subtask actions and results. The final output includes a description of the reflection process and conclusions, as well as a score indicating whether the step passed the evaluation. The input is... , and Ultimately, this can be formally expressed as follows:
[0082] ;
[0083] Where thought, conclusion, and score represent the reflection process description text, the reflection conclusion text, and the pass / fail score, respectively.
[0084] On the other hand, this invention also controls the use of large models by separating reflection based on large models from reflection based on simple verification rules, thus saving computational resources. Taking numerical calculation tasks as an example, we can set some simple verification rules, such as the sum of the results of each sub-item must equal the total item. This verification rule can be used for evaluation and reflection in scenarios such as financial statement analysis and invoice verification. Such verification rules are simple and easy to implement, whether using code snippets or built-in tools. In addition, some basic reflection and verification rules can be set for other types of sub-tasks. For example, in data acquisition scenarios, evaluating whether the acquisition results are complete only requires simply counting the number of missing values in each row and column. Of course, in this scenario, large models and simple verification rules can also be combined for reflection in a serial or parallel manner to achieve more accurate reflection of actions and results. In this invention, the verification rule base is implemented through a knowledge base + code script. The knowledge base stores rules represented in the form of code scripts, code functions, etc. After matching different rules according to the type of sub-task, these rules are executed by the code compiler, and finally the reflection result score is output. The score here is a binary distribution of 1 and 0.
[0085] Reflection Result Gating Module: All reflection results are aggregated through a gating module, which ultimately evaluates the rationality and unbiasedness of the execution result of the current step. Considering that the cognitive biases of existing reflection methods and systems mainly stem from the mismatch caused by the collision between a single large-scale reflection model or tool and the diversity of subtasks of a general intelligent agent, this invention employs different types of large-scale model combinations, large-scale models combined with simple verification rules, and large-scale models combined with other tools in the large-scale model multi-path fusion reflection module. Different reflection mechanisms are used to evaluate the results of different types of intelligent agent subtasks. Furthermore, for the same subtask action, different large-scale models, tools, or verification rules may be used for evaluation and reflection. For example, for data collection tasks, in addition to using simple verification rules to judge the completeness of the collection results, a large language model can be used in parallel to evaluate the relevance and correctness of the collected content. Therefore, this invention designs a gating mechanism for multi-dimensional reflection results. The input to this module is the reflection conclusion text of different dimensions. And pass / fail scores The final reflection result is achieved through a weighted average method, which can be formally expressed as:
[0086] ;
[0087] in Represents the gate function. This represents the final result score. and This represents the weight and score of the i-th evaluation dimension. This represents the dimensions of the overall evaluation; the weighted summation method described above provides a soft constraint on the pass / fail status of the reflection results, rather than relying solely on individual reflection tools to determine the final evaluation outcome. Taking the data collection task mentioned above as an example, the evaluation dimensions for this type of task could include: completeness (achieved through simple validation rules), relevance (achieved through a large language model), accuracy (achieved through a large language model), and compliance (achieved through simple validation rules), etc. The scores for these dimensions are provided by their respective reflection tools, and their weighting coefficients can be pre-set or reasonably valued by a large model; the gating module for the entire reflection result is as follows: Figure 4 As shown, the reflection conclusion text The output is summarized from the large model.
[0088] Safety and Timeout Control Module: In order to enhance the safety and controllability of the reflection system, thereby improving the safety and controllability of the entire general intelligent agent, this invention adds a safety control and timeout control module to the reflection module.
[0089] Existing large-scale model and intelligent agent solutions all consider security controls in the overall process. For example, many large-scale model services use a combination of reinforcement learning control and safety barriers for security control. Reinforcement learning reduces the harmfulness of model output by aligning with human ethics and morality, while safety barriers use engineering methods to further control the output results. Although proven effective, the characteristics of large-scale models mean that there is still a risk of outputting harmful answers. Intelligent agents also use both large-scale models and engineering to control the security and reliability of task execution, such as adding output filtering and avoiding high-risk behaviors (account login, fund payment, etc.) through human intervention. However, there is little discussion on security controls in the reflection module. Existing agent reflection based on large models inevitably introduces the inherent security problems of the large model itself. At the same time, due to its characteristics (i.e., it needs to comprehensively evaluate and examine user input, user information, and environmental information), it amplifies the risk of outputting harmful information. Common reflection risks include outputting user privacy information, system information, etc. To address this, this invention designs two security control strategies in the security control module: model-based and rule-based. The former uses a large language model or a small text classification model to determine whether the aforementioned reflection conclusion text is sensitive or harmful information. The latter directly matches the output reflection conclusion text through sensitive word databases, etc., and judges that there is a security risk when sensitive words are matched, requiring filtering or blocking of the output.
[0090] On the other hand, reflection schemes based on large models are prone to getting stuck in a state of excessively long execution time or infinite loops, the so-called "over-reflection" phenomenon. This is because reflection based purely on large models is easily affected by the illusion of large models, causing the entire reflection process to be constantly evaluating and thinking about the current execution actions and results without outputting any conclusive content. To address this, the timeout control module of this invention limits the execution time, length, and output of the entire reflection process through various control mechanisms.
[0091] Timeout control: When the reflection module exceeds the preset time, the reflection will be interrupted. You can choose to restart the reflection or skip it directly to avoid the reflection process taking too long. Generally, this is due to the large model exhibiting hallucinations.
[0092] Ultra-long control: To avoid excessive calls to large models by the reflection module, the length of the input and output tokens of the reflection module is limited to restrict the continuous thinking and output of the entire reflection process;
[0093] Outcome control: If the reflection does not produce any conclusive results, including if the reflection conclusion text is vague, the reflection is considered unsuccessful and needs to be repeated.
[0094] The timeout and extended control strategies can further limit the reflexive module, including the abuse of large models by the entire agent system, save the computing resources occupied by the agent, and avoid excessive waste and a decline in user experience.
[0095] Output Module: The entire reflection system outputs a textual reflection conclusion, which is integrated by the gating module and filtered by the security control module. This text is displayed to the user during the agent's execution. It also outputs a pass / fail score. If the score is above a threshold, the current step's action and result are considered reasonable and correct, allowing the system to continue thinking or executing the next step. Conversely, if the score is below a threshold, the action or execution is considered problematic, requiring review and re-execution or replanning before proceeding.
[0096] Based on the technical solution of this invention, the implementation process of this invention in practical applications will be illustrated through the following case scenarios. The specific application implementation scheme is as follows:
[0097] like Figure 5 As shown, the entire reflection system begins with the completion of a single-step subtask by the general agent:
[0098] 1. The reflection system of the present invention first collects and summarizes all data that needs to be input into the reflection, including the user's original task description, information of the preceding sub-tasks / actions before the current step, execution result information of each step of the preceding step, reasoning and reflection description information of each step of the preceding step, current execution sub-task step information, current sub-task execution result information, etc. The above information will be stored in the database after the agent completes the execution of the preceding steps and the current step;
[0099] 2. Based on the user's original task description, previous subtask information, and current subtask information, task routing and classification are performed. Regarding the specific implementation of the routing and classification engine, closed-source / open-source general-purpose models such as the GPT series, Claude, Gemini, Qwen, and Deepseek can be selected. Alternatively, open-source models can be fine-tuned to improve task routing and classification performance; the Qwen series and Deepseek series of open-source models can be chosen. Or, considering computational resource consumption and classification time optimization, traditional convolutional neural network models or recurrent neural network models can be selected, such as TextCNN and FastText models.
[0100] 3. The sub-task types obtained from task routing classification will be fed into the core large-scale model multi-path fusion reflection module. This module, combined with the aforementioned input information, will evaluate the rationality, unbiasedness, and completeness of the current step's actions and execution results. Specific evaluation dimensions are stored in the reflection dimension knowledge base, which can be implemented using a structured database or a vector database. Similarly, the verification rule base stores verification rules for each sub-task type, which can also be implemented using a structured database or a vector database. The large-scale model multi-path fusion reflection module will, for each sub-task type of the general agent, call different types of large models (such as the aforementioned general large language model, multimodal large models like GPT4V and Qwen2.5-VL, GUI multimodal large models, code large models, etc.) to perform serial or parallel model and result fusion, or combine the results of the large model with simple verification rules. Furthermore, other external tools or interfaces, such as numerical calculators, network search engines, and operations optimization tools, can be integrated serially or in parallel with the large model and verification rules as a tool pool. Finally, this stage outputs reflection conclusion text, pass / fail scores, and other information.
[0101] 4. When the large model multi-path fusion reflection module is running, it is monitored by the security control and timeout control modules. The timeout control module determines whether the reflection process has exceeded the time limit or the length of time, thereby avoiding excessive waste of computing resources. If the time limit or the length of time exceeds the time limit, the reflection process is directly interrupted. The strategy after interrupting the reflection can be determined according to the actual situation, such as retrying or directly ignoring the reflection step.
[0102] 5. All reflection results across all dimensions are integrated through a gating module. The reflection conclusion text is then summarized and processed using a large model, which can be the aforementioned general language model or a finely tuned version of the large model. Simultaneously, the reflection scores are weighted and averaged to implement soft constraints on the output results. Besides weighted averaging, direct averaging, machine learning models such as linear regression, and logistic regression can also be used to integrate the results. It should be noted that the weights can be preset dimension weights or assigned by the large model based on the importance of different reflection dimensions.
[0103] 6. The output of the reflection result gating step is again judged by the security control module to see if there is sensitive or harmful information. If so, the reflection is directly interrupted and no reflection conclusion is output; otherwise, the threshold is used to determine whether the reflection passes. A successful reflection means that the agent's actions and results in this step are reasonable, correct, complete and harmless.
[0104] 7. If the reflection result is satisfactory, the next step of thinking and execution will continue; otherwise, the reflection will be interrupted, and the preset logic will decide whether to retry the execution of this step or directly terminate the execution of the entire agent; this completes the entire reflection process.
[0105] This invention proposes a general intelligent agent reflection method and system based on a large-model multi-path fusion strategy and gating mechanism. Combining the proposed task routing module, large-model multi-path fusion reflection module, gating module, and safety / timeout control module, more accurate and unbiased general intelligent agent reflection can be achieved, contributing to more accurate and stable operation of the general intelligent agent and enabling more precise identification and correction of various errors. Simultaneously, the simple verification rules employed can save computational resources during the reflection process and even the entire general intelligent agent, making agent execution more economical. The introduction of safety and timeout control mechanisms makes the agent's reflection process more controllable. Therefore, this invention is a more accurate, economical, and controllable general intelligent agent reflection scheme, particularly suitable for general intelligent agents facing different industries and users.
[0106] The innovative aspects of this invention are as follows:
[0107] 1. A reflection strategy and method for multi-path fusion of large models is proposed, which can realize the organic integration between different types of large models, between large models and simple verification rules, and between large models and external tool interfaces. Combined with the sub-task routing mechanism of the agent, it can more effectively evaluate the results and reflect on the process of different types of sub-tasks in the general agent, thereby achieving a more accurate and unbiased reflection process.
[0108] 2. A lightweight reflection strategy combining task routing mechanism and simple verification rules is proposed. It runs in parallel with the large model-based reflection method, which can greatly reduce the abuse of large models in the reflection process and the entire execution process of the general intelligent agent, as well as the computational resource consumption caused by calling large models.
[0109] 3. A reflection result gating integration mechanism is introduced. By integrating the reflection conclusion text and the reflection result score, the final reflection result is output in a soft constraint manner, so as not to rely on a single model or tool, thus alleviating the cognitive bias problem in the reflection process of general intelligent agents.
[0110] 4. Finally, this invention also introduces safety control and timeout control strategies. By conducting safety checks on the reflection process itself and monitoring and handling issues such as timeouts and excessive durations, it further avoids ineffective and overly divergent agent thinking and reflection.
[0111] The above description is merely a detailed explanation of preferred embodiments and principles of the present invention. For those skilled in the art, there may be changes in specific implementation methods based on the ideas provided by the present invention, and these changes should also be considered within the scope of protection of the present invention.
Claims
1. A general-purpose intelligent agent reflection system based on large-scale model multi-path fusion and gating mechanism, characterized in that, include: The input module is used to receive the set of input information from the agent after completing a single-step subtask. The task routing module is used to classify the current action into task types based on the input information set and output the classification results; The large model multi-path fusion reflection module is used to evaluate and reflect on the current action and corresponding execution results in multiple dimensions based on the classification results and a combination of reflection strategies adapted to the task type. The reflection result gating module is used to integrate the reflection sub-results of multiple dimensions output by the large model multi-path fusion reflection module, generate and output the final reflection conclusion and comprehensive evaluation score; The safety and timeout control module is used to monitor safety risks and control resource consumption during the reflection process. The output module is used to output the final reflection conclusion and comprehensive evaluation score to determine the subsequent execution process of the agent; The set of input information includes: the user's original task description, historical action sequence, historical action execution results, historical reflection description, current action description, and current action execution result; The large-model multi-path fusion reflection module includes: The model scheduling unit is used to schedule at least two different types of large models from the model pool based on the classification results; the model pool includes a general large language model, a multimodal large model, a graphical user interface multimodal large model, and a code large model; A rule execution engine is used to match and execute corresponding programmable verification rules from the verification rule base based on the classification results; The fusion processing unit is used to fuse the output of the large scheduling model and the execution verification rules through serial, parallel or serial-parallel processing to generate the reflection sub-results of the multiple dimensions. When the classification result is an application operation task, the model scheduling unit operates as follows: Based on the user's original task description, historical action sequence, historical reflection description and current action description, a logical self-consistency evaluation is performed to generate the first reflection sub-result; Parallel scheduling of a large multimodal model with a graphical user interface (GUI) is performed, executing the following two evaluation branches: Branch 1: Based on the expected conformity assessment of the user's original task description, current action description, and current action execution result, generate a second reflection sub-result; Branch 2: Based on the trajectory coherence evaluation of the user's original task description, historical action sequence, historical action execution results, and current action execution results, a third reflection sub-result is generated; The fusion processing unit performs a comprehensive analysis on the first reflection sub-result, the second reflection sub-result, and the third reflection sub-result, and outputs a reflection process description text, a reflection conclusion text, and a pass / fail score. The reflection result gating module specifically includes the following process: The evaluation scores corresponding to the reflection sub-results of the multiple dimensions are received, and the comprehensive evaluation score is calculated using a weighted average algorithm; wherein the weight of each dimension is a preset value or a value given by the large language model; The system receives the textual conclusions corresponding to the reflection sub-results from the multiple dimensions, and then uses a large language model to summarize and aggregate them to generate the final reflection conclusion.
2. The general intelligent agent reflection system based on large-model multi-path fusion and gating mechanism according to claim 1, characterized in that, The task routing module includes a routing classification engine, which is configured to receive the user's original task description, historical action sequence and current action description, and map them to a preset set of subtask types; the set of subtask types includes at least knowledge question answering, application operation, file operation, numerical calculation and network search.
3. The general intelligent agent reflection system based on large-model multi-path fusion and gating mechanism according to claim 2, characterized in that, In the large model multi-path fusion reflection module, the reflection strategy combination includes: the combination of calling different types of large models, the combination of calling large models and preset verification rule bases, and the combination of calling large models and external tool interfaces.
4. The general intelligent agent reflection system based on large-model multi-path fusion and gating mechanism according to claim 1, characterized in that, The verification rule base in the large model multi-path fusion reflection module stores verification rules for each type of subtask; the verification rule base is implemented through a knowledge base + code script, and the knowledge base stores several rules represented in the form of code scripts and code functions; Once different validation rules are matched based on the type of subtask, the corresponding validation rules are executed by the code compiler, and the final reflection result score is output.
5. The general intelligent agent reflection system based on large-model multi-path fusion and gating mechanism according to claim 1, characterized in that, The safety and timeout control module specifically includes the following processes: Based on a pre-defined sensitive word database or security discrimination model, unsafe and sensitive information is identified and filtered in the text content circulating during the reflection process; the security discrimination model includes a large language model or a small text classification model. The system monitors the execution time and input / output data volume of the large model multi-path fusion reflection module and the reflection result gating module, and triggers an interruption or retry mechanism when the preset time threshold or length threshold is exceeded.
6. The general intelligent agent reflection system based on large-model multi-path fusion and gating mechanism according to claim 1, characterized in that, The set of input information received by the input module is encapsulated and transmitted in a structured data format; The output module outputs a reflection conclusion text, which is used to interact with the planning and execution engine of the agent to trigger subsequent operations such as continuing execution, retrying the current step, or terminating the task process; the reflection conclusion text includes the final reflection conclusion and the comprehensive evaluation score.
Citation Information
Patent Citations
Multi-agent collaborative question and answer enhancement method and system based on heterogeneous data knowledge
CN120705277A
Task reflection verification method and device of intelligent agent, equipment, medium and product
CN121031644A