Task processing method and device based on agent and expert model, and storage medium
By splitting complex tasks into subtasks and selecting target models from shared expert models by the agent, the problems of low utilization, low efficiency and low accuracy of the expert model when handling complex tasks are solved, and more efficient and accurate task processing is achieved.
Patent Information
- Application Number
- CN202510044650.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-12
- Publication Date
- 2025-05-09
AI Technical Summary
Traditional hybrid expert models have problems such as low utilization, low processing efficiency and low accuracy when dealing with complex tasks.
By splitting the task to be processed into multiple subtasks and sending the subtasks to the corresponding agents, the agent determines the target expert model for performing the subtask from the multiple expert models and calls the target expert model to process the subtask. Multiple agents share expert models, which improves the utilization rate of expert models.
It improves the utilization rate of expert models, significantly improves the efficiency and accuracy of task processing, and solves the shortcomings of traditional hybrid expert models when dealing with complex tasks.
Smart Images

Figure CN119962691A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a task processing method, device and storage medium based on an intelligent agent and an expert model. Background Art
[0002] The core design concept of the traditional Mixture of Experts (MoE) framework is to manage and activate multiple expert models by introducing a central control module, so as to make full use of the expertise of each expert model to flexibly respond to complex and changeable input tasks. However, in practical applications, the limitations of this framework have gradually emerged, especially when processing tasks. Specifically, the sparsity principle, as an important guiding principle for the control module when calling expert models, has effectively reduced the consumption of computing resources to a certain extent, but it also brings about the problem of low utilization of expert models. When faced with a task, the control module tends to activate only a few (for example, 2 to 3) expert models, while ignoring other experts with the same processing capabilities. This selection strategy may be able to cope with simple or single-type tasks, but it seems to be unable to cope with complex or multi-tasks. Because complex tasks often require comprehensive knowledge and reasoning ability from many aspects, and the sparsity principle limits the control module to only call a few expert models to process, these expert models may not be able to effectively cope with highly complex or unknown tasks due to insufficient processing capabilities or experience. Therefore, when the model processes these tasks, it is prone to problems of low processing efficiency and low accuracy, and causes a waste of expert model resources, that is, low utilization of the expert model.
[0003] With respect to the technical problems that the traditional hybrid expert model in the above-mentioned prior art has low expert model utilization, low processing efficiency and low accuracy when processing complex tasks, no effective solution has been proposed so far. Summary of the invention
[0004] The embodiments of the present disclosure provide a task processing method, device and storage medium based on an agent and an expert model, so as to at least solve the technical problems in the prior art that the traditional hybrid expert model has low expert model utilization, low processing efficiency and low accuracy when processing complex tasks.
[0005] According to one aspect of an embodiment of the present disclosure, a task processing method based on an agent and an expert model is provided, comprising: splitting a task to be processed into multiple subtasks, and sending the subtasks to corresponding agents respectively; determining, by the agent, a target expert model for executing the subtask from multiple expert models, and calling the target expert model to process the subtask, wherein the multiple expert models are shared by multiple agents; receiving, by the agent, a subtask processing result corresponding to the subtask returned by the target expert model; and summarizing the subtask processing results to generate a task processing result corresponding to the task.
[0006] According to another aspect of the embodiments of the present disclosure, a storage medium is further provided. The storage medium includes a stored program, wherein the above method is executed by a processor when the program is running.
[0007] According to another aspect of the embodiments of the present disclosure, there is also provided a task processing device based on an agent and an expert model, including: a task splitting module, used to split the task to be processed into multiple subtasks, and send the subtasks to the corresponding agents respectively; a subtask allocation module, used to determine the target expert model for executing the subtask from multiple expert models through the agent, and call the target expert model to process the subtask, wherein the multiple expert models are shared by multiple agents; a subtask processing result acquisition module, used to receive the subtask processing result corresponding to the subtask returned by the target expert model through the agent; and a task processing result generation module, used to summarize the subtask processing results and generate a task processing result corresponding to the task.
[0008] According to another aspect of the embodiments of the present disclosure, there is also provided a task processing system based on an agent and an expert model, including a processor; and a memory connected to the processor, for providing the processor with instructions for processing the following processing steps: splitting the task to be processed into multiple subtasks, and sending the subtasks to the corresponding agents respectively; determining, through the agent, a target expert model for executing the subtask from multiple expert models, and calling the target expert model to process the subtask, wherein the multiple expert models are shared by multiple agents; receiving, through the agent, a subtask processing result corresponding to the subtask returned by the target expert model; and summarizing the subtask processing results to generate a task processing result corresponding to the task.
[0009] The present application first splits the task to be processed into multiple subtasks to decompose the complex task into smaller and more manageable subtasks, laying the foundation for the subsequent accurate selection of the expert model, and then sends the split subtasks to the corresponding agents. As the intermediary and coordinator of task processing, the agent can process subtasks in parallel, improving the speed and efficiency of task processing. Then the target expert model for executing the subtask is determined from multiple shared expert models by the agent, and the target expert model is called to process the subtask. Since multiple agents share the expert model, the resources of the expert model can be used more effectively, resource waste can be avoided, and the utilization rate of the expert model can be improved. Secondly, after the target expert model is processed, the subtask processing result corresponding to the subtask returned by the target expert model is received by the agent, ensuring the accurate transmission of information and the smooth execution of the task. Finally, all subtask processing results received by all agents are summarized to generate the task processing result corresponding to the task. Thus, by introducing the task decomposition and parallel processing mechanism of the agent and the shared expert model, the present application not only improves the utilization rate of the expert model, but also significantly improves the efficiency and accuracy of task processing. This solves the technical problems faced by traditional hybrid expert models when dealing with complex tasks, such as low expert model utilization, low processing efficiency and reduced accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0011] Figure 1 is a hardware structure block diagram of a computing device for implementing the method according to Embodiment 1 of the present application;
[0012] Figure 2 is a schematic diagram of a task processing system based on an agent and an expert model according to Example 1 of the present application;
[0013] Figure 3 is a flowchart of a task processing method based on an agent and an expert model according to Example 1 of the present application;
[0014] Figure 4 is a schematic diagram of a task processing device based on an agent and an expert model according to Embodiment 2 of the present application; and
[0015] Figure 5 It is a schematic diagram of the task processing system based on the intelligent agent and expert model described in Example 3 of the present application. DETAILED DESCRIPTION
[0016] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only embodiments of a part of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.
[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0018] Example 1
[0019] According to this embodiment, a method embodiment of a task processing method based on an agent and an expert model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0020] The method embodiment provided in this embodiment can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computing device for implementing a task processing method based on an agent and an expert model. Figure 1 As shown, the computing device may include one or more processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, a transmission device for communication functions, and an input / output interface. The memory, the transmission device, and the input / output interface are connected to the processor via a bus. In addition, it may also include: a display, a keyboard, and a cursor control device connected to the input / output interface. A person skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0021] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computing device. As involved in the embodiments of the present disclosure, the data processing circuitry acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0022] The memory can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the task processing method based on the agent and expert model in the embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, the task processing method based on the agent and expert model of the above-mentioned application is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computing device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0023] The transmission device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computing device. In one example, the transmission device includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device can be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.
[0024] The display may be, for example, a touch screen liquid crystal display (LCD) that may enable a user to interact with a user interface of the computing device.
[0025] It should be noted that, in some optional embodiments, the above Figure 1 The computing device shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware elements and software elements. Figure 1This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computing devices described above.
[0026] Figure 2 is a schematic diagram of a task processing system based on an agent and an expert model according to this embodiment. Figure 2 As shown, the task processing system based on agents and expert models includes: a control module, multiple agents, a large language model and multiple expert models. The multiple agents include, for example but not limited to, agent 1 and agent 2, and the multiple expert models include, for example but not limited to, expert models 1-5. Among them, expert models 1-5 can be machine learning models, deep learning models, etc. with specific domain knowledge and processing capabilities, and agents 1 and 2 share and access expert models 1-5. Specifically, both agents 1 and 2 can interact with expert models 1-5, send subtasks to them, and receive subtask processing results returned by them.
[0027] It should be noted that multiple agents can process their own subtasks in parallel. In addition, in the process of processing their own subtasks, each agent can interact with the large language model, and with the help of the powerful reasoning ability of the large language model, more accurately determine the target expert model for executing the subtask from multiple expert models. The system can add new agents to handle new task types, and similarly add new expert models to handle new subtask types, which is flexible and scalable.
[0028] In the above operating environment, according to the first aspect of this embodiment, a task processing method based on an agent and an expert model is provided. Figure 3 A schematic diagram showing the process of the method is shown in FIG. Figure 3 As shown, the method includes:
[0029] S102: Split the task to be processed into multiple subtasks, and send the subtasks to corresponding agents respectively;
[0030] S104: determining a target expert model for executing a subtask from a plurality of expert models through an intelligent agent, and calling the target expert model to process the subtask, wherein the plurality of expert models are shared by a plurality of intelligent agents;
[0031] S106: receiving, through the agent, a subtask processing result corresponding to the subtask returned by the target expert model; and
[0032] S108: Summarize the subtask processing results to generate a task processing result corresponding to the task.
[0033] Specifically, the task processing system receives a task to be processed, which may be complex and contain multiple data types or processing requirements. In order to complete this task efficiently, the system needs to split it into multiple smaller and more manageable subtasks. Among them, these subtasks can be divided based on data types (such as text, images, etc.), processing steps (such as preprocessing, analysis, report generation, etc.) or other logically independent units. After splitting the task, the system will select the appropriate agent to process according to the specific requirements and characteristics of each subtask. Agents are key components in the system and have the ability to handle specific types of tasks. For example, one agent may be better at processing image data, while another agent may be better at processing text data. Therefore, in this step, the system will assign each subtask to the most suitable agent (corresponding to step S102) according to the type and requirements of the subtask.
[0034] Each agent will call a suitable model from multiple shared expert models to process the subtask according to the specific requirements of the subtask they receive (corresponding to step S104). These expert models are another key component in the system. They have the ability to process specific types of data or perform specific types of analysis. For example, one expert model may be good at natural language processing, while another expert model may be good at image recognition. Since multiple agents share these expert models, the resources of the expert models can be used more effectively, resource waste can be avoided, and the utilization rate of the expert models can be improved.
[0035] After the target expert model completes the processing, the agent receives the subtask processing result corresponding to the subtask returned by the target expert model, ensuring the accurate transmission of information and the smooth execution of the task (corresponding to step S106). Finally, all subtask processing results received by all agents are summarized to generate the task processing result corresponding to the task (corresponding to step S108).
[0036] Combined with the following Figure 2 , taking the task to be processed as predicting the user's disease and providing treatment suggestions based on the user's medical history data as an example, the corresponding task processing flow is given. Among them, the medical history data covers records from different periods, including medical images (such as X-rays, CT scans, etc.) and text data such as doctor's diagnosis reports and test reports. The specific task processing flow is as follows:
[0037] When the task processing system receives the task to be processed, it inputs the task into the control module, which splits the task into multiple subtasks, such as subtask 1 and subtask 2. Subtask 1 requires analysis of text data such as doctor's diagnosis reports and test reports, while subtask 2 requires analysis of medical images generated by various examinations. Afterwards, the control module selects appropriate agents from agent 1 and agent 2 to process these two subtasks based on the specific needs and characteristics of subtask 1 and subtask 2. For example, agent 1 is more suitable for processing image data, while agent 2 is more suitable for processing text data. Therefore, the control module assigns subtask 1 to agent 2 and assigns subtask 2 to agent 1.
[0038] Expert models play an important role in the system. For example, expert model 1 is good at extracting key features from medical images (such as X-rays, CT scans, and MRI images) to identify lesion areas, abnormal structures, or change patterns. Expert model 2 is good at processing text data such as doctors' diagnosis reports and test reports. It can parse medical terms, identify disease names, symptom descriptions, and treatment history, and convert them into structured information. Expert model 3 is good at further analyzing and assisting in the diagnosis of specific diseases such as tumors, fractures, and vascular lesions based on the extracted image features, and providing preliminary diagnostic opinions. Expert model 4 is good at combining patient medical history, genetic information, lifestyle habits, and other data to use machine learning algorithms to assess the patient's risk of developing a specific disease and generate a risk score. Expert model 5 is good at recommending the most suitable treatment plan or suggesting follow-up examination items based on the patient's current condition, past treatment response, and the latest medical research results.
[0039] After receiving subtask 2 (analyzing the medical images generated by various examinations and giving diagnostic results), agent 1 selects expert model 1 from expert models 1-5 according to its needs, calls expert model 1 to extract key features from the medical images, which may include the location, size, shape, etc. of the lesion area, and receives the key feature information returned by expert model 1. Then, agent 1 calls expert model 3 to make a preliminary diagnosis of the disease based on these key feature information, and receives the diagnostic results returned by expert model 3. In addition, when a more in-depth disease risk assessment is required, agent 1 can also call expert model 4, send other patient information (shared with other agents or directly obtained from the control module) and the data returned by expert model 3 to expert model 4, and use expert model 4 to comprehensively assess the risk of disease and return it to agent 1.
[0040] Similarly, after receiving subtask 1 (analyzing text data such as doctor's diagnosis reports and test reports and giving disease risk assessment results), agent 2 first calls expert model 2 to parse the text content, extract key medical information and diagnostic conclusions, and receive the parsing results returned by expert model 2. Subsequently, agent 2 sends the parsing results to expert model 4, performs disease risk assessment through expert model 4, and receives the assessment results returned by expert model 4. In addition, when it is necessary to provide treatment recommendations based on the current condition, agent 2 can also consider calling expert model 5, sending the parsing results and assessment results to expert model 5 together, generating personalized treatment recommendations through expert model 5, and returning them to agent 2.
[0041] After receiving the processing results returned by expert model 1 and expert model 3, agent 1 integrates the two processing results to form a comprehensive analysis result of the medical image. Agent 2 will integrate the processing results of expert model 2, expert model 4 (if risk assessment is involved) and expert model 5 (if treatment recommendations are required) to form a comprehensive analysis result of the text data. In addition, when integrating the processing results, the agent may perform operations such as data cleaning, deduplication, and format conversion to ensure that all results are consistent and comparable.
[0042] After completing the integration of the expert model processing results, Agent 1 and Agent 2 will return the integrated image analysis results, text parsing results, risk assessment reports, treatment plan recommendations, etc. to the control module. After receiving the processing results returned by the agents, the control module will further summarize and comprehensively analyze to generate the final processing results of the entire task. Among them, the final processing result is, for example, a comprehensive disease risk assessment report, which contains information such as the patient's risk score for various diseases, possible disease types, recommended treatment plans or follow-up examination items. In addition, the control module can also present the final processing results to the user in a visual way, such as generating reports, charts, etc., so that doctors and patients can understand and use them.
[0043] As described in the background technology, the core design concept of the traditional Mixture of Experts (MoE) framework is to manage and activate multiple expert models by introducing a central control module, so as to make full use of the expertise of each expert model to flexibly respond to complex and changeable input tasks. However, in practical applications, the limitations of this framework gradually emerge, especially when processing tasks. Specifically, the sparsity principle, as an important guiding principle for the control module when calling the expert model, effectively reduces the consumption of computing resources to a certain extent, but also brings about the problem of low utilization of expert models. When facing a task, the control module tends to activate only a few (for example, 2 to 3) expert models, while ignoring other experts with the same processing capabilities. This selection strategy may be able to cope with simple or single-type tasks, but it seems to be unable to cope with complex or multi-tasks. Because complex tasks often require comprehensive knowledge and reasoning ability from many aspects, and the sparsity principle limits the control module to only call a few expert models for processing, these expert models may not be able to effectively cope with highly complex or unknown tasks due to insufficient processing ability or experience. Therefore, when the model processes these tasks, it is prone to problems of low processing efficiency and low accuracy, and causes a waste of expert model resources, that is, low utilization of the expert model.
[0044] In view of this, the present application first splits the task to be processed into multiple subtasks to decompose the complex task into smaller and more manageable subtasks, laying the foundation for the subsequent accurate selection of the expert model, and then sends the split subtasks to the corresponding agents. As the intermediary and coordinator of task processing, the agent can process subtasks in parallel, which improves the speed and efficiency of task processing. Then, the target expert model for executing the subtask is determined from multiple shared expert models by the agent, and the target expert model is called to process the subtask. Since multiple agents share the expert model, the resources of the expert model can be used more effectively, resource waste can be avoided, and the utilization rate of the expert model can be improved. Secondly, after the target expert model is processed, the subtask processing result corresponding to the subtask returned by the target expert model is received by the agent, ensuring the accurate transmission of information and the smooth execution of the task. Finally, all subtask processing results received by all agents are summarized to generate the task processing result corresponding to the task. Thus, by introducing the task decomposition and parallel processing mechanism of the agent and the shared expert model, the present application not only improves the utilization rate of the expert model, but also significantly improves the efficiency and accuracy of task processing. This solves the technical problems faced by traditional hybrid expert models when dealing with complex tasks, such as low expert model utilization, low processing efficiency and reduced accuracy.
[0045] Optionally, a target expert model for executing a subtask is determined from multiple expert models by an intelligent agent, and the target expert model is called to process the subtask, including: generating corresponding prompt information according to the subtask by the intelligent agent, sending the prompt information to the large language model, and receiving instruction information corresponding to the subtask returned by the large language model; and determining the target expert model for executing the subtask from multiple expert models according to the instruction information by the intelligent agent, and calling the target expert model to process the subtask according to the instruction information.
[0046] Specifically, continue to use the specific examples described above, and combine Figure 2 As shown, when agent 1 determines the target expert model for executing subtask 2, it can first generate corresponding prompt information according to subtask 2. An example of the prompt information is as follows:
[0047] User input information: ×× image;
[0048] Reference standard text: ×× text;
[0049] Generate processing instructions corresponding to user input information and determine the expert model used to process the information.
[0050] Then, Agent 1 sends the prompt information to the large language model, and receives the instruction information corresponding to subtask 2 returned by the large language model. An example of the instruction information is as follows:
[0051] Target processing instructions: feature extraction and preliminary diagnosis of images;
[0052] The expert models used to process user input information are: expert model 1 and expert model 3.
[0053] Agent 1 determines that the target expert models for executing subtask 2 are expert models 1 and 3 from expert models 1-5 according to the instruction information returned by the large language model, and calls expert models 1 and 3 to process subtask 2 according to the instruction information.
[0054] Similarly, when Agent 2 determines the target expert model for executing Subtask 1, it can also first generate corresponding prompt information according to Subtask 1. An example of the prompt information is as follows:
[0055] User input information: ×× text;
[0056] Reference standard text: ×× text;
[0057] Generate processing instructions corresponding to user input information and determine the expert model used to process the information.
[0058] Then, Agent 2 sends the prompt information to the large language model, and receives the instruction information corresponding to subtask 1 returned by the large language model. An example of the instruction information is as follows:
[0059] Target processing instructions: parse the text and perform disease risk assessment;
[0060] The expert models used to process user input information are: expert model 2 and expert model 4.
[0061] Agent 2 determines that the target expert models for executing subtask 1 are expert models 2 and 4 from expert models 1-5 according to the instruction information returned by the large language model, and calls expert models 2 and 4 to process subtask 1 according to the instruction information.
[0062] In this way, each agent can interact with the large language model while processing its own subtask, and use the powerful reasoning ability of the large language model to more accurately determine the target expert model for performing the subtask from multiple expert models.
[0063] Optionally, the intelligent agent generates corresponding prompt information according to the respective subtasks, including: vectorizing the subtasks through the intelligent agent to generate corresponding vector information; retrieving reference standard text matching the vector information from a pre-configured template library through the intelligent agent, wherein different intelligent agents are configured with different template libraries; and generating corresponding prompt information according to the subtasks and the reference standard text through the intelligent agent.
[0064] Specifically, continuing with the example above, Agent 1 is assigned to subtask 2, which requires analyzing the medical images generated by various examinations and giving diagnostic results. Therefore, Agent 1 can use existing image processing technology or deep learning models to vectorize the medical images, extract key features and convert them into numerical vectors, thereby generating vector information corresponding to the medical images. Agent 1 is configured with a predefined template library, which contains standard texts related to medical image diagnosis. These texts may include descriptions of image features, diagnostic criteria, common misdiagnoses, etc. of various diseases. Thus, Agent 1 retrieves matching reference standard texts in the template library, including disease features and diagnostic criteria, based on the generated medical image vector information. Afterwards, Agent 1 generates corresponding prompt information based on subtask 2 and the reference standard text as follows:
[0065] User input information: chest X-ray;
[0066] Reference standard text: Pneumonia diagnostic standards (including imaging feature description and diagnostic criteria);
[0067] Please generate processing instructions corresponding to the chest X-ray film and determine the expert model used to process the chest X-ray film.
[0068] Similarly, Agent 2 is assigned to subtask 1, which requires analyzing text data such as doctor's diagnosis reports and test reports and giving disease risk assessment results. Therefore, Agent 2 can use natural language processing technology to vectorize the text, such as word embedding or sentence embedding, to convert the text into a numerical vector, thereby generating vector information corresponding to the text data. Agent 2 is also configured with a predefined template library, which contains standard texts related to disease risk assessment, which may include risk assessment schemes for various diseases, lists of risk factors, risk assessment level classification, etc. Therefore, Agent 2 retrieves matching reference standard texts in the template library, including risk assessment schemes and risk factors, based on the generated text data vector information.
[0069] Afterwards, Agent 2 generates the following prompt information based on subtask 1 and the reference standard text:
[0070] User input information: doctor's diagnosis report and test report;
[0071] Reference standard text: Diabetes risk assessment standard (including risk assessment scheme and risk factor list);
[0072] Please generate processing instructions corresponding to the doctor's diagnosis report and the test report, and determine the expert model used to process the doctor's diagnosis report and the test report.
[0073] In this way, the intelligent agent can generate corresponding prompt information to the large language model for different types of input information and subtasks, so as to assist the large language model in generating accurate processing instructions and more accurately determine the target expert model.
[0074] Optionally, the task processing method also includes: generating target processing instructions through the large language model according to the prompt information sent by the intelligent agent, and determining the model identifier of the expert model used to process the subtask from multiple expert models; and generating corresponding instruction information through the large language model according to the target processing instructions and the model identifier, and sending the instruction information to the intelligent agent.
[0075] Specifically, continuing with the above example, after the large language model receives the prompt information sent by Agent 1, it generates a target processing instruction based on the user input information (chest X-ray) and the reference specification text (pneumonia diagnosis specification) in the prompt information. The instruction includes a series of steps such as preprocessing the chest X-ray, feature extraction, and disease diagnosis, and determines the model identifier of the expert model used to process subtask 2 from expert models 1-5 (for example, the identifiers of expert models 1 and 3). Afterwards, the large language module generates corresponding instruction information based on the target processing instruction and model identifier, and sends the instruction information to Agent 1.
[0076] Similarly, after receiving the prompt information sent by Agent 2, the large language model generates a target processing instruction based on the user input information (doctor's diagnosis report and test report) and the reference specification text (diabetes risk assessment specification) in the prompt information. The instruction includes a series of steps such as analyzing the doctor's diagnosis report and test report, disease risk assessment, etc., and determines the model identifier of the expert model used to process subtask 1 from expert models 1-5 (for example, the identifiers of expert models 2 and 4). Afterwards, the large language module generates corresponding instruction information based on the target processing instruction and model identifier, and sends the instruction information to Agent 2.
[0077] In this way, the accuracy of the instruction information generated by the large language model is guaranteed, laying the foundation for the subsequent intelligent agent to call the expert model based on the instruction information.
[0078] Optionally, a target expert model for executing a subtask is determined from multiple expert models by an intelligent agent, and the target expert model is called to process the subtask, including: parsing instruction information by an intelligent agent to obtain target processing instructions and model identifiers in the instruction information; determining a target expert model for executing the subtask from multiple expert models according to the model identifier by an intelligent agent; and determining a calling order of the target expert models according to the target processing instructions by the intelligent agent, and calling the target expert model to process the subtask in the calling order.
[0079] Specifically, after receiving the instruction information sent by the large language model, the agent 1 first needs to parse the instruction information to obtain the target processing instructions and model identification in the instruction information to prepare for the subsequent steps. After parsing the instruction information, the agent 1 finds the target expert model that matches the current subtask (i.e., analyzing medical images and giving diagnosis results) from the pre-configured multiple expert models according to the model identification. Since medical image analysis may involve multiple steps, such as preprocessing, feature extraction, classification diagnosis, etc., different expert models may be responsible for different steps, and the processing steps of these expert models are sequential. Therefore, the agent 1 needs to determine the calling order of these target expert models according to the target processing instructions. For example, the expert model 1 needs to extract the key feature information in the medical image, and then input the key feature information into the expert model 3 for diagnosis. Therefore, the calling order of the model is to call the expert model 1 first and then call the expert model 3. Afterwards, the agent 1 calls the target expert model to process the subtask according to the determined calling order, ensuring that each expert model can work together in a predetermined order and manner to complete the subtask.
[0080] Similarly, after receiving the instruction information sent by the large language model, Agent 2 also needs to parse it and identify the target processing instructions and model identifiers in the instruction information to prepare for the subsequent steps. Since Agent 2 processes the doctor's diagnosis report and test report, Agent 2 finds the target expert model that matches the current subtask (i.e., analyzing the doctor's diagnosis report and test report and giving the risk assessment result) from the pre-configured multiple expert models according to the model identifier. Since the analysis of the doctor's diagnosis report and test report may involve multiple steps, such as preprocessing, text analysis, disease risk assessment, etc., different expert models may be responsible for different steps, and the processing steps of these expert models are sequential. Therefore, Agent 2 needs to determine the calling order of these target expert models according to the target processing instructions. For example, Expert Model 2 needs to analyze the doctor's diagnosis report and test report, and then input the results of the text analysis into Expert Model 2 for disease risk assessment. Therefore, the model calling order is to call Expert Model 2 first and then Expert Model 4. Afterwards, Agent 2 calls the target expert model to process the subtask in the determined calling order, ensuring that each expert model can work together in the predetermined order and manner to complete the subtask.
[0081] In this way, the agents are able to handle their respective subtasks efficiently and accurately.
[0082] In addition, according to this embodiment, a storage medium is also provided, wherein the storage medium includes a stored program, wherein when the program is run, a processor executes any one of the above methods.
[0083] The present application first splits the task to be processed into multiple subtasks to decompose the complex task into smaller and more manageable subtasks, laying the foundation for the subsequent accurate selection of the expert model, and then sends the split subtasks to the corresponding agents. As the intermediary and coordinator of task processing, the agent can process subtasks in parallel, improving the speed and efficiency of task processing. Then the target expert model for executing the subtask is determined from multiple shared expert models by the agent, and the target expert model is called to process the subtask. Since multiple agents share the expert model, the resources of the expert model can be used more effectively, resource waste can be avoided, and the utilization rate of the expert model can be improved. Secondly, after the target expert model is processed, the subtask processing result corresponding to the subtask returned by the target expert model is received by the agent, ensuring the accurate transmission of information and the smooth execution of the task. Finally, all subtask processing results received by all agents are summarized to generate the task processing result corresponding to the task. Thus, by introducing the task decomposition and parallel processing mechanism of the agent and the shared expert model, the present application not only improves the utilization rate of the expert model, but also significantly improves the efficiency and accuracy of task processing. This solves the technical problems faced by traditional hybrid expert models when dealing with complex tasks, such as low expert model utilization, low processing efficiency and reduced accuracy.
[0084] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0085] Example 2
[0086] Figure 4 The schematic diagram of the structure of the task processing device 400 based on the agent and the expert model according to the present embodiment is shown. The task processing device 400 includes: a task splitting module 410, which is used to split the task to be processed into multiple subtasks and send the subtasks to the corresponding agents respectively; a subtask allocation module 420, which is used to determine the target expert model for executing the subtask from multiple expert models through the agent, and call the target expert model to process the subtask, wherein the multiple expert models are shared by multiple agents; a subtask processing result acquisition module 430, which is used to receive the subtask processing result corresponding to the subtask returned by the target expert model through the agent; and a task processing result generation module 440, which is used to summarize the subtask processing results and generate the task processing result corresponding to the task.
[0087] Optionally, the subtask assignment module 420 includes: a prompt information generation submodule, which is used to generate corresponding prompt information according to the subtask through the intelligent agent, send the prompt information to the large language model, and receive instruction information corresponding to the subtask returned by the large language model; and a target expert model determination submodule, which is used to determine the target expert model for executing the subtask from multiple expert models according to the instruction information through the intelligent agent, and call the target expert model to process the subtask according to the instruction information.
[0088] Optionally, the prompt information generation submodule includes: a vectorization unit, which is used to vectorize the subtask through an intelligent agent to generate corresponding vector information; a retrieval unit, which is used to retrieve a reference standard text that matches the vector information from a pre-configured template library through an intelligent agent, wherein different intelligent agents are configured with different template libraries; and a generation unit, which is used to generate corresponding prompt information through an intelligent agent based on the subtask and the reference standard text.
[0089] Optionally, the task processing device 400 also includes: a standard text generation module, which is used to generate target processing instructions based on prompt information sent by the intelligent agent through a large language model, and determine the model identifier of the expert model used to process the subtask from multiple expert models; and an instruction information generation module, which is used to generate corresponding instruction information based on the target processing instructions and model identifier through a large language model, and send the instruction information to the intelligent agent.
[0090] Optionally, the instruction information generation module is specifically used to: parse the instruction information through an intelligent agent to obtain target processing instructions and model identifiers in the instruction information; determine, through the intelligent agent based on the model identifier, a target expert model for executing a subtask from multiple expert models; and determine, through the intelligent agent based on the target processing instructions, a calling order of the target expert models, and call the target expert model to process the subtask in accordance with the calling order.
[0091] Thus, according to this embodiment, the task to be processed is first split into multiple subtasks to decompose the complex task into smaller and more manageable subtasks, which lays the foundation for the subsequent accurate selection of the expert model, and then the split subtasks are sent to the corresponding agents respectively. As the intermediary and coordinator of task processing, the agent can process the subtasks in parallel, which improves the speed and efficiency of task processing. Then, the target expert model for executing the subtask is determined from multiple shared expert models by the agent, and the target expert model is called to process the subtask. Since multiple agents share the expert model, the resources of the expert model can be more effectively utilized, resource waste is avoided, and the utilization rate of the expert model is improved. Secondly, after the target expert model is processed, the subtask processing result corresponding to the subtask returned by the target expert model is received by the agent, ensuring the accurate transmission of information and the smooth execution of the task. Finally, all subtask processing results received by all agents are summarized to generate the task processing result corresponding to the task. Thus, by introducing the task decomposition and parallel processing mechanism of the agent and the shared expert model, the present application not only improves the utilization rate of the expert model, but also significantly improves the efficiency and accuracy of task processing. This solves the technical problems faced by traditional hybrid expert models when dealing with complex tasks, such as low expert model utilization, low processing efficiency and reduced accuracy.
[0092] Example 3
[0093] Figure 5 The task processing system 500 based on an agent and an expert model according to the present embodiment is shown, comprising: a processor 510; and a memory 520, connected to the processor 510, for providing the processor 510 with instructions for processing the following processing steps: splitting the task to be processed into multiple subtasks, and sending the subtasks to the corresponding agents respectively; determining a target expert model for executing the subtask from multiple expert models through the agent, and calling the target expert model to process the subtask, wherein the multiple expert models are shared by multiple agents; receiving the subtask processing results corresponding to the subtask returned by the target expert model through the agent; and summarizing the subtask processing results to generate a task processing result corresponding to the task.
[0094] Optionally, a target expert model for executing a subtask is determined from multiple expert models by an intelligent agent, and the target expert model is called to process the subtask, including: generating corresponding prompt information according to the subtask by the intelligent agent, sending the prompt information to the large language model, and receiving instruction information corresponding to the subtask returned by the large language model; and determining the target expert model for executing the subtask from multiple expert models according to the instruction information by the intelligent agent, and calling the target expert model to process the subtask according to the instruction information.
[0095] Optionally, the intelligent agent generates corresponding prompt information according to the respective subtasks, including: vectorizing the subtasks through the intelligent agent to generate corresponding vector information; retrieving reference standard text matching the vector information from a pre-configured template library through the intelligent agent, wherein different intelligent agents are configured with different template libraries; and generating corresponding prompt information according to the subtasks and the reference standard text through the intelligent agent.
[0096] Optionally, the memory 520 is also used to provide the processor 510 with instructions for processing the following processing steps: generating a target processing instruction based on the prompt information sent by the agent through the large language model, and determining the model identifier of the expert model used to process the subtask from multiple expert models; and generating corresponding instruction information based on the target processing instruction and the model identifier through the large language model, and sending the instruction information to the agent.
[0097] Optionally, a target expert model for executing a subtask is determined from multiple expert models by an intelligent agent, and the target expert model is called to process the subtask, including: parsing instruction information by an intelligent agent to obtain target processing instructions and model identifiers in the instruction information; determining a target expert model for executing the subtask from multiple expert models according to the model identifier by an intelligent agent; and determining a calling order of the target expert models according to the target processing instructions by the intelligent agent, and calling the target expert model to process the subtask in the calling order.
[0098] Thus, according to this embodiment, the task to be processed is first split into multiple subtasks to decompose the complex task into smaller and more manageable subtasks, which lays the foundation for the subsequent accurate selection of the expert model, and then the split subtasks are sent to the corresponding agents respectively. As the intermediary and coordinator of task processing, the agent can process the subtasks in parallel, which improves the speed and efficiency of task processing. Then, the target expert model for executing the subtask is determined from multiple shared expert models by the agent, and the target expert model is called to process the subtask. Since multiple agents share the expert model, the resources of the expert model can be more effectively utilized, resource waste is avoided, and the utilization rate of the expert model is improved. Secondly, after the target expert model is processed, the subtask processing result corresponding to the subtask returned by the target expert model is received by the agent, ensuring the accurate transmission of information and the smooth execution of the task. Finally, all subtask processing results received by all agents are summarized to generate the task processing result corresponding to the task. Thus, by introducing the task decomposition and parallel processing mechanism of the agent and the shared expert model, the present application not only improves the utilization rate of the expert model, but also significantly improves the efficiency and accuracy of task processing. This solves the technical problems faced by traditional hybrid expert models when dealing with complex tasks, such as low expert model utilization, low processing efficiency and reduced accuracy.
[0099] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0100] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0101] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0103] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0104] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0105] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A task processing method based on an agent and an expert model, characterized in that: include: Split the task to be processed into multiple subtasks, and send the subtasks to corresponding agents respectively; Determining, by the agent, a target expert model for executing the subtask from a plurality of expert models, and calling the target expert model to process the subtask, wherein the plurality of expert models are shared by a plurality of the agents; Receiving, by the agent, a subtask processing result corresponding to the subtask returned by the target expert model; as well as The subtask processing results are summarized to generate a task processing result corresponding to the task.
2. The method according to claim 1, characterized in that The step of determining, by the agent, a target expert model for executing the subtask from a plurality of expert models, and calling the target expert model to process the subtask comprises: Generate corresponding prompt information according to the subtask by the agent, send the prompt information to the large language model, and receive instruction information corresponding to the subtask returned by the large language model; and The agent determines a target expert model for executing the subtask from a plurality of expert models according to the instruction information, and calls the target expert model to process the subtask according to the instruction information.
3. The method according to claim 2, characterized in that The generating corresponding prompt information according to the respective subtasks by the intelligent agent includes: Vectorizing the subtasks by the agent to generate corresponding vector information; Retrieving, by the agent, a reference specification text matching the vector information from a pre-configured template library, wherein different template libraries are configured for different agents; and The intelligent agent generates corresponding prompt information according to the subtask and the reference specification text.
4. The method according to claim 2, characterized in that: Also includes: Generate a target processing instruction according to the prompt information sent by the agent through the large language model, and determine the model identifier of the expert model used to process the subtask from the multiple expert models; and The large language model generates corresponding instruction information according to the target processing instruction and the model identifier, and sends the instruction information to the agent.
5. The method according to claim 4, characterized in that The step of determining, by the agent, a target expert model for executing the subtask from a plurality of expert models, and calling the target expert model to process the subtask comprises: Parsing the instruction information by the agent to obtain the target processing instruction and the model identifier in the instruction information; Determining, by the agent according to the model identifier, a target expert model for executing the subtask from among the multiple expert models; and The agent determines the calling order of the target expert model according to the target processing instruction, and calls the target expert model to process the subtask according to the calling order.
6. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is run, the processor executes the method according to any one of claims 1 to 5.
7. A task processing device based on an agent and an expert model, comprising: A task splitting module is used to split the task to be processed into multiple subtasks and send the subtasks to corresponding agents respectively; A subtask allocation module, used to determine a target expert model for executing the subtask from a plurality of expert models through the agent, and call the target expert model to process the subtask, wherein the plurality of expert models are shared by a plurality of the agents; A subtask processing result acquisition module, used for receiving, through the agent, a subtask processing result corresponding to the subtask returned by the target expert model; as well as The task processing result generating module is used to summarize the subtask processing results and generate a task processing result corresponding to the task.
8. The device according to claim 7, characterized in that The subtask allocation module comprises: a prompt information generating submodule, configured to generate corresponding prompt information according to the subtask through the agent, send the prompt information to the large language model, and receive instruction information corresponding to the subtask returned by the large language model; and The target expert model determination submodule is used to determine the target expert model for executing the subtask from multiple expert models according to the instruction information through the intelligent agent, and call the target expert model to process the subtask according to the instruction information.
9. The device according to claim 8, characterized in that The prompt information generation submodule includes: A vectorization unit, used to vectorize the subtask through the agent to generate corresponding vector information; a retrieval unit, configured to retrieve, through the agent, a reference specification text matching the vector information in a pre-configured template library, wherein different agents are configured with different template libraries; and A generating unit is used to generate corresponding prompt information according to the subtask and the reference specification text through the intelligent agent.
10. A task processing system based on intelligent agent and expert model, characterized in that: include: processor; as well as A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: Split the task to be processed into multiple subtasks, and send the subtasks to corresponding agents respectively; Determining, by the agent, a target expert model for executing the subtask from a plurality of expert models, and calling the target expert model to process the subtask, wherein the plurality of expert models are shared by a plurality of the agents; Receiving, by the agent, a subtask processing result corresponding to the subtask returned by the target expert model; as well as The subtask processing results are summarized to generate a task processing result corresponding to the task.
Citation Information
Cited By
Data processing method
CN120234286A
Data processing methods
CN120234286B
Processor system and operation method for large-scale deep learning
CN120448132A
Decision-making method of expert model, memory card and decision-making equipment
CN120725179A
Multi-agent tool calling method and system based on MoE expert model
CN120762787A