A method, device and equipment for calling a function based on a large model
By outputting prediction messages of fused function call data and pre-reply templates at one time, the problem of low efficiency of function call based on the big model is solved and more efficient data interaction is achieved.
Patent Information
- Application Number
- CN202510284613.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-03-11
AI Technical Summary
In the process of function calling based on large models, there are problems with low function calling efficiency and interaction efficiency, which requires multiple interaction and reasoning processes.
Through the large model, the prediction messages that combine function call data and pre-reply templates are output at one time. After the objective function call is made, the function return value is replaced directly to obtain the answer text.
It improves the utilization rate of large-scale model inference and improves the data interaction efficiency during function calls.
Smart Images

Figure CN119807383B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a function calling method, device and equipment based on a large model. Background Art
[0002] With the successful application of ChatGPT (Generative Pre-trained Transformer, a dialogue generation tool based on the GPT model developed by OpenAI), intelligent question-answering systems based on large models have rapidly become popular in many fields. In the use of intelligent question-answering systems, function calls based on large models provide users with more accurate and more diverse services.
[0003] In related technologies, function calls are usually executed by the AI (Artificial Intelligence) system in the user's device. The AI system consists of two parts: the application and the large model reasoning engine. The specific function call process is: the application combines the question text and function information and inputs them into the large model reasoning engine; the large model reasoning engine performs reasoning and outputs a function call request; the application executes the function call process based on the function call request, and inputs the obtained function call result and question text into the large model reasoning engine again; the large model reasoning engine performs reasoning again, outputs the answer text and returns it to the application, and the application feeds the answer text back to the user.
[0004] In the above function calling process, multiple interactions are required between the application and the large model inference engine, and the large model inference engine needs to perform multiple inference processes. Therefore, there are problems such as low function calling efficiency and interaction efficiency. Summary of the invention
[0005] The present invention provides a function calling method, device and equipment based on a large model, which are used to solve the problem of low function calling efficiency and low interaction efficiency when function calling is performed based on a large model.
[0006] In a first aspect, an embodiment of the present application provides a function calling method based on a large model, the method comprising:
[0007] Generate a question message based on the question text input by the user and the description text of each candidate function; wherein each description text includes input parameter information and output parameter information of the corresponding candidate function;
[0008] The target large model is used to predict the answer based on the question message to obtain a prediction message; the prediction message includes: function call data corresponding to the target function and a pre-reply template, the pre-reply template includes an identification field corresponding to the return value of the target function; the target function is a candidate function related to the question text;
[0009] Call the target function based on the function call data to obtain the function return value;
[0010] The identification field in the pre-reply template is replaced based on the function return value to obtain the answer text corresponding to the question text.
[0011] The above method uses a large model to output the fused function call data and the predicted message of the pre-reply template at one time. After calling the target function, the function return value is directly replaced with the identification field to obtain the answer text, ensuring that the user's final output can be obtained through one large model inference, thereby improving the utilization rate of large model inference and further improving the data interaction efficiency during the function call process.
[0012] In a possible implementation, based on the question text and the description text of each candidate function, a question message is generated, including:
[0013] Based on the question text and the first preset template, a first text is generated; the first text includes: a first text type that identifies the first text as a question text, and text content of the question text;
[0014] Based on the description text of each candidate function and the second preset template, a second text is generated; the second text includes: a second text type that identifies the second text as a description text, and text content of each description text;
[0015] A question message is generated based on the first text, the second text and a preset prompt word, wherein the prompt word is used to instruct the target large model to output a predicted message based on the question message.
[0016] In a possible implementation, before generating a question message based on the question text and the description text of each candidate function, the method further includes:
[0017] Obtaining the target function call level corresponding to the artificial intelligence AI system, and searching for candidate functions matching the target function call level from a function library; the function library stores multiple functions and the function call levels corresponding to each function; or,
[0018] A function set supported by the AI system is obtained, and each function included in the function set is used as a candidate function.
[0019] In a possible implementation, the prediction message further includes: an identifier for distinguishing the function call data from the pre-reply template;
[0020] Before calling the target function based on the function call data, the method further includes:
[0021] Based on the identifier, parse the function call data from the prediction message;
[0022] The function call data includes the function identifier of the target function, the identifier and value of each input parameter, and the identifier of the output parameter. The value of each input parameter is parsed from the question text through the target large model.
[0023] In a possible implementation, the target macro model is obtained by:
[0024] Constructing each sample message, the sample message including a sample question message and a reference prediction message corresponding to the sample question message;
[0025] The constructed sample messages are used to iteratively train the initial large model to obtain a target large model; wherein, in one iterative training, the following operations are performed: the initial large model is used to predict the answer based on a sample question message, and based on the difference between the obtained prediction message and a reference prediction message of a sample question message, the parameters of the current initial large model are adjusted.
[0026] In one possible implementation, each sample message is constructed in the following manner:
[0027] Input the sample question text corresponding to the sample message and the input parameter information of each candidate function into the initial large model, perform answer prediction through the initial large model, and obtain a function call request;
[0028] Call the function based on the function call request to obtain the function return value, and input the function return value and the sample question text into the initial large model to obtain the sample answer text;
[0029] Based on the sample question text, the input parameter information and the output parameter information of each candidate function, construct a sample question message in the sample message;
[0030] The function return value in the sample answer text is replaced with the identification field, and a reference prediction message in the sample message is constructed based on the replaced sample answer text and the function call data in the function call request.
[0031] In a second aspect, an embodiment of the present application provides a function calling device based on a large model, the device comprising:
[0032] A generation module, used to generate a question message based on the question text input by the user and the description text of each candidate function; wherein each description text includes input parameter information and output parameter information of the corresponding candidate function;
[0033] A prediction module is used to predict the answer based on the question message through the target large model to obtain a prediction message; the prediction message includes: function call data corresponding to the target function and a pre-reply template, the pre-reply template includes an identification field corresponding to the return value of the target function; the target function is a candidate function related to the question text;
[0034] A calling module is used to call the target function based on the function calling data to obtain the function return value;
[0035] The replacement module is used to replace the identification field in the pre-reply template based on the function return value to obtain the answer text corresponding to the question text.
[0036] In a possible implementation manner, the above-mentioned generation module is specifically used to:
[0037] Based on the question text and the first preset template, a first text is generated; the first text includes: a first text type that identifies the first text as a question text, and text content of the question text;
[0038] Based on the description text of each candidate function and the second preset template, a second text is generated; the second text includes: a second text type that identifies the second text as a description text, and text content of each description text;
[0039] A question message is generated based on the first text, the second text and a preset prompt word, wherein the prompt word is used to instruct the target large model to output a predicted message based on the question message.
[0040] In a possible implementation manner, before generating the question message based on the question text and the description text of each candidate function, the generation module is further configured to:
[0041] Obtaining the target function call level corresponding to the artificial intelligence AI system, and searching for candidate functions matching the target function call level from a function library; the function library stores multiple functions and the function call levels corresponding to each function; or,
[0042] A function set supported by the AI system is obtained, and each function included in the function set is used as a candidate function.
[0043] In a possible implementation, the prediction message further includes: an identifier for distinguishing the function call data from the pre-reply template;
[0044] Before the calling module calls the target function based on the function calling data, it is also used to:
[0045] Based on the identifier, parse the function call data from the prediction message;
[0046] The function call data includes the function identifier of the target function, the identifier and value of each input parameter, and the identifier of the output parameter. The value of each input parameter is parsed from the question text through the target large model.
[0047] In a possible implementation manner, the embodiment of the present application further includes a training module, which is specifically used to obtain a target large model in the following manner:
[0048] Constructing each sample message, the sample message including a sample question message and a reference prediction message corresponding to the sample question message;
[0049] The constructed sample messages are used to iteratively train the initial large model to obtain a target large model; wherein, in one iterative training, the following operations are performed: the initial large model is used to predict the answer based on a sample question message, and based on the difference between the obtained prediction message and a reference prediction message of a sample question message, the parameters of the current initial large model are adjusted.
[0050] In a possible implementation, the training module is specifically used to construct each sample message in the following manner:
[0051] Input the sample question text corresponding to the sample message and the input parameter information of each candidate function into the initial large model, perform answer prediction through the initial large model, and obtain a function call request;
[0052] Call the function based on the function call request to obtain the function return value, and input the function return value and the sample question text into the initial large model to obtain the sample answer text;
[0053] Based on the sample question text, the input parameter information and the output parameter information of each candidate function, construct a sample question message in the sample message;
[0054] The function return value in the sample answer text is replaced with the identification field, and a reference prediction message in the sample message is constructed based on the replaced sample answer text and the function call data in the function call request.
[0055] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the large model-based function calling method when executing the computer program.
[0056] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps in the above-mentioned large model-based function calling method of the present application are implemented.
[0057] In the fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which is stored in a computer-readable storage medium; when the processor of the memory access device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the memory access device executes the steps in the above-mentioned large model-based function calling method of the present application.
[0058] For each of the above-mentioned second to fifth aspects and the technical effects that may be achieved by each of the above-mentioned aspects, please refer to the above-mentioned description of the technical effects that can be achieved by the first aspect or various possible schemes in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0060] Figure 1 A schematic diagram of a function calling process in a related technology provided by this application;
[0061] Figure 2 A schematic diagram of a function call architecture provided in an embodiment of the present application;
[0062] Figure 3 A flowchart of a function calling method based on a large model provided in an embodiment of the present application;
[0063] Figure 4 A schematic diagram of a large model training process provided in an embodiment of the present application;
[0064] Figure 5 A flowchart of a function call example provided in an embodiment of the present application;
[0065] Figure 6 A schematic diagram of a function calling device provided in an embodiment of the present application;
[0066] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0068] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0069] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0070] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0071] In order to facilitate those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the following is a brief description of the professional terms involved:
[0072] (1) Large model: refers to a machine learning model with ultra-large-scale parameters (usually more than one billion) and complex computing structure. It can usually process massive amounts of data and complete various complex tasks, such as natural language processing and image recognition. Large models include a variety of models including LLM (Large Language Model). Large language models refer to deep learning models trained with a large amount of text data. They can generate natural language text or understand the meaning of language text. They can handle a variety of natural language tasks, such as text classification, question and answer, dialogue, etc. For example, Chat GPT, Wenxin Yiyan, etc.
[0073] (2) Function Call: It is an important technical means for intelligent agents to realize their functions. In the context of AI big models, function calls allow intelligent agents to use predefined functions to handle specific tasks or problems. These functions can be simple custom functions or functional functions that encapsulate external tool APIs (Application Programming Interfaces), enabling intelligent agents to call external resources and services, such as accessing emails and obtaining weather information.
[0074] In recent years, with the successful application of ChatGPT (Generative Pre-trained Transformer, a dialogue generation tool based on the GPT model), intelligent question-answering systems based on large models have rapidly become popular in many fields. In the use of intelligent question-answering systems, function calls based on large models provide users with more accurate and more diverse services.
[0075] In related technologies, function calls are usually executed by the AI system in the user's device. The AI system consists of two parts: an application and a large model reasoning engine. The specific function call process is as follows: the application combines the question text and function information and inputs them into the large model reasoning engine; the large model reasoning engine performs reasoning and outputs a function call request; the application executes the function call process based on the function call request, and inputs the obtained function call result and question text into the large model reasoning engine again; the large model reasoning engine performs reasoning again, outputs the answer text and returns it to the application, and the application feeds the answer text back to the user, such as Figure 1 shown.
[0076] In the above function calling process, multiple interactions are required between the application and the large model inference engine, and the large model inference engine needs to perform multiple inference processes. Therefore, there are problems such as low function calling efficiency and interaction efficiency.
[0077] In this regard, although there are solutions in the related technologies that analyze the dependencies between function calls and use parallel calls to improve instruction processing efficiency, and solutions that increase fixed reply words and function call replies to respond to users in a timely manner and improve user experience, the former is applied to scenarios with multiple function calls and does not consider the optimization of a single function call; the latter only improves user perception and does not fundamentally improve processing efficiency.
[0078] To solve the above problems, the embodiment of the present application provides a function call method based on a large model, which outputs a prediction message that integrates function call data and a pre-reply template (in which an identification field corresponding to the return value of the target function is embedded) at one time through the large model. After calling the target function, the identification field is directly replaced by the function return value to obtain the answer text. This method ensures that the user's final output can be obtained through a single large model inference, that is, the utilization rate of large model inference is improved, thereby improving the efficiency of data interaction during the function call process.
[0079] Figure 2 A schematic diagram of a function call architecture provided in an embodiment of the present application. For ease of understanding, the present application embodiment first combines Figure 2 , the overall process of function calling in the embodiment of the present application is explained.
[0080] See also Figure 2 As shown, the function calling method in the embodiment of the present application is applied to an AI system, which includes an application and a large model reasoning engine. Optionally, the application is set on the user's terminal device, and is used to: interact with the user (i.e., receive information input by the user and feedback information to the user), call the large model reasoning engine to perform large model reasoning, and complete the function calling task; the large model reasoning engine is set on the server, and is used to perform reasoning based on the call of the application to output the corresponding result and feedback it to the application.
[0081] In some embodiments, the function call process includes: the user sends a question text to the application, the application builds a question message based on the question text and the description text of the candidate function, and sends it to the large model inference engine; the large model predicts the answer based on the question message, outputs a prediction message including function call data and a pre-reply template, and returns it to the application; the application calls the target function based on the function call data, obtains the function return value, and fills it into the pre-reply template to generate an answer text; the application feeds the answer text back to the user.
[0082] The present application is further described in detail below in conjunction with the above architecture and other drawings. Figure 3 A flow chart of a function calling method based on a large model provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the function calling method provided in the embodiment of the present application specifically includes the following steps:
[0083] Step S301, generating a question message based on the question text input by the user and the description text of each candidate function;
[0084] Each description text includes input parameter information and output parameter information of the corresponding candidate function;
[0085] In some embodiments, the application program in the AI system is set in the user's terminal device, which includes but is not limited to a mobile phone, a computer, etc.; when the user has the need to conduct question and answer based on function calls, the user can enter the question text on the operation interface provided by the terminal device, such as "The original price of an electronic product is 400 yuan, and there is a 10% discount. How much do I need to pay?".
[0086] After receiving the question text entered by the user, the application triggers the subsequent function call process based on the large model. Specifically, the description text of each candidate function is first obtained. The candidate function here refers to: the function supported by the AI system to call; then based on the question text and the description text of the candidate function, a question message is generated. The description text here includes but is not limited to: the candidate function's identification (name), function, and parameter definition (i.e., input parameter information and output parameter information).
[0087] In a possible implementation manner, the candidate function may be determined in the following manner in the embodiment of the present application:
[0088] Obtaining the target function call level corresponding to the artificial intelligence AI system, and searching for candidate functions matching the target function call level from a function library; the function library stores multiple functions and the function call levels corresponding to each function; or,
[0089] A function set supported by the AI system is obtained, and each function included in the function set is used as a candidate function.
[0090] In one possible implementation, a corresponding target function call level is set in the AI system in the embodiment of the present application, and the target function call level is used to characterize the function call capability of the AI system; when determining the candidate function, a function matching the target function call level (i.e., the function call level is not higher than the target function call level) is searched from the function library as the candidate function. In implementation, real-time modification of the target function call level of the AI system is supported.
[0091] In another possible implementation, the embodiment of the present application pre-configures a function set supported by the AI system, which may be in the form of a list, and pre-adds functions supported by the AI system (i.e., candidate functions) to the function set; during implementation, it supports modification, addition, and deletion of the content in the function set.
[0092] In a possible implementation, the step of generating a question message based on the question text and the description text of each candidate function specifically includes:
[0093] Based on the question text and the first preset template, a first text is generated; the first text includes: a first text type that identifies the first text as a question text, and text content of the question text;
[0094] Based on the description text of each candidate function and the second preset template, a second text is generated; the second text includes: a second text type that identifies the second text as a description text, and text content of each description text;
[0095] A question message is generated based on the first text, the second text and a preset prompt word, wherein the prompt word is used to instruct the target large model to output a predicted message based on the question message.
[0096] In some embodiments, after obtaining the question text and the description text of the candidate function, the present application assembles them according to the format of the input message supported by the large model to obtain a question message.
[0097] In a specific implementation, the present application pre-sets a first preset template and a second preset template, wherein the first preset template is provided with a position corresponding to the question text and a first text type, and the second preset template is provided with a position corresponding to the description text and a second text type; after obtaining the question text, the question text is filled into the corresponding position of the first preset template to obtain the first text, and similarly, after obtaining the description text, the description text is filled into the corresponding position of the second preset template to obtain the second text.
[0098] The generation process of the first text and the second text is described below with reference to examples.
[0099] Assume that the question text entered by the user is: "The original price of an electronic product is 400 yuan. With a 10% discount, how much do I need to pay?"; the candidate functions are "calculate_discount" and "get_current_weather"; the description information corresponding to each candidate function includes: name, description, parameters, required, and returns (return information, i.e. output parameter information), etc., and the parameters include type, properties, description, etc.
[0100] In a possible implementation, the first text type is user, and the first preset template is:
[0101] {
[0102] "role": "user",
[0103] "content": "XXXXX (i.e. the location corresponding to the question text)"
[0104] }.
[0105] Based on the first preset template and the question text, the first text can be obtained as follows:
[0106] {
[0107] "role": "user",
[0108] "content": "If the original price of electronic products is 400 yuan and there is a 10% discount, how much do I need to pay?"
[0109] }.
[0110] In a possible implementation, the second text type is system, and the second preset template is:
[0111] {
[0112] "role": " system ",
[0113] "content": "You have the following tools to call: XXXXX (that is, the location corresponding to the description text)"
[0114] }.
[0115] Based on the first preset template and each description text, the second text can be obtained as follows:
[0116] {
[0117] "role": "system",
[0118] "content": "You have the following tools to call: [{'name':'calculate_discount', 'description': 'Calculate the discounted price()', 'parameters': {'type': 'object', 'properties': {'original_price': {'type': 'number', 'description': 'The original price of the item'}, 'discount_percentage': {'type': 'number', 'description': 'The percentage of discount'}}, 'required': ['original_price', 'discount_percentage']}, 'returns': {'type': 'object', 'properties': {'discounted_price': {'type': 'number', 'description': 'The price afterapplying the discount'}}}},
[0119] {'name': 'get_current_weather', 'description': 'Get the currentweather', 'parameters': {'type': 'object', 'properties': {'location': {'type': 'string', 'description': 'The city name'}}, 'required': ['location'}, 'returns': {'type': 'object', 'properties': {'temperature': {'type': 'number', 'description': 'The temperature of city'}}}}]"
[0120] }.
[0121] In some embodiments, a prompt word is also pre-set in the embodiments of the present application, and the prompt word is used to: instruct the target large model to output a prediction message based on the question message. In the specific implementation, the content of the prompt word can be set based on the needs, for example, it can be set to: "Please output the function call data corresponding to the target function that needs to be called, and the template of the answer text to reply to the user based on the following content".
[0122] In some embodiments, the present application can also pre-set the function type corresponding to each function in the function library. The function type is used to characterize: the business scenario to which the function belongs. The business scenario can be set based on demand, for example, it can be set to: weather, sales, etc.
[0123] When the user inputs the question text, he can also input the target business scenario corresponding to the question text. When generating a question message based on the question text and the description text of each candidate function, the user can first select the candidate function matching the target business scenario from the candidate functions based on the target business scenario and the business scenario corresponding to each candidate function, and then generate a question message based on the question text and the description text of each selected candidate function. This method can reduce the number of candidate functions in the question message, reduce the running amount of the large model, and thus improve the efficiency and accuracy of the model.
[0124] For example, assuming that the candidate functions include Function 1 (the corresponding business scenario is weather), Function 2 (the corresponding business scenario is sales), and Function 3 (the corresponding business scenario is sales), and the question text is "The original price of an electronic product is 400 yuan, and there is a 10% discount. How much do I need to pay?", and the corresponding target business scenario is sales, then you can first filter out Function 2 and Function 3 whose business scenario is sales from the candidate functions, and then generate a question message based on the question text and the description texts corresponding to Functions 2 and 3 respectively.
[0125] Step S302, predicting the answer based on the question message through the target large model to obtain a predicted message;
[0126] The prediction message includes: function call data corresponding to the target function and a pre-reply template, the pre-reply template includes an identification field corresponding to the return value of the target function; the target function is a candidate function related to the question text;
[0127] In some embodiments, the present application pre-fine-tunes the initial large model through sample messages to obtain a target large model. The target large model obtained after fine-tuning supports outputting prediction messages based on question messages including function call data and pre-reply templates.
[0128] After receiving the question message, the question message is input into the target big model, and the target big model can output the predicted message. Specifically, the target big model performs reasoning based on the context information in the question message, and can determine the target function corresponding to the question text (i.e., the one with the strongest correlation) from multiple candidate functions, and then parse the function call data corresponding to the target function from the answer text of the question message, and based on the context in the question message, predict the content of the pre-reply template, and finally output the predicted message.
[0129] In some embodiments, the identification field corresponding to the return value of the target function is located in the pre-reply template in an embedded form, and the identification field can be set based on demand, for example, it can be set to the identification of the output parameter of the target function. The format of the function call data is not limited in the embodiments of the present application, for example, it can be in json format.
[0130] For example, a possible prediction message format is as follows:
[0131] {{%% <function call data> %%}} large model pre-reply {{identification field}} large model pre-reply, where "large model pre-reply {{identification field}} large model pre-reply" is the pre-reply template part.
[0132] Taking the question text as "For an electronic product with an original price of 400 yuan and a 10% discount, how much do I need to pay?" and the objective function as "calculate_discount" as an example, the corresponding predicted message can be: {{%% {'name': 'calculate_discount','return_vars (return values)': ['discounted_price'], 'arguments': {'original_price': 400, 'discount_percentage': 10}} %%}} You should pay {{discounted_price}} yuan for this electronic product.
[0133] Among them, "{'name': 'calculate_discount','return_vars (return values)': ['discounted_price'], 'arguments': {'original_price': 400, 'discount_percentage': 10}}" is the function call data, "You should pay {{discounted_price}} yuan for this electronic product" is the pre-reply template, and "discounted_price" is the identification field.
[0134] Step S303, call the objective function based on the function call data to obtain the function return value;
[0135] In some embodiments, after obtaining the predicted message output by the large model, first parse the predicted message to obtain the function call data and the pre-reply template, and then call the objective function based on the function call data to obtain the function return value.
[0136] In a possible implementation manner, the above predicted message further includes: an identifier for distinguishing the function call data and the pre-reply template; the identifier can be set based on requirements.
[0137] Before calling the objective function based on the function call data, the method in the embodiments of the present application further includes:
[0138] Based on the identifier, parse the function call data from the predicted message;
[0139] The function call data includes the function identifier of the objective function, the identifiers and values of each input parameter, and the identifier of the output parameter. The values of each input parameter are parsed from the question text by the target large model.
[0140] Exemplarily, in an embodiment of the present application, the identifier can be set to "{{%%, %%}}" to distinguish function call data from pre-reply templates. Taking "{{%% <function call data> %%}} large model pre-reply {{identification field}} large model pre-reply" as an example, based on the identifier {{%%, %%}}, the part located inside the identifier and the part located outside the identifier can be obtained, wherein the part located inside the identifier is the function call data, and the part located outside the identifier is the pre-reply template.
[0141] Take the predicted message as: "{{%% {'name': 'calculate_discount', 'return_vars': ['discounted_price'], 'arguments': {'original_price': 400, 'discount_percentage': 10}} %%}} You should pay {{ discounted_price}} yuan for this electronic product." as an example. Based on the identifier setting "{{%%, %%}}", it can be identified that: the function call data is {'name': 'calculate_discount', 'return_vars': ['discounted_price'], 'arguments': {'original_price': 400, 'discount_percentage': 10}}, and the pre-reply template is: "You should pay {{ discounted_price}} yuan for this electronic product".
[0142] Furthermore, the function call message can be further parsed to obtain the function identifier of the target function, the identifiers and values of each input parameter, and the identifier of the output parameter. Taking the above example, the function identifier of the target function calculate_discount, the identifiers and values of the input parameters {'original_price': 400, 'discount_percentage': 10}, and the identifier of the output parameter discounted_price can be obtained.
[0143] Step S304: replace the identification field in the pre-reply template based on the function return value to obtain the answer text corresponding to the question text.
[0144] In some embodiments, in the present application, an identifier for representing an identification field may also be set in the pre-reply template. The identifier may also be set based on demand. When executing the above step S304, the identification field in the pre-reply template may be determined based on the identifier.
[0145] Exemplarily, the identifier corresponding to the identification field can be set to "{{}}". Taking the pre-reply template as: "You should pay {{ discounted_price}} yuan for this electronic product." as an example, the identification field can be identified as "discounted_price" through the identifier "{{}}". Then, the identification field discounted_price in the pre-reply template can be replaced based on the function return value of the target function (assuming it is 360) to obtain the answer text corresponding to the question text: "You should pay 360 yuan for this electronic product." and return it to the user.
[0146] The above method uses a large model to output the fused function call data and the predicted message of the pre-reply template at one time. After calling the target function, the function return value is directly replaced with the identification field to obtain the answer text, ensuring that the user's final output can be obtained through one large model inference, thereby improving the utilization rate of large model inference and further improving the data interaction efficiency during the function call process.
[0147] In some embodiments, the solution of the present application includes two parts: model fine-tuning and model reasoning, see Figure 4 As shown, before executing the above steps S301-304, it is first necessary to fine-tune the initial large model (ie, the large model in the related art) based on the sample message to support one-time output of the predicted message.
[0148] In a possible implementation manner, the target macro model is obtained in the following manner:
[0149] Constructing each sample message, the sample message including a sample question message and a reference prediction message corresponding to the sample question message;
[0150] The constructed sample messages are used to iteratively train the initial large model to obtain a target large model; wherein, in one iterative training, the following operations are performed: the initial large model is used to predict the answer based on a sample question message, and based on the difference between the obtained prediction message and a reference prediction message of a sample question message, the parameters of the current initial large model are adjusted.
[0151] In some embodiments, the present application may construct multiple sample messages based on specific business scenarios, and fine-tune the initial large model based on the sample messages; optionally, the large model may be fine-tuned using conventional fine-tuning frameworks such as llama-factory and DeepSpeed.
[0152] After fine-tuning the initial large model based on each sample message, the target large model in the above step S302 of the present application can be obtained.
[0153] In a possible implementation manner, the embodiment of the present application constructs each sample message in the following manner:
[0154] Step 1: Input the sample question text corresponding to the sample message and the input parameter information of each candidate function into the initial large model, and predict the answer through the initial large model to obtain the function call request;
[0155] Step 2: Based on the function call request, a function call is made to obtain a function return value, and the function return value and the sample question text are input into the initial large model to obtain a sample answer text;
[0156] Step 3: construct a sample question message in the sample message based on the sample question text, input parameter information and output parameter information of each candidate function;
[0157] Step 4: Replace the function return value in the sample answer text with the identification field, and construct a reference prediction message in the sample message based on the replaced sample answer text and the function call data in the function call request.
[0158] In some embodiments, the process of obtaining a sample answer text based on the initial large model (i.e., steps 1 to 2) is a related technology, and its specific process is not repeated here. It should be noted that when constructing multiple sample messages, the process described in steps 1 to 4 can be performed multiple times in succession in the embodiment of the present application, or the process described in steps 1 to 2 can be performed for multiple sample answer texts respectively, and then the process described in steps 3 to 4 can be performed respectively based on the obtained results.
[0159] In some embodiments, the present application may also artificially construct a function call fine-tuning dataset, which includes sample question text, input parameter information of each candidate function, sample answer text, etc., and then execute the fine-tuning process described in steps 3 to 4 above to obtain sample messages for fine-tuning the large model.
[0160] The following is a detailed description of the process of constructing the sample message with reference to a specific example.
[0161] First, in the embodiment of the present application, a large model in the related art, i.e., an initial large model, is used to generate a function call fine-tuning dataset based on the sample question text (i.e., steps 1 to 2 above). The specific process is as follows:
[0162] Assume that the sample question text is: "A pair of shoes with an original price of 200 yuan and a 15% discount, how much do I need to pay?", and the input parameter information is "[{'name': 'calculate_discount', 'description': 'Calculate thediscounted price', 'parameters': {'type': 'object', 'properties': {'original_price': {'type': 'number', 'description': 'The original price of the item'},'discount_percentage': {'type': 'number', 'description': 'The percentage ofdiscount'}}, 'required': ['original_price', 'discount_percentage']}}}]", and combine them to get the input of the initial large model:
[0163] {
[0164] "role": "system",
[0165] "content": "You have the following tools to call: [{'name': 'calculate_discount', 'description': 'Calculate the discounted price', 'parameters': {'type': 'object', 'properties': {'original_price': {'type': 'number', 'description': 'The original price of the item'}, 'discount_percentage': {'type': 'number', 'description': 'The percentage of discount'}}, 'required': ['original_price','discount_percentage']}}}]"
[0166] },{
[0167] "role": "user",
[0168] "content": "A pair of shoes originally priced at 200 yuan, with a 15% discount, how much do I need to pay?"
[0169] }.
[0170] By using the initial large model to predict the answer, we can get the function call request:
[0171] {
[0172] "role": "assistant",
[0173] "content": "{'name': 'calculate_discount', 'return_vars': ['discounted_price'], 'arguments': {'original_price': 200, 'discount_percentage': 15}}"
[0174] }.
[0175] Based on the function call request, a function call is made and the function return value is obtained: 170. According to the format of the input message supported by the initial large model, it is assembled to obtain:
[0176] {
[0177] "role": "tool",
[0178] "content": "170"
[0179] }.
[0180] Combine the function return value in the above format with the sample question text, input it into the initial large model, and predict the answer based on the initial large model to obtain the sample answer text;
[0181] {
[0182] "role": "assistant",
[0183] "content": "You should pay 170 yuan for this pair of shoes."
[0184] }]
[0185] }.
[0186] Then, in the embodiment of the present application, after obtaining the function call fine-tuning dataset, the function call fine-tuning dataset is adjusted to obtain a sample message for fine-tuning the large model (i.e., steps 3-4 above). The specific process is as follows:
[0187] Get the output parameter information corresponding to the candidate function: {'type': 'object', 'properties': {'discounted_price': {'type': 'number', 'description': 'The price afterapplying the discount'}}, set it to the "returns" field, and assemble it with the above sample question text and the input parameter information of each candidate function to construct the sample question message in the sample message:
[0188] "role": "system",
[0189] "content": "You have the following tools to call: [{'name': 'calculate_discount', 'description': 'Calculate the discounted price', 'parameters': {'type': 'object', 'properties': {'original_price': {'type': 'number', 'description': 'The original price of the item'}, 'discount_percentage': {'type': 'number', 'description': 'The percentage of discount'}}, 'required': ['original_price','discount_percentage']}, 'returns': {'type': 'object', 'properties': {'discounted_price': {'type': 'number', 'description': 'The price afterapplying the discount'}}}}]"
[0190] },{
[0191] "role": "user",
[0192] "content": "A pair of shoes originally priced at 200 yuan, with a 15% discount, how much do I need to pay?"
[0193] }.
[0194] Replace the function return value in the sample answer text with the identification field (taking discounted_price as an example), and you get: "You should pay {{ discounted_price}} yuan for this pair of shoes", and assemble it with the function call data in the function call request to construct the reference prediction message in the sample message:
[0195] {
[0196] "role": "assistant",
[0197] "content": "{{%% {'name': 'calculate_discount', 'return_vars': ['discounted_price'], 'arguments': {'original_price': 200, 'discount_percentage': 15}} %%}} You should pay {{ discounted_price}} yuan for these shoes."
[0198] }.
[0199] According to the above method, multiple sample messages corresponding to the required business scenarios can be constructed.
[0200] The following combination Figure 5 The above-mentioned function calling process based on the large model is described in detail with a specific example, and the process specifically includes:
[0201] Step S501, construct each sample message;
[0202] Each sample message includes a sample question message and a reference prediction message corresponding to the sample question message.
[0203] Step S502, using the constructed sample messages to iteratively train the initial large model to obtain a target large model;
[0204] In one iterative training, the following operations are performed: the answer is predicted based on a sample question message by the initial large model, and the parameters of the current initial large model are adjusted based on the difference between the obtained prediction message and a reference prediction message of the sample question message.
[0205] Step S503, generating a question message based on the question text input by the user and the description text of each candidate function;
[0206] Each description text includes input parameter information and output parameter information of the corresponding candidate function;
[0207] Step S504, predicting the answer based on the question message through the target large model to obtain a predicted message;
[0208] The prediction message includes: function call data corresponding to the target function and a pre-reply template, the pre-reply template includes an identification field corresponding to the return value of the target function; the target function is a candidate function related to the question text;
[0209] Step S505, parsing the function call data from the prediction message based on the identifier in the prediction message;
[0210] The above identifier is used to: distinguish function call data and pre-reply template;
[0211] Step S506, calling the target function based on the function calling data to obtain the function return value;
[0212] Step S507, replacing the identification field in the pre-reply template based on the function return value to obtain the answer text corresponding to the question text.
[0213] Based on the same inventive concept, the present application also provides a function calling device based on a large model, see Figure 6 , the device comprises:
[0214] A generating module 601 is used to generate a question message based on the question text input by the user and the description text of each candidate function; wherein each description text includes input parameter information and output parameter information of the corresponding candidate function;
[0215] Prediction module 602, used to predict the answer based on the question message through the target big model to obtain a prediction message; the prediction message includes: function call data corresponding to the target function and a pre-reply template, the pre-reply template includes an identification field corresponding to the return value of the target function; the target function is a candidate function related to the question text;
[0216] The calling module 603 is used to call the target function based on the function calling data to obtain the function return value;
[0217] The replacement module 604 is used to replace the identification field in the pre-reply template based on the function return value to obtain the answer text corresponding to the question text.
[0218] In a possible implementation manner, the generating module 601 is specifically configured to:
[0219] Based on the question text and the first preset template, a first text is generated; the first text includes: a first text type that identifies the first text as a question text, and text content of the question text;
[0220] Based on the description text of each candidate function and the second preset template, a second text is generated; the second text includes: a second text type that identifies the second text as a description text, and text content of each description text;
[0221] A question message is generated based on the first text, the second text and a preset prompt word, wherein the prompt word is used to instruct the target large model to output a predicted message based on the question message.
[0222] In a possible implementation manner, before generating the question message based on the question text and the description text of each candidate function, the generation module 601 is further configured to:
[0223] Obtaining the target function call level corresponding to the artificial intelligence AI system, and searching for candidate functions matching the target function call level from a function library; the function library stores multiple functions and the function call levels corresponding to each function; or,
[0224] A function set supported by the AI system is obtained, and each function included in the function set is used as a candidate function.
[0225] In a possible implementation, the prediction message further includes: an identifier for distinguishing the function call data from the pre-reply template;
[0226] Before calling the target function based on the function calling data, the calling module 603 is further used to:
[0227] Based on the identifier, parse the function call data from the prediction message;
[0228] The function call data includes the function identifier of the target function, the identifier and value of each input parameter, and the identifier of the output parameter. The value of each input parameter is parsed from the question text through the target large model.
[0229] In a possible implementation manner, the embodiment of the present application further includes a training module, which is specifically used to obtain a target large model in the following manner:
[0230] Constructing each sample message, the sample message including a sample question message and a reference prediction message corresponding to the sample question message;
[0231] The constructed sample messages are used to iteratively train the initial large model to obtain a target large model; wherein, in one iterative training, the following operations are performed: the initial large model is used to predict the answer based on a sample question message, and based on the difference between the obtained prediction message and a reference prediction message of a sample question message, the parameters of the current initial large model are adjusted.
[0232] In a possible implementation, the training module is specifically used to construct each sample message in the following manner:
[0233] Input the sample question text corresponding to the sample message and the input parameter information of each candidate function into the initial large model, perform answer prediction through the initial large model, and obtain a function call request;
[0234] Call the function based on the function call request to obtain the function return value, and input the function return value and the sample question text into the initial large model to obtain the sample answer text;
[0235] Based on the sample question text, the input parameter information and the output parameter information of each candidate function, construct a sample question message in the sample message;
[0236] The function return value in the sample answer text is replaced with the identification field, and a reference prediction message in the sample message is constructed based on the replaced sample answer text and the function call data in the function call request.
[0237] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the functions of the aforementioned function calling device based on a large model, referring to Figure 7 , the electronic device comprises:
[0238] At least one processor 701, and a memory 702 connected to the at least one processor 701. The specific connection medium between the processor 701 and the memory 702 is not limited in the embodiment of the present application. Figure 7 In the example, the processor 701 and the memory 702 are connected via a bus 700. Figure 7 The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 700 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 7 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 701 can also be called a controller, and there is no limitation on the name.
[0239] In the embodiment of the present application, the memory 702 stores instructions that can be executed by at least one processor 701. The at least one processor 701 can execute the function calling method based on the large model discussed above by executing the instructions stored in the memory 702. The processor 701 can implement Figure 6 The functions of each module in the device shown.
[0240] Among them, the processor 701 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 702 and calling data stored in the memory 702, the various functions of the device and process data, the device can be monitored as a whole.
[0241] In one possible design, the processor 701 may include one or more processing units, and the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0242] Processor 701 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the function call method based on the large model disclosed in the embodiments of the present application can be directly embodied as a hardware processor execution, or a combination of hardware and software modules in the processor.
[0243] The memory 702 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 702 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 702 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 702 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0244] By designing and programming the processor 701, the code corresponding to the application anomaly detection method described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 3 The steps of the function calling method based on the large model in the embodiment shown are as follows: How to design and program the processor 701 is a technology well known to those skilled in the art and will not be described in detail here.
[0245] An embodiment of the present application also provides a computer-readable storage medium that stores computer-executable instructions required to execute the above-mentioned processor, which includes a program required to execute the above-mentioned processor.
[0246] In some possible implementations, various aspects of the large model-based function calling method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the above-mentioned program product is run on an electronic device, the above-mentioned program code is used to enable the above-mentioned electronic device to execute the steps of the large model-based function calling method according to various exemplary embodiments of the present application described above in this specification.
[0247] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0248] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (apparatus), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, 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 generate 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 flowchart and / or block diagram. 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.
[0249] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate 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 A function specified in one or more boxes.
[0250] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0251] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0252] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A function calling method based on a large model, characterized in that: The method comprises: Generate a question message based on the question text input by the user and the description text of each candidate function; wherein each description text includes input parameter information and output parameter information of the corresponding candidate function; The target large model is used to predict the answer based on the question message to obtain a prediction message; the prediction message includes: function call data corresponding to the target function and a pre-reply template, the pre-reply template includes an identification field corresponding to the return value of the target function; the target function is a candidate function related to the question text; Calling the target function based on the function call data to obtain a function return value; The identification field in the pre-reply template is replaced based on the function return value to obtain an answer text corresponding to the question text.
2. The method according to claim 1, characterized in that The generating a question message based on the question text and the description text of each candidate function includes: Based on the question text and the first preset template, a first text is generated; the first text includes: a first text type that identifies the first text as a question text, and text content of the question text; Based on the description texts of the candidate functions and the second preset template, a second text is generated; the second text includes: a second text type that identifies the second text as a description text, and text content of each description text; The question message is generated based on the first text, the second text and a preset prompt word; wherein the prompt word is used to instruct the target large model to output a predicted message based on the question message.
3. The method according to claim 1, characterized in that Before generating a question message based on the question text and the description texts of each candidate function, the method further includes: Obtaining a target function call level corresponding to the artificial intelligence AI system, and searching for a candidate function matching the target function call level from a function library; the function library stores a plurality of functions and the function call levels corresponding to each function; or, A function set supported by the AI system is obtained, and each function included in the function set is used as the candidate function.
4. The method according to claim 1, characterized in that The prediction message also includes: an identifier for distinguishing the function call data and the pre-reply template; Before calling the target function based on the function calling data, the method further includes: parsing the function call data from the prediction message based on the identifier; The function call data includes the function identifier of the target function, the identifier and value of each input parameter, and the identifier of the output parameter. The value of each input parameter is parsed from the question text through the target large model.
5. The method according to any one of claims 1 to 4, characterized in that: The target large model is obtained by: Constructing each sample message, wherein the sample message includes a sample question message and a reference prediction message corresponding to the sample question message; The constructed sample messages are used to iteratively train the initial large model to obtain the target large model; wherein, in one iterative training, the following operations are performed: the initial large model is used to predict the answer based on a sample question message, and based on the difference between the obtained prediction message and the reference prediction message of the sample question message, the parameters of the current initial large model are adjusted.
6. The method according to claim 5, characterized in that Each sample message is constructed in the following way: Inputting the sample question text corresponding to the sample message and the input parameter information of each candidate function into the initial large model, performing answer prediction through the initial large model, and obtaining a function call request; Perform a function call based on the function call request to obtain a function return value, and input the function return value and the sample question text into the initial large model to obtain a sample answer text; Based on the sample question text, input parameter information and output parameter information of each candidate function, construct a sample question message in the sample message; The function return value in the sample answer text is replaced with an identification field, and a reference prediction message in the sample message is constructed based on the replaced sample answer text and the function call data in the function call request.
7. A function calling device based on a large model, characterized in that: The device comprises: A generation module, used to generate a question message based on the question text input by the user and the description text of each candidate function; wherein each description text includes input parameter information and output parameter information of the corresponding candidate function; A prediction module, configured to predict an answer based on the question message through a target large model to obtain a prediction message; the prediction message includes: function call data corresponding to a target function and a pre-reply template, the pre-reply template includes an identification field corresponding to a return value of the target function; the target function is a candidate function related to the question text; A calling module, used for calling the target function based on the function calling data to obtain a function return value; A replacement module is used to replace the identification field in the pre-reply template based on the function return value to obtain an answer text corresponding to the question text.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method according to any one of claims 1 to 6 when executing a computer program stored in the memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Function tool calling method and device in trusted execution environment, medium and equipment
CN118114771A
Answer feedback method to be applied to large-scale language model, device, electronic apparatus, storage medium and computer program
JP2024178148A