A method and device for constructing an AI large model agent

By optimizing tool information processing during the training and inference phases of large AI models, performance and accuracy issues were resolved, improving the training efficiency and response speed of large AI model agents while reducing resource consumption and error rates.

CN118569383BActive Publication Date: 2026-03-31PACHIRA INFORAMTION TECH BEIJING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing methods for building large-scale AI models face performance and accuracy challenges when handling large-scale tool calls, resulting in slow model training and inference speeds, high memory consumption, and the potential introduction of errors during the selection process.

Method used

Instead of directly inputting a list of tool descriptions during the training phase of the large AI model, tool call information is predicted based on user context and current instructions. Furthermore, a special identifier is used to prematurely end the generation process during inference, thus optimizing the generation process during the inference phase.

Benefits of technology

It improves the training efficiency of the model, reduces resource consumption during inference, reduces the introduction of errors, and improves response speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569383B_ABST
    Figure CN118569383B_ABST
Patent Text Reader

Abstract

The application provides a method and device for constructing an AI large model agent, the method comprising: collecting and integrating API interfaces related to a content provider (CP) or a service provider (SP) to prepare tool calls; constructing and training an AI large model to optimize the generation process in the inference stage; selecting an appropriate tool input method according to the number and complexity of the tools and inputting the tools into the AI large model; after the AI large model receives the tool information, outputting corresponding tool call information according to the user's question and demand; according to the tool call information, the agent system calls corresponding tools to perform operations and obtains returned content; the AI large model further analyzes and processes the returned content obtained after the agent system calls the tools to form an answer to the user's question. The application improves the training efficiency of the AI large model, reduces the consumption of computing resources, reduces the resource consumption during the inference of the AI large model, and improves the accuracy of the AI large model agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular, to the field of AI large-scale models and intelligent agents; specifically, it relates to a method and apparatus for constructing AI large-scale model intelligent agents. Background Technology

[0002] In the field of artificial intelligence, especially in Natural Language Processing (NLP) technology, Large Language Models (LLMs) have become a landmark achievement. These LLM models, through massive training data and a large number of neural network parameters, demonstrate a powerful ability to understand natural language, images, and even videos. A significant feature of LLM models is that knowledge is pre-trained into the model, enabling it to understand and respond to user input.

[0003] However, this pre-training method also brings significant problems. First, due to the massive number of model parameters and slow knowledge update speed, the model cannot acquire the latest knowledge and information in real time, easily generating outdated or inaccurate information. To address this issue, researchers have proposed the concept of large AI model agents, which enables large AI models to access tools, acquire the latest knowledge, and reduce the illusion of large models.

[0004] Currently, the process of building a large-scale AI model agent can be roughly divided into the following steps:

[0005] 1. Before starting to build a large-scale AI model agent, it is necessary to prepare a series of tools and parameters, mainly referring to collecting and integrating a series of API interfaces related to CP (Content Provider) or SP (Service Provider). These API interfaces are key external resources for building large-scale AI model agents, enabling the agent to access and utilize various online services and information. For example:

[0006] Weather query interface: Obtains real-time weather information, forecasts, and other climate-related data to answer users' weather queries.

[0007] Mathematical Calculation Interface: Provides functions for solving complex mathematical problems and can handle mathematical calculation requests from users.

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

[0009] Hot News API: Get the latest news headlines, special reports, and current affairs commentary to meet users' needs for staying informed about current events.

[0010] Navigation Interface: Provides geographic information and route planning services, offering users navigation guides, traffic updates, and optimal route suggestions.

[0011] 2. Based on the number and complexity of the tools, input the tools into the large AI model, including two different input methods:

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

[0013] (2) If the number of tools is too large, exceeding the contextual limitations of the large AI model, a tool filtering module is needed. This module can be used, for example, through a deep neural network model or RAG technology, to filter out tools relevant to the user's instructions. The function of this tool filtering module is to select the most relevant tools from a large pool based on the user's instructions and needs, and then only input these filtered tools into the large AI model. This ensures the model's efficiency and accuracy, and avoids unnecessary information overload.

[0014] 3. After receiving the tool information, the AI ​​model outputs corresponding tool invocation information based on the user's questions and needs. This tool invocation information includes which tools need to be used, how to use these tools, and what specific information needs to be obtained.

[0015] 4. Based on the tool invocation information output by the AI ​​large-scale model, the intelligent agent system accordingly invokes these tools, performs the corresponding operations, and obtains the returned content. This step is crucial for realizing the functionality of the AI ​​large-scale model intelligent agent; through actual tool invocation and operation, the specific data or results needed to solve the problem can be obtained.

[0016] 5. The AI ​​big data model, combined with the intelligent agent system, further analyzes and processes the returned content obtained after calling the tools, ultimately forming an answer to the user's question. This step demonstrates the comprehensive processing capabilities of the AI ​​big data model intelligent agent, which can not only understand the user's question but also utilize information provided by various tools to give accurate and useful answers.

[0017] However, existing methods for building large AI model agents require inputting a complete list of tool descriptions into the model during both training and inference (e.g., ...). Figure 1 As shown, there are some obvious shortcomings, specifically in the following two aspects:

[0018] 1. Performance issues caused by the large number of tool calls: In real-world applications, the number of available tool call interfaces can be enormous, reaching tens of thousands. Directly inputting these interfaces into a large AI model leads to a dramatic increase in the model's input context, slowing down model training and inference, and increasing memory usage during these processes. This is especially true when using key-value caching (kV caching) techniques, where memory consumption grows even faster, posing a challenge to system performance and stability.

[0019] 2. Errors and Delays Introduced in the Screening Process: To address the issue of excessive tool calls, existing methods employ techniques such as model-based or retrieval-augmented generation (RAG) to screen relevant tools. However, because the model cannot accurately determine which tools are truly relevant, this screening process may introduce additional errors. Furthermore, the screening process itself consumes time, increasing the inference time of large AI models and slowing down the overall response speed.

[0020] In summary, existing construction methods face the 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] Therefore, the purpose of this invention is to propose a method and apparatus for constructing a large-scale AI model agent. During the training phase, an innovative tool information processing method is adopted, avoiding the direct input of all tool description lists into the large-scale AI model. Instead, the model predicts the required tool call information and tool description information based on the user context and current instructions. During the inference phase, the model predicts and outputs tool call information based on the user context and instructions, and terminates the large-scale AI model generation process early using a special identifier between the tool call information and tool description information. This improves efficiency and response speed, enhances the training efficiency of the large-scale AI model, and reduces resource consumption during inference. By avoiding the introduction of additional errors during the selection process, the accuracy of the large-scale AI model agent is improved.

[0022] This invention provides a method for constructing a large-scale AI model agent, comprising the following steps:

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

[0024] S2. Build and train a large AI model to optimize the generation process during the inference stage;

[0025] The method for training the AI ​​large model includes: instead of directly including the tool description list in the input prompts during the training process, the AI ​​large model predicts the required tool call information and tool description information based on the user's context and current command; a special character or marker is used as a separator between the generated tool call information and tool description information, enabling the model to effectively associate the user's context and current command, tool call information and tool description information during the learning process, thus achieving sufficient learning; this method avoids directly inputting all tool description list information into the AI ​​large model, reducing the input length of the AI ​​large model, while also ensuring that the accuracy of tool calls is not affected;

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

[0027] Considering that in the actual process of calling intelligent agent systems, only tool call information is needed and tool description information is not required, the AI ​​large model can be further optimized during the generation process.

[0028] Through these innovative designs, this invention addresses the performance and accuracy challenges faced by existing AI large-scale model intelligent agent construction methods, improves model training efficiency, reduces resource consumption during inference, and keeps the accuracy of the intelligent agent unaffected.

[0029] S3. Based on the number and complexity of the tools, select the appropriate tool input method and input the tools into the large AI model;

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

[0031] S5. Based on the tool call information output by the AI ​​big model, the intelligent agent system calls the corresponding tools to perform operations and obtains the returned content. This step is the key step to realize the intelligent agent function of the AI ​​big model.

[0032] S6. The returned content obtained by the AI ​​big model in conjunction with the intelligent agent system after 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 the number of tools is small, choose to directly input the tools and their parameters into the large AI model;

[0035] If there are many tools, use the tool filtering module to filter tools that are related to user commands.

[0036] Furthermore, the tool call information in step S4 includes: which tools need to be used, how to use these tools, and what 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 an apparatus for constructing a large-scale AI model agent, which performs the method for constructing a large-scale AI model agent as described above, including:

[0039] Preparation Tools Module: Used to collect and integrate API interfaces related to content providers (CPs) or service providers (SPs) to prepare for tool calls;

[0040] AI Large Model Intelligent Agent Module: Used to build and train large AI models and optimize the generation process during the inference phase;

[0041] Tool Input Module: Used to select the appropriate tool input method based on the number and complexity of the tools, and input the tools into the large AI model;

[0042] Output tool call information module: After the AI ​​large model receives tool information, it outputs the corresponding tool call information according to the user's questions and needs;

[0043] Tool Invocation Module: Based on the tool invocation information output by the AI ​​large model, the intelligent agent system invokes the corresponding tools to perform operations and obtains the returned content;

[0044] The module for answering questions based on returned content is used to further analyze and process the returned content obtained by the AI ​​model in conjunction with the intelligent agent system after calling the tool, and to form an answer to the user's question.

[0045] Furthermore, the module for constructing the AI ​​large-scale model intelligent agent includes:

[0046] Training AI Large Model Unit: This unit is used to prevent the tool description list from being directly included in the input prompts during the training of the AI ​​large model. Instead, it allows the AI ​​large model to predict the required tool call information and tool description information based on the user's context and current command. A special character or marker is used as a separator between the generated tool call information and tool description information, so that the model can effectively associate the user's context and current command, tool call information and tool description information during the learning process, and achieve full learning.

[0047] The generation process unit optimizes the inference phase: during the inference phase of the AI ​​large model, it predicts the output tool call information and tool description information based on the user context and current instructions; when the AI ​​large model is generated, it immediately stops generating more output when it recognizes a special identifier between the tool call and the tool description, thus ending the generation process of the AI ​​large model in advance, saving processing time and resources, and improving the 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 a large AI model agent as described above.

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

[0050] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0051] The method and apparatus for constructing large-scale AI model agents provided by this invention eliminate the need to input the entire tool description list into the AI ​​model during the training phase, significantly reducing the input length and improving training efficiency, including training speed and memory usage. Similarly, during the inference phase, the entire tool description list is not required; tool-related information is generated based on user context and current instructions. The process can terminate early when distinguishing between tool call information and tool description information, further reducing computational resource consumption and lowering resource consumption during AI model inference. This helps reduce the deployment cost of systems using large-scale AI models. By avoiding the introduction of additional errors during the selection process, the accuracy of the large-scale AI model agent is improved. The model directly predicts relevant tool call information, reducing errors that may arise from improper selection, effectively improving the accuracy and reliability of the final output, and laying a solid foundation for the future development of large-scale AI model agents. Attached Figure Description

[0052] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention.

[0053] In the attached diagram:

[0054] Figure 1 Example diagram of input and output for existing large-scale AI model agents;

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

[0056] Figure 3 This is a flowchart of a method for constructing a large-scale AI model intelligent agent according to the present invention;

[0057] Figure 4 This is a schematic diagram of the configuration of a computer device according to an embodiment of the present invention. Detailed Implementation

[0058] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and products consistent with some aspects of this disclosure as detailed in the appended claims.

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

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

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

[0062] This invention provides a method for constructing a large-scale AI model agent. See [link to relevant documentation]. Figure 3 As shown, it includes the following steps:

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

[0064] S2. Build and train a large AI model to optimize the generation process during the inference stage;

[0065] The method for training the AI ​​large model includes: instead of directly including the tool description list in the input prompts during the training process, the AI ​​large model predicts the required tool call information and tool description information based on the user's context and current command; a special character or marker is used as a separator between the generated tool call information and tool description information, enabling the model to effectively associate the user's context and current command, tool call information and tool description information during the learning process, thus achieving sufficient learning; this method avoids directly inputting all tool description list information into the AI ​​large model, reducing the input length of the AI ​​large model, while also ensuring that the accuracy of tool calls is not affected;

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

[0067] Considering that in the actual process of calling intelligent agent systems, only tool call information is needed and tool description information is not required, the AI ​​large model can be further optimized during the generation process.

[0068] S3. Based on the number and complexity of the tools, select the appropriate tool input method and input the tools into the large AI model;

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

[0070] If the number of tools is small, choose to directly input the tools and their parameters into the large AI model;

[0071] If there are many tools, the tools related to the user's instructions can be filtered through the tool filtering module (in this embodiment, the search enhancement generation RAG technology is used).

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

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

[0074] S5. Based on the tool call information output by the AI ​​big model, the intelligent agent system calls the corresponding tools to perform operations and obtains the returned content. This step is the key step to realize the intelligent agent function of the AI ​​big model.

[0075] S6. The returned content obtained by the AI ​​big model in conjunction with the intelligent agent system after 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 in this embodiment is shown.

[0077] This invention also provides an apparatus for constructing a large-scale AI model agent, which performs the method for constructing a large-scale AI model agent as described above, including:

[0078] Preparation Tools Module: Used to collect and integrate API interfaces related to content providers (CPs) or service providers (SPs) to prepare for tool calls;

[0079] AI Large Model Intelligent Agent Module: Used to build and train large AI models and optimize the generation process during the inference phase;

[0080] Tool Input Module: Used to select the appropriate tool input method based on the number and complexity of the tools, and input the tools into the large AI model;

[0081] Output tool call information module: After the AI ​​large model receives tool information, it outputs the corresponding tool call information according to the user's questions and needs;

[0082] Tool Invocation Module: Based on the tool invocation information output by the AI ​​large model, the intelligent agent system invokes the corresponding tools to perform operations and obtains the returned content;

[0083] The module for answering questions based on returned content is used to further analyze and process the returned content obtained by the AI ​​model in conjunction with the intelligent agent system after calling the tool, and to form an answer to the user's question.

[0084] The module for constructing the AI ​​large-scale model intelligent agent includes:

[0085] Training AI Large Model Unit: This unit is used to prevent the tool description list from being directly included in the input prompts during the training of the AI ​​large model. Instead, it allows the AI ​​large model to predict the required tool call information and tool description information based on the user's context and current command. A special character or marker is used as a separator between the generated tool call information and tool description information, so that the model can effectively associate the user's context and current command, tool call information and tool description information during the learning process, and achieve full learning.

[0086] The generation process unit optimizes the inference phase: during the inference phase of the AI ​​large model, it predicts the output tool call information and tool description information based on the user context and current instructions; when the AI ​​large model is generated, it immediately stops generating more output when it recognizes a special identifier between the tool call and the tool description, thus ending the generation process of the AI ​​large model in advance, saving processing time and resources, and improving the system response speed.

[0087] This invention also provides a computer device. Figure 4 This is a schematic diagram of the structure of a computer device provided in 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 a large-scale AI model agent as provided in the above embodiments; wherein the input device 23, the output device 24, the memory 22, and the processor 21 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.

[0088] The memory 22, as a read / write storage medium for computing devices, can be used to store software programs and computer-executable programs, such as the program instructions corresponding to the method for constructing a large-scale AI model intelligent agent as described in this embodiment of the invention. The memory 22 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device. Furthermore, the memory 22 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 22 may further include memory remotely located relative to the processor 21, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0089] Input device 23 can be used to receive input digital or character information, and generate key signal inputs related to user settings and function control of the device; output device 24 may include display devices 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, thereby realizing the above-mentioned method for building a large AI model intelligent agent.

[0091] The computer equipment provided above can be used to execute the method for constructing large AI model intelligent agents provided in the above embodiments, and has corresponding functions and beneficial effects.

[0092] This invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the method for constructing a large-scale AI model agent as provided in the above embodiments. The storage medium can be any type of memory device or storage device, including: mounting media such as CD-ROM, floppy disk, or magnetic tape; 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 (e.g., hard disk or optical storage); registers or other similar types of memory elements; the storage medium may also include other types of memory or combinations thereof; furthermore, the storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet); the second computer system can provide program instructions to the first computer for execution. The storage medium includes two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). The storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.

[0093] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method for constructing a large AI model agent as described in the above embodiments, but can also execute related operations in the method for constructing a large AI model agent provided in any embodiment of the present invention.

[0094] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles 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 all fall within the scope of protection of the present invention.

[0095] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for constructing an AI large model agent, characterized in that, The method comprises the following steps: S1, collecting and integrating API interfaces related to a content provider CP or a service provider SP, and preparing tool calls; S2, building and training an AI large model, and optimizing the generation process in the inference stage; The method for training the AI large model comprises: in the training process of the AI large model, the tool call information and the tool description information required by the user are predicted according to the context and the current instruction of the user instead of directly including the tool description list in the input prompt word; 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 effectively associates the user context and the current instruction, the tool call information and the tool description information in the learning process, and fully learns; The method for optimizing the generation process in the inference stage comprises: in the inference stage of the AI large model, the output tool call information and the tool description information are predicted according to the context and the current instruction of the user; in the generation process of the AI large model, when the special identifier between the tool call and the tool description is identified, the AI large model immediately stops generating more output and ends the generation process in advance, thereby saving processing time and resources and improving system response speed; S3, selecting a proper tool input method according to the number and complexity of the tools, and inputting the tools into the AI large model; S4, after the AI large model receives the tool information, outputting corresponding tool call information according to the user's question and demand; S5, according to the tool call information output by the AI large model, the agent system calls corresponding tools to execute operations and obtains returned content; S6, the AI large model further analyzes and processes the returned content obtained by calling the tools by the agent system to form an answer to the user's question. The S3 step of selecting a proper tool input method comprises: If the number of tools is small and does not exceed the context limit of the AI large model, the tools and their parameters are directly input into the AI large model; If the number of tools is large and exceeds the context limit of the AI large model, the tool filtering module is used to filter tools related to the user's instruction.

2. The method of Claim 1, wherein, The tool call information in the S4 step comprises: which tools need to be used, how to use these tools, and which specific information needs to be obtained.

3. The method of Claim 1, wherein, The tool filtering module comprises a deep neural network model or a retrieval augmented generation RAG technology.

4. An apparatus for constructing an AI large model agent, which performs the method for constructing an AI large model agent according to any one of claims 1-3. It comprises: A tool preparation module for collecting and integrating API interfaces related to a content provider CP or a service provider SP, and preparing tool calls; An AI large model agent module for building and training an AI large model, and optimizing the generation process in the inference stage; A tool input module for selecting a proper tool input method according to the number and complexity of the tools, and inputting the tools into the AI large model; An output tool call information module for outputting corresponding tool call information according to the user's question and demand after the AI large model receives the tool information; A tool calling module for calling corresponding tools to execute operations according to the tool call information output by the AI large model, and obtaining returned content; The question answering module combined with the returned content is used to further analyze and process the returned content obtained by the AI large model combined with the agent system calling tool to form an answer to the user's question.

5. The apparatus of claim 4, wherein the apparatus is configured to: The AI large model agent module includes: The AI large model training unit is used to predict the required tool calling information and tool description information according to the user's context and current instruction in the training process of the AI large model, instead of directly including the tool description list in the input prompt word, so that the model effectively associates the user's context and current instruction, tool calling information and tool description information in the learning process, and fully learns; The generation process optimization unit in the inference stage is used to predict the output tool calling information and tool description information according to the user's context and current instruction in the inference stage of the AI large model; when the AI large model identifies the special identifier between the tool calling and the tool description in the generation process, it immediately stops generating more output and ends the generation process of the AI large model in advance, saving processing time and resources and improving system response speed.

6. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the steps of the method for building an AI large model agent according to any one of claims 1-3.

7. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the method for building an AI large model agent according to any one of claims 1-3.

Citation Information

Patent Citations

  • 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