Intelligent agent framework based on large language model

By introducing task decomposition, tool selection, parameter extraction and operation models into the intelligent proxy framework, LLMs are solved in terms of costly enhancement of proxy autonomy, difficulty in tool selection and static tool use problems, and more efficient and flexible task execution is achieved .

CN119476505AInactive Publication Date: 2025-02-18杭州半云科技有限公司

Patent Information

Application Number
CN202510058884.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Current large language models (LLMs) have high costs, distraction and tool selection difficulties, and limitations in enhancing agent autonomy.

Method used

A smart proxy framework based on large language models is proposed, including tool library, task decomposition model, tool selection model, parameter extraction model and operation model. Through the combination of these models, the smart proxy can automatically decompose user query information into subtasks, dynamically Select the appropriate tool, extract input parameters, and generate operation steps to achieve efficient execution of tasks.

Benefits of technology

Through the combination of task decomposition and tool selection model, task complexity and computing cost are reduced, the agent's independent decision-making ability and execution efficiency in diverse task scenarios are improved, and the applicability in open and dynamic environments is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476505A_ABST
    Figure CN119476505A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent agent framework based on a large language model, and the framework comprises a tool library which integrates a plurality of tools for executing tasks, and carries out the initialization management; the task decomposition model is used for decomposing the user query information into a task plan formed by a series of subtasks based on the user query information and the tool related information; and the tool selection model is used for using the tool search module to search tools related to each subtask from the tool library. In the invention, through organic combination of the task decomposition model, the tool selection model, the parameter extraction model and the operation model, the intelligent agent can process complex tasks more flexibly and efficiently, and through cooperation of the models, the autonomous decision-making capability and the execution efficiency of the intelligent agent in diversified task scenes can be significantly improved, and the intelligent agent can be used in a large scale. And meanwhile, the calculation cost and complexity are reduced, and a solid technical basis is provided for realizing a more intelligent and autonomous artificial intelligence system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of large language models, and in particular to an intelligent agent framework based on a large language model. Background Art

[0002] With the development of large language models (LLMs), the technology has laid the foundation for creating highly autonomous agents. These agents can be applied in a variety of scenarios, such as pure software assistants or intelligent entities embedded in devices, or even developed into robots with artificial intelligence. To enhance the autonomy of these agents, it is key to improve their understanding of the environment and their ability to perform tasks in this environment. This is due to the ability of LLMs to make plans and follow instructions precisely, including meeting specific output format requirements, so that various tools can be effectively used.

[0003] However, current technologies still have some limitations: (1) Cost issue: The tool description needs to occupy the context window of LLM, which will increase the consumption of computing resources and thus increase the cost.

[0004] (2) Distraction and difficulty in tool selection: When faced with a multitude of available tools, LLMs may find it difficult to decide which tool to use, especially when processing long text inputs, where their performance in contextual understanding, multi-fact retrieval, and complex reasoning is limited. At the same time, platforms like OpenAI may also limit the number of tools that LLMs can call.

[0005] (3) Static tool usage: Current tool usage is often static and limited to a preset set of functions, which hinders the flexibility and applicability of autonomous agents in more open and dynamic environments. Summary of the invention

[0006] In order to solve the technical problems mentioned in the above background technology, an intelligent agent framework based on a large language model is proposed.

[0007] In order to achieve the above object, the present invention adopts the following technical solutions: include: The tool library contains several tools for executing tasks and performs initialization management; Task decomposition model, based on user query information and tool-related information, decomposes user query information into a task plan consisting of a series of subtasks; The tool selection model uses the tool search module to assign relevant tools to each subtask from the tool library; The parameter extraction model extracts the input values ​​required for each subtask based on the user query information and the historical output values ​​of the tool; Operational model, which generates the operations for each subtask based on the selected tools and the extracted input values; The tool executor calls the tool corresponding to the operation of each subtask and outputs the results related to the user's query information.

[0008] Preferably, the initialization management is to use a function analyzer to extract function names, document strings, parameter names, descriptions and type information from Python modules, generate tool descriptions, and store these descriptions in a vector database to facilitate subsequent semantic search and matching.

[0009] Preferably, the step of decomposing the user query information into a task plan consisting of a series of subtasks based on the user query information and the tool-related information further includes: By setting the similarity threshold of semantic search, further decomposition of subtasks is triggered until the tool selection model can select an appropriate tool.

[0010] Preferably, the method of setting a similarity threshold of semantic search to trigger further decomposition of subtasks until the tool selection model can select a suitable tool includes the following steps: S1. Receive initial user query information. The system receives the query information input by the user and performs pre-processing for subsequent processing; S2. Generate a preliminary task plan. Based on the user query information, use a large language model to decompose the query information into a series of preliminary subtasks to form a preliminary task plan; S3. Calculate the preliminary subtask embedding and generate the corresponding semantic embedding for each preliminary subtask. The embedding vector represents the core semantic information of the subtask.

[0011] S4, perform tool matching, match the embedding of the preliminary subtask with the embedding of the tool description in the tool library, and calculate the similarity score; S5. Check the matching results, compare the similarity scores between each subtask and the tool, and check whether there is a tool that meets the preset similarity threshold. If the similarity score of the found tool is higher than the threshold, record the matched tool and enter the rematching process.

[0012] Preferably, the compounding process comprises the following steps: For subtasks for which no suitable tools are found, further decompose them into more fine-grained subtasks; Repeat the process of calculating subtask embedding and checking matching results for the newly generated subtask; Based on the result of the recursive decomposition, the task plan is updated to form a detailed task plan including the newly generated subtasks; Dynamically adjust the similarity threshold of semantic search based on tool matching results and task requirements to optimize the effect of tool matching; For each subtask in the new task plan, the tool matching process is repeated until the maximum recursion depth is reached; The system outputs a task plan containing all subtasks and their corresponding tool selection results for the intelligent agent to execute.

[0013] Preferably, the tool search module is used to search for tools related to each subtask from a tool library, including: Create semantic embeddings for each subtask and tool, match the embedding of the subtask with the embedding of the tool description, and output the top k tools with the highest association with each subtask.

[0014] Preferably, creating a semantic embedding for each subtask and tool, matching the embedding of the subtask with the embedding of the tool description, and outputting the top k tools with the highest correlation with each subtask include: Subtask embedding generation: Generate a semantic embedding vector for each subtask to capture the semantic information of the subtask; Tool embedding generation, generating a semantic embedding vector for each tool in the tool library, representing the functional description of the tool; Calculate similarity, using the similarity metric method to calculate the similarity score between the subtask embedding and the tool embedding; Sorting and selection, sorting the tools according to the similarity scores, and selecting the top k tools with the highest similarity as the most relevant tools; Output the results and output the top k most relevant tools corresponding to each subtask for the intelligent agent to perform subsequent operations.

[0015] Preferably, the tools in the tool library have unique identifiers, and each model calls the tools and tool-related information by parsing the identifiers.

[0016] Preferably, the tools in the tool library are executable functions that perform related functions and return results, including but not limited to mathematical functions provided by computers and APIs for calling robots.

[0017] Preferably, the task decomposition model, tool selection model, parameter extraction model and operation model are all large language models triggered by different system prompt words.

[0018] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. In the present invention, the task decomposition model can automatically decompose the high-level query information input by the user into several smaller and more specific subtasks. This decomposition method helps to reduce the complexity of the task and allows each subtask to be processed more accurately. Then, the tool selection model uses the tool search module to find the most suitable tool for executing each subtask in the tool library, ensuring the efficient matching and use of the tool. The parameter extraction model further extracts the input parameters required to execute each subtask from the user query information and the historical output of the tool, avoiding errors or omissions that may be caused by manual input. The operation model generates specific operation steps based on the selected tool and the extracted input parameters. The tool executor executes these operations and returns the final result. Through the organic combination of the task decomposition model, the tool selection model, the parameter extraction model and the operation model, the intelligent agent can handle complex tasks more flexibly and efficiently. Through the cooperation of these models, the autonomous decision-making ability and execution efficiency of the intelligent agent in diversified task scenarios can be significantly improved, while reducing the computing cost and complexity, providing a solid technical foundation for realizing a more intelligent and autonomous artificial intelligence system.

[0019] 2. In the present invention, by intelligently selecting and matching tools, the context window occupancy is reduced, the computing cost is reduced, and the tool utilization efficiency is improved. The agent can dynamically manage and expand its tool library according to task requirements, thereby improving its applicability in open and dynamic environments.

[0020] 3. In the present invention, through recursive decomposition and feedback loop mechanism, it is ensured that the task can be solved optimally, while reducing the error rate and operation delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A structural schematic diagram of an intelligent agent framework based on a large language model provided according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Embodiment 1

[0023] See also Figure 1 The present invention provides a technical solution: an intelligent agent framework based on a large language model, comprising: The tool library contains several tools for executing tasks and performs initialization management. The initialization management uses the function analyzer to extract function names, document strings, parameter names, descriptions, and type information from Python modules, generate tool descriptions, and store these descriptions in a vector database to facilitate subsequent semantic search and matching; The task decomposition model decomposes the user query information into a task plan consisting of a series of subtasks based on the user query information and the tool-related information. The task decomposition model decomposes the user query information into a task plan consisting of a series of subtasks based on the user query information and the tool-related information, including setting a similarity threshold for semantic search to trigger further decomposition of subtasks until the tool selection model can select an appropriate tool. Specifically, the following steps are included: S1. Receive initial user query information. The system receives the query information input by the user and performs pre-processing for subsequent processing; S2. Generate a preliminary task plan. Based on the user query information, use a large language model to decompose the query information into a series of preliminary subtasks to form a preliminary task plan; S3. Calculate the preliminary subtask embedding and generate the corresponding semantic embedding for each preliminary subtask. The embedding vector represents the core semantic information of the subtask.

[0024] S4, perform tool matching, match the embedding of the preliminary subtask with the embedding of the tool description in the tool library, and calculate the similarity score; S5. Check the matching results, compare the similarity scores between each subtask and the tool, check whether there is a tool that meets the preset similarity threshold, and if the similarity score of the found tool is higher than the threshold, record the matched tool and enter the re-matching process. The re-matching process includes the following steps: for subtasks for which no suitable tools are found, further decompose them into more fine-grained subtasks; repeat the calculation of the subtask embedding process for the newly generated subtasks to check the matching results; based on the results of the recursive decomposition, update the task plan to form a detailed task plan containing the newly generated subtasks; dynamically adjust the similarity threshold of the semantic search according to the tool matching results and task requirements to optimize the tool matching effect; repeat the tool matching process for each subtask in the new task plan until the maximum recursive depth is reached; the system outputs a task plan containing all subtasks and their corresponding tool selection results for execution by the intelligent agent; Tool selection model, using the tool search module to assign relevant tools to each subtask from the tool library, creating semantic embeddings for each subtask and tool, matching the embedding of the subtask with the embedding of the tool description, and outputting the top k tools with the highest correlation with each subtask. Specifically, it includes subtask embedding generation, generating a semantic embedding vector for each subtask to capture the semantic information of the subtask; tool embedding generation, generating a semantic embedding vector for each tool in the tool library to represent the functional description of the tool; calculating similarity, using a similarity measurement method to calculate the similarity score between the subtask embedding and the tool embedding; sorting and selecting, sorting the tools according to the similarity score, and selecting the top k tools with the highest similarity as the tools with the highest correlation; outputting the results, outputting the top k tools with the highest correlation corresponding to each subtask for the intelligent agent to perform subsequent operations; The parameter extraction model extracts the input values ​​required for each subtask based on the user query information and the historical output values ​​of the tool; Operational model, which generates the operations for each subtask based on the selected tools and the extracted input values; The tool executor calls the tool corresponding to the operation of each subtask and outputs the results related to the user's query information; The tools in the tool library have unique identifiers. Each model calls the tools and tool-related information by parsing the identifiers. The tools in the tool library are executable functions that perform related functions and return results, including but not limited to mathematical functions provided by computers and APIs for calling robots. The task decomposition model, tool selection model, parameter extraction model and operation model are all large language models triggered by different system prompt words.

[0025] The agent framework can be initialized with a potentially large set of tools T, with natural language descriptions and documentation of these tools available for use. When a user asks a task via a natural language query q, the agent’s task decomposition model M td First, we need to decompose the query into a plan P of subtasks so that these subtasks can be solved by available tools. In this process, the model M td Information related to available tools can be optionally loaded T Initialize, as shown in the attached Figure 1 As shown in steps ① to ②.

[0026] Specifically, including (1) Task decomposition Mission Model M td Receive user query q and tool related information I T , generate a task plan P, which consists of a series of subtasks.

[0027] M td (q,lT )→P; (2) Tool selection After the task decomposition is completed, select model M s It is necessary to select the appropriate tool T for each subtask i from the possible tool set T i . This process can be viewed as a search problem. Figure 1 Steps ② to ③ in the figure show this process. To select a model, you can use the tool search module t s To provide assistance.

[0028] M s (P,T,t s )→{T* i} i ; (3) Input value extraction Parameter extraction model M e Responsible for the user's query q, the output value V used by the previous tool out Or the common sense knowledge of the model, extract the input value V required for each subtask in .like Figure 1 As shown before step ④ in the figure, extracting the model ensures that the tool receives the correct parameters.

[0029] M e (T* i,q,V out )→V in ; (4) Operation generation Combine the selected tools and the extracted input parameters to operate the model M a Generate an operation a for each subtask i , these operations belong to the actions in the action space A. Figure 1 In step ④, the operation will be passed to the tool executor to execute the corresponding tool call.

[0030] M a (T* i,V in )→a i ; (5) Tool execution and feedback The tool actuator E is responsible for executing the operation ai and generating the output value V out These output values ​​can be new information for further processing, failure feedback, or a final response to a user query. Figure 1 As shown in steps ⑤ to ⑦ in Figure 1, this step realizes the final execution of the task. Based on the tool execution results, the model can generate adjusted operations until plan P is completed and return the final response to the user.

[0031] E(a i )→V out .

[0032] It is worth noting that each model M x It can be implemented as a large language model triggered by different system prompt words. Through the above steps, the agent framework proposed in this embodiment can effectively decompose complex tasks, select appropriate tools and execute them, thereby achieving the purpose of autonomous agent; Further, in this embodiment, a tool refers to an executable function that can perform a certain function and return a result or status message, including a mathematical function provided by a calculator, and an API for calling a robot. In order to facilitate providing a tool to the agent framework proposed in this embodiment, an entire file containing multiple functions can be imported.

[0033] In order for LLMs to use these tools, the tool needs to have a unique identifier that can be resolved to call the tool, text describing the tool's purpose, and the names, types, and descriptions of the required input parameters.

[0034] The method of this embodiment relies on a function analyzer for introspective analysis, which can process Python functions recorded in the Sphinx style and can also be extended to support other types of tools. From the extracted information, a tool library is built. In principle, the tool library can be any database that supports searching for suitable tools. Since the user input is natural language and LLMs perform well in processing natural language, it is particularly promising to match tasks with available tools through semantic search through dense embedding.

[0035] During the initialization of the agent framework, embeddings of function names and corresponding docstrings, i.e., vector representations capturing semantics, are created and stored together with the function descriptions generated by the introspection module. The resulting vector library enables semantic search to find suitable tools.

[0036] In this way, the method of this embodiment can create an efficient tool library for the agent framework, support rapid location of appropriate tools through semantic search, and thus enhance the functionality and flexibility of the agent framework.

[0037] Furthermore, during the initialization phase, the agent framework accepts tasks described by users in natural language. These tasks are usually at a high level of abstraction, which does not match the fine-grained nature of available tools. Therefore, it is necessary to decompose these high-level tasks into more specific subtasks through large language models (LLMs) in order to more effectively match and call appropriate tools.

[0038] Specifically, they include: (1) Task decomposition: Use LLMs to decompose high-level user tasks into a series of more general and specific subtasks. For example: User input: "Prepare the company's annual financial report"; Subtasks of LLMs output: collecting financial data, collating data, analyzing data, writing reports, and reviewing reports.

[0039] (2) Generate embeddings: Create semantic embeddings for each subtask. These embeddings capture the core meaning of the subtask and facilitate the subsequent matching process. For example: Embedding for “collecting financial data”: Embedding_collecting financial data; Embedding of “organizing data”: Embedding_Organizing data.

[0040] (3) Tool matching: Match the embedding of the subtask with the embedding of the tool description in the tool library, and return the top k tools with the highest correlation with each subtask. For example, match the embedding of "collect financial data" with the embedding of the tool description in the tool library. Find suitable tools, such as data collection scripts, database query tools, etc.

[0041] (4) Recursive decomposition: If the granularity of the initial subtask is still too large and no suitable tool can be found, further task decomposition and search processes are triggered by setting the similarity threshold of semantic search until a suitable tool is found or the maximum recursive depth is reached. For example, when the task description of "analyzing data" is still too broad, it is further decomposed into "cleaning data" and "generating statistical charts". Appropriate tools are matched again, such as data cleaning tools, chart generation tools, etc.

[0042] This recursive task decomposition and tool search mechanism ensures that the agent can gradually refine task requirements, accurately match applicable tools, and improve the effectiveness and accuracy of task execution.

[0043] Further, based on the generated subtask plan P and the identified tools, LLMs will gradually generate the corresponding tool call commands. This process is performed step by step, allowing LLMs to consider the return value of the previous tool call. Tool calls can be in the form of structured JSON responses (especially for models that have been fine-tuned for tool use), or in the form of text that needs to be parsed. For each tool call, the corresponding tool is retrieved from the tool library, and the tool executor E executes the tool according to the provided parameters. The return value of the tool can be an intermediate result (e.g., a calculation result), a status message (e.g., feedback on the robot's actions), or an error feedback. The result is fed back to the LLMs, allowing the model to continue to call further tools or even search for other related tools in the tool library. When all subtasks are solved or it is confirmed that the LLMs cannot solve the task, the LLMs will provide a final response to the user.

[0044] The present invention significantly improves the efficiency and accuracy of task execution by enhancing task decomposition, dynamically managing tool libraries, optimizing semantic search, recursively decomposing tasks, and introducing automated learning capabilities, ensuring that the system has strong adaptability and scalability in complex and changing environments. Embodiment 2

[0045] This architecture can also be completely independent of tool library access. In this variant, the agent does not call external tools, but relies entirely on embedded LLMs functions to complete tasks. It is suitable for environments with limited resources or when external tools are not available.

[0046] Reducing the reliance on external resources allows the agent to run in offline or resource-constrained environments. In addition, reducing tool library calls can reduce complexity, improve system responsiveness, and in some cases enhance system security and stability. Embodiment 3

[0047] Using CoT hints guided by a fixed process, LLMs are guided to complete task decomposition and tool invocation in a fixed way. This scheme maintains consistency in the task decomposition process, avoids potential errors caused by LLMs' internal reasoning, and can be independent of other features of the tool library.

[0048] Example 3 By using CoT hints of fixed processes, the agent can maintain consistency in task execution, reduce errors caused by internal reasoning differences of LLMs, improve the predictability of task execution, and make the system easier to debug and optimize. Embodiment 4

[0049] Use LLMs presets that are optimized for the tools available in the tool library. This optimization includes guiding LLMs to better match existing tools through contextual prompts or training data, improving the efficiency of task decomposition and tool selection.

[0050] With optimized LLMs presets, the agent can more accurately match existing tools in the tool library, thereby improving the efficiency of task decomposition and tool selection, reducing the semantic gap between tasks and tools, and improving the overall efficiency of the system and the success rate of task solving. Embodiment 5

[0051] This architecture can have the ability to self-edit tools. This architecture allows agents to dynamically modify their tool library during execution through CRUD (create, read, update, delete) operations. The self-editing function enables agents to continuously optimize and improve their tools during task execution, improving the accuracy and efficiency of task solving.

[0052] Giving agents the ability to self-edit their tools enables them to dynamically adjust and optimize their tool library during execution. This adaptive capability helps agents cope with changing task requirements and environments, thereby improving their adaptability and flexibility in complex and uncertain environments. Embodiment 6

[0053] Integrate this architecture with other LLMs agent paradigms. By combining different agent architectures, agents can utilize multiple strategies in complex tasks to achieve more efficient task processing. This architecture variant is suitable for environments that require high flexibility, such as multi-domain tasks or complex application scenarios that require dynamic adjustment of strategies.

[0054] By integrating multiple agent paradigms, the system is able to take advantage of the strengths of different strategies to handle complex tasks. This integration improves the agent's task processing capabilities, especially in multi-domain tasks or application scenarios that require dynamic strategy adjustment, which can significantly enhance the system's robustness and efficiency.

[0055] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. An intelligent agent framework based on a large language model, characterized in that: include: The tool library contains several tools for executing tasks and performs initialization management; Task decomposition model, based on user query information and tool-related information, decomposes user query information into a task plan consisting of a series of subtasks; The tool selection model uses the tool search module to assign relevant tools to each subtask from the tool library; The parameter extraction model extracts the input values ​​required for each subtask based on the user query information and the historical output values ​​of the tool; Operational model, which generates the operations for each subtask based on the selected tools and the extracted input values; The tool executor calls the tool corresponding to the operation of each subtask and outputs the results related to the user's query information.

2. According to claim 1, an intelligent agent framework based on a large language model is characterized in that: The initialization management is to use the function analyzer to extract function names, document strings, parameter names, descriptions and type information from Python modules, generate tool descriptions, and store these descriptions in a vector database to facilitate subsequent semantic search and matching.

3. The intelligent agent framework based on a large language model according to claim 1, characterized in that: The step of decomposing the user query information into a task plan consisting of a series of subtasks based on the user query information and the tool related information further includes: By setting the similarity threshold of semantic search, further decomposition of subtasks is triggered until the tool selection model can select an appropriate tool.

4. The intelligent agent framework based on a large language model according to claim 2, characterized in that: The method of setting a similarity threshold of semantic search to trigger further decomposition of subtasks until the tool selection model can select a suitable tool includes the following steps: S1. Receive initial user query information. The system receives the query information input by the user and performs pre-processing for subsequent processing; S2. Generate a preliminary task plan. Based on the user query information, use a large language model to decompose the query information into a series of preliminary subtasks to form a preliminary task plan; S3, calculate the preliminary subtask embedding, generate the corresponding semantic embedding for each preliminary subtask, and the embedding vector represents the core semantic information of the subtask; S4, perform tool matching, match the embedding of the preliminary subtask with the embedding of the tool description in the tool library, and calculate the similarity score; S5. Check the matching results, compare the similarity scores between each subtask and the tool, and check whether there is a tool that meets the preset similarity threshold. If the similarity score of the found tool is higher than the threshold, record the matched tool and enter the rematching process.

5. The intelligent agent framework based on a large language model according to claim 3, characterized in that: The compounding process comprises the following steps: For subtasks for which no suitable tools are found, further decompose them into more fine-grained subtasks; Repeat the process of calculating subtask embedding and checking matching results for the newly generated subtask; Based on the result of the recursive decomposition, the task plan is updated to form a detailed task plan including the newly generated subtasks; Dynamically adjust the similarity threshold of semantic search based on tool matching results and task requirements to optimize the effect of tool matching; For each subtask in the new task plan, the tool matching process is repeated until the maximum recursion depth is reached; The system outputs a task plan containing all subtasks and their corresponding tool selection results for the intelligent agent to execute.

6. The intelligent agent framework based on a large language model according to claim 1, characterized in that: The tool search module uses the tool library to find the relevant tools for each subtask, including: Create semantic embeddings for each subtask and tool, match the embedding of the subtask with the embedding of the tool description, and output the top k tools with the highest association with each subtask.

7. The intelligent agent framework based on a large language model according to claim 5, characterized in that: The method creates a semantic embedding for each subtask and tool, matches the embedding of the subtask with the embedding of the tool description, and outputs the top k tools with the highest correlation with each subtask, including: Subtask embedding generation: Generate a semantic embedding vector for each subtask to capture the semantic information of the subtask; Tool embedding generation, generating a semantic embedding vector for each tool in the tool library, representing the functional description of the tool; Calculate similarity, using the similarity metric method to calculate the similarity score between the subtask embedding and the tool embedding; Sorting and selection, sorting the tools according to the similarity scores, and selecting the top k tools with the highest similarity as the most relevant tools; Output the results and output the top k most relevant tools corresponding to each subtask for the intelligent agent to perform subsequent operations.

8. The intelligent agent framework based on a large language model according to claim 6, characterized in that: The tools in the tool library have unique identifiers, and each model calls the tools and tool-related information by parsing the identifiers.

9. The intelligent agent framework based on a large language model according to claim 1, characterized in that: The tools in the tool library are executable functions that perform related functions and return results, including but not limited to mathematical functions provided by computers and APIs for calling robots.

10. The intelligent agent framework based on a large language model according to claim 1, characterized in that: The task decomposition model, tool selection model, parameter extraction model and operation model are all large language models triggered by different system prompt words.

Citation Information

Patent Citations

  • Interactive intelligent software application construction tool based on large model

    CN118939261A

  • Task processing method and device based on intelligent agent and electronic equipment

    CN119166834A

  • Task scale scheduling method and device based on large model

    CN119201392A

  • Complex problem analysis method based on few-sample prompt learning, medium, device and program product

    CN119292770A

Cited By

  • Remote sensing image processing system and method based on intelligent agent

    CN120596070A

  • A remote sensing image processing system and method based on intelligent agent

    CN120596070B

  • Task description optimization method and device, equipment, storage medium and product

    CN120764579A

  • Information query method and device, medium and electronic equipment

    CN121350117A

  • Intelligent agent tool selection method with self-reflecting and caching mechanism

    CN121525735A