Method and device for constructing AI large model agent

By predicting tool call information and tool description information in the training and inference stages of the AI ​​large model, and combining special identifiers to end the generation process in advance, the performance and accuracy problems of the AI ​​large model agent in the existing technology are solved, and the training efficiency is improved. and response speed, reducing resource consumption and error rates.

CN118569383AActive Publication Date: 2024-08-30PACHIRA INFORAMTION TECH BEIJING CO LTD

Patent Information

Application Number
CN202410618579.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-08-30
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

Existing methods of building AI large model agents face performance and accuracy challenges when handling large-scale tool calls, resulting in slower model training and inference, increased memory usage, and the potential to introduce additional errors.

Method used

In the training and inference phase of the AI ​​​​large model, avoid directly inputting all tool description lists, predict the required tool call information and tool description information through user context and current instructions, and use special identifiers to end the generation process in advance, optimizing the generation process to Improve efficiency and accuracy.

Benefits of technology

It improves the training efficiency of large AI models, reduces resource consumption during inference, reduces the introduction of errors, improves the response speed and accuracy of the model, and reduces system deployment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569383A
    Figure CN118569383A
Patent Text Reader

Abstract

The invention provides a method and device for constructing an AI large model agent, and the method comprises the steps: collecting and integrating API interfaces related to a content provider (CP) or a service provider (SP), and preparing tool calling; an AI large model is constructed and trained, and the generation process of the reasoning stage is optimized; according to the number and complexity of tools, a proper tool input mode is selected, and the tools are input to the AI large model; after receiving the tool information, the AI large model outputs corresponding tool calling information according to the problem and demand of the user; according to the tool calling information, the intelligent agent system calls a corresponding tool to execute operation and obtains returned content; and the AI large model is combined with the returned content obtained after the agent system calls the tool, and the returned content is further analyzed and processed to form an answer to the user question. According to the method, the training efficiency of the AI large model is improved, the consumption of computing resources is reduced, the resource consumption during AI large model reasoning is reduced, and the accuracy of the AI large model intelligent agent is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, in particular, to the field of technology related to AI big models and intelligent agents; specifically, to a method and device for constructing an AI big model intelligent agent. Background Art

[0002] In the field of artificial intelligence, especially natural language processing (NLP) technology, large language models (LLMs) have become an epoch-making milestone. These LLM models have demonstrated a strong ability to understand natural language, images, and even videos through massive training data and a large number of neural network parameters. A notable feature of LLM models is that knowledge is pre-trained into the model, enabling the model to understand and respond to user input.

[0003] However, this pre-training method also brings obvious problems. First, due to the huge number of model parameters and the slow knowledge update speed, the model cannot obtain the latest knowledge and information consultation in real time, which easily generates outdated or inaccurate information. To solve this problem, researchers proposed the concept of AI large model intelligent agent, which enables AI large models to have the ability to call tools, obtain the latest knowledge, and reduce the illusion phenomenon of large models.

[0004] At present, the process of building an AI large model agent can be roughly divided into the following steps:

[0005] 1. Before starting to build an AI big model agent, you first need to prepare a series of tools and parameters, mainly to collect and integrate a series of API interfaces related to CP (Content Provider) or SP (Service Provider). These API interfaces are key external resources for building AI big model agents, which enable agents to access and utilize various online services and information. For example:

[0006] Weather query interface: Get real-time weather information, forecasts, and other climate-related data to answer user queries about the weather.

[0007] Mathematical calculation interface: provides complex mathematical problem solving functions and can process mathematical calculation requests submitted by users.

[0008] Stock query interface: enables AI big models to access stock market data, including real-time stock prices, historical trends, market analysis, etc.

[0009] Hot news interface: Get the latest news headlines, special reports and current affairs commentary to meet users' needs for understanding current affairs.

[0010] Navigation interface: Provides geographic information and path planning services to provide users with navigation guides, traffic status updates and optimal route suggestions.

[0011] 2. Depending on the number and complexity of the tools, the tools are fed into the AI ​​model in two different ways:

[0012] (1) If there are a small number of tools, these tools and their parameters can be directly input into the large AI model. The advantage of this is that the model can quickly understand and use these tools.

[0013] (2) If the number of tools is large and exceeds the context limit of the AI ​​big model, a tool screening module is needed, such as a deep neural network model or RAG technology, to screen out the tools related to the user's instructions. The function of this tool screening module is to select the most relevant parts from a large number of tools based on the user's instructions and needs, and then only input these screened tools into the AI ​​big model. This can ensure the efficiency and accuracy of the model and avoid unnecessary information overload.

[0014] 3. After the AI ​​big model receives the tool information, it outputs the corresponding tool call information according to the user's questions and needs. The tool call information includes which tools need to be used, how to use these tools, and what specific information needs to be obtained.

[0015] 4. According to the tool call information output by the AI ​​big model, the intelligent system calls these tools accordingly, performs corresponding operations, and obtains the return content. This step is the key to realizing the AI ​​big model intelligent function. Through actual tool calls and operations, specific data or results required to solve the problem can be obtained.

[0016] 5. The AI ​​big model combines the returned content obtained after the intelligent system calls the tool, further analyzes and processes it, and finally forms an answer to the user's question. This step reflects the comprehensive processing ability of the AI ​​big model intelligent body, which can not only understand the user's questions, but also use the information provided by various tools to give accurate and useful answers.

[0017] However, the existing methods for building AI large model agents require all tool description lists to be input into the model during AI large model training and reasoning (such as Figure 1 There are some obvious deficiencies, which are specifically manifested in the following two aspects:

[0018] 1. Performance issues caused by a large number of tool calls: In real-world application scenarios, the number of available tool call interfaces may be very large, reaching tens of thousands. If these tool call interfaces are directly input into large AI models, the input context of the model will expand dramatically, resulting in slower model training and model reasoning, and increased memory usage for model training and model reasoning. Especially when using key-value cache (kv cache) technology, the consumption of video memory will increase at a faster rate, posing a challenge to the performance and stability of the system.

[0019] 2. Errors and delays introduced by the screening process: To solve the problem of too many tool calls, the existing method is to use models or retrieval-augmented generation (RAG) and other technologies to screen related tools. However, because the model cannot accurately determine which tools are truly relevant, this screening process may introduce additional errors. In addition, the screening process itself also takes time, which increases the inference time of the large AI model, resulting in a slower overall response speed.

[0020] In summary, existing construction methods face dual challenges of performance and accuracy when handling large-scale tool calls. Therefore, there is an urgent need to find more efficient solutions to optimize the performance of large AI model agents, reduce resource consumption, and improve response speed and accuracy. Summary of the invention

[0021] In view of this, the purpose of the present invention is to propose a method and device based on building an AI big model intelligent agent, which adopts an innovative tool information processing method in the training stage to avoid directly inputting all tool description lists into the AI ​​big model, so that the model can predict the required tool call information and tool description information based on the user context and current instructions; in the reasoning stage, the model outputs the tool call information according to the user context and instruction prediction, and ends the generation process of the AI ​​big model in advance through a special identifier between the tool call information and the tool description information, so as to improve efficiency and response speed, enhance the training efficiency of the AI ​​big model, and reduce resource consumption during reasoning; and improve the accuracy of the AI ​​big model intelligent agent by avoiding the introduction of additional errors in the screening process.

[0022] The present invention provides a method for constructing an AI large model agent, comprising the following steps:

[0023] S1. Collect and integrate API interfaces related to content providers CP or service providers SP, and prepare tool calls; these API interfaces are key external resources for intelligent agents to access and utilize online services and information;

[0024] S2. Build and train large AI models to optimize the generation process in the inference phase;

[0025] The method for training the AI ​​big model includes: in the training process of the AI ​​big model, the tool description list is no longer directly included in the input prompt word, but the AI ​​big model is allowed to predict the required tool call information and tool description information based on the user context and the current instruction; a special character or mark is used as a separator between the generated tool call information and the tool description information, so that the model can effectively associate the user context and the current instruction, the tool call information and the tool description information during the learning process, and fully learn; this method avoids directly inputting all the tool description list information into the AI ​​big model, reduces the input length of the AI ​​big model, and also ensures that the accuracy of the tool call is not affected;

[0026] The method for optimizing the generation process in the inference phase includes: in the inference phase of the AI ​​big model, predicting and outputting tool call information and tool description information according to the user context and the current instruction; during the generation process of the AI ​​big model, when a special identifier between the tool call and the tool description is identified, immediately stopping the generation of more outputs, terminating the generation process of the AI ​​big model in advance, saving processing time and resources, and improving the system response speed;

[0027] Considering that in the actual intelligent system call process, only tool call information is required but not tool description information, the AI ​​large model can be further optimized during the generation process.

[0028] Through these innovative designs, the present invention solves the performance and accuracy challenges faced by the existing AI large model intelligent agent construction method, improves the model training efficiency, reduces resource consumption during reasoning, and keeps the intelligent agent accuracy unaffected;

[0029] S3. Select appropriate tool input methods based on the number and complexity of tools and input the tools into the AI ​​big model;

[0030] S4. After the AI ​​big model receives the tool information, it outputs the corresponding tool calling information according to the user's questions and needs;

[0031] S5. According to the tool call information output by the AI ​​big model, the agent system calls the corresponding tool to perform the operation and obtains the return content. This step is the key step to realize the AI ​​big model agent function;

[0032] S6. The return content obtained by the AI ​​big model combined with the intelligent system calling the tool is further analyzed and processed to form an answer to the user's question.

[0033] Furthermore, the selection of an appropriate tool input method in step S3 includes:

[0034] If there are a small number of tools, choose to directly input the tools and their parameters into the AI ​​big model;

[0035] If there are a large number of tools, the tools related to the user instructions are filtered through the tool filtering module.

[0036] Furthermore, the tool calling information in step S4 includes: which tools need to be used, how to use these tools, and which specific information needs to be obtained.

[0037] Furthermore, the tool screening module includes: a deep neural network model or a retrieval enhancement generation RAG technology.

[0038] The present invention also provides a device for constructing an AI large model intelligent agent, which executes the method for constructing an AI large model intelligent agent as described above, including:

[0039] Tool preparation module: used to collect and integrate API interfaces related to content providers CP or service providers SP, and prepare tool calls;

[0040] Building AI big model agent module: used to build and train AI big models and optimize the generation process in the reasoning stage;

[0041] Tool input module: used to select the appropriate tool input method according to the number and complexity of tools, and input the tools into the AI ​​big model;

[0042] Output tool call information module: used to output corresponding tool call information according to user questions and needs after the AI ​​big model receives the tool information;

[0043] Tool calling module: Based on the tool calling information output by the AI ​​big model, the agent system calls the corresponding tool to perform operations and obtains the return content;

[0044] The module for answering questions based on the returned content is used to further analyze and process the returned content obtained after the AI ​​big model combines with the intelligent system to call the tool, and form answers to user questions.

[0045] Furthermore, the AI ​​large model agent module is constructed including:

[0046] Training AI big model unit: used for not directly including the tool description list in the input prompt word during the training process of the AI ​​big model, but allowing the AI ​​big model to predict the required tool call information and tool description information based on the user context and current instructions; using a special character or mark as a separator between the generated tool call information and tool description information, so that the model can effectively associate the user context and the current instruction, the tool call information and the tool description information during the learning process, and perform full learning;

[0047] Optimize the generation process unit in the reasoning phase: used to predict the output tool call information and tool description information according to the user context and current instructions during the reasoning phase of the AI ​​large model; during the generation process of the AI ​​large model, when the special identifier between the tool call and the tool description is recognized, stop generating more outputs immediately, end the generation process of the AI ​​large model in advance, save processing time and resources, and improve system response speed.

[0048] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for constructing an AI large model intelligent agent as described above.

[0049] The present invention also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for constructing an AI large model intelligent agent as described above are implemented.

[0050] Compared with the prior art, the present invention has the following beneficial effects:

[0051] The method and device for constructing an AI large model intelligent body provided by the present invention do not need to input all tool description lists into the AI ​​large model during the AI ​​large model training stage, which greatly reduces the input length of the AI ​​large model and improves the training efficiency of the AI ​​large model, including the training speed and memory usage; in the AI ​​large model reasoning stage, it is also not necessary to input all tool description lists into the AI ​​large model, but only needs to predict and generate tool-related information based on the user context and the current instruction, and can terminate in advance when encountering the need to distinguish between tool call information and tool description information, further reducing the consumption of computing resources, reducing resource consumption during AI large model reasoning, and helping to reduce the deployment cost of systems that deploy and use AI large models on a large scale; by avoiding the introduction of additional errors in the screening process, the accuracy of the AI ​​large model intelligent body is improved, the model directly predicts related tool call information, reduces errors that may be caused by improper screening, effectively improves the accuracy and reliability of the final output, and lays a solid foundation for the future development of the AI ​​large model intelligent body. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the following detailed description of the preferred embodiment.The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting the invention.

[0053] In the attached picture:

[0054] Figure 1 Input and output example diagram for existing AI large model agents;

[0055] Figure 2 This is an example diagram of input and output of the AI ​​large model agent in an embodiment of the present invention;

[0056] Figure 3 This is a flow chart of a method for constructing an AI large model intelligent agent according to the present invention;

[0057] Figure 4 The figure is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0058] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and products consistent with some aspects of the present disclosure as detailed in the appended claims.

[0059] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0060] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0061] The embodiments of the present invention are described in further detail below.

[0062] The present invention provides a method for constructing an AI large model agent, see Figure 3 As shown, the following steps are included:

[0063] S1. Collect and integrate API interfaces related to content providers CP or service providers SP, and prepare tool calls; these API interfaces are key external resources for intelligent agents to access and utilize online services and information;

[0064] S2. Build and train large AI models to optimize the generation process in the inference phase;

[0065] The method for training the AI ​​big model includes: in the training process of the AI ​​big model, the tool description list is no longer directly included in the input prompt word, but the AI ​​big model is allowed to predict the required tool call information and tool description information based on the user context and the current instruction; a special character or mark is used as a separator between the generated tool call information and the tool description information, so that the model can effectively associate the user context and the current instruction, the tool call information and the tool description information during the learning process, and fully learn; this method avoids directly inputting all the tool description list information into the AI ​​big model, reduces the input length of the AI ​​big model, and also ensures that the accuracy of the tool call is not affected;

[0066] The method for optimizing the generation process in the inference phase includes: in the inference phase of the AI ​​big model, predicting and outputting tool call information and tool description information according to the user context and the current instruction; during the generation process of the AI ​​big model, when a special identifier between the tool call and the tool description is identified, immediately stopping the generation of more outputs, terminating the generation process of the AI ​​big model in advance, saving processing time and resources, and improving the system response speed;

[0067] Considering that in the actual intelligent system call process, only tool call information is required but not tool description information, the AI ​​large model can be further optimized during the generation process.

[0068] S3. Select appropriate tool input methods based on the number and complexity of tools and input the tools into the AI ​​big model;

[0069] The selection of an appropriate tool input method includes:

[0070] If there are a small number of tools, choose to directly input the tools and their parameters into the AI ​​big model;

[0071] If the number of tools is large, the tools related to the user instructions are screened through a tool screening module (in this embodiment, the retrieval enhancement generation RAG technology is used).

[0072] S4. After the AI ​​big model receives the tool information, it outputs the corresponding tool calling information according to the user's questions and needs;

[0073] The tool calling information includes: which tools need to be used, how to use these tools, and which specific information needs to be obtained.

[0074] S5. According to the tool call information output by the AI ​​big model, the agent system calls the corresponding tool to perform the operation and obtains the return content. This step is the key step to realize the AI ​​big model agent function;

[0075] S6. The return content obtained by the AI ​​big model combined with the intelligent system calling the tool is further analyzed and processed to form an answer to the user's question.

[0076] Figure 2 An example of the input and output of the AI ​​large model agent of this embodiment is shown.

[0077] The embodiment of the present invention further provides a device for constructing an AI large model intelligent agent, which executes the method for constructing an AI large model intelligent agent as described above, including:

[0078] Tool preparation module: used to collect and integrate API interfaces related to content providers CP or service providers SP, and prepare tool calls;

[0079] Building AI big model agent module: used to build and train AI big models and optimize the generation process in the reasoning stage;

[0080] Tool input module: used to select the appropriate tool input method according to the number and complexity of tools, and input the tools into the AI ​​big model;

[0081] Output tool call information module: used to output corresponding tool call information according to user questions and needs after the AI ​​big model receives the tool information;

[0082] Tool calling module: Based on the tool calling information output by the AI ​​big model, the agent system calls the corresponding tool to perform operations and obtains the return content;

[0083] The module for answering questions based on the returned content is used to further analyze and process the returned content obtained after the AI ​​big model combines with the intelligent system to call the tool, and form answers to user questions.

[0084] The AI ​​large model intelligent agent module includes:

[0085] Training AI big model unit: used for not directly including the tool description list in the input prompt word during the training process of the AI ​​big model, but allowing the AI ​​big model to predict the required tool call information and tool description information based on the user context and current instructions; using a special character or mark as a separator between the generated tool call information and tool description information, so that the model can effectively associate the user context and the current instruction, the tool call information and the tool description information during the learning process, and perform full learning;

[0086] Optimize the generation process unit in the reasoning phase: used to predict the output tool call information and tool description information according to the user context and current instructions during the reasoning phase of the AI ​​large model; during the generation process of the AI ​​large model, when the special identifier between the tool call and the tool description is recognized, stop generating more outputs immediately, end the generation process of the AI ​​large model in advance, save processing time and resources, and improve system response speed.

[0087] An embodiment of the present invention further provides a computer device, Figure 4 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention; see the accompanying drawings Figure 4 As shown, the computer device includes: an input device 23, an output device 24, a memory 22 and a processor 21; the memory 22 is used to store one or more programs; when the one or more programs are executed by the one or more processors 21, the one or more processors 21 implement the method for constructing an AI large model agent as provided in the above embodiment; wherein the input device 23, the output device 24, the memory 22 and the processor 21 can be connected by a bus or other means, Figure 4 The example of connecting through bus is taken in the following.

[0088] The memory 22 is a readable and writable storage medium of a computing device, which can be used to store software programs, computer executable programs, such as program instructions corresponding to the method for constructing an AI large model intelligent body described in an embodiment of the present invention; the memory 22 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application required for a function; the data storage area may store data created according to the use of the device, etc.; in addition, the memory 22 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device; in some instances, the memory 22 may further include a memory remotely arranged relative to the processor 21, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0089] The input device 23 may be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the device; the output device 24 may include a display device such as a display screen.

[0090] The processor 21 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 22, that is, implements the above-mentioned method of building an AI large model intelligent agent.

[0091] The computer device provided above can be used to execute the method for building an AI large model intelligent agent provided in the above embodiment, and has corresponding functions and beneficial effects.

[0092] The embodiment of the present invention also provides a storage medium containing computer executable instructions, which are used to execute the method of building an AI large model agent as provided in the above embodiment when executed by a computer processor. The storage medium is any of various types of memory devices or storage devices, and the storage medium includes: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDORAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc.; the storage medium may also include other types of memory or a combination thereof; in addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, the second computer system is connected to the first computer system via a network (such as the Internet); the second computer system may provide program instructions to the first computer for execution. The storage medium includes two or more storage media that can reside in different locations (for example, in different computer systems connected via a network). The storage medium can store program instructions (for example, specifically implemented as a computer program) that can be executed by one or more processors.

[0093] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present invention is not limited to the method for constructing an AI large model intelligent agent as described in the above embodiment, and the computer executable instructions can also execute the relevant operations in the method for constructing an AI large model intelligent agent provided in any embodiment of the present invention.

[0094] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0095] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for constructing an AI large model agent, characterized in that: The following steps are involved: S1. Collect and integrate API interfaces related to content providers CP or service providers SP, and prepare tool calls; S2. Build and train large AI models to optimize the generation process in the inference phase; The method for training the AI ​​big model includes: in the training process of the AI ​​big model, the tool description list is no longer directly included in the input prompt word, but the AI ​​big model is allowed to predict the required tool call information and tool description information based on the user context and the current instruction; a special character or mark is used as a separator between the generated tool call information and the tool description information, so that the model can effectively associate the user context and the current instruction, the tool call information and the tool description information during the learning process, and fully learn; The method for optimizing the generation process in the inference phase includes: in the inference phase of the AI ​​big model, predicting and outputting tool call information and tool description information according to the user context and the current instruction; during the generation process of the AI ​​big model, when a special identifier between the tool call and the tool description is identified, immediately stopping the generation of more outputs, terminating the generation process of the AI ​​big model in advance, saving processing time and resources, and improving the system response speed; S3. Select appropriate tool input methods based on the number and complexity of tools and input the tools into the AI ​​big model; S4. After the AI ​​big model receives the tool information, it outputs the corresponding tool calling information according to the user's questions and needs; S5. According to the tool call information output by the AI ​​big model, the agent system calls the corresponding tool to perform the operation and obtains the return content; S6. The return content obtained by the AI ​​big model combined with the intelligent system calling the tool is further analyzed and processed to form an answer to the user's question.

2. The method for constructing an AI large model agent according to claim 1, characterized in that: The method of selecting an appropriate tool input in step S3 includes: If there are a small number of tools, choose to directly input the tools and their parameters into the AI ​​big model; If there are a large number of tools, the tools related to the user instructions are filtered through the tool filtering module.

3. The method for constructing an AI large model agent according to claim 1, characterized in that: The tool calling information in step S4 includes: which tools need to be used, how to use these tools, and which specific information needs to be obtained.

4. The method for constructing an AI large model agent according to claim 2, characterized in that: The tool screening module includes: a deep neural network model or a retrieval enhancement generation RAG technology.

5. A device for constructing an AI large model intelligent agent, executing the method for constructing an AI large model intelligent agent as described in any one of claims 1 to 4, characterized in that: include: Tool preparation module: used to collect and integrate API interfaces related to content providers CP or service providers SP, and prepare tool calls; Building AI big model agent module: used to build and train AI big models and optimize the generation process in the reasoning stage; Tool input module: used to select the appropriate tool input method according to the number and complexity of tools, and input the tools into the AI ​​big model; Output tool call information module: used to output corresponding tool call information according to user questions and needs after the AI ​​big model receives the tool information; Tool calling module: Based on the tool calling information output by the AI ​​big model, the agent system calls the corresponding tool to perform operations and obtains the return content; The module for answering questions based on the returned content is used to further analyze and process the returned content obtained after the AI ​​big model combines with the intelligent system to call the tool, and form answers to user questions.

6. The device for constructing an AI large model agent according to claim 5, characterized in that: The AI ​​large model agent module is constructed as follows: Training AI big model unit: used for not directly including the tool description list in the input prompt word during the training process of the AI ​​big model, but allowing the AI ​​big model to predict the required tool call information and tool description information based on the user context and current instructions; using a special character or mark as a separator between the generated tool call information and tool description information, so that the model can effectively associate the user context and the current instruction, the tool call information and the tool description information during the learning process, and perform full learning; Optimize the generation process unit in the reasoning phase: used to predict the output tool call information and tool description information according to the user context and current instructions during the reasoning phase of the AI ​​large model; during the generation process of the AI ​​large model, when the special identifier between the tool call and the tool description is recognized, stop generating more outputs immediately, end the generation process of the AI ​​large model in advance, save processing time and resources, and improve system response speed.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for constructing an AI large model intelligent agent as described in any one of claims 1 to 4 are implemented.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for building an AI large model intelligent agent as described in any one of claims 1-4 are implemented.

Citation Information

Patent Citations

  • Communication content customization

    CN116034355A

  • Large-model-oriented universal tool collaboration and refined learning system and method

    CN116594768A

  • Task solution-oriented training method and use method of generative large language model

    CN116756564A

  • Language model training method and device, reward model training method and device and electronic equipment

    CN117273117A

  • Training sample generation method, model training method, knowledge question and answer method and equipment

    CN117575008A

Cited By

  • Large model intelligent agent system based on thinking clustering planning and domain knowledge retrieval

    CN118861305A

  • Intelligent agent tool configuration information processing method, device and system and storage medium

    CN119576430A

  • Meteorological data analysis method, device and equipment based on large model agent and medium

    CN119577097A

  • Optimizing workflows of agents in scenarios in an optimized workflow graph

    US12694066B1