Large model task routing method, device and medium
By combining task discrimination agents with large model toolsets, and utilizing semantic similarity and historical task records, we solved the information dependency and historical information interference problems of large models in intent recognition, achieving more efficient task routing and a simpler interaction process.
Patent Information
- Application Number
- CN202510875092.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-27
AI Technical Summary
Existing large models have problems in user intent recognition and task routing, such as strong information dependence, excessive historical information affecting judgment, and bottlenecks caused by users asking questions continuously, resulting in reduced recognition effect and poor performance in complex tasks.
A task discrimination agent is used to receive task function descriptions and parameters, and a task execution agent is registered through a large model tool set. Intent analysis is performed based on semantic similarity and historical task records. Semantic reasoning and slot parameter completeness verification are used to ensure accurate calling of the task execution agent.
A more accurate and easy-to-use task routing system has been implemented, which improves the accuracy of task routing in complex scenarios, simplifies the interaction process, reduces the number of parameter inquiries, and improves the efficiency of task completion in multi-round dialogues.
Smart Images

Figure CN120429307B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a large-model task routing method, device, and medium. Background Art
[0002] Currently, building a unified interaction portal for human-computer interaction systems is a core direction for future intelligent system design. Its significance lies not only in improving technical efficiency but also in reshaping the human-computer interaction paradigm, optimizing resource allocation, and promoting the implementation of multimodal scenarios. A unified interaction portal is also a key stepping stone towards general artificial intelligence. Through intent recognition and dynamic routing, the model can gradually achieve a closed loop of perception-decision-execution, approaching human-level comprehensive problem-solving capabilities. This form of interaction is particularly urgent and widespread in systems such as intelligent customer service, AI assistants, and smart terminals. Traditional systems require users to actively select function portals (such as navigating different interfaces and clicking different buttons to access services such as translation, search, and Q&A). A unified portal automatically understands user needs and intent. Users simply express themselves naturally, and the system automatically routes them to the corresponding service module and performs the relevant operations. This significantly improves business processing efficiency and provides a more user-friendly human-computer interaction experience.
[0003] Therefore, task routing through user intent identification is one of the core tasks in the field of natural language processing and an important technology in engineering systems. It aims to parse the user's real needs or goals from the user input and realize the automatic execution of tasks.
[0004] Currently, with the increasing centralization of task execution systems and the continuous enrichment of user intent, the requirements for generalization of task discrimination are gradually increasing. With the continuous development of large model capabilities, methods based on large models and prompt engineering are becoming more and more widely used, gradually becoming the mainstream means of task discrimination in intelligent interaction. However, in actual applications, the following problems exist:
[0005] Strong dependence on information integrity: Large models are highly dependent on the integrity of input information. If the user does not provide complete information (such as missing time or location), the recognition effect will be significantly reduced, and the performance will be even worse in complex tasks (such as multi-step decision-making).
[0006] Excessive historical information can affect judgment: Although the model supports long text input, it may still fail to understand the intent of extremely long conversations or complex logic. For example, when users frequently switch topics in multiple rounds of conversation, the model may lose key information.
[0007] Consecutive user questioning bottlenecks: Large models may forget key information across multiple rounds of conversation, leading to incorrect intent recognition. For example, if a user asks "What's the weather like tomorrow?" and "What about the day after tomorrow?" consecutively, the system may overlook the context.
[0008] Therefore, it is necessary to build a more accurate and easy-to-use task routing system to achieve a more efficient and accurate task routing technical solution. Summary of the Invention
[0009] The embodiments of the present application provide a large-model task routing method, device, and medium for solving the problem of building a more accurate and easy-to-use task routing system and achieving a technical solution for more efficient and accurate task routing.
[0010] The embodiments of this application adopt the following technical solutions:
[0011] On the one hand, an embodiment of the present application provides a large model task routing method, which includes: a task discrimination agent receives a task function description, task parameters and parameter description provided by each task execution agent; based on the task function description, task parameters and parameter description, each task execution agent is registered in the form of a function to a large model tool set; when an input question statement is received, the dialogue interaction records corresponding to each historical task in the current session are retrieved; the historical tasks belong to the same task, and the dialogue interaction records include all input question statements, historical task function descriptions and historical task word slots of the historical tasks; the current session is not a new session opened for the first time; according to the large model tool set, the input question statement and the dialogue interaction records corresponding to each historical task are analyzed for intent, and the adaptation task execution agent of the input question statement is determined; according to the task parameters of the adaptation task execution agent, the input question statement is checked for word slot parameter completeness, and the adaptation task execution agent is called through the complete word slot parameters.
[0012] In one example, when receiving an input question statement, before searching for several historical conversation records of the current session, the method also includes: receiving typical task questions provided by each task execution agent, semantically vectorizing the typical task questions, and storing the vectorized typical questions in a mounted vector database; the method also includes: when receiving the input question statement, vectorizing the input question statement, matching the vectorized statement in the vector database, and determining the semantic similarity between the input question statement and each task execution agent.
[0013] In one example, the vectorized statement is matched in a vector database to determine the semantic similarity between the input question statement and each task execution agent, specifically including: calculating the similarity between the vectorized statement and the vectorized typical questions in the vector database to obtain the semantic similarity between the input question statement and each vectorized typical question; determining the maximum semantic similarity corresponding to each task execution agent based on the semantic similarity of the vectorized typical questions corresponding to each task execution agent; constructing a similarity set vector based on the maximum semantic similarity corresponding to each task execution agent; and normalizing the similarity set vector to obtain the semantic similarity between the input question statement and each task execution agent.
[0014] In one example, the intention analysis of the input question statement and the dialogue interaction records corresponding to each historical task is performed based on the big model toolset to determine the adapted task execution agent for the input question statement, specifically including: using the input question statement and the dialogue interaction records corresponding to each historical task as input data of the big model, using the big model toolset as the adaptation constraint condition, and obtaining the probability of each task execution agent being called; and determining the adapted task execution agent based on the calling probability and semantic similarity of each task execution agent.
[0015] In one example, the method of determining the adapted task execution agent based on the probability of being called and the semantic similarity of each task execution agent specifically includes: when the current task is not a new task, extracting the semantic similarity between the updated task and each task execution agent; the updated task is the first historical task in the current session; performing weighted summation of the semantic similarity between the input question statement and each task execution agent, and the semantic similarity between the updated task and each task execution agent, to obtain a semantic similarity adaptation score; performing weighted summation of the semantic similarity adaptation score and the probability of being called of each task execution agent, to obtain a comprehensive adaptation score between the input question statement and each task execution agent; and determining the task execution agent with the highest comprehensive adaptation score as the adapted task execution agent.
[0016] In one example, before performing a slot parameter completeness check on the input question statement based on the task parameters of the adaptation task execution agent, the method further includes: judging whether the current task and the historical task belong to the same type of task based on the task function description of the adaptation task execution agent; if they do not belong to the same type of task, clearing the historical task and recording the conversation for the current task.
[0017] In one example, the word slot parameter completeness check is performed on the input question statement based on the task parameters of the adaptation task execution agent, specifically including: judging whether the word slot parameters of the input question statement are complete based on the task parameters of the adaptation task execution agent; when incomplete, if the historical tasks have not been cleared, extracting the missing word slot parameters from the historical tasks; questioning the user to confirm the missing word slot parameters, and guiding the user to supplement the missing word slot parameters that have not been extracted until the word slot parameters are complete; if the historical tasks have been cleared, guiding the user to supplement the missing word slot parameters until the word slot parameters are complete.
[0018] In one example, after the adaptation task execution agent is called through complete word slot parameters, the method further includes: when the current task is an update task, when the task judgment is correct, the input question statement is used as a typical question of the adaptation task execution agent; when the task judgment fails, the task execution agent that should actually be called is determined based on user-specified information, and the input question statement is used as a typical question of the task execution agent that should actually be called.
[0019] On the other hand, an embodiment of the present application provides a large model task routing device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the large model task routing methods described above.
[0020] On the other hand, an embodiment of the present application provides a large model task routing non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions can execute any of the large model task routing methods described above.
[0021] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0022] Based on big model technology, we build an agent for task routing and propose an agent-based task routing framework. This framework leverages the understanding capabilities of big models while fully integrating semantic information and historical user interaction information to implement an accurate and easy-to-use task routing system. The details are as follows:
[0023] The task identification agent is independent of the task execution agent and interacts with it through standardized interfaces, separating routing logic from specific task implementations. This architecture facilitates independent optimization of the task identification algorithm (for example, upgrading the semantic understanding capabilities of large models) or iteration of the task execution module without affecting overall system operation, thus improving the maintainability of the architecture.
[0024] The functional registration mechanism simplifies tool management: by configuring the task function description, task parameters and parameter instructions of the task execution agent in the tools of the task judgment agent mounted on the large model, the registration process of adding a new task execution agent can be made more convenient. There is no need to modify the large model prompt words each time to add a new judgment task, and it will not affect the registration of other task execution agents.
[0025] Use the big model for intent understanding and reasoning: Register each task execution agent as a function to the big model toolset. By retrieving the input questions, function descriptions, and word slot information of historical tasks in the current session, and combining the big model toolset to perform intent analysis, when the historical tasks and the current task belong to the same task, the big model can quickly infer the true intent of the current problem based on contextual semantic associations (such as historical user needs and collected parameters), thereby quickly identifying the task execution agent.
[0026] In other words, the input question and the dialogue interaction records of historical tasks are fed into a large model for semantic reasoning, and semantic matching is performed within the tool set, achieving an upgrade from single-round semantic understanding to multi-round contextual reasoning. Compared to traditional task allocation methods based solely on the current input, this mechanism can accurately identify implicit task continuities (such as parameter supplementation for the same task) across multiple rounds of dialogue, improving task routing accuracy in complex scenarios.
[0027] The historical tasks stored in the current session all belong to the same type of task, and in the process of performing large-model intent analysis on the input question statement each time, excessive historical information interference is avoided.
[0028] After identifying the task execution agent, the word slot parameter completeness verification mechanism is used to ensure that all parameters are complete before calling the task execution agent, avoiding task failures due to missing parameters. In addition, based on historical word slot information, the system can automatically complete parameters that the user has not explicitly mentioned but has provided in historical conversations, reducing the number of parameter inquiries and making the interaction process simpler. Especially for multi-round task scenarios, this mechanism can significantly shorten the task completion cycle. In addition, even if there are no historical word slots or the historical word slots cannot be completed, through the functional registration mechanism, the large model can also determine the word slots that need to be completed and conduct effective counter-questioning guidance, provided that the task has been determined and the task parameters have been registered. In this way, on the basis of automatically determining the user's intention, the automatic execution of the current task is also achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solution of the present application, some embodiments of the present application will be described in detail below with reference to the accompanying drawings, in which:
[0030] Figure 1A flowchart of a large model task routing method provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of the structure of a task routing framework provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of a typical question registration process provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of a process for registering a task description and parameter description provided in an embodiment of the present application;
[0034] Figure 5 A flowchart of a task routing logic provided in an embodiment of the present application;
[0035] Figure 6 A flowchart of a task discrimination logic provided in an embodiment of the present application;
[0036] Figure 7 A flow chart of a feedback mechanism provided in an embodiment of the present application;
[0037] Figure 8 A schematic diagram of the structure of a large-model task routing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0039] Some embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0040] Figure 1 This is a flowchart of a large-scale model task routing method provided in an embodiment of the present application. This method can be applied to various business areas, such as internet finance, e-commerce, instant messaging, gaming, and government affairs. Certain input parameters or intermediate results in this process can be manually adjusted to help improve accuracy.
[0041] The analysis method involved in the embodiments of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For ease of understanding and description, the following embodiments are described in detail using a server as an example.
[0042] It should be noted that the server can be a single device or a system composed of multiple devices, that is, a distributed server, and this application does not make any specific restrictions on this.
[0043] Figure 1 The process in includes the following steps:
[0044] S101: The task identification agent receives the task function description, task parameters and parameter description provided by each task execution agent.
[0045] It should be noted that the task function description is an abstract summary of what the task does, the task parameters are the parameters that the user needs to provide when calling the task execution agent to perform the task, and the task parameter description is a structured definition of the task parameters.
[0046] For example, a task function described as a "weather query task" is used when a user needs to know the weather conditions. The task parameters are: region name and query date. The parameter descriptions are: 1. The region name for the query, which supports Chinese city names, English city names, or region codes; 2. The query date, in the format of YYYY-MM-DD.
[0047] In some implementations of this application, the task routing framework primarily consists of a task identification agent and a task execution agent. The task identification agent is the primary interaction agent, responsible for receiving and understanding user input, determining user intent, and routing tasks. Furthermore, the task execution agent is the agent that actually performs operations, leveraging large model capabilities and leveraging mounted knowledge bases or tools to execute specific tasks.
[0048] It should be noted that the large model of this application can refer to a large language model. The task discrimination agent is equipped with a large model and a vector database, and can distinguish tasks by combining semantic similarity and the understanding ability of the large model. Various task execution agents need to register with the task discrimination agent. Registration mainly includes registration of typical questions, task function descriptions, and task parameter descriptions. The specific process is as follows:
[0049] Registration of typical questions: Each task execution agent provides typical questions corresponding to its own task. During registration, the typical questions are semantically vectorized and stored in the vector database mounted on the task discrimination agent for subsequent semantic similarity calculation.
[0050] That is, the task discrimination agent receives typical task problems provided by each task execution agent, semantically vectorizes the typical task problems, and stores the vectorized typical problems in the mounted vector database.
[0051] It should be noted that a single task execution agent may have multiple typical problems. During interaction, if the current input is very similar to the typical problem maintained by the task execution agent, it means that the current input may correspond to the task of this task execution agent.
[0052] Task function description and parameter registration: Each task execution agent provides the corresponding task description (task function description) and required parameters and parameter descriptions under its own task.
[0053] S102: According to the task function description, task parameters and parameter description, each task execution agent is registered in the form of a function to the large model tool set.
[0054] In some implementations of this application, registration is achieved through the large model tools of the task discrimination agent, and the process is as follows:
[0055] Register each task execution agent as a function in the large model tools. The name parameter of the function corresponds to the index identifier or name of the task execution agent, the description parameter corresponds to the task function description of the task execution agent, and the parameters and parameter descriptions of the task execution agent are written in the parameters parameter.
[0056] In summary, by configuring the task function description, task parameters, and parameter instructions in the tools, the registration process for adding new task execution agents can be made more convenient. There is no need to modify the large model prompt words each time to add a new judgment task, and it will not affect the registration of other task execution agents.
[0057] It should be noted that typical question registration is optional. If you are unable to provide a typical question corresponding to a task execution agent, you can simply register the task function description, task parameters, and parameter descriptions. This will not affect subsequent functionality. Furthermore, users can add, delete, or modify typical questions corresponding to task execution agents at any time during actual use.
[0058] S103: Upon receiving an input question statement, searching for dialogue interaction records corresponding to each historical task in the current session; the historical tasks belong to the same type of task, and the dialogue interaction records include all input question statements, historical task function descriptions, and historical task word slots of the historical tasks; the current session is not a new session opened for the first time.
[0059] It's important to note that a slot is a structured parameter unit required for task execution. Each slot corresponds to a specific type of information, namely, a slot value that the user has confirmed in a previous conversation. For example, if the task parameters define "departure location" as a required field, a historical slot might store information such as "departure location = Beijing." In other words, a slot corresponds to the parameters required for task execution, such as the departure location, destination, time, and other necessary information.
[0060] In some embodiments of the present application, after the task registration process is completed, the task routing framework can be used for task routing, which can be tailored to multiple rounds of dialogue and interactive friendliness. The task discrimination agent makes a judgment after receiving the question statement input by the current user. This judgment process can jointly utilize semantic similarity and large model capabilities, and at the same time combine historical tasks and historical word slots of the current session to minimize the possibility of judgment failure due to unclear user questions.
[0061] It's important to note that during a conversation, once the input question sentence identifies the current task (e.g., "checking the weather") and the required parameters are complete, the corresponding task execution agent can be invoked. This completes the task. This process can involve multiple conversational interactions. However, if the next task in the current conversation (e.g., "checking the weather") still invokes the same task execution agent, it indicates that these two tasks belong to the same type.
[0062] It should be noted that the same task refers to multiple task interactions of the same task type. For example, a user may first ask: "Book a flight from Beijing to Shanghai on June 20th," then add: "Change to business class," and then add: "How about Shanghai to Beijing?"
[0063] In some embodiments of the present application, the historical tasks stored for the current session belong to the same type of historical tasks. Therefore, the current task entered by the user may be the same type of task as the historical task, or it may be a new task. When the current task is identified as a new task, it is equivalent to a task update. Before executing the task, the above historical tasks will be cleared and the current task will be recorded.
[0064] Obviously, through the above method, it is ensured that multiple historical tasks stored in a single session are all the same type of tasks.
[0065] In some embodiments of the present application, the process of determining using semantic similarity is as follows:
[0066] When an input question statement is received, the input question statement is vectorized, the vectorized statement is matched in the vector database, and the semantic similarity between the input question statement and each task execution agent is determined.
[0067] The matching process is as follows:
[0068] First, the similarity between the vectorized sentence and the vectorized typical questions in the vector database is calculated to obtain the semantic similarity between the input question sentence and each vectorized typical question.
[0069] Then, according to the semantic similarity of the vectorized typical problems corresponding to each task execution agent, the maximum semantic similarity corresponding to each task execution agent is determined.
[0070] Then, a similarity set vector is constructed based on the maximum semantic similarity corresponding to each task execution agent.
[0071] Finally, the similarity set vector is normalized to obtain the semantic similarity between the input question statement and each task execution agent.
[0072] It should be noted that the similarity calculation can be performed using the L2 distance. For the recall results, the maximum similarity is recorded, and the values with too small similarity can be set to 0. The expression is as follows:
[0073]
[0074] in, The maximum similarity corresponding to the nth task execution agent, It is the semantic similarity between the user's current input question statement and the i-th typical question corresponding to the task execution agent.
[0075] For all N task execution agents, the following similarity set vector can be obtained:
[0076]
[0077] The normalized expression is as follows:
[0078]
[0079] in, is the minimum similarity in the similarity set vector, is the maximum similarity in the similarity set vector.
[0080] In some embodiments of the present application, the first task of a new task is marked as an update task, that is, the update task is at the starting point of an independent task, representing that the user initiates a brand new task, which is used to indicate the task creation point. Since the user input of the update task usually represents a relatively complete task description, it has a strong reference value for judging the user's current intention. Therefore, when the current task is not an update task, the user input during the last update task can be used as information for task judgment.
[0081] For example, the first task input of a new task is: Tianjin’s weather (marked as an update task), the second task input is: what about tomorrow, and the third task input is: what about the day after tomorrow.
[0082] Based on this, when the current task is not a new task, the semantic similarity between the updated task and each task execution agent is extracted.
[0083] It should be noted that when the current task is not a new task, it means that the current task and the historical tasks are of the same type. Therefore, the updated task is actually the first historical task in the current session.
[0084] Among them, for all N task execution agents, the similarity set vector corresponding to the user input when updating the task can be obtained as follows:
[0085]
[0086] in, The maximum similarity corresponding to the nth task execution agent, is the semantic similarity between the user input when updating the task and the i-th typical question corresponding to the task agent.
[0087] For all N task execution agents, the following similarity set vector can be obtained:
[0088]
[0089] The normalized expression is as follows:
[0090]
[0091] In some embodiments of the present application, the understanding capability of the large model is fully utilized to determine the user's intention. The process of determining the user's intention by utilizing the understanding capability of the large model is as follows:
[0092] It should be noted that when the current session is a new session, there is no historical task. When it is not a new session, the current session has one or more historical tasks belonging to the same task.
[0093] Among them, historical tasks and word slots use the results of multiple rounds of recording, which can be put into the historical dialogue for the large model to understand. For a task dialogue, the dialogue interaction record can be assembled into the following form:
[0094] {"role":"user","content":all user input}
[0095] {"role":"assistant","content":task:xxx,parameter:[parameter]}
[0096] It should be noted that all user input refers to all user input question statements involved in this historical task.
[0097] In addition, there may be multiple historical tasks, each of which will have its own dialogue record. Therefore, there may be dialogue interaction records for multiple historical tasks.
[0098] In summary, the form of dialogue interaction records for historical tasks can avoid situations where user input or large model output is irregular or the content is confusing, thereby resolving the impact of excessive historical information on task judgment.
[0099] Furthermore, since the task execution agent has been registered before, the task function description, task parameters and parameter description of each task execution agent have been recorded in the big model tools. Based on this, the big model can continue to conduct comprehensive analysis in combination with the dialogue interaction records of historical tasks and the user's current input.
[0100] S104: Performing intent analysis on the input question statement and the dialogue interaction records corresponding to each historical task according to the large model toolset to determine an adaptation task execution agent for the input question statement.
[0101] In some embodiments of the present application, the input question statement and the dialogue interaction records corresponding to each historical task are used as the input data of the big model, and the big model toolset is used as the adaptation constraint condition to obtain the probability of each task execution agent being called.
[0102] For example, the input question statement and the corresponding dialogue interaction records for each historical task are input into the large model as context. The model's internal attention mechanism and semantic representation network perform context-based semantic encoding and logical reasoning, generating a semantic feature vector that includes user intent, entity relationships, and contextual dependencies. This semantic feature vector is then mapped to the semantic space of the large model tool set and multi-dimensional semantic matching is performed with the pre-registered semantic representations of each task execution agent in the tool set (including semantic vectors of task descriptions, parameter constraints, and functional logic).
[0103] Finally, the adapted task execution agent is determined based on the calling probability and semantic similarity of the task execution agent.
[0104] It should be noted that the large model can be set up in such a way that the input result is in the form of the probability of each task execution agent being called.
[0105] In some embodiments of the present application, the specific process of determining the adaptation task execution agent may be as follows:
[0106] When the current task is not a new task, the semantic similarity between the updated task and each task execution agent is extracted.
[0107] It should be noted that, generally speaking, for different tasks, the user's expression is relatively clear, and it can be determined that this is a new task. However, the specific task is still uncertain, so it is still necessary to identify the specific task type.
[0108] Then, the semantic similarity between the input question statement and each task execution agent, and the semantic similarity between the update task and each task execution agent are weighted and summed to obtain the semantic similarity adaptation score.
[0109] Then, a weighted sum is performed on the semantic similarity adaptation score and the calling probability of each task execution agent to obtain a comprehensive adaptation score between the input question statement and each task execution agent.
[0110] Finally, the task execution agent with the highest comprehensive adaptation score is determined as the adapted task execution agent.
[0111] The specific expression can be as follows:
[0112]
[0113]
[0114] Among them, idx is the index identifier corresponding to the task execution agent, is the weight of the input question statement, is the weight of the semantic similarity adaptation score, The probability of the agent being called to execute the Nth task.
[0115] It should be noted that since the current user input has the highest information value, the weight It can be set to a larger value, about 0.8. In addition, the parameter This is used to measure the semantic similarity and the judgment results of the large model. It can be set to around 0.5. In actual application, it can be adjusted according to specific circumstances.
[0116] It should be noted that when the current task is a new task, it means that the current task is an update task and is the starting point of an independent task, that is, the current task does not have a previous update task.
[0117] Based on this, the semantic similarity and calling probability of the input question statement and each task execution agent are weighted and summed to obtain the comprehensive adaptation score between the input question statement and each task execution agent.
[0118] S105: According to the task parameters of the adaptation task execution agent, the word slot parameter completeness check is performed on the input question sentence, and the adaptation task execution agent is called through the complete word slot parameters.
[0119] In some embodiments of the present application, after determining the adaptation task execution agent, the parameter values required by the adaptation task execution agent are required before calling the adaptation task execution agent.
[0120] Before checking the completeness of the slot parameters for the input question sentence, it is necessary to determine whether to erase the historical tasks. The process is as follows:
[0121] According to the task function description of the adaptive task execution agent, it is determined whether the current task and the historical task belong to the same task.
[0122] When they do not belong to the same task, the historical tasks will be cleared and the conversation record of the current task will be kept.
[0123] When they belong to the same task, they directly enter the word slot parameter completeness verification process.
[0124] It should be noted that when the tasks are not the same, it means that the user has entered a new task interaction scenario, for example, from checking the weather to checking air tickets.
[0125] In summary, since conversational interactions are usually continuous, this method can effectively retain the user's historical intentions when they belong to the same task, thereby providing an effective reference for judgment. At the same time, when they do not belong to the same task, the previous historical tasks are erased to avoid affecting the judgment of the current task and the extraction of word slot parameters.
[0126] In some embodiments of the present application, the process of checking the completeness of the slot parameters of the input question sentence is as follows:
[0127] First, based on the task parameters of the adaptation task execution agent, it is determined whether the word slot parameters of the input question sentence are complete.
[0128] When incomplete, if the historical tasks have not been cleared, the missing word slot parameters are extracted from the historical tasks.
[0129] The user is asked questions to confirm the missing word slot parameters, and the user is guided to supplement the missing word slot parameters that have not been extracted until the word slot parameters are complete.
[0130] If the historical tasks have been cleared, the user will be guided to supplement the missing slot parameters until the slot parameters are complete.
[0131] In summary, the rhetorical questioning and clarification process relies on the large model to guide users. Given that the task has been determined and its parameters have been registered, the large model can effectively provide guidance. Furthermore, users' questions are typically coherent, and related historical tasks and word slots also serve as reference information for the rhetorical questioning and clarification process.
[0132] For example, a task requires three parameters. When the user asks a question this time, he only changes one parameter based on the previous question. The large model can associate historical tasks with word slots and determine all the parameters of the current question.
[0133] It should be noted that after the parameters are complete, the corresponding word slot under the current task is updated, and the adaptation task execution agent is called through the complete parameter values to complete the corresponding task. At the same time, the word slot parameters are recorded as reference information for subsequent intention judgment and counter-question clarification.
[0134] In some embodiments of the present application, a feedback mechanism is provided, which takes effect when there is an updated task. After the user confirms that the task judgment is accurate, the user input of the updated task can be selected to be stored as a typical problem corresponding to the task execution agent in the vector database mounted on the task judgment agent.
[0135] In addition, if the task is misidentified, the user can specify to call the actual correct task execution agent and choose whether to store the input as a typical problem corresponding to the correct task execution agent in the vector database mounted on the task judgment agent.
[0136] Based on this, when the current task is an update task and the task is correctly identified, the input question statement is used as a typical question of the adaptation task execution agent.
[0137] When task identification fails, the task execution agent that should actually be called is determined based on user-specified information, and the input question statement is used as a typical question of the task execution agent that should actually be called.
[0138] In summary, with the continuous expansion of user feedback and typical problems, the versatility and accuracy of the framework are constantly improving.
[0139] Based on this, when updating the current task, if the task is correctly identified, the user input of the current task is used as the typical update problem corresponding to the adaptation task execution agent.
[0140] When task identification fails, an updated adaptation task execution agent is determined, and user input is used as a typical update problem for the updated adaptation task execution agent.
[0141] It should be noted that although the embodiments of this application are based on Figure 1Steps S101 to S105 are described in sequence, but this does not mean that steps S101 to S105 must be performed in a strict order. Figure 1 The order shown in FIG1 is to introduce and explain step S101 to step S105 in order to facilitate those skilled in the art to understand the technical solution of the embodiment of the present application. In other words, in the embodiment of the present application, the order between step S101 to step S105 can be appropriately adjusted according to actual needs.
[0142] It should be noted that the current technical routes mainly revolve around the following methods:
[0143] Rule-based task identification: This approach directly matches specific patterns in user input using predefined rules (such as regular expressions and keyword matching). While simple to implement, this approach suffers from limited flexibility, struggles with complex semantics and long-tail queries, and requires frequent rule base updates, resulting in high maintenance costs.
[0144] Traditional machine learning methods use feature engineering to extract text features (such as TF-IDF and bag-of-words models) and combine them with classification algorithms (such as Naive Bayes, Support Vector Machines (SVMs), and Random Forests) for intent classification. These methods are only suitable for small-scale scenarios with low data annotation costs. Their feature engineering relies on manual experience, has limited generalization capabilities, and is ineffective in handling semantic ambiguity and complex expressions.
[0145] Deep learning methods use neural network models (such as CNN, RNN, and Transformer) to automatically learn text features and perform intent classification in an end-to-end manner. These methods have high training costs (requiring large amounts of labeled data and computing resources) and limited generalization capabilities.
[0146] Large model and prompt engineering approach: simple implementation, short development cycle, and certain generalization ability for unseen intents.
[0147] pass Figure 1 The proposed method can achieve a simpler, more accurate and easier-to-use effect than the above technical routes. Specifically, based on the large model technology, an intelligent agent for task routing is constructed. At the same time, an agent-based task routing framework is proposed. While utilizing the understanding ability of the large model, the framework fully combines semantic information and user historical interaction information to realize an accurate and easy-to-use task routing system. The details are as follows:
[0148] The task identification agent is independent of the task execution agent and interacts with it through standardized interfaces, separating routing logic from specific task implementations. This architecture facilitates independent optimization of the task identification algorithm (for example, upgrading the semantic understanding capabilities of large models) or iteration of the task execution module without affecting overall system operation, thus improving the maintainability of the architecture.
[0149] The functional registration mechanism simplifies tool management: by configuring the task function description, task parameters and parameter instructions of the task execution agent in the tools of the task judgment agent mounted on the large model, the registration process of adding a new task execution agent can be made more convenient. There is no need to modify the large model prompt words each time to add a new judgment task, and it will not affect the registration of other task execution agents.
[0150] Typical questions can cover the core semantic patterns of the task. By vectorizing and storing these typical expressions, the system can match non-standard questions input by users with benchmark semantics, ensuring that different expressions are accurately mapped to the same task and avoiding task recognition errors caused by differences in expressions.
[0151] Furthermore, when adding a new task execution agent, one only needs to provide a set of typical questions for that task (covering core semantic scenarios). After vectorization, these questions are stored in the database to complete semantic registration, eliminating the need to modify the underlying routing logic. This "plug-and-play" mechanism significantly reduces the cost of integrating new features and is suitable for dynamically expanding business scenarios.
[0152] In addition, by accumulating high-frequency atypical questions in real user questions, the typical question library can be continuously supplemented and updated, so that the system's understanding of task semantics is optimized as data grows, avoiding the rigidity of matching capabilities caused by fixed rules.
[0153] Based on the above settings, the process of identifying the current task is as follows:
[0154] Use the big model for intent understanding and reasoning: Register each task execution agent as a function to the big model toolset. By retrieving the input questions, function descriptions, and word slot information of historical tasks in the current session, and combining the big model toolset to perform intent analysis, when the historical tasks and the current task belong to the same task, the big model can quickly infer the true intent of the current problem based on contextual semantic associations (such as historical user needs and collected parameters), thereby quickly identifying the task execution agent.
[0155] In other words, the input question and the dialogue interaction records of historical tasks are fed into a large model for semantic reasoning, and semantic matching is performed within the tool set, achieving an upgrade from single-round semantic understanding to multi-round contextual reasoning. Compared to traditional task allocation methods based solely on the current input, this mechanism can accurately identify implicit task continuities (such as parameter supplementation for the same task) across multiple rounds of dialogue, improving task routing accuracy in complex scenarios.
[0156] Reasoning based on semantic similarity: A weighted summation mechanism (current task similarity and updated task similarity) forms a contextual semantic chain. This is particularly suitable for scenarios requiring multiple rounds of parameter replenishment, further reducing task misjudgments caused by context breaks, and accurately identifying implicit task continuity in multi-round conversations.
[0157] Furthermore, by introducing similarity calculation for typical problems, even when the current task is new and the previous tasks in the current session are unable to assist the large model in intent analysis, similarity calculation can be used to compensate for the large model's intent analysis capabilities. This allows for more accurate task determination in complex dialogue scenarios for new tasks or new sessions. This avoids the cold start problem caused by a lack of historical data for new users or new scenarios, making it difficult for the model to accurately identify intent.
[0158] In summary, by fusing multiple information sources (the semantic similarity of the current user input, the semantic similarity of the updated task input, and the intent analysis capabilities of the large model) to calculate the comprehensive adaptation score, the executing agent of the current task can be accurately identified, enabling more intelligent and adaptive task allocation. This is especially suitable for scenarios where continuous questions are asked but the input information is incomplete. It can more accurately identify the implicit task continuity in multiple rounds of dialogue, effectively improving task recognition accuracy, context awareness, and efficiency.
[0159] Based on this, after the current task is identified and completed, the process of supplementing the parameters required for the current task is as follows:
[0160] After identifying the called task execution agent, when the historical task and the current task do not belong to the same task, the historical task will be cleared and the current task will be recorded, so that the historical tasks stored in the current session all belong to the same task, and in the process of performing large-model intent analysis on the input question statement each time, excessive historical information interference is avoided.
[0161] In addition, after determining whether the historical tasks of the current session have been cleared, the word slot parameter completeness verification mechanism is used to ensure that the parameters are complete before calling the task execution agent, avoiding task failures due to missing parameters. In addition, based on historical word slot information, the system can automatically complete parameters that the user has not explicitly mentioned but has provided in historical conversations, reducing the number of parameter inquiries and making the interaction process simpler. Especially for multi-round task scenarios, this mechanism can significantly shorten the task completion cycle. In addition, even if there is no historical word slot or the historical word slot cannot be completed, through the functional registration mechanism, the large model can also determine the word slot that needs to be completed and conduct effective counter-questioning guidance under the premise that the task has been determined and the task parameters have been registered. Thus, on the basis of realizing the automatic judgment of user intentions, the automatic execution of the current task is also realized.
[0162] More intuitively, Figure 2 A schematic diagram of the structure of a task routing framework provided in an embodiment of the present application.
[0163] exist Figure 2 In the figure, multiple task execution agents are registered in the task discrimination agent, the task discrimination agent mounts a large model and vector database, and the task discrimination agent performs the task routing process.
[0164] Figure 3 A schematic diagram of a typical question registration process provided in an embodiment of the present application.
[0165] exist Figure 3 In the
[15] , typical problems corresponding to multiple task execution agents are registered into the vector database.
[0166] Figure 4 A flowchart of a task description and parameter description registration process provided in an embodiment of the present application.
[0167] exist Figure 4 In , the task descriptions and task parameter descriptions corresponding to multiple task execution agents are registered to the large model toolset.
[0168] Figure 5 A flowchart of a task routing logic provided in an embodiment of the present application.
[0169] exist Figure 5 The specific process of task routing based on the current user input is shown in Figure 2.
[0170] Figure 6 A flowchart of a task determination logic provided in an embodiment of the present application.
[0171] exist Figure 6 In the figure, the specific process of task identification based on the current user input is demonstrated.
[0172] Figure 7 A flow chart of a feedback mechanism provided in an embodiment of the present application.
[0173] exist Figure 7 In
[15] , the feedback process for typical problems of an agent performing a supplementary task is shown.
[0174] Based on the same idea, some embodiments of the present application also provide devices and non-volatile computer storage media corresponding to the above methods.
[0175] Figure 8 A schematic diagram of the structure of a large-scale model task routing device provided in an embodiment of the present application includes:
[0176] at least one processor; and,
[0177] a memory communicatively connected to the at least one processor; wherein,
[0178] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any one of the large model task routing methods described above.
[0179] Some embodiments of the present application provide a large model task routing non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions can execute any of the large model task routing methods described above.
[0180] The various embodiments in this application are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device and medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant portions, refer to the descriptions of the method embodiments.
[0181] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects to their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0182] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0183] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0184] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0185] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0186] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0187] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0188] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0189] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0190] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modifications, equivalent replacements, improvements, etc. made within the technical principles of the present application should fall within the scope of protection of the present application.
Claims
1. A large model task routing method, characterized in that: The method comprises: The task discrimination agent receives the task function description, task parameters and parameter description provided by each task execution agent; According to the task function description, task parameters and parameter instructions, each task execution agent is registered in the form of a function to the large model tool set; Upon receiving an input question statement, searching for the corresponding dialogue interaction records of each historical task in the current session; the historical tasks belong to the same task, and the dialogue interaction records include all input question statements, historical task function descriptions, and historical task word slots of the historical tasks; the current session is not a new session opened for the first time; Performing intent analysis on the input question statement and the dialogue interaction records corresponding to each historical task according to the large model tool set, and determining an adaptation task execution agent for the input question statement; Performing a slot parameter completeness check on the input question sentence according to the task parameters of the adaptation task execution agent, and calling the adaptation task execution agent through the complete slot parameters; When receiving the input question statement, before retrieving the dialogue interaction records corresponding to each historical task in the current session, the method further includes: Receive typical task questions provided by each task execution agent, semantically vectorize the typical task questions, and store the vectorized typical questions in a mounted vector database; The method further comprises: Upon receiving the input question statement, vectorizing the input question statement, matching the vectorized statement in a vector database, and determining the semantic similarity between the input question statement and each task execution agent; The step of performing intent analysis on the input question statement and the dialogue interaction records corresponding to each historical task based on the large model tool set to determine an adaptation task execution agent for the input question statement specifically includes: The input question statement and the dialogue interaction records corresponding to each historical task are used as input data of the large model, and the large model tool set is used as the adaptation constraint condition to obtain the probability of each task execution agent being called; Determine the appropriate task execution agent based on the calling probability and semantic similarity of each task execution agent; The step of determining the appropriate task execution agent based on the calling probability and semantic similarity of each task execution agent specifically includes: When the current task is not a new task, extracting the semantic similarity between the update task and each task execution agent; the update task is the first historical task in the current session; Performing weighted summation on the semantic similarity between the input question statement and each task execution agent, and the semantic similarity between the update task and each task execution agent, to obtain a semantic similarity adaptation score; Performing a weighted summation of the semantic similarity adaptation score and the call probability of each task execution agent to obtain a comprehensive adaptation score between the input question statement and each task execution agent; The task execution agent with the highest comprehensive adaptation score is determined as the adapted task execution agent.
2. The method according to claim 1, characterized in that Matching the vectorized statement in the vector database to determine the semantic similarity between the input question statement and each task execution agent specifically includes: Calculating similarity between the vectorized sentence and the vectorized typical questions in the vector database to obtain semantic similarity between the input question sentence and each vectorized typical question; According to the semantic similarity of the vectorized typical problems corresponding to each task execution agent, the maximum semantic similarity corresponding to each task execution agent is determined; Construct a similarity set vector based on the maximum semantic similarity corresponding to each task execution agent; The similarity set vector is normalized to obtain the semantic similarity between the input question statement and each task execution agent.
3. The method according to claim 1, characterized in that Before performing a slot parameter completeness check on the input question sentence according to the task parameters of the adaptation task execution agent, the method further includes: According to the task function description of the adaptation task execution agent, determining whether the current task and the historical task belong to the same task; When the tasks do not belong to the same type, the historical tasks are cleared and the conversation record of the current task is made.
4. The method according to claim 1, wherein The step of performing a slot parameter completeness check on the input question sentence according to the task parameters of the adaptation task execution agent specifically includes: Determining whether the word slot parameters of the input question sentence are complete according to the task parameters of the adaptation task execution agent; In the case of incompleteness, if the historical tasks have not been cleared, the missing word slot parameters are extracted from the historical tasks; The user is asked to confirm the missing word slot parameters, and the user is guided to supplement the missing word slot parameters that have not been extracted until the word slot parameters are complete; If the historical tasks have been cleared, the user will be guided to supplement the missing slot parameters until the slot parameters are complete.
5. The method according to claim 1, characterized in that After calling the adaptation task execution agent with complete word slot parameters, the method further includes: When the current task is an update task and the task is correctly identified, the input question statement is used as a typical question of the adaptation task execution agent; When task identification fails, the task execution agent to be actually called is determined based on user-specified information, and the input question statement is used as a typical question of the task execution agent to be actually called.
6. A large model task routing device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the large model task routing method described in any one of claims 1 to 5.
7. A large model task routing non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions can execute the large model task routing method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Display device and voice retrieval method
CN118915986A
Question and answer method, device and equipment based on intelligent agent and medium
CN120162404A