Information processing method and device based on large model

By introducing user requirements sets and related tool sets into the big model, the problem of low accuracy of tool selection and parameter extraction of large model is solved, which improves the accuracy and efficiency of tool calls, and enhances the scalability of the system.

CN119623636APending Publication Date: 2025-03-14ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411704132.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The accuracy of large-model tool selection and parameter extraction is not high, resulting in the inability to perform user tasks correctly, and the length of the system tool list limits the system's scalability and tool calling capabilities.

Method used

By introducing a set of user requirements, limiting user intentions to a given user requirements, and configuring only the toolsets related to each user requirement, the generative model determines the target tool from the tool set associated with user requirements, and calls the target tool to perform user tasks.

Benefits of technology

It improves the accuracy and efficiency of large-scale tool calls, reduces irrelevant information, and enhances the scalability and user experience of system tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623636A_ABST
    Figure CN119623636A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an information processing method and device based on a large model, and the method comprises the steps: determining a target user demand from a pre-configured user demand set according to a phrase input by a user, and determining a target tool from a tool set related to the target user demand through a generative model, and calling the target tool to execute the target task and returning a task execution result to the user. In the embodiment of the specification, the user intention can be limited in the given user demand by introducing the user demand set, so that the recognition accuracy of the pan intention or the fuzzy intention of the user is improved. And in addition, only related system tools are configured in tool sets required by different users, other irrelevant system tools are not included, the tool sets are not limited by the length of a model input text, and the system tools have good expansibility. And moreover, irrelevant information is greatly reduced, so that useful information can be more easily extracted by a large model, and the calling precision and efficiency of a model tool are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of artificial intelligence technology, and in particular, to a large model-based information processing method and device. Background Art

[0002] An artificial intelligence agent (AI agent) refers to a program or device built based on an AI big model that can autonomously perceive, make decisions, and execute tasks. The big model tool call is an important part of the agent that connects the model dialogue with the system capabilities.

[0003] In the related art, the system tool list and the user input text are generally input into a large model, and the large model is used to identify the user's intention to select the corresponding tool, and the tool is called in combination with the parameters in the user input text to complete the task execution. However, the accuracy of the tool selection and parameter extraction of the large model is not high, resulting in the inability to correctly execute the user task. Summary of the invention

[0004] In order to improve the accuracy of calling a large model tool, one or more embodiments of this specification provide an information processing method, device, electronic device, storage medium and computer program product based on a large model.

[0005] In a first aspect, the embodiments of this specification provide an information processing method based on a large model, including:

[0006] Acquire a user input phrase, and determine a target user need from a preconfigured user need set according to the user input phrase, wherein each user need in the user need set has a tool set associated therewith, and the tools included in the tool sets associated with different user needs are not completely the same;

[0007] Determining a target tool from a set of tools associated with the target user needs using a generative model;

[0008] The target tool is called to execute the target task corresponding to the user input phrase, and the task execution result is returned to the user.

[0009] In some implementations, obtaining a user input phrase and determining a target user need from a preconfigured user need set according to the user input phrase includes:

[0010] Generate a first query phrase based on the user input phrase and the user requirement set;

[0011] The first query phrase is input into the generative model to obtain the target user demand output by the generative model.

[0012] In some implementations, the determining a target tool from a tool set associated with the target user requirement using a generative model includes:

[0013] Acquire a target toolset associated with the target user's needs;

[0014] generating a second query phrase based on the user input phrase, the target user requirement, and the target toolset;

[0015] The second query phrase is input into the generative model to obtain the target tool output by the generative model.

[0016] In some implementations, calling the target tool to execute the target task corresponding to the user input phrase and returning the task execution result to the user includes:

[0017] Acquire one or more execution parameters required for calling the target tool, and a parameter value of each execution parameter included in the user input phrase;

[0018] Based on the parameter value of each execution parameter, the target tool is called to execute the target task, and the task execution result is returned to the user.

[0019] In some implementations, the process of obtaining the parameter value of each execution parameter included in the user input phrase includes:

[0020] The user input phrase is input into the generative model, and the parameter value including the execution parameter in the user input phrase is extracted by using the generative model.

[0021] In some implementations, the user input phrase includes user input phrases of multiple rounds of dialogue; and obtaining the user input phrase and determining the target user demand from a preconfigured user demand set according to the user input phrase includes:

[0022] Acquire a user input phrase in a first round of dialogue, and determine the target user demand from the user demand set according to the user input phrase in the first round of dialogue;

[0023] The method further comprises:

[0024] In response to user input phrases according to the current round of dialogue and historical dialogues before the current round of dialogue, a parameter value of each execution parameter required by the target tool is obtained, and the current round of dialogue is determined as a dialogue that ends with the target user's needs.

[0025] In some implementations, the user input phrase includes a user input phrase of multiple rounds of dialogue; and the process of obtaining the parameter value of each execution parameter included in the user input phrase includes:

[0026] In response to the failure to obtain a parameter value of each execution parameter according to the user input phrase of the first round of dialogue, obtaining a target dialogue rewriting text corresponding to the target tool from a pre-configured dialogue rewriting text set, wherein the target dialogue rewriting text includes each execution parameter corresponding to the target tool;

[0027] Generate a third query phrase based on the target dialogue rewritten text and the user input phrase of the first dialogue, and input the third query phrase into the generative model to obtain a first answer text output by the generative model, wherein the first answer text includes various execution parameters corresponding to the target tool;

[0028] Acquire user input phrases of multiple rounds of dialogue generated by the user according to the first answer text, and determine a parameter value of each execution parameter according to the user input phrases of the multiple rounds of dialogue.

[0029] In a second aspect, the embodiments of this specification provide an information processing device based on a large model, including:

[0030] an acquisition module configured to acquire a user input phrase, and determine a target user need from a preconfigured user need set according to the user input phrase, wherein each user need in the user need set has a tool set associated therewith, and the tools included in the tool sets associated with different user needs are not completely the same;

[0031] A tool determination module is configured to determine a target tool from a tool set associated with the target user requirement using a generative model;

[0032] The tool calling module is configured to call the target tool to execute the target task corresponding to the user input phrase and return the task execution result to the user.

[0033] In some implementations, the acquisition module is configured to:

[0034] Generate a first query phrase based on the user input phrase and the user requirement set;

[0035] The first query phrase is input into the generative model to obtain the target user demand output by the generative model.

[0036] In some embodiments, the tool determination module is configured to:

[0037] Acquire a target toolset associated with the target user's needs;

[0038] generating a second query phrase based on the user input phrase, the target user requirement, and the target toolset;

[0039] The second query phrase is input into the generative model to obtain the target tool output by the generative model.

[0040] In some implementations, the tool calling module is configured to:

[0041] Acquire one or more execution parameters required for calling the target tool, and a parameter value of each execution parameter included in the user input phrase;

[0042] Based on the parameter value of each execution parameter, the target tool is called to execute the target task, and the task execution result is returned to the user.

[0043] In some implementations, the tool calling module is configured to:

[0044] The user input phrase is input into the generative model, and the parameter value including the execution parameter in the user input phrase is extracted by using the generative model.

[0045] In some implementations, the user input phrase includes user input phrases of multiple rounds of dialogue, and the acquisition module is configured to: acquire the user input phrase of the first round of dialogue, and determine the target user demand from the user demand set based on the user input phrase of the first round of dialogue.

[0046] In some implementations, the tool calling module is configured to:

[0047] In response to user input phrases according to the current round of dialogue and historical dialogues before the current round of dialogue, a parameter value of each execution parameter required by the target tool is obtained, and the current round of dialogue is determined as a dialogue that ends with the target user's needs.

[0048] In some implementations, the user input phrase includes a user input phrase of a multi-round conversation, and the tool calling module is configured to:

[0049] In response to the failure to obtain a parameter value of each execution parameter according to the user input phrase of the first round of dialogue, obtaining a target dialogue rewriting text corresponding to the target tool from a pre-configured dialogue rewriting text set, wherein the target dialogue rewriting text includes each execution parameter corresponding to the target tool;

[0050] Generate a third query phrase based on the target dialogue rewritten text and the user input phrase of the first dialogue, and input the third query phrase into the generative model to obtain a first answer text output by the generative model, wherein the first answer text includes various execution parameters corresponding to the target tool;

[0051] Acquire user input phrases of multiple rounds of dialogue generated by the user according to the first answer text, and determine a parameter value of each execution parameter according to the user input phrases of the multiple rounds of dialogue.

[0052] In a third aspect, an embodiment of the present specification provides an electronic device, including:

[0053] Processor; and

[0054] A memory stores computer instructions, wherein the computer instructions are used to enable a processor to execute the method described in any of the above embodiments.

[0055] In a fourth aspect, an embodiment of this specification provides a computer program product, which, when executed by a processor, implements the method described in any of the above embodiments.

[0056] The information processing method of the implementation mode of this specification includes determining the target user demand from a pre-configured user demand set according to a user input phrase, and using a generative model to determine the target tool from a tool set associated with the target user demand, calling the target tool to perform the target task and returning the task execution result to the user. In the implementation mode of this specification, the user intention can be limited to a given user demand by introducing a user demand set, thereby improving the recognition accuracy of the user's general intention or fuzzy intention. Moreover, in the tool set of different user needs, only the system tools related to it are configured, and other irrelevant system tools are not included. It will not be limited by the length of the model input text, and the system tool has good scalability. Moreover, irrelevant information is greatly reduced, making it easier for large models to extract useful information and improving the accuracy and efficiency of model tool calls. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is an architectural diagram of an intelligent agent system in an exemplary embodiment of this specification.

[0058] Figure 2 It is a schematic diagram of a client page of an intelligent agent system in an exemplary implementation manner of this specification.

[0059] Figure 3 is a flowchart of an information processing method in an exemplary embodiment of this specification.

[0060] Figure 4 is a flowchart for determining target user needs in an exemplary implementation of this specification.

[0061] Figure 5 is a flowchart of determining a target tool in an exemplary embodiment of this specification.

[0062] Figure 6 is a flowchart of calling a target tool in an exemplary embodiment of this specification.

[0063] Figure 7 is a block diagram of the structure of an information processing device in an exemplary embodiment of this specification.

[0064] Figure 8 is a structural block diagram of an electronic device in an exemplary embodiment of this specification. DETAILED DESCRIPTION

[0065] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0066] Large models refer to large language models (LLMs), which are generative models based on deep neural networks. The characteristics of large models include large parameter scale and pre-training. Large models have hundreds of millions to hundreds of billions of model parameters, which are used to capture complex patterns and relationships in natural language. Large models are usually pre-trained on large-scale general data, and only need to be fine-tuned with a small amount of task scenario data to adapt to natural language processing tasks in various scenarios.

[0067] An artificial intelligence agent (AI agent) is a program or device that is built on a large model and can autonomously perceive, make decisions, and execute tasks. With the continuous development of AI technology, AI agents are being used in more and more scenarios, such as intelligent customer service, intelligent assistants, and intelligent robots.

[0068] Among them, Large Model Tool Invocation is an important part of the intelligent agent to connect the large model dialogue with the system capabilities. Large Model Tool Invocation means that the large model can call various system tools through the programming interface (API, Application Programming Interface) or call functions, thereby giving the large model the ability to autonomously perform various user tasks and simplifying the complexity of the interaction between the user and the system.

[0069] For example, in a system development scenario, a developer user wants to create a development machine. In the conventional solution, the user needs to manually call the software tool for creating the machine and fill in the corresponding machine parameters to complete the machine creation. In the AI ​​agent-based solution, the user can input "Help me create a development machine, the machine parameters are as follows: ..." to the intelligent assistant, so that the intelligent agent system can use the large model to autonomously call the software tool for creating the machine and extract the machine parameters to complete the machine creation task, which greatly simplifies the developer's operation.

[0070] In related technical solutions, in order to implement the large model tool call, the user input text and the system tool list are generally assembled into an AI prompt word (Prompt) and input into the large model. Then the large model recognizes the user's intention based on its own natural language understanding ability, selects the tool that matches the user's intention from the system tool list, and extracts the parameters contained in the user input text and returns them to the system. The system calls the tool based on the parameters extracted by the large model to complete the task and return the result to the user. However, in actual engineering performance, the effect of large model tool call is not good.

[0071] For example, in some cases, the large model cannot accurately identify the user's intention, and recognizes the user's intention as a normal conversation, thus returning information irrelevant to the user. For example, if the user inputs "I need a development machine now", the large model cannot recognize the user's intention to create a new machine, and recognizes the user's intention as a normal conversation, returning a text result such as "If you need a development machine, here are some established configurations and software:...", and will not correctly call the system tool. The user needs to repeatedly modify the input text, such as modifying the input text to "Help me create a new development machine", before the large model can correctly recognize the user's intention.

[0072] For example, in some cases, the large model cannot correctly select the tool to be called, especially for system tools with similar functions or descriptions, and often misidentification occurs. Or, even if the system tool to be called can be correctly identified, the parameters extracted from the user input text are missing or wrong, resulting in the inability to correctly call and run the system tool, resulting in incorrect task execution or user feedback. For example, for functions such as machine restart and machine creation, users have very high requirements for accuracy. Once the large model gives an incorrect participation, the user needs to pay a higher cost to correct it, which greatly reduces the user experience.

[0073] In addition, in the above-mentioned related technical solutions, the user input text needs to be combined with the system tool list and input into the big model. For some complex systems, the system includes a large number of tools, resulting in a large amount of tool description text in the tool list. Limited by the length limit of the big model text context, when the number of tools reaches a certain number, new tools cannot be added, which further limits the system's scalability and tool calling capabilities.

[0074] Based on this, the implementation methods of this specification provide an information processing method, device, electronic device, storage medium and computer program product based on a big model. By introducing a set of user requirements, the categories of user intentions are accurately divided, thereby improving the accuracy of the big model in identifying user intentions, especially for the recognition of general intentions. In addition, only the relevant tool sets are configured for different user needs, further improving the accuracy of the big model tool call and improving the system tool expansion capabilities.

[0075] Figure 1 FIG. 1 shows an architecture diagram of an intelligent agent system according to an exemplary embodiment of the present specification. Figure 1 As shown, the system architecture may include a server 11, a network 12, and several electronic devices, such as a PC (Personal Computer) 13, a mobile phone 14, and the like.

[0076] The server 11 may be a physical server including an independent host, or the server 11 may be a virtual server carried by a host cluster, and the intelligent agent system may run on the server 11 to realize the service end of the system.

[0077] PC 13 and mobile phone 14 refer to some types of electronic devices that can be used by users. Of course, this specification does not limit the types of electronic devices, and they can also be, for example, tablet devices, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), etc. When the intelligent system is running, the client of the system can run on the electronic device to achieve the client level. The client program of the intelligent system can be a native application installed on the electronic device, or the program on the client side can be a small program, a quick application or other similar forms. Of course, when using web page technologies such as HTML5 or similar, the relevant functions can be realized through the page displayed by the browser. The browser here can be an independent browser application or a browser module embedded in certain applications.

[0078] For the network 12 for interaction between electronic devices such as PC 13 and mobile phone 14 and server 11, a wired or wireless network can be selected to achieve communication based on the communication mode supported by the corresponding electronic device, and this specification does not limit this. For example, PC 13 can support both wired and wireless communication, so a wired or wireless network can be used to achieve communication as needed, while mobile phone 14 usually only supports wireless communication, so a wireless network can be used to achieve communication.

[0079] Figure 2 The client page of the agent system in an exemplary embodiment of this specification is shown. Figure 2 As shown, the client user can input text information through the client page, so that the client sends the text information input by the user to the server, and the server executes one or more method steps of the following implementation of the present disclosure to realize the corresponding functions.

[0080] In one example, taking a database development system as an example, the development system provides a large number of system tools and provides an API programming interface for calling these system tools. In the development environment, developers need to call different system tools to achieve different business needs, so they can call the required system tools by calling the API interface.

[0081] In the implementation of this specification, based on the application scenario of the intelligent agent system, user requirements can be classified, summarized and extracted in advance, and a corresponding user requirement set can be constructed. It can be understood that user requirements can be selected based on the experience of artificial experts and combined with the specific application scenario requirements. The user requirement set is the set of all user requirements for the intelligent agent system.

[0082] For example, in the aforementioned database development system, common user needs may include: machine query, such as querying the machine list of a specific application or environment; machine restart, such as restarting the machine based on the IP address or domain name; machine creation, such as creating a new machine based on application name, deployment environment, quantity and other parameters; debug port control, such as turning the debug function on or off; machine detail viewing, such as viewing the detailed information of the machine; problem diagnosis, such as viewing the machine information or work order ID for diagnosis of machines with application startup failures or abnormal processes.

[0083] In the implementation mode of this specification, multiple user requirements can be pre-configured according to the actual requirements of the above-mentioned users, and a user requirement set can be constructed based on these user requirements. For example, in one example, the pre-configured user requirement set can be expressed as: {query machine: ...; create machine: ...; restart machine: ...; delete machine: ...; ...; other}, that is, the user requirement set includes multiple user requirements, such as query machine, create machine, restart machine, etc. In addition, it can further include description information corresponding to each user requirement, and the description information refers to the text content describing the user requirement. Those skilled in the art can understand this, and the above examples are replaced by ellipsis.

[0084] In the implementation manner of this specification, the purpose of constructing a user demand set includes at least the following two aspects:

[0085] 1) Help the big model to accurately understand the user’s possible general or ambiguous intent.

[0086] For example, in one example, the user inputs the text "Help me create a development machine". In this case, the big model can better understand that the user's intention is to create a machine. If the user inputs the text "I need a new development machine" or "My current development machine is not enough", the big model may have hallucination problems for such general intent expressions, and thus fail to accurately identify that the user's intention is to create a machine.

[0087] Therefore, in the implementation manner of this specification, using the constructed user requirement set, the user requirement set can be input into the big model together with the user input text, so that the big model selects the most matching target user requirement from the user requirements given by the user requirement set. Due to the restriction effect of the user requirement set, the big model can accurately identify the user intention and obtain the target user requirement that best meets the user intention.

[0088] For example, in the above example, no matter what form of expression the user uses to input the text, since the big model is restricted to selecting only from a given set of user requirements, the big model can accurately understand that the target user requirement that best meets the user's intention is "create a machine."

[0089] 2) Classify and package system tools according to different user requirements to obtain the tool set associated with each user requirement.

[0090] It is understandable that there are often a large number of system tools, and different tools implement different functions. Therefore, for a certain user demand, there may be only one or a few system tools needed to implement the user demand, and the remaining large number of system tools are irrelevant tools.

[0091] For example, if the user demand is to "restart the machine", in order to restart the machine, the system tools that need to be called only include "restart tool" and "replace tool". At this time, other system tools are irrelevant tools for the user demand of "restarting the machine". In the aforementioned related technical solutions, the list of all system tools and the user input text are given to the large model together. At this time, there are a large number of system tools in the tool list that are irrelevant to the user demand. These system tools, on the one hand, occupy a large amount of text content, slowing down the speed of the large model, and on the other hand, introduce a large amount of irrelevant noise as interference information, causing the model accuracy to decrease.

[0092] Therefore, in the implementation of this specification, after constructing the user requirement set, it is necessary to configure the tool set associated with each user requirement in the user requirement set. Taking any user requirement as an example, each tool included in the tool set corresponding to the user requirement represents a system tool related to realizing the user requirement.

[0093] It is worth noting that the tool set corresponding to the user requirements may include one tool or multiple tools. Moreover, the tools included in the tool sets associated with different user requirements are not exactly the same. For example, in one example, the user requirement set and tool set of the implementation method of this specification may be shown in Table 1 below:

[0094] Table 1 User requirements set and tool set

[0095]

[0096] In the example of Table 1, user requirement 1 to user requirement n represent n user requirements included in the user requirement set, where n is an integer and n≥1. The system tool list corresponding to each user requirement is the tool set associated with the user requirement. For example, taking user requirement 1 as an example, the tool set associated with it is {Tool 1: ...; Tool 2: ...; Tool 4: ...; ...}, which means that the system tools related to realizing user requirement 1 include Tool 1, Tool 2, Tool 4, ...

[0097] By configuring an associated toolset for each user requirement, when using a large model to call tools, only the system tools in the toolset associated with the user requirement can be given to the large model. This can not only reduce a large amount of prompt text and speed up model processing, but also avoid interference from other irrelevant tools and improve tool calling accuracy.

[0098] After configuring the user requirements set and tool set of the system through the above process, the information processing method described below in this specification can be executed to implement the system tool calling process based on the large model. Figure 3 Provide explanation.

[0099] like Figure 3 As shown, in some embodiments, the information processing method exemplified in this specification includes:

[0100] S310: Acquire a user input phrase, and determine a target user need from a pre-configured user need set according to the user input phrase.

[0101] Combination Figure 2 As shown, the user can input text in the client of the intelligent system, so that the system can obtain the text content input by the user, which is the user input phrase in this specification. After obtaining the user input phrase, the intent can be identified according to the user input phrase, and the target user demand can be selected from the user demand set configured above.

[0102] For example, in one example, the user input phrase may be "Help me create a new development machine", and the target user demand is determined to be "create a machine" from the user demand set configured in the previous text according to the user input phrase.

[0103] In some implementations, the user input text may be identified through an NLP (Natural Language Processing) algorithm to obtain the user intent, and then similarity matching is performed on each user requirement in the user requirement set based on the user intent, and the user requirement with the highest similarity is selected as the target requirement. NLP algorithms include but are not limited to rule engines, keyword matching, decision trees, etc. Those skilled in the art can understand and fully implement them by referring to relevant technologies, and this specification will not elaborate on them.

[0104] In other embodiments, the agent system can construct a prompt based on the user input phrase and the user demand set, and then use the large model to identify the user demand and determine the target user demand from the user demand set. Figure 4 This process is described.

[0105] like Figure 4 As shown, in some implementations, the information processing method exemplified in this specification, the process of determining the target user needs from the user needs set includes:

[0106] S311: Generate a first query phrase based on a user input phrase and a user requirement set.

[0107] S312: Input the first query phrase into the generative model to obtain the target user demand output by the generative model.

[0108] In the implementation mode of this specification, the generative model is a large model. The specific model type of the generative model is not limited in this specification. It can adopt any general large model suitable for implementation, such as ChatGPT, Tongyi Qianwen, Wenxin, etc. The first query phrase is the AI ​​prompt word (prompt) input into the large model. The purpose of the first query phrase is to limit the large model to select the target user demand that best matches the user intention from the user demand set. Therefore, it is necessary to jointly generate the first query phrase based on the user input phrase and the user demand set.

[0109] For example, in one example, the user input phrase is "help me apply for a development machine", and the user requirement set is {create machine; restart machine; delete machine; query machine; other}. At this time, the first query phrase generated according to the user input phrase and the user requirement set can be, for example:

[0110] "Please determine the user's needs based on the user's input. Please select and return the user's needs from the following user needs set. The user needs set is {create a machine; restart a machine; delete a machine; query a machine; other}. Do not return other information. The user input is: Help me apply for a development machine."

[0111] After obtaining the first query phrase, the first query phrase can be input into the large model, and then the target user demand output by the large model is obtained.

[0112] From the above examples, we can see that the user intent can be limited to given user needs through the user need set, so that for the large model, both the more precise user intent and the more vague general intent can be well identified. For example, whether the user input phrase is "help me apply for a development machine" in the above example, or "I need a development machine" or "I don't have enough development machines now", the large model can identify the user intent as creating a machine, and output the target user need as "create a machine".

[0113] S320: Determine a target tool from a tool set associated with target user requirements using a generative model.

[0114] In the implementation manner of this specification, after the system obtains the target user's needs, the target user's needs do not need to be returned to the client user, but a tool set associated with the target user's needs is determined based on the target user's needs.

[0115] As can be seen from the example in Table 1 above, each user requirement is associated with a corresponding toolset, and the system tools included in the toolset are system tools related to realizing the user requirement.

[0116] Therefore, after obtaining the target user needs, the tool set associated with the target user needs can be determined as the target tool set, and then the target tool to be called from the target tool set can be determined using the large model. Figure 5 The implementation method describes this process.

[0117] like Figure 5 As shown, in some embodiments, the information processing method exemplified in this specification, the process of determining the target tool from the target tool set includes:

[0118] S321. Obtain a target toolset associated with target user needs.

[0119] S322: Generate a second query phrase based on the user input phrase, target user requirements, and target toolset.

[0120] S323: Input the second query phrase into the generative model to obtain the target tool output by the generative model.

[0121] In this example, after determining the target user's needs, the toolset related to the target user's needs can be determined as the target toolset as shown in Table 1. Then, the target tool can be selected from the target toolset according to the user input phrase and the target user's needs.

[0122] In some embodiments, a generative model can be used to select a target tool from a target tool set, so that the target tool can be selected by the aforementioned Figure 4 The implementation method constructs a similar process to the first query phrase. First, a second query phrase is generated based on the user input phrase, target user needs, and target tool set. The second query phrase is an AI prompt that calls the large model to determine the target tool.

[0123] For example, in one example, the user input phrase is "help me apply for a development machine", the target user demand is "create a machine", and the target tool set is {tool a: ...; tool b: ...; tool c: ...}. At this time, the generated second query phrase can be, for example:

[0124] "Please select the system tools to be called according to the user input and user needs, and extract the corresponding execution parameters from the user input. Please select the system tools from the target tool set below and return them. The target tool set is {tool a: ...; tool b: ...; tool c: ...}. Do not return other information. The user input is: Help me apply for a development machine.

[0125] User requirements are: create a machine. "

[0126] After the second query phrase is obtained, the second query phrase can be input into the large model, and then the target tool outputted by the large model is obtained.

[0127] From the above examples, we can see that the second query phrase only includes system tools related to the target user's needs, and does not include other irrelevant system tools. Therefore, compared with the solution in the related art that all system tool lists are input into the large model, the text content of the second query phrase in the solution of this specification is greatly reduced. Even if more tools are added, the length limit of the model context text will not be exceeded, and the system tools have good scalability. Moreover, irrelevant information is greatly reduced, making it easier for the large model to extract useful information and improve the accuracy and efficiency of model tool calls.

[0128] S330: Call the target tool to execute the target task corresponding to the phrase input by the user, and return the task execution result to the user.

[0129] In the implementation manner of this specification, after the system obtains the target tool output by the large model, it can call the target tool to execute the target task corresponding to the user input phrase, and then return the task execution result to the client user.

[0130] It is worth noting that when the system calls the target tool to execute the target task, it generally needs to give one or more execution parameter values. The parameter values ​​of these execution parameters can be extracted from the user input phrase using the large model. Figure 6 The implementation method is described.

[0131] like Figure 6 As shown, in some embodiments, the information processing method exemplified in this specification, the process of calling the target tool to perform the target task, includes:

[0132] S331. Obtain one or more execution parameters required for invoking the target tool, and a parameter value of each execution parameter included in the user input phrase.

[0133] S332. Based on the parameter value of each execution parameter, the target tool is called to execute the target task, and the parallel user returns the task execution result.

[0134] It is understandable that when calling each system tool, the user needs to manually configure some parameter values, which are the execution parameters required to call the tool. In the implementation of this specification, after determining the target tool through the aforementioned method process, the system can determine the required execution parameters based on the target tool, and then extract the parameter values ​​corresponding to these execution parameters from the user input phrase.

[0135] For example, in an example, the target tool is "Create machine", and the task execution parameters corresponding to the target tool may include: machine name, logical address, number of machines, and the parameter values ​​corresponding to these execution parameters need to be extracted from the user input phrase.

[0136] For example, in one example, the user input phrase is "Please help me create a development machine with the machine name XXX and the logical address YYY". Combined with the aforementioned second query phrase, the big model can extract the execution parameters from the user input phrase while determining the target tool. The parameter values ​​of the execution parameters are: machine name XXX, logical address YYY, and the number of machines is 1.

[0137] Then, the system can call the target tool and configure it based on the parameter values ​​of the execution parameters to realize the execution of the target task and return the task execution result to the client user. For example, in an example, after calling the target tool "Create machine" and completing the target task of creating a machine through the execution parameters of the above example, you can Figure 2 The client interface shown returns to the user "A new development machine has been successfully created for you, machine name: XXX, logical address YYY, you can click the link below to operate: ...".

[0138] Of course, it is understandable that in some cases, a single round of user input phrases may not contain execution parameters, or may only contain some execution parameters, so that the parameter values ​​of all execution parameters cannot be extracted based on a single round of user input phrases. In this case, the system can return prompt information to the user based on the missing execution parameters, such as "Please provide the machine name and logical address of the newly created machine", and then extract the parameter values ​​of each execution parameter based on the user input phrases of multiple consecutive rounds. This process is described in detail in the implementation method later in this specification.

[0139] From the above, it can be seen that in the implementation mode of this specification, by introducing a set of user requirements, the user intention can be limited to a given user requirement, thereby improving the recognition accuracy of the user's general intention or fuzzy intention. Moreover, the tool set for different user requirements only configures the system tools related to it, and does not include other irrelevant system tools. Compared with the solution of inputting all system tool lists into a large model in the related technology, the text content of the second query phrase in the solution of this specification is greatly reduced. Even if more tools are added, the length limit of the model context text will not be exceeded, and the system tool has good scalability. Moreover, irrelevant information is greatly reduced, making it easier for the large model to extract useful information and improve the accuracy and efficiency of model tool calls.

[0140] In some scenarios, considering that user conversations are often multi-round conversations, if the above user demand identification process is performed for each round of user conversations, the system request volume will increase dramatically, and the response speed to user requests will be slow. Moreover, in related technical solutions, when large models understand user intentions in context, they often easily associate conversations with different user intentions together, thereby giving erroneous results.

[0141] For example, in an example scenario, the multi-round dialogue between the user and the agent system is as follows:

[0142] "User Session 1: Please help me check my machine and give me the IP information.

[0143] Model answer 1: The result has been found for you. Your machine IP is 192.168.0.1.

[0144] User Session 2: I have a machine problem, please help me restart the machine. ”

[0145] In this example, the user intention in user session 1 is to "query the IP address of my own machine". At this time, the big model can understand the user intention very well and give the correct model answer 1. In user session 2, the user intention needs to restart a machine, which is not the machine in user session 1. However, the big model combined with user session 1 will identify the machine that needs to be restarted as the machine in user session 1, thereby erroneously triggering the machine restart operation.

[0146] Therefore, in some implementations of this specification, for multiple rounds of conversations under the same user demand, the user demand is only identified in the first round of conversation, and the user demand is no longer identified in subsequent rounds of conversation. To achieve this purpose, the user demand needs to be truncated.

[0147] By truncating user needs, on the one hand, for multiple rounds of conversations under the same user need, repeated identification of user needs can be avoided, the system request volume can be reduced, and the response speed can be improved. On the other hand, in the above example, by truncating user needs, the large model can identify that user session 2 has generated new user needs. At this time, the above method process is executed according to the new user needs to avoid being affected by historical conversations and improve accuracy.

[0148] In order to achieve the truncation of user needs, it can be judged based on whether the system tool corresponding to the user needs is correctly called and generates task execution results. For example, for the user need of "query machine", if the system has correctly called the machine query tool and returned the corresponding query results, the target task has been completed, indicating that the user need has ended, so it can be determined that the user need of "query machine" has been truncated. For the text content entered by the subsequent user, the user need needs to be re-identified.

[0149] On the contrary, if the system fails to call the machine query tool correctly (for example, some execution parameters are missing), it means that the user demand has not been completed, and the answer providing the execution parameters can be returned to the user. The text content that the user continues to enter does not need to be identified as the user demand has not been truncated at this time, and the user input text in subsequent rounds of dialogue also corresponds to the user demand of the "query machine".

[0150] Based on this idea, in some implementations of this specification, whether the current target user demand has been terminated can be determined based on whether all parameter values ​​of the execution parameters required to call the target tool have been obtained.

[0151] For example, in one example, the multi-round dialogue between the user and the agent system is as follows:

[0152] “

[0153] User Session 1: Help me create a new development machine.

[0154] Model Answer 1: OK, please provide the machine name.

[0155] User session 2: The name is abc.

[0156] Model Answer 2: OK, please provide the logical address.

[0157] User session 3: Logical address is xyz.

[0158] Model answer 3: OK, a new machine has been created for you. The machine name is abc and the logical address is xyz. You can click the link below to access...

[0159] User Session 4: I have a machine that needs to be rebooted.

[0160] Model Answer 4: OK, please provide the IP address of the machine you need to reboot.

[0161] User session 5: The IP address is 192.168.0.2.

[0162] Model answer 5: OK, we have restarted your machine for you.

[0163] ”

[0164] In this example, the first round of user input phrase is "User Session 1: Help me create a new development machine." Then refer to the above Figure 3 The method process of the implementation method first determines the target user demand as "create machine" from the user demand set, and then determines the target tool as "create machine" from the tool set corresponding to the target user demand.

[0165] In order to call the target tool "Create machine", three execution parameters need to be provided: machine name, logical address, and quantity. The large model extracts the parameter value of the execution parameter "quantity" as "1" based on the user input phrase (that is, user session 1), but the parameter values ​​of the execution parameters "machine name" and "logical address" are still missing. Then, the system can return the answer to the user to provide other missing execution parameters, and obtain the parameter values ​​of the execution parameters "machine name" and "logical address" through user session 2 and user session 3.

[0166] During this process, for user session 2 and user session 3, since the system has not obtained the parameter value of each execution parameter required to call the target tool at this time, it means that the user demand "create a machine" is not terminated. Therefore, after user session 2 and user session 3 are entered into the system, the process of determining the target user demand from the user demand set in the aforementioned S310 will not be repeated, but the parameter values ​​of the execution parameters will continue to be extracted according to user session 2 and user session 3.

[0167] Until the parameter values ​​of all execution parameters required by the target tool are obtained, it means that the target tool can be called correctly, and thus the target task can be executed. Then it can be determined that the last round of dialogue is the dialogue that ends with the target user's needs. After the target task is executed, the task execution result can be returned to the user.

[0168] For example, in the above example, the parameter values ​​of all execution parameters can be obtained according to user session 3, so the target tool "Create machine" is called according to the parameter values ​​of these execution parameters, and the target task of creating a machine is executed, and the task execution result (that is, model answer 3) is returned to the user. At this time, the target user's demand "Create machine" is completed. The conversation corresponding to model answer 3 is the dialogue that ends the demand, that is, the multi-round dialogue corresponding to "user session 1 to model answer 3" is the dialogue of the target user's demand "Create machine".

[0169] The user continues to input "User Conversation 4: I have a machine that needs to be restarted". Since the user demand "Create a machine" in the previous round of conversation has expired, it means that this round of conversation is the first round of conversation corresponding to the new user demand. Therefore, the system refers to the previous Figure 3 The method process of the implementation method first determines a new target user requirement as "restart machine" from the user requirement set, and then determines a target tool as "reset machine" from the tool set corresponding to the target user requirement.

[0170] In this example, in order to call the target tool "Reset machine", it is necessary to provide the execution parameter "machine ip". Through the aforementioned method process, a multi-round dialogue process such as "user conversation 4 ~ model answer 5" in the example is generated, and the user demand "reset machine" is terminated. For this specific process, those skilled in the art can undoubtedly understand and fully implement it in combination with the above, and this specification will not repeat it.

[0171] As can be seen from the above example, for the multi-round dialogue of "User Conversation 1 ~ Model Answer 3", only the first round of dialogue will identify the user needs, and for the subsequent multi-round dialogue, due to the mechanism of user demand truncation, the process of user demand identification will not be repeated, thereby reducing the number of large model accesses and improving the response speed. Moreover, for the newly generated "User Conversation 4", since the user demand "Create a Machine" has been terminated before, "User Conversation 4" indicates that a new user demand has been generated, and the aforementioned method steps are repeated to call the tool and execute the task for the new user demand, without combining historical conversations to produce erroneous execution results, thereby improving the system accuracy.

[0172] In some scenarios, see the following examples of multi-turn dialogue:

[0173] “

[0174] User Session 1: Help me create a new development machine.

[0175] Model Answer 1: OK, please provide the machine name.

[0176] User session 2: The name is abc.

[0177] Model Answer 2: OK, please provide the logical address.

[0178] User session 3: Logical address is xyz.

[0179] Model answer 3: OK, a new machine has been created for you. The machine name is abc and the logical address is xyz. You can click the link below to access...

[0180] ”

[0181] In this example, in the process of calling the target tool "Create machine" to execute the target task, the large model extracts the parameter value of the execution parameter "quantity" as "1" based on user session 1. When configuring the target tool, the system finds that the execution parameter "machine name" is missing, and thus returns model answer 1 to the user. The user continues to provide user session 2, and the large model extracts the parameter value of the execution parameter "machine name" as "abc" based on user session 2. The system continues to configure the target tool and finds that the execution parameter "logical address" is still missing, and thus returns model answer 2 to the user. The user continues to provide user session 3, and the large model extracts the parameter value "xyz" corresponding to the execution parameter "logical address" based on user session 3, thereby obtaining the parameter values ​​of all execution parameters. The system configures the target tool and completes the execution of the target task, and returns the task execution result of model answer 3 to the user.

[0182] It can be seen that in this process, the system needs to continuously initiate conversations with the user to provide parameters through multiple rounds of dialogue. The user does not know in advance what parameters are needed to call the target tool, nor does he know how many times he needs to supplement the parameters before he can officially start the task, resulting in a very poor user experience.

[0183] Therefore, in some implementations of this specification, for different system tools, corresponding dialogue rewriting texts can be pre-configured based on the execution parameters required by the system tools, and the dialogue rewriting text includes the execution parameters required to call the system tool. The purpose of setting the dialogue rewriting text is to generate AI prompt words based on the dialogue rewriting text, so as to tell the big model all the execution parameters required to call a certain system tool, so as to feedback the required execution parameters to the user at one time, and improve the user experience.

[0184] For example, taking the system tool "Create machine", the execution parameters required to call the tool include: machine name, logical address, quantity. Therefore, the dialogue rewriting text for the tool can be generated in advance, and the dialogue rewriting text is, for example:

[0185] “User session: Please help me create a machine. I will provide the parameter values ​​for machine name, logical address and number of machines.

[0186] The model responds: “Ok, once I have the values ​​for the machine name, logical address, and number of machines, I will call the system tool that creates the machine.”

[0187] The above-mentioned dialogue rewriting text can be understood as a set conversation. The purpose of setting the conversation is: when the target tool is determined to be a creation machine, the above-mentioned dialogue rewriting text and the user input phrase are input into the big model together, so that the big model can know which execution parameters are required to call the tool, and feedback the missing execution parameters to the user at one time without the need for multiple rounds of conversations.

[0188] For example, in one example, the user input phrase for the first round of dialogue is: "User Session 1: Help me create a new development machine.".

[0189] In the method process of the above implementation, the target tool is determined to be "Create machine", and then the dialogue rewriting text corresponding to the tool is obtained, that is, the target dialogue rewriting text. After that, an AI prompt word is generated according to the target dialogue rewriting text and the user input phrase of the first round of dialogue, that is, the third query phrase. The third query phrase is, for example:

[0190] “User session: Please help me create a machine. I will provide the parameter values ​​for machine name, logical address and number of machines.

[0191] Model Answer: OK, once the parameter values ​​for machine name, logical address and number of machines are obtained, I will call the system tool to create the machine.

[0192] User Session 1: Help me create a new development machine."

[0193] In the third query phrase of this example, the target dialogue rewrite text is the set dialogue, which is invisible to the user. User conversation 1 is the text actually input by the user. The third query phrase of the above example is input into the big model, and the big model can generate the first answer text. The first answer text is, for example:

[0194] "Model answer 1: OK, please provide the machine name and logical address of the new machine."

[0195] It can be seen that in the first answer text, the system can return all the required execution parameters to the user at one time, without obtaining the missing parameters from the process of configuring the target tool by the system. Then, the user can continue to input text content according to the first answer text, and the system can extract the parameter value of each execution parameter from one or more rounds of user input phrases according to the aforementioned method process.

[0196] For example, in this example, the complete process of multi-round dialogue is:

[0197] "User Session 1: Help me create a new development machine.

[0198] Model answer 1: OK, please provide the machine name and logical address of the new machine.

[0199] User session 2: The name is abc and the logical address is xyz.

[0200] Model answer 2: OK, a new machine has been created for you. The machine name is abc and the logical address is xyz. You can click the link below to access... "

[0201] By comparing with the previous examples, it can be seen that in the implementation mode of this specification, for tool calls in multiple rounds of dialogue, by pre-configuring dialogue rewriting texts for different tools, AI prompt words can be generated by combining the corresponding dialogue rewriting texts after the target tool is determined, so that the large model can know the required execution parameters, and thus return the required execution parameters to the user at one time. The user can clearly understand the type of parameters required to be provided without going through multiple rounds of dialogue, which greatly simplifies the tool calling process and improves the user experience.

[0202] In some embodiments, this specification provides an information processing device based on a large model, see Figure 7 As shown, the device comprises:

[0203] The acquisition module 100 is configured to acquire a user input phrase, and determine a target user requirement from a preconfigured user requirement set according to the user input phrase, wherein each user requirement in the user requirement set has a tool set associated therewith, and the tools included in the tool sets associated with different user requirements are not completely the same;

[0204] A tool determination module 200 is configured to determine a target tool from a tool set associated with the target user's needs using a generative model;

[0205] The tool calling module 300 is configured to call the target tool to execute the target task corresponding to the user input phrase, and return the task execution result to the user.

[0206] In some implementations, the acquisition module 100 is configured to:

[0207] Generate a first query phrase based on the user input phrase and the user requirement set;

[0208] The first query phrase is input into the generative model to obtain the target user demand output by the generative model.

[0209] In some implementations, the tool determination module 200 is configured to:

[0210] Acquire a target toolset associated with the target user's needs;

[0211] generating a second query phrase based on the user input phrase, the target user requirement, and the target toolset;

[0212] The second query phrase is input into the generative model to obtain the target tool output by the generative model.

[0213] In some implementations, the tool calling module 300 is configured to:

[0214] Acquire one or more execution parameters required for calling the target tool, and a parameter value of each execution parameter included in the user input phrase;

[0215] Based on the parameter value of each execution parameter, the target tool is called to execute the target task, and the task execution result is returned to the user.

[0216] In some implementations, the tool calling module 300 is configured to:

[0217] The user input phrase is input into the generative model, and the parameter value including the execution parameter in the user input phrase is extracted by using the generative model.

[0218] In some implementations, the user input phrase includes user input phrases of multiple rounds of dialogue, and the acquisition module 100 is configured to: acquire the user input phrase of the first round of dialogue, and determine the target user demand from the user demand set based on the user input phrase of the first round of dialogue.

[0219] In some implementations, the tool calling module 300 is configured to:

[0220] In response to user input phrases according to the current round of dialogue and historical dialogues before the current round of dialogue, a parameter value of each execution parameter required by the target tool is obtained, and the current round of dialogue is determined as a dialogue that ends with the target user's needs.

[0221] In some implementations, the user input phrase includes a user input phrase of a multi-round conversation, and the tool calling module 300 is configured to:

[0222] In response to the failure to obtain a parameter value of each execution parameter according to the user input phrase of the first round of dialogue, obtaining a target dialogue rewriting text corresponding to the target tool from a pre-configured dialogue rewriting text set, wherein the target dialogue rewriting text includes each execution parameter corresponding to the target tool;

[0223] Generate a third query phrase based on the target dialogue rewritten text and the user input phrase of the first dialogue, and input the third query phrase into the generative model to obtain a first answer text output by the generative model, wherein the first answer text includes various execution parameters corresponding to the target tool;

[0224] Acquire user input phrases of multiple rounds of dialogue generated by the user according to the first answer text, and determine a parameter value of each execution parameter according to the user input phrases of the multiple rounds of dialogue.

[0225] In some implementations, this specification provides an electronic device, including:

[0226] Processor; and

[0227] A memory stores computer instructions, wherein the computer instructions are used to enable a processor to execute the method described in any of the above embodiments.

[0228] In some embodiments, the present specification provides a computer program product, which implements the method described in any of the above embodiments when executed by a processor.

[0229] Figure 8 is a schematic structural diagram of an electronic device provided by an exemplary embodiment. Figure 8 At the hardware level, the electronic device includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile memory 710, and may also include hardware required for other functions. One or more embodiments of this specification may be implemented based on software, such as the processor 702 reading the corresponding computer program from the non-volatile memory 710 into the memory 708 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

Claims

1. A large model-based information processing method, characterized in that: include: Acquire a user input phrase, and determine a target user need from a preconfigured user need set according to the user input phrase, wherein each user need in the user need set has a tool set associated therewith, and the tools included in the tool sets associated with different user needs are not completely the same; Determining a target tool from a set of tools associated with the target user needs using a generative model; The target tool is called to execute the target task corresponding to the user input phrase, and the task execution result is returned to the user.

2. The method according to claim 1, characterized in that: The acquiring of a user input phrase and determining a target user requirement from a pre-configured user requirement set according to the user input phrase includes: Generate a first query phrase based on the user input phrase and the user requirement set; The first query phrase is input into the generative model to obtain the target user demand output by the generative model.

3. The method according to claim 1, characterized in that The step of using a generative model to determine a target tool from a tool set associated with the target user's needs includes: Acquire a target toolset associated with the target user's needs; generating a second query phrase based on the user input phrase, the target user requirement, and the target toolset; The second query phrase is input into the generative model to obtain the target tool output by the generative model.

4. The method according to any one of claims 1 to 3, characterized in that: The calling of the target tool to execute the target task corresponding to the user input phrase and returning the task execution result to the user includes: Acquire one or more execution parameters required for calling the target tool, and a parameter value of each execution parameter included in the user input phrase; Based on the parameter value of each execution parameter, the target tool is called to execute the target task, and the task execution result is returned to the user.

5. The method according to claim 4, characterized in that The process of obtaining the parameter value of each execution parameter included in the user input phrase includes: The user input phrase is input into the generative model, and the parameter value including the execution parameter in the user input phrase is extracted by using the generative model.

6. The method according to claim 4, characterized in that The user input phrase includes user input phrases of multiple rounds of dialogue; the acquiring the user input phrase and determining the target user demand from a pre-configured user demand set according to the user input phrase includes: Acquire a user input phrase in a first round of dialogue, and determine the target user demand from the user demand set according to the user input phrase in the first round of dialogue; The method further comprises: In response to user input phrases according to the current round of dialogue and historical dialogues before the current round of dialogue, a parameter value of each execution parameter required by the target tool is obtained, and the current round of dialogue is determined as a dialogue that ends with the target user's needs.

7. The method according to claim 4, characterized in that The user input phrases include user input phrases of multiple rounds of dialogues; The process of obtaining the parameter value of each execution parameter included in the user input phrase includes: In response to the failure to obtain a parameter value of each execution parameter according to the user input phrase of the first round of dialogue, obtaining a target dialogue rewriting text corresponding to the target tool from a pre-configured dialogue rewriting text set, wherein the target dialogue rewriting text includes each execution parameter corresponding to the target tool; Generate a third query phrase based on the target dialogue rewritten text and the user input phrase of the first dialogue, and input the third query phrase into the generative model to obtain a first answer text output by the generative model, wherein the first answer text includes various execution parameters corresponding to the target tool; Acquire user input phrases of multiple rounds of dialogue generated by the user according to the first answer text, and determine a parameter value of each execution parameter according to the user input phrases of the multiple rounds of dialogue.

8. An information processing device based on a large model, characterized in that: include: an acquisition module configured to acquire a user input phrase, and determine a target user need from a preconfigured user need set according to the user input phrase, wherein each user need in the user need set has a tool set associated therewith, and the tools included in the tool sets associated with different user needs are not completely the same; A tool determination module is configured to determine a target tool from a tool set associated with the target user requirement using a generative model; The tool calling module is configured to call the target tool to execute the target task corresponding to the user input phrase and return the task execution result to the user.

9. An electronic device, characterized in that: include: processor; and A memory storing computer instructions, wherein the computer instructions are used to enable a processor to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is executed by a processor, the method according to any one of claims 1 to 7 is implemented.