Large model tool retrieval method and device, equipment, storage medium and program product

By employing a multi-level retrieval method and utilizing hierarchical indexing of functional keywords, semantic vectors, and descriptive keywords, the problem of low efficiency in calling large model tools is solved, and efficient tool calling is achieved.

CN121144487APending Publication Date: 2025-12-16CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511238298.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In existing technologies, the invocation efficiency of large model tools is low, resulting in wasted computing resources and increased response latency, mainly due to the consumption of a large number of tokens when fully loading the tool description text.

Method used

A multi-level retrieval method is adopted, which gradually narrows down the range of candidate tools through hierarchical indexing of functional keywords, semantic vectors and descriptive keywords, reduces full loading and improves call efficiency.

Benefits of technology

By employing a multi-level retrieval strategy, token consumption was reduced, computational resource waste was avoided, and the efficiency of calling large model tools was improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144487A_ABST
    Figure CN121144487A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computers, and provides a large model tool retrieval method and device, equipment, a storage medium and a program product. Performing multi-level retrieval based on the tool calling request to obtain a target large model tool; wherein in the multi-level retrieval process, other levels except the first level execute corresponding retrieval strategies based on the retrieval result of the previous level and the tool calling request, and tool fingerprints on which the retrieval strategies of the levels depend are different. According to the technical scheme, multi-level retrieval can be carried out based on the tool calling request, retrieval strategies of all levels depend on different tool fingerprints, hierarchical retrieval is achieved according to the different tool fingerprints, and in the retrieval process of each level, the tool fingerprints can be retrieved only according to the corresponding tool fingerprint and the retrieval result of the previous level, so that the retrieval efficiency is improved. Therefore, quick retrieval can be realized, and the calling efficiency of the large model tool is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method, apparatus, device, storage medium, and program product for retrieving large model tools. Background Technology

[0002] As large-scale models evolve, the demand for their applications also increases. Therefore, to leverage the capabilities of single or multiple large-scale models, it's necessary to invoke large-scale model tools. Current methods typically involve selecting a suitable tool based on user commands and its description, then directly invoking the corresponding tool. However, as the number of large-scale model tools increases, a full load of all tools is required to determine the one compatible with the user commands. This full loading of tool descriptions consumes a significant amount of tokens, leading to wasted computing resources, increased response latency, and consequently, low inefficiency in invoking large-scale model tools. Summary of the Invention

[0003] This application provides a method, apparatus, device, storage medium, and program product for retrieving large model tools, in order to solve the technical problem of low calling efficiency of large model tools in the prior art.

[0004] In a first aspect, embodiments of this application provide a method for retrieving large model tools, including: Obtain the tool call request; Based on the tool call request, a multi-level search is performed to obtain the target large model tool; wherein, in the multi-level search process, except for the first level, the other levels execute the corresponding search strategy based on the search results of the previous level and the tool call request, and the tool fingerprint on which the search strategy of each level depends is different.

[0005] In one embodiment, the step of performing multi-level retrieval based on the tool invocation request to obtain the target large model tool includes: Extract the functional keywords from the tool call request, and execute the first-level search strategy based on the functional keywords to obtain the first candidate tool; The tool invocation request is vectorized, and a second-level retrieval strategy is executed based on the vectorized tool invocation request and the first candidate tool to obtain a second candidate tool; Extract the descriptive keywords from the tool call request, and execute a third-level retrieval strategy based on the second candidate tool and the descriptive keywords to obtain the third candidate tool; The target large model tool is determined based on the third candidate tool.

[0006] In one embodiment, the step of executing a first-level retrieval strategy based on the functional keywords to obtain a first candidate tool includes: The functional keywords are matched with the functional parameters of large model tools in relational databases to obtain matching results; Based on the matching results, the first candidate tool is determined.

[0007] In one embodiment, the tool invocation request based on the vectorized representation and the first candidate tool execute a second-level retrieval strategy to obtain a second candidate tool, including: Based on the identifier of the first candidate tool, extract the semantic vector of each first candidate tool from the vector database; Calculate the similarity between the vectorized representation of the tool invocation request and the semantic vector of each of the first candidate tools; Based on the similarity, the second candidate tool is determined.

[0008] In one embodiment, the step of executing a third-level retrieval strategy based on the second candidate tool and the descriptive keywords to obtain the third candidate tool includes: Based on the descriptive keywords, the third candidate tool is obtained by searching the descriptive parameters of the second candidate tool.

[0009] In one embodiment, the step of retrieving the third candidate tool from the description parameters of the second candidate tool based on the description keywords includes: Based on the described keywords, the third candidate tool is obtained by searching the description parameters of the second candidate tool using ElasticSearch.

[0010] In one embodiment, determining the target large model tool based on the third candidate tool includes: The third candidate tool and its functional description are pushed to the user terminal. If a user confirms the third candidate tool, the target large model tool is determined based on the confirmation, and the structured data of the target large model tool is obtained for the large model to call.

[0011] In one embodiment, after performing multi-level retrieval based on the tool invocation request to obtain the target large model tool, the method further includes: If a large model tool to be stored is detected, extract the functional parameters, description parameters, and semantic vector of the large model tool to be stored. The functional parameters, the descriptive parameters, and the semantic vectors are stored hierarchically, and the functional parameters, descriptive parameters, and semantic vectors are associated with the identifier of the large model tool to be stored.

[0012] Secondly, embodiments of this application provide a large model tool retrieval device, comprising: The acquisition module is used to acquire tool invocation requests; A multi-level retrieval module is used to perform multi-level retrieval based on the tool call request to obtain the target large model tool; wherein, in the multi-level retrieval process, other levels except the first level execute the corresponding retrieval strategy based on the retrieval results of the previous level and the tool call request, and the tool fingerprint on which the retrieval strategy of each level depends is different.

[0013] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the large model tool retrieval methods described above.

[0014] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the large model tool retrieval method as described above.

[0015] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the large model tool retrieval method as described above.

[0016] The large model tool retrieval method, apparatus, device, storage medium, and program product provided in this application perform multi-level retrieval based on tool invocation requests. Each level's retrieval strategy relies on different tool fingerprints, and hierarchical indexing is implemented according to these different tool fingerprints. For levels other than the first level, the corresponding retrieval strategy is executed based on the retrieval results of the previous level and the tool invocation request. Therefore, based on the technical solution provided in this application, when retrieving large model tools, it is not necessary to load all tool description text. Instead, rapid retrieval can be achieved simply by using the corresponding tool fingerprint and the retrieval results of the previous level during the retrieval process at each level. This reduces the required tokens, avoids wasting computational resources, and improves the efficiency of large model tool invocation. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the large model tool retrieval method provided in this application.

[0019] Figure 2 This is a schematic diagram of the triplet knowledge base provided in this application.

[0020] Figure 3 This is a schematic diagram of the structure of the large model tool retrieval device provided in this application.

[0021] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] The following is combined with Figures 1-4 This application describes the large-scale model tool retrieval method, apparatus, device, storage medium, and program product.

[0024] Figure 1 This is a flowchart illustrating a large model tool retrieval method according to an exemplary embodiment. For example... Figure 1 As shown in an exemplary embodiment, the large model tool retrieval method includes steps 110 to 120, which are described in detail below.

[0025] Step 110: Obtain the tool call request.

[0026] In this embodiment of the application, a tool call request input by the user is obtained. The tool call request may be a function that the user describes they want to achieve, such as checking the abnormal bandwidth utilization log of resource pool node N7 in xx location last week.

[0027] Step 120: Perform multi-level retrieval based on the tool call request to obtain the target large model tool; wherein, in the multi-level retrieval process, for each level other than the first level, the corresponding retrieval strategy is executed based on the retrieval results of the previous level and the tool call request, and the tool fingerprint on which the retrieval strategy of each level depends is different.

[0028] In this embodiment, multi-level retrieval is performed based on tool call requests to obtain the target large model tool. The retrieval strategies at each level rely on different tool fingerprints. For example, retrieval can be performed based on tool fingerprints such as the functional parameters, semantic vectors, and description parameters of the large model tool. In the multi-level retrieval process, the first level directly performs retrieval based on the tool call request, while other levels besides the first level execute the corresponding retrieval strategy based on the retrieval results of the previous level and the tool call request.

[0029] In this embodiment, multi-level retrieval is performed based on tool call requests. The retrieval strategies at each level rely on different tool fingerprints. Hierarchical indexing is implemented based on these different tool fingerprints. For levels other than the first level, the corresponding retrieval strategy is executed based on the retrieval results of the previous level and the tool call request. Therefore, based on the technical solution provided in this application, when retrieving large model tools, it is not necessary to load all tool description text. Instead, fast retrieval can be achieved simply by using the corresponding tool fingerprint and the retrieval results of the previous level during the retrieval process at each level. This reduces the required tokens, avoids wasting computational resources, and improves the efficiency of calling large model tools.

[0030] In one exemplary embodiment of this application, the step of performing multi-level retrieval based on the tool invocation request to obtain the target large model tool includes: Extract the functional keywords from the tool call request, and execute the first-level search strategy based on the functional keywords to obtain the first candidate tool; The tool invocation request is vectorized, and a second-level retrieval strategy is executed based on the vectorized tool invocation request and the first candidate tool to obtain a second candidate tool; Extract the descriptive keywords from the tool call request, and execute a third-level retrieval strategy based on the second candidate tool and the descriptive keywords to obtain the third candidate tool; The target large model tool is determined based on the third candidate tool.

[0031] In this embodiment of the application, a tuple knowledge base can be pre-formed based on the tool fingerprint, such as based on the functional parameters, semantic vectors, and description parameters of the large model tool, to form a tuple knowledge base. Figure 2The triplet knowledge base shown is used to complete three levels of retrieval. The triplet knowledge base includes a relational database (first-level index - relational database), a vector database (second-level index - vector database), and a keyword database (third-level index - Elasticsearch), thus forming a three-level index structure of relational index → ​​vector index → ​​keyword index. These three levels of index structure work together through a chain working mechanism to achieve efficient tool retrieval.

[0032] Specifically, in the first-level retrieval process, namely the relational index, functional keywords are extracted from the tool call request. These functional keywords enable rapid, structured queries, quickly filtering out large-scale tools that don't meet the functional requirements and obtaining a set of first-candidate tools. The identifiers of these first-candidate tools are then passed to the second level, the vector index, to vectorize the tool call request for further semantic similarity calculation. The second-candidate tools with high similarity are then passed to the third level, the keyword index, to extract descriptive keywords from the tool call request. Finally, a full-text search and exact match are performed based on these descriptive keywords.

[0033] In this embodiment of the application, each index level has a set of filtering rules to eliminate tools that do not meet the requirements. For example, in a relational index, preliminary filtering can be performed using functional keywords; in a vector index, filtering can be performed by setting a similarity threshold; and in a keyword index, filtering can be performed by the keyword matching degree of the descriptive keywords.

[0034] In an exemplary embodiment of this application, the step of executing a first-level retrieval strategy based on the functional keywords to obtain a first candidate tool includes: The functional keywords are matched with the functional parameters of large model tools in relational databases to obtain matching results; Based on the matching results, the first candidate tool is determined.

[0035] In this embodiment, each large model tool has corresponding functional parameters. These parameters describe the main functions of the large model tool, such as image processing and natural language processing. The functional parameters can be single words or phrases, and can be used to quickly filter out large model tools that do not meet the requirements.

[0036] The basic information of large model tools is stored in a relational database. The basic information includes the identifier of the large model tool, functional parameters, parameter signatures, etc., such as storing functional parameters and structured parameter templates in MySQL.

[0037] The mentioned functional keywords are matched with functional parameters in the relational database to obtain matching results. Based on these results, the first candidate tool is determined, i.e., the large model tool whose functional parameters match the functional keywords. For example, in the tool call request to check the abnormal bandwidth utilization log of resource pool node N7 in location xx last week, the relational database is queried with the following conditions: function_tags includes resource pools, and the name of the resource pool in param_signature is xx. This allows large model tools that are not part of network operations and maintenance, such as customer service robots, to be excluded from the relational database, thus obtaining the first candidate tool.

[0038] In one exemplary embodiment of this application, the tool invocation request based on vectorized representation and the first candidate tool execute a second-level retrieval strategy to obtain a second candidate tool, including: Based on the identifier of the first candidate tool, extract the semantic vector of each first candidate tool from the vector database; Calculate the similarity between the vectorized representation of the tool invocation request and the semantic vector of each of the first candidate tools; Based on the similarity, the second candidate tool is determined.

[0039] In this embodiment, specifically, natural language processing techniques are used to convert the descriptive text of large model tools into high-dimensional vectors, obtaining semantic vectors for the large model tools. For example, embedding models can be used to convert the descriptive text into high-dimensional semantic vectors, which are then used to capture the semantic features of the large model tools. Semantic vectors can be used to calculate the similarity between tools, thereby achieving semantic-level retrieval. A vector database is used to store the semantic vectors of large model tools. Semantic vectors support efficient vector similarity calculation, enabling the rapid finding of semantically similar large model tools on large-scale datasets.

[0040] Each large model tool has a unique identifier, tool_id, which identifies its position in the database. Therefore, based on the identifier of the first candidate tool, the semantic vectors of each first candidate tool can be quickly extracted from the vector database.

[0041] The similarity between the vectorized representation of the tool call request and the semantic vectors of each first candidate tool can be calculated. Specifically, the cosine similarity, Euclidean similarity, etc., between the two can be calculated.

[0042] Based on similarity, a second candidate tool is determined. Specifically, the similarity can be sorted in descending order. Based on the descending order, the top-K large model tools are selected as the second candidate tools. The value of K in the top-K can be set based on experience or determined based on the number of first candidate tools, such as setting K to 20% of the number of first candidate tools.

[0043] In one exemplary embodiment of this application, the step of executing a third-level retrieval strategy based on the second candidate tool and the descriptive keywords to obtain the third candidate tool includes: Based on the descriptive keywords, the third candidate tool is obtained by searching the descriptive parameters of the second candidate tool.

[0044] In this embodiment, the description parameters are used to describe the input parameters and output results of the large model tool, including the parameter name, type, and default value. The description parameters are used to accurately match the user's needs, ensuring that the retrieved large model tool can meet specific parameter requirements. Therefore, the description parameters of the second candidate tool are determined based on the identifier of the second candidate tool. Then, based on the extracted description keywords, the matching degree between the description keywords in the tool call request and the description parameters of the second candidate tool is calculated. The third candidate tool is then determined based on the matching degree.

[0045] For example, in response to the aforementioned tool call request to check the abnormal bandwidth utilization log of resource pool node N7 in location xx last week, the third candidate tool that precisely matches the N7 node and the 7-day time range was matched.

[0046] In this embodiment of the application, during the multi-level retrieval process, after the first candidate tool is determined in the first-level retrieval process, the semantic vector of the first candidate tool is loaded through the identifier of the first candidate tool. After the second candidate tool is determined in the second level, the description parameters of the second candidate tool are loaded through the identifier of the second candidate tool. Through the technical solution provided by this application, the tool range will be narrowed in each level of retrieval process, and only one or a few third candidate tools that match the best will be obtained in the end. It is not necessary to load all the large model tools, which saves the token usage of the large model to a certain extent.

[0047] In one exemplary embodiment of this application, the step of searching for the third candidate tool based on the descriptive keywords in the descriptive parameters of the second candidate tool includes: Based on the described keywords, the third candidate tool is obtained by searching the description parameters of the second candidate tool using ElasticSearch.

[0048] In this embodiment of the application, ElasticSearch is an open-source, distributed search and analytics engine primarily used for real-time search, analysis, and visualization of massive amounts of data. Built on top of the Apache Lucene search engine library, it provides powerful, flexible, and easy-to-use features, and excels particularly at handling unstructured or semi-structured data (such as logs, documents, metrics, etc.). Therefore, this application obtains a third candidate tool by performing keyword matching on the description parameters of the second candidate tool using ElasticSearch.

[0049] In one exemplary embodiment of this application, determining the target large model tool based on the third candidate tool includes: The third candidate tool and its functional description are pushed to the user terminal. If a user confirms the third candidate tool, the target large model tool is determined based on the confirmation, and the structured data of the target large model tool is obtained for the large model to call.

[0050] In this embodiment, the determined third candidate tool and its functional description are pushed to the user terminal. The user can view the most suitable third candidate tools retrieved for the tool call request on the user terminal. The user can select the most preferred large model tool by viewing the functional description of the third candidate tool. If the user's confirmation operation for the third candidate tool is received, the third candidate tool corresponding to the confirmation operation is taken as the target large model tool. Then, the knowledge base is queried according to the identifier of the target large model tool, and the structured parameter template (non-natural language description) of the target large model tool is returned for the large model to call.

[0051] In this embodiment, the functional description of the third candidate tool pushed to the user terminal can be either the complete functional description of the third candidate tool or a brief functional description. Pushing a brief functional description can save on the token usage of the large model to some extent. Furthermore, in this embodiment, the structured data of the target large model tool is only obtained after the user confirms which large model tool to use (i.e., the target large model tool). For example, if three third candidate tools are identified, and the structured data of each third candidate tool is very large, when the user confirms the use of one of the third candidate tools, the structured data of the other two third candidate tools do not need to be loaded, further saving on the token usage of the large model.

[0052] In an exemplary embodiment of this application, after performing multi-level retrieval based on the tool invocation request to obtain the target large model tool, the method further includes: If a large model tool to be stored is detected, extract the functional parameters, description parameters, and semantic vector of the large model tool to be stored. The functional parameters, the descriptive parameters, and the semantic vectors are stored hierarchically, and the functional parameters, descriptive parameters, and semantic vectors are associated with the identifier of the large model tool to be stored.

[0053] In this embodiment, a corresponding tool fingerprint is formed for each large model tool, including the aforementioned functional parameters, descriptive parameters, and semantic vector. The tool fingerprints are stored hierarchically, and data association is achieved through identifiers.

[0054] In this embodiment, identifiers allow for quick access to detailed information about large model tools, such as functional parameters, descriptive parameters, and semantic vectors. This separates frequently accessed semantic vectors from frequently changing functional parameters, satisfying millisecond-level retrieval requirements (vector databases like Weaviate) while ensuring strong consistency of structured parameter templates (relational databases like MySQL). Additionally, ElasticSearch is used to solve the problem of precise keyword matching.

[0055] The large model tool retrieval device provided in this application is described below. The large model tool retrieval device described below can be referred to in correspondence with the large model tool retrieval method described above. It should be noted that the device provided in the following embodiments belongs to the same concept as the method provided in the above embodiments, and the specific way in which each module and unit performs operations has been described in detail in the method embodiments, and will not be repeated here.

[0056] In one exemplary embodiment of this application, please refer to Figure 3 , Figure 3 This is an exemplary embodiment of a large model tool retrieval device, comprising the following modules.

[0057] Module 310 is used to obtain tool call requests; The multi-level retrieval module 320 is used to perform multi-level retrieval based on the tool call request to obtain the target large model tool; wherein, in the multi-level retrieval process, other levels except the first level execute the corresponding retrieval strategy based on the retrieval results of the previous level and the tool call request, and the tool fingerprint on which the retrieval strategy of each level depends is different.

[0058] In one exemplary embodiment of this application, the multi-level retrieval module 320 includes: The first execution submodule is configured to extract functional keywords from the tool call request and execute a first-level retrieval strategy based on the functional keywords to obtain a first candidate tool; The second execution submodule is configured to vectorize the tool invocation request and execute a second-level retrieval strategy based on the vectorized tool invocation request and the first candidate tool to obtain a second candidate tool; The third execution submodule is configured to extract the descriptive keywords from the tool call request, and execute a third-level retrieval strategy based on the second candidate tool and the descriptive keywords to obtain the third candidate tool; The determination submodule is configured to determine the target large model tool based on the third candidate tool.

[0059] In one exemplary embodiment of this application, the first execution submodule includes: The matching unit is configured to match the functional keywords with the functional parameters of large model tools in a relational database to obtain matching results; The first determining unit is configured to determine the first candidate tool based on the matching result.

[0060] In one exemplary embodiment of this application, the second execution submodule includes: The extraction unit is configured to extract the semantic vectors of each of the first candidate tools from the vector database based on the identifiers of the first candidate tools. A computational unit configured to compute the similarity between the vectorized representation of the tool invocation request and the semantic vectors of each of the first candidate tools; The second determining unit is configured to determine the second candidate tool based on the similarity.

[0061] In one exemplary embodiment of this application, the third execution submodule includes: The retrieval unit is configured to perform a search within the description parameters of the second candidate tool based on the description keywords to obtain the third candidate tool.

[0062] In one exemplary embodiment of this application, the retrieval unit includes: The retrieval subunit is configured to retrieve the third candidate tool by searching the description parameters of the second candidate tool using ElasticSearch based on the description keywords.

[0063] In one exemplary embodiment of this application, determining a submodule includes: The push unit is configured to push the third candidate tool and its functional description to the user terminal. The third determining unit is configured to, upon receiving a user's confirmation operation for the third candidate tool, determine the target large model tool based on the confirmation operation, and obtain the structured data of the target large model tool for the large model to call.

[0064] In one exemplary embodiment of this application, the large model tool retrieval device further includes: The extraction module is configured to extract the functional parameters, description parameters, and semantic vectors of the large model tool to be stored if a large model tool to be stored is detected. The hierarchical storage module is configured to store the functional parameters, the descriptive parameters, and the semantic vector in a hierarchical manner, and to associate the functional parameters, the descriptive parameters, and the semantic vector through the identifier of the large model tool to be stored.

[0065] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a large model tool retrieval method, which includes: obtaining a tool invocation request; Based on the tool call request, a multi-level search is performed to obtain the target large model tool; wherein, in the multi-level search process, except for the first level, the other levels execute the corresponding search strategy based on the search results of the previous level and the tool call request, and the tool fingerprint on which the search strategy of each level depends is different.

[0066] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0067] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the large model tool retrieval method provided by the above methods, which includes: obtaining a tool invocation request. Based on the tool call request, a multi-level search is performed to obtain the target large model tool; wherein, in the multi-level search process, except for the first level, the other levels execute the corresponding search strategy based on the search results of the previous level and the tool call request, and the tool fingerprint on which the search strategy of each level depends is different.

[0068] In another aspect, this application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the large model tool retrieval methods provided by the above methods, the method comprising: obtaining a tool invocation request; Based on the tool call request, a multi-level search is performed to obtain the target large model tool; wherein, in the multi-level search process, except for the first level, the other levels execute the corresponding search strategy based on the search results of the previous level and the tool call request, and the tool fingerprint on which the search strategy of each level depends is different.

[0069] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0070] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0071] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for retrieving large model tools, characterized in that, include: Obtain the tool call request; Based on the tool call request, a multi-level search is performed to obtain the target large model tool; wherein, in the multi-level search process, except for the first level, the other levels execute the corresponding search strategy based on the search results of the previous level and the tool call request, and the tool fingerprint on which the search strategy of each level depends is different.

2. The large model tool retrieval method according to claim 1, characterized in that, The process of performing multi-level retrieval based on the tool call request to obtain the target large model tool includes: Extract the functional keywords from the tool call request, and execute the first-level search strategy based on the functional keywords to obtain the first candidate tool; The tool invocation request is vectorized, and a second-level retrieval strategy is executed based on the vectorized tool invocation request and the first candidate tool to obtain a second candidate tool; Extract the descriptive keywords from the tool call request, and execute a third-level retrieval strategy based on the second candidate tool and the descriptive keywords to obtain the third candidate tool; The target large model tool is determined based on the third candidate tool.

3. The large model tool retrieval method according to claim 2, characterized in that, The first-level retrieval strategy based on the functional keywords to obtain the first candidate tool includes: The functional keywords are matched with the functional parameters of large model tools in relational databases to obtain matching results; Based on the matching results, the first candidate tool is determined.

4. The large model tool retrieval method according to claim 2, characterized in that, The tool invocation request based on vectorized representation and the first candidate tool execute a second-level retrieval strategy to obtain a second candidate tool, including: Based on the identifier of the first candidate tool, extract the semantic vector of each first candidate tool from the vector database; Calculate the similarity between the vectorized representation of the tool invocation request and the semantic vector of each of the first candidate tools; Based on the similarity, the second candidate tool is determined.

5. The large model tool retrieval method according to claim 2, characterized in that, The third-level retrieval strategy, based on the second candidate tool and the descriptive keywords, is used to obtain the third candidate tool, including: Based on the descriptive keywords, the third candidate tool is obtained by searching the descriptive parameters of the second candidate tool.

6. The large model tool retrieval method according to claim 5, characterized in that, The step of retrieving the third candidate tool based on the descriptive keywords from the description parameters of the second candidate tool includes: Based on the described keywords, the third candidate tool is obtained by searching the description parameters of the second candidate tool using ElasticSearch.

7. The large model tool retrieval method according to claim 2, characterized in that, The step of determining the target large model tool based on the third candidate tool includes: The third candidate tool and its functional description are pushed to the user terminal. If a user confirms the third candidate tool, the target large model tool is determined based on the confirmation, and the structured data of the target large model tool is obtained for the large model to call.

8. The method for retrieving large model tools according to any one of claims 1 to 7, characterized in that, After obtaining the target large model tool through multi-level retrieval based on the tool invocation request, the method further includes: If a large model tool to be stored is detected, extract the functional parameters, description parameters, and semantic vector of the large model tool to be stored. The functional parameters, the descriptive parameters, and the semantic vectors are stored hierarchically, and the functional parameters, descriptive parameters, and semantic vectors are associated with the identifier of the large model tool to be stored.

9. A large model tool retrieval device, characterized in that, include: The acquisition module is used to acquire tool invocation requests; A multi-level retrieval module is used to perform multi-level retrieval based on the tool call request to obtain the target large model tool; wherein, in the multi-level retrieval process, other levels except the first level execute the corresponding retrieval strategy based on the retrieval results of the previous level and the tool call request, and the tool fingerprint on which the retrieval strategy of each level depends is different.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the large model tool retrieval method as described in any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the large model tool retrieval method as described in any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the large model tool retrieval method as described in any one of claims 1 to 8.