Function selection and execution method and system in multi-task environment based on large model

By building a feature vector library and a large model to analyze user needs and automatically select and execute functions, the problem of high complexity in using traditional API function libraries is solved, intelligent function selection and execution is achieved, and efficiency and user experience are improved.

CN119847639BActive Publication Date: 2025-10-10SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411797975.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-10-10
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

In a multi-tasking environment, the use of traditional API function libraries is complex and has a high learning cost. How to effectively manage and utilize function libraries, how to understand user natural language input and automatically select and execute corresponding functions to complete complex tasks.

Method used

By defining the attribute information of the function and extracting the feature vector, building a feature vector library, using the large model to analyze user needs and expectations, formulating task execution strategies, automatically selecting and executing functions, and monitoring and adjusting the execution results, intelligent function selection and execution are achieved.

Benefits of technology

It improves function usage efficiency, optimizes user experience, reduces manual intervention and costs, enhances the system's automation level and task completion rate, and adapts flexibly to different task types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847639B_ABST
    Figure CN119847639B_ABST
Patent Text Reader

Abstract

The application discloses a function selection and execution method and system in a multi-task environment based on a large model, belongs to the technical field of artificial intelligence, and aims to solve the technical problem of how to understand user natural language input, automatically select and execute corresponding functions to complete complex tasks in a multi-task environment. The method comprises the following steps: defining attribute information of each function in a user API function library, constructing a feature vector library based on functions and corresponding feature vectors; finding a function matched with a user question based on vector similarity between a feature vector of the user question and a function feature vector; analyzing user demand and expectation through a large model based on the user question and the matched function, formulating a task execution strategy based on the user demand and expectation, selecting a function to be executed based on the task execution strategy, and constructing a function execution plan; and executing each function in the function execution plan in sequence and monitoring and adjusting the currently executed function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for selecting and executing functions in a multi-task environment based on a large model. Background Art

[0002] Natural language processing (NLP) and artificial intelligence (AI) technologies are increasingly being used in various fields. When dealing with complex and changing task environments, how to improve the intelligence level of the system, reduce manual intervention, and enhance user experience has become a key point in technological development.

[0003] Traditional API function libraries often require users to possess a certain level of technical background to effectively call and configure functions to meet specific business needs. This leads to complex operations, high learning curves, and low efficiency. Furthermore, with the continuous expansion and update of API function libraries, efficiently managing and utilizing these libraries has become a significant challenge for developers.

[0004] In a multi-tasking environment, how to understand user natural language input, automatically select and execute corresponding functions to complete complex tasks is a technical problem that needs to be solved. Summary of the Invention

[0005] The technical task of the present invention is to address the above shortcomings and provide a function selection and execution method and system in a multi-task environment based on a large model to solve the technical problem of how to understand user natural language input, automatically select and execute corresponding functions to complete complex tasks in a multi-task environment.

[0006] In a first aspect, the present invention provides a method for selecting and executing functions in a multi-tasking environment based on a large model, comprising the following steps:

[0007] Function library modeling: For each function in the user API function library, define the function's attribute information and extract the function's feature vector. Build a feature vector library based on the function and its corresponding feature vector. The function's attribute information includes description, input fields, output fields, type, and function.

[0008] User question analysis: For user questions, extract the feature vector of the user question and find the function that matches the user question based on the vector similarity between the feature vector of the user question and the feature vector of the function;

[0009] Function execution plan construction: Based on user questions and matching functions, we analyze user needs and expectations through a large model, formulate task execution strategies based on user needs and expectations, select functions to be executed based on the task execution strategies, and build a function execution plan.

[0010] Task execution: for function execution planning, execute each function in turn, monitor and adjust the currently executed function, if all functions in the function execution planning are executed successfully, return the task execution result of successful execution to the user, if there is a function execution failure in the function execution planning, return the execution result of the execution failure task to the user, wherein, when monitoring and adjusting the currently executed function, if the currently executed function returns a successful execution result, execute the next function, if the currently executed function returns a failed execution result, based on the execution log of the currently executed function and the returned execution result, adjust and judge the currently executed function and the function execution planning through the large model, based on the adjustment and judgment result, select to re-execute the adjusted function or re-execute the adjusted function execution planning, if re-executing the adjusted function, monitor and judge the adjusted function, if re-executing the adjusted function execution planning, determine that the current function execution fails and return the execution result of the execution failure task to the user.

[0011] As preferred, the feature vector of the function is extracted by the text embedding model, and the feature vector of the user question is extracted by the text embedding model.

[0012] As preferred, monitoring and adjusting the currently executed function include the following steps:

[0013] During the execution of the current function, the execution process of the current function is recorded to form the execution log of the current function;

[0014] After the execution of the current function is completed, it is judged whether the execution of the current function is successful based on the returned execution result of the current function;

[0015] If the execution of the current function is successful, it is judged whether there is a function to be executed after the current function, if yes, the next function is executed, if not, it is determined that the task execution is successful, and the task execution result of successful execution is returned to the user;

[0016] If the execution of the current function fails, based on the execution log of the current function and the returned execution result, the currently executed function and the function execution planning are adjusted and judged through the large model, if the currently executed function is adjusted, the adjusted function is re-executed, and the adjusted function is monitored and judged, if the function execution planning is adjusted, it is determined that the current function execution fails and the execution result of the execution failure task is returned to the user, and the task execution operation is performed based on the adjusted function execution planning.

[0017] Preferably, the return value or status code returned by the function is used as the execution result. Based on the execution log of the current function and the returned execution result, the log analysis of the current function is performed through a large model, the error type is identified, and the task execution strategy is adjusted, it is determined whether to adjust the currently executed function and / or adjust the function execution plan, wherein adjusting the currently executed function includes redefining the attribute information of the function, and adjusting the function execution plan includes selecting the function to be executed and the execution order of the functions to form a new function execution plan.

[0018] In a second aspect, the present invention provides a system for selecting and executing functions in a multi-task environment based on a large model, which is used to implement function selection and execution in a multi-task environment by using a method for selecting and executing functions in a multi-task environment based on a large model as described in any one of the first aspects, wherein the system includes a function library modeling module, a user problem analysis module, a function execution planning construction module, and a task execution module;

[0019] The function library modeling module is used to perform the following: for each function in the user API function library, define the function's attribute information, extract the function's feature vector, and build a feature vector library based on the function and its corresponding feature vector. The function's attribute information includes description, input fields, output fields, type, and function;

[0020] The user question analysis module is used to perform the following: for a user question, extract a feature vector of the user question, and based on the vector similarity between the feature vector of the user question and the feature vector of the function, find a function that matches the user question;

[0021] The function execution plan building module is used to perform the following operations: based on user questions and matching functions, analyze user needs and expectations through a large model, formulate task execution strategies based on user needs and expectations, select functions to be executed based on the task execution strategies, and build a function execution plan;

[0022] The task execution module is configured to perform the following: for function execution planning, sequentially execute each function, monitor and adjust the currently executed function, if all functions in the function execution planning are successfully executed, return the task execution result of successful execution to the user, if there is a function execution failure in the function execution planning, return the execution result of the execution of the failed task to the user, wherein, when monitoring and adjusting the currently executed function, if the currently executed function returns a successful execution result, execute the next function, if the currently executed function returns a failed execution result, based on the execution log of the currently executed function and the returned execution result, adjust and judge the currently executed function and the function execution planning through the large model, based on the adjustment and judgment result, select to re-execute the adjusted function or re-execute the adjusted function execution planning, if re-executing the adjusted function, monitor and judge the adjusted function, if re-executing the adjusted function execution planning, determine that the current function execution fails and return the execution result of the execution of the failed task to the user.

[0023] Preferably, the function library modeling module is configured to extract a feature vector of the function through a text embedding model, and the user question analysis module is configured to extract a feature vector of the user question through the text embedding model.

[0024] Preferably, the task execution module is configured to perform the following monitoring and adjustment of the currently executed function:

[0025] During execution of the current function, the execution process of the current function is recorded to form an execution log of the current function;

[0026] After execution of the current function is completed, it is determined whether the execution of the current function is successful based on the returned execution result of the current function;

[0027] If the execution of the current function is successful, it is determined whether there is a function to be executed after the current function, if yes, the next function is executed, if no, it is determined that the task execution is successful, and the task execution result of successful execution is returned to the user;

[0028] If the execution of the current function fails, based on the execution log of the current function and the returned execution result, the currently executed function and the function execution planning are adjusted and judged through the large model, if the currently executed function is adjusted, the adjusted function is re-executed, and the adjusted function is monitored and judged, if the function execution planning is adjusted, it is determined that the current function execution fails and the execution result of the execution of the failed task is returned to the user, and the task execution operation is performed based on the adjusted function execution planning.

[0029] Preferably, the task execution module is used to use the return value or status code returned by the function as the execution result, and based on the execution log of the current function and the returned execution result, perform log analysis of the current function through a large model, identify the error type, and adjust the task execution strategy, determine whether to adjust the currently executed function and / or adjust the function execution plan, wherein adjusting the currently executed function includes redefining the attribute information of the function, and adjusting the function execution plan includes selecting the function to be executed and the execution order of the functions to form a new function execution plan.

[0030] The method and system for selecting and executing functions in a multi-tasking environment based on a large model of the present invention have the following advantages:

[0031] 1. Improved function usage efficiency: For each function in the user API function library, the function's attribute information is defined and the function's feature vector is extracted. A feature vector library is constructed based on the function and its corresponding feature vector, making it easier to understand the function and make intelligent function selections.

[0032] 2. Optimized user experience: By analyzing user questions through a large model, we can identify user needs and expectations, formulate task execution strategies based on these needs and expectations, select functions to execute based on these strategies, and build function execution plans. This enables automated and intelligent generation of function execution plans. Users can obtain function execution plans simply by asking questions, without having to deeply understand the functions. This meets the needs of users, especially non-professionals, and reduces operational complexity.

[0033] 3. Reduce manual intervention: Automated problem-solving processes reduce the need for manual operations and reduce the frequency and degree of manual intervention;

[0034] 4. Reduced labor costs: Reduced dependence on professionals, thereby reducing labor costs;

[0035] 5. Improved problem-solving accuracy: Driven by large models, the system can more accurately understand and execute user intent, improving the accuracy of problem solving;

[0036] 6. Enhanced flexibility: The large model can work in a multi-task environment and adapt to different task types and requirements, with high flexibility;

[0037] 7. Improved automation level: Automated execution steps and error handling mechanisms improve the automation level of the entire large model system;

[0038] 8. Improved task completion rate: Through detailed planning and execution steps, the consistency and correctness of tasks are ensured, thereby improving the task completion rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to make the technical solutions in the embodiments of the present application clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and other accompanying drawings can be obtained by those skilled in the art without any creative effort on the basis of these accompanying drawings.

[0040] The present application will be further described below in conjunction with the accompanying drawings.

[0041] Figure 1 A flowchart of a function selection and execution method based on a large model in a multi-task environment for Embodiment 1. DETAILED DESCRIPTION

[0042] The present application will be further described below in conjunction with the accompanying drawings and specific embodiments, so that those skilled in the art can better understand the present application and implement it. However, the embodiments are not limiting to the present application, and the technical features in the embodiments and the embodiments can be combined with each other without conflict.

[0043] The embodiments of the present application provide a function selection and execution method and system based on a large model in a multi-task environment, which is used to solve the technical problem of how to understand user natural language input, automatically select and execute corresponding functions to complete complex tasks in a multi-task environment.

[0044] Embodiment 1:

[0045] The present application provides a function selection and execution method based on a large model in a multi-task environment, which includes four steps of function library construction, user problem analysis, function execution planning construction and task execution.

[0046] Step S100 function library modeling: for each function in the user API function library, the attribute information of the function is defined, and the feature vector of the function is extracted, and a feature vector library is constructed based on the function and the corresponding feature vector, wherein the attribute information of the function includes description, input field, output field, type and function.

[0047] In this embodiment, the feature vector of the function is extracted by a text embedding model.

[0048] Step S200 user problem analysis: for the user problem, the feature vector of the user problem is extracted, and the function matching the user problem is found based on the vector similarity between the feature vector of the user problem and the function feature vector.

[0049] In this embodiment, for the user's questions or problems, the feature vector of the user's question is extracted through the text embedding model, the cosine similarity between the user's question feature vector and the function feature vector is calculated, and the function matching the user's question is found based on the similarity between the feature vectors.

[0050] Step S300: Function execution plan construction: Based on user questions and matching functions, analyze user needs and expectations through a large model, formulate a task execution strategy based on user needs and expectations, select the function to be executed based on the task execution strategy and construct a function execution plan.

[0051] In this embodiment, a large model of prompt word input is constructed based on user questions and matching functions. The large model analyzes the user's needs and expectations based on the input prompt words to evaluate the user's intentions. If the current output user intention does not meet the user's expectations, the user will continue to be questioned and the user's intentions will be evaluated again based on the user's questions and problems until the user's needs and expectations are met.

[0052] Step S400 task execution: for the function execution plan, execute each function in turn, and monitor and adjust the currently executed function. If all functions in the function execution plan are executed successfully, the task execution result of successful execution is returned to the user. If there is a function execution failure in the function execution plan, the execution result of the failed task is returned to the user. When monitoring and adjusting the currently executed function, if the currently executed function returns an execution result of success, the next function is executed. If the currently executed function returns an execution result of failure, based on the execution log of the currently executed function and the returned execution result, the currently executed function and the function execution plan are adjusted and judged through the large model. Based on the adjustment judgment result, the adjusted function is selected to be re-executed or the adjusted function execution plan is re-executed. If the adjusted function is re-executed, the adjusted function is monitored and judged. If the adjusted function execution plan is re-executed, it is determined that the current function execution has failed and the execution result of the failed task is returned to the user.

[0053] In this embodiment, monitoring and adjusting the currently executed function includes the following steps:

[0054] (1) During the execution of the current function, the execution process of the current function is recorded to form the execution log of the current function;

[0055] (2) After the current function is executed, determine whether the current function is executed successfully based on the execution result returned by the current function;

[0056] (3) If the current function is executed successfully, determine whether there is a function to be executed after the current function. If so, execute the next function. If not, determine that the task is executed successfully and return the successful task execution result to the user;

[0057] (4) If the current function fails to execute, the currently executed function and the function execution plan are adjusted and judged based on the execution log of the current function and the returned execution result through the large model. If the currently executed function is adjusted, the adjusted function is re-executed and the adjusted function is monitored and judged. If the function execution plan is adjusted, the current function execution is determined to have failed and the execution result of the failed execution task is returned to the user, and the task execution operation is performed based on the adjusted function execution plan.

[0058] As a specific implementation, the return value or status code returned by the function is used as the execution result. Based on the execution log of the current function and the returned execution result, the log analysis of the current function is performed through a large model, the error type is identified, and the task execution strategy is adjusted. It is determined whether to adjust the currently executed function and / or adjust the function execution plan, wherein adjusting the currently executed function includes redefining the attribute information of the function, and adjusting the function execution plan includes selecting the function to be executed and the execution order of the functions to form a new function execution plan.

[0059] During the task execution process, after all planning steps are completed, the big model will perform a final check to confirm that all user requirements have been met and there are no remaining execution steps. If everything is normal, a task completion notification will be sent to the user and the task execution results will be provided.

[0060] Example 2:

[0061] The present invention provides a function selection and execution system in a multi-task environment based on a large model, comprising a function library modeling module, a user problem analysis module, a function execution planning construction module and a task execution module.

[0062] The function library modeling module is used to perform the following: for each function in the user API function library, define the function's attribute information, extract the function's feature vector, and build a feature vector library based on the function and its corresponding feature vector, where the function's attribute information includes description, input field, output field, type, and function.

[0063] Among them, the function library modeling module in this embodiment is used to extract the feature vector of the function through the text embedding model.

[0064] The user question analysis module is used to perform the following: for a user question, extract a feature vector of the user question, and search for a function matching the user question based on the vector similarity between the feature vector of the user question and the feature vector of the function.

[0065] In this embodiment, for the user's questions or problems raised, the user question analysis module is used to perform the following: extract the feature vector of the user question through the text embedding model, calculate the cosine similarity between the user question feature vector and the function feature vector, and find a function that matches the user question based on the similarity between the feature vectors.

[0066] The function execution planning construction module is used to perform the following: based on user questions and matching functions, analyze user needs and expectations through a large model, formulate task execution strategies based on user needs and expectations, select functions to be executed based on the task execution strategies, and build a function execution plan.

[0067] In this embodiment, the function execution planning construction module is used to construct a prompt word input large model based on user questions and matching functions. The large model analyzes the user's needs and expectations based on the input prompt words to evaluate the user's intentions. If the current output user intention does not meet the user's expectations, the user will continue to be questioned and the user's intentions will be evaluated again based on the user's questions and problems until the user's needs and expectations are met.

[0068] The task execution module is used to perform the following: for the function execution plan, execute each function in turn, and monitor and adjust the currently executed function. If all functions in the function execution plan are executed successfully, the successful task execution result is returned to the user. If there is a function execution failure in the function execution plan, the execution result of the failed task is returned to the user. Among them, when monitoring and adjusting the currently executed function, if the currently executed function returns the execution result of success, the next function is executed. If the currently executed function returns the execution result of failure, based on the execution log of the currently executed function and the returned execution result, the currently executed function and the function execution plan are adjusted and judged through the large model. Based on the adjustment judgment result, the adjusted function is selected to be re-executed or the adjusted function execution plan is re-executed. If the adjusted function is re-executed, the adjusted function is monitored and judged. If the adjusted function execution plan is re-executed, it is determined that the current function execution has failed and the execution result of the failed task is returned to the user.

[0069] In this embodiment, the task execution module is used to perform the following monitoring and adjustment on the currently executed function:

[0070] (1) During the execution of the current function, the execution process of the current function is recorded to form the execution log of the current function;

[0071] (2) After the current function is executed, determine whether the current function is executed successfully based on the execution result returned by the current function;

[0072] (3) If the current function is executed successfully, determine whether there is a function to be executed after the current function. If so, execute the next function. If not, determine that the task is executed successfully and return the successful task execution result to the user;

[0073] (4) If the current function fails to execute, the currently executed function and the function execution plan are adjusted and judged based on the execution log of the current function and the returned execution result through the large model. If the currently executed function is adjusted, the adjusted function is re-executed and the adjusted function is monitored and judged. If the function execution plan is adjusted, the current function execution is determined to have failed and the execution result of the failed execution task is returned to the user, and the task execution operation is performed based on the adjusted function execution plan.

[0074] As a specific implementation, the return value or status code returned by the function is used as the execution result. Based on the execution log of the current function and the returned execution result, the log analysis of the current function is performed through a large model, the error type is identified, and the task execution strategy is adjusted. It is determined whether to adjust the currently executed function and / or adjust the function execution plan, wherein adjusting the currently executed function includes redefining the attribute information of the function, and adjusting the function execution plan includes selecting the function to be executed and the execution order of the functions to form a new function execution plan.

[0075] During the task execution process, after all planning steps are completed, the big model will perform a final check to confirm that all user requirements have been met and there are no remaining execution steps. If everything is normal, a task completion notification will be sent to the user and the task execution results will be provided.

[0076] The above is a detailed introduction to the function selection and execution method and system in a multi-tasking environment based on a large model provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for selecting and executing functions in a multi-task environment based on a large model, characterized in that: The steps include: Function library modeling: For each function in the user API function library, define the function's attribute information and extract the function's feature vector. Build a feature vector library based on the function and its corresponding feature vector. The function's attribute information includes description, input fields, output fields, type, and function. User question analysis: For user questions, extract the feature vector of the user question and find the function that matches the user question based on the vector similarity between the feature vector of the user question and the feature vector of the function; Function execution plan construction: Based on user questions and matching functions, we analyze user needs and expectations through a large model, formulate task execution strategies based on user needs and expectations, select functions to be executed based on the task execution strategies, and build a function execution plan. Task execution: For the function execution plan, execute each function in turn, and monitor and adjust the currently executed function. If all functions in the function execution plan are executed successfully, the successful task execution result is returned to the user. If there is a function execution failure in the function execution plan, the execution result of the failed task is returned to the user. Among them, when monitoring and adjusting the currently executed function, if the currently executed function returns the execution result of success, the next function is executed. If the currently executed function returns the execution result of failure, based on the execution log of the currently executed function and the returned execution result, the currently executed function and the function execution plan are adjusted and judged through the big model. Based on the adjustment judgment result, it is selected to re-execute the adjusted function or re-execute the adjusted function execution plan. If the adjusted function is re-executed, the adjusted function is monitored and judged. If the adjusted function execution plan is re-executed, it is determined that the current function execution has failed and the execution result of the failed task is returned to the user.

2. The method for selecting and executing functions in a multi-task environment based on a large model according to claim 1, characterized in that: The feature vector of the function is extracted through the text embedding model, and the feature vector of the user question is extracted through the text embedding model.

3. The method for selecting and executing functions in a multi-task environment based on a large model according to claim 1, characterized in that: Monitoring and adjusting the currently executed function includes the following steps: During the execution of the current function, the execution process of the current function is recorded to form the execution log of the current function; After the current function is executed, determine whether the current function is executed successfully based on the execution result returned by the current function; If the current function is executed successfully, determine whether there is a function to be executed after the current function. If so, execute the next function. If not, determine that the task is executed successfully and return the successful task execution result to the user; If the current function fails to execute, the currently executed function and the function execution plan are adjusted and judged based on the execution log of the current function and the returned execution result through the big model. If the currently executed function is adjusted, the adjusted function is re-executed and the adjusted function is monitored and judged. If the function execution plan is adjusted, the current function execution is determined to have failed and the execution result of the failed task is returned to the user, and the task execution operation is performed based on the adjusted function execution plan.

4. The method for selecting and executing functions in a multi-task environment based on a large model according to claim 1, characterized in that: Taking the return value or status code returned by the function as the execution result, based on the execution log of the current function and the returned execution result, log analysis of the current function is performed through a large model, error type identification and task execution strategy adjustment, it is determined whether to adjust the currently executed function and / or the function execution plan. Among them, adjusting the currently executed function includes redefining the attribute information of the function, and adjusting the function execution plan includes selecting the function to be executed and the execution order of the functions to form a new function execution plan.

5. A function selection and execution system in a multi-task environment based on a large model, characterized in that: Used to implement the selection and execution of functions in a multi-task environment by using a method for selecting and executing functions in a multi-task environment based on a large model as described in any one of claims 1 to 4, the system comprising a function library modeling module, a user problem analysis module, a function execution planning construction module, and a task execution module; The function library modeling module is used to perform the following: for each function in the user API function library, define the function's attribute information, extract the function's feature vector, and build a feature vector library based on the function and its corresponding feature vector. The function's attribute information includes description, input fields, output fields, type, and function; The user question analysis module is used to perform the following: for a user question, extract a feature vector of the user question, and based on the vector similarity between the feature vector of the user question and the feature vector of the function, find a function that matches the user question; The function execution plan building module is used to perform the following operations: based on user questions and matching functions, analyze user needs and expectations through a large model, formulate task execution strategies based on user needs and expectations, select functions to be executed based on the task execution strategies, and build a function execution plan; The task execution module is used to perform the following: for the function execution plan, execute each function in turn, and monitor and adjust the currently executed function. If all functions in the function execution plan are executed successfully, the successful task execution result is returned to the user. If there is a function execution failure in the function execution plan, the execution result of the failed task is returned to the user. Among them, when monitoring and adjusting the currently executed function, if the currently executed function returns the execution result of success, the next function is executed. If the currently executed function returns the execution result of failure, based on the execution log of the currently executed function and the returned execution result, the currently executed function and the function execution plan are adjusted and judged through the large model. Based on the adjustment judgment result, the adjusted function is selected to be re-executed or the adjusted function execution plan is re-executed. If the adjusted function is re-executed, the adjusted function is monitored and judged. If the adjusted function execution plan is re-executed, it is determined that the current function execution has failed and the execution result of the failed task is returned to the user.

6. The function selection and execution system in a multi-task environment based on a large model according to claim 5, characterized in that: The function library modeling module is used to extract the feature vector of the function through the text embedding model, and the user question analysis module is used to extract the feature vector of the user question through the text embedding model.

7. The function selection and execution system in a multi-task environment based on a large model according to claim 5, characterized in that: The task execution module is used to monitor and adjust the currently executed function as follows: During the execution of the current function, the execution process of the current function is recorded to form the execution log of the current function; After the current function is executed, determine whether the current function is executed successfully based on the execution result returned by the current function; If the current function is executed successfully, determine whether there is a function to be executed after the current function. If so, execute the next function. If not, determine that the task is executed successfully and return the successful task execution result to the user; If the current function fails to execute, the currently executed function and the function execution plan are adjusted and judged based on the execution log of the current function and the returned execution result through the big model. If the currently executed function is adjusted, the adjusted function is re-executed and the adjusted function is monitored and judged. If the function execution plan is adjusted, the current function execution is determined to have failed and the execution result of the failed task is returned to the user, and the task execution operation is performed based on the adjusted function execution plan.

8. The function selection and execution system in a multi-task environment based on a large model according to claim 5, characterized in that: The task execution module is used to use the return value or status code returned by the function as the execution result, and based on the execution log of the current function and the returned execution result, perform log analysis of the current function through a large model, identify the error type, and adjust the task execution strategy, to determine whether to adjust the currently executed function and / or adjust the function execution plan. Among them, adjusting the currently executed function includes redefining the attribute information of the function, and adjusting the function execution plan includes selecting the function to be executed and the execution order of the functions to form a new function execution plan.

Citation Information

Patent Citations

  • Chained natural language interaction method and system driven by large language model

    CN116992006A

  • Method and system for enhancing reasoning ability of large language model in material field

    CN118504682A