Information processing method and device, equipment and storage medium
By accessing multiple API dynamic selection and verification adjustment, the large language model solves the lag problem caused by the static knowledge base, achieving more flexible and real-time answer generation, and improving the accuracy of the answer.
Patent Information
- Application Number
- CN202510422544.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-18
AI Technical Summary
Due to the reliance on static knowledge base, large language models have lagged in search results and inflexible answers, which affects the accuracy of answers, especially when it comes to the latest information or professional fields, which are more misleading.
By connecting to multiple application programming interface APIs, dynamically selecting the appropriate APIs from them for searching, obtaining the latest search results, and generating answer information through multiple checksum adjustments.
It improves the retrieval flexibility and real-time nature of the large language model, and the generated answer information is more accurate, adapting to the needs of diverse users.
Smart Images

Figure CN120336480A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to an information processing method, apparatus, device, and storage medium. Background Art
[0002] A large language model (LLM) refers to a deep learning model trained using a large amount of text data. This model can generate natural language text or understand the meaning of language text, and to a certain extent, simulate the human language cognition and generation process.
[0003] In practical applications, a knowledge base can be pre-constructed for the large language model. When a user inputs question information, the large language model can retrieve information with the help of the knowledge base and output the retrieval result to the user as an answer. However, the currently constructed knowledge bases are generally static, that is, it is difficult to obtain the latest knowledge. Therefore, the retrieval results obtained by the large language model using such a knowledge base for retrieval will have a certain lag, lack flexibility, and thus affect the accuracy of the answer. Summary of the Invention
[0004] Embodiments of this application provide an information processing method, apparatus, device, and storage medium to improve the real-time performance and flexibility of the detection results of the large language model, as well as the accuracy of the output answer information.
[0005] In a first aspect, embodiments of this application provide an information processing method, including:
[0006] Obtain user question information;
[0007] In the case of determining that the user question information needs to be retrieved, call the target API corresponding to the user question information from multiple application programming interfaces (APIs) accessed by the large language model to obtain a first retrieval result corresponding to the user question information, where the target API is used to retrieve the user question information;
[0008] Generate answer information corresponding to the user question information based on the first retrieval result;
[0009] Output the answer information.
[0010] Optionally, the step of calling the target API corresponding to the user question information from multiple application programming interfaces (APIs) accessed by the large language model to obtain a first retrieval result corresponding to the user question information includes:
[0011] Generate a retrieval strategy based on the user question information and multiple APIs, where the retrieval strategy is used to instruct the large language model to retrieve the user question information based on the target API;
[0012] Invoke the target API based on the retrieval strategy to obtain the first retrieval result.
[0013] Optionally, the step of invoking the target API based on the retrieval strategy to obtain the first retrieval result includes:
[0014] Write the call code for the target API based on the retrieval strategy;
[0015] Compile the call code to obtain the first retrieval result.
[0016] Optionally, before generating the answer information corresponding to the user's question based on the first retrieval result, the method further includes:
[0017] Based on the user's question, verify whether the keywords in the first retrieval result match the keywords in the user's question to obtain a first verification result;
[0018] The step of generating the answer information corresponding to the user's question based on the first retrieval result includes:
[0019] When the first verification result indicates that the keywords in the first retrieval result match the keywords in the user's question, generate the answer information based on the first retrieval result.
[0020] Optionally, the method further includes:
[0021] When the first verification result indicates that the keywords in the first retrieval result do not match the keywords in the user's question, adjust the first retrieval result based on the user's question to obtain a second retrieval result;
[0022] The step of generating the answer information corresponding to the user's question based on the first retrieval result includes:
[0023] Generate the answer information based on the second retrieval result.
[0024] Optionally, before outputting the answer information, the method further includes:
[0025] Based on the user's question and the retrieval result, verify whether the keywords in the answer information match the keywords in the user's question and the keywords in the retrieval result to obtain a second verification result;
[0026] The step of outputting the answer information includes:
[0027] When the second verification result indicates that the keywords of the answer information match the keywords of the user's question information and the keywords of the retrieval result, output the answer information.
[0028] Optionally, the method further includes:
[0029] When the second verification result indicates that the keywords of the answer information do not match the keywords of the user's question information or the keywords of the retrieval result, adjust the answer information based on the user's question information and the retrieval result to obtain a new answer information;
[0030] The outputting the answer information includes:
[0031] Output the new answer information.
[0032] In a second aspect, an embodiment of the present application provides an information processing device, including:
[0033] An information acquisition module, configured to acquire user question information;
[0034] An interface call module, configured to, when it is determined that the user question information needs to be retrieved, call a target API corresponding to the user question information from multiple application programming interfaces (APIs) accessed by the large language model to obtain a first retrieval result corresponding to the user question information, where the target API is used to retrieve the user question information;
[0035] An information generation module, configured to generate answer information corresponding to the user question information based on the first retrieval result;
[0036] An information output module, configured to output the answer information.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, the device includes: a processor, a memory, and a system bus;
[0038] The processor and the memory are connected through the system bus;
[0039] The memory is used to store a program, the program includes instructions, and when the instructions are executed by the processor, the processor is caused to execute any implementation step of the above information processing method.
[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored, and when the instructions run on an electronic device, the electronic device is caused to execute any implementation step of the above information processing method.
[0041] From the above technical solutions, it can be seen that the embodiments of the present application have the following advantages:
[0042] In the embodiment of the present application, the large language model first obtains the user's question information. Then, when it is determined that the user's question information needs to be retrieved, the large language model calls the target API corresponding to the user's question information from multiple APIs connected to the large language model to obtain the first retrieval result corresponding to the user's question information. The target API is used to retrieve the user's question information. Next, after the large language model generates the answer information corresponding to the user's question information based on the first retrieval result, the answer information can be output. It can be seen that by connecting multiple APIs, the large language model can dynamically select a suitable API from multiple APIs for retrieval according to the user's question information, thereby improving the flexibility of retrieval. Moreover, relying on the data update capabilities of the multiple APIs themselves, the large language model can obtain the current latest retrieval result when calling the target API. In this way, the large language model generates the answer information through the first retrieval result with high timeliness and flexibility, which helps to improve the accuracy of the answer information. Brief Description of the Drawings
[0043] Figure 1 It is a flowchart of an information processing method provided by an embodiment of the present application;
[0044] Figure 2 It is a schematic diagram of the overall framework of an information processing method provided by an embodiment of the present application;
[0045] Figure 3 It is a schematic diagram of the structure of an information processing device provided by an embodiment of the present application. Detailed Embodiment
[0046] As described above, the large language model is a deep learning model trained based on a large amount of text data. In practical applications, a knowledge base is usually pre-constructed for the large language model, and the knowledge base is relied on to retrieve the user's questions and then output the retrieval results. Due to the update cycle limitation of the knowledge base and the limitation of the information acquisition method, there may be a certain lag in the detection results, lack of flexibility, and thus affect the accuracy of the answers.
[0047] Specifically, when a large language model answers a user's question information, due to its learning mechanism based on large-scale data training, the generated answer information may not match the user's question information or may contain content errors. For example, there may be semantic biases when the large language model understands natural language. Especially for questions containing polysemous words, complex sentence patterns, or technical terms, the large language model may not be able to accurately grasp the context meaning, resulting in biased answer results. Or, the answer information of the large language model is generated based on probability distribution, rather than strict logical reasoning or fact verification. Therefore, it may generate seemingly reasonable but actually inaccurate or fictional information. Especially when it comes to domain knowledge with high professionalism and accuracy requirements such as medicine, law, or finance, misleading answers may occur. Or, since the training data of the large language model is usually static and it is difficult to obtain and integrate the latest information in real time, when it comes to content with strong timeliness, the model may still rely on outdated information to answer, thus reducing the accuracy of the answer.
[0048] Based on this, to solve the above problems, the embodiments of the present application provide an information processing method applied to a large language model, including: after obtaining the user's question information, when it is determined that the user's question information needs to be retrieved, call the target API corresponding to the user's question information from multiple application programming interfaces (APIs) accessed by the large language model to obtain the first retrieval result corresponding to the user's question information. The target API is used to retrieve the user's question information, and then generate the answer information corresponding to the user's question information based on the first retrieval result, and then the answer information can be output.
[0049] It can be seen that by accessing multiple APIs, the large language model can dynamically select a suitable API from multiple APIs for retrieval according to the user's question information, thereby improving the flexibility of retrieval. And, with the data update capabilities of the multiple APIs themselves, the large language model can obtain the current latest retrieval result when calling the target API. In this way, the large language model generates answer information through the first retrieval result with high real-time and flexibility, which helps to improve the accuracy of the answer information.
[0050] It should be noted that the embodiments of the present application do not limit the execution entity of the information processing method. For example, the information processing method of the embodiments of the present application can be applied to information processing devices such as servers or terminal devices. Correspondingly, the large language model can be installed in the information processing device. Among them, the server can be an independent server, a cluster server, or a cloud server. The terminal device can be an electronic device such as a smart phone, a computer, a personal digital assistant (PDA), or a tablet computer.
[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
[0052] Figure 1 This is a flowchart of an information processing method provided for the embodiments of this application. In combination with Figure 1 As shown, for the information processing method provided by the embodiments of this application, the large language model deployed in the corresponding information processing device is used as the execution subject to describe the specific implementation of the solution. This information processing method may include the following steps S101 to step S104.
[0053] S101: Obtain user question information.
[0054] The large language model can obtain user question information through various methods to improve the integrity and accuracy of obtaining user question information. For example, the large language model can obtain it through direct text input, that is, the user enters a question in a text box, and the model directly receives and processes it, thereby realizing the acquisition of user question information. In addition, the large language model can also support voice input, that is, the large language model converts the user question information in voice form into text through the built-in voice recognition function. Additionally, the large language model can also process image input. The user can upload a picture containing text or key information, and the model analyzes the picture content through image recognition and text extraction technology and extracts the user question information from it. Or the large language model can also combine historical conversation records, comprehensively consider the context information, understand the complete intention of the user, and use this historical conversation record as part of the user question information.
[0055] It should be noted that the acquisition methods of user question information are not limited to the above examples, nor are they limited to text input. The model can combine multimodal data (such as text, voice, and pictures, etc.) to obtain user question information from different channels to more comprehensively understand user needs.
[0056] S102: When it is determined that the user question information needs to be retrieved, call the target API corresponding to the user question information from multiple APIs accessed by the large language model to obtain the first retrieval result corresponding to the user question information. This target API is used to retrieve the user question information.
[0057] Here, for the process of determining whether the user question information needs to be retrieved, the embodiments of this application can provide multiple possible implementation manners. For ease of understanding, examples are given below.
[0058] As an example, a large language model can determine whether user question information needs to be retrieved by classifying the user question information.
[0059] For example, user question information can be divided into chatting questions and query questions. The content of chatting questions can include greetings, interest discussions, and subjective expressions. Such questions usually do not involve external knowledge and can generate natural conversations only relying on the existing knowledge reserve of the large language model. Therefore, no additional retrieval is required, and the model directly generates a response. Query questions need to be further subdivided, including knowledge-based questions and real-time information query questions, etc. For knowledge-based questions, their answers are relatively stable, such as definition explanations, historical events, or scientific common sense. Currently, large language models can usually directly provide accurate answers without calling external data. For real-time information query questions, such as weather conditions, stock prices, news dynamics, etc., since their answers change over time, it is difficult for the model to obtain the latest information through local data. Therefore, in such cases, it is necessary to retrieve and obtain the latest data related to the user question information through the API accessed by the large language model, so as to generate a precise response.
[0060] As another example, a large language model can also rely on its own semantic understanding ability and combine the existing knowledge base to determine whether user question information needs external retrieval.
[0061] In addition, the APIs that the above large language model can access include: business knowledge retrieval API, general information query API, real-time data acquisition API, etc. Among them, the business knowledge retrieval API is mainly used to query professional knowledge in specific business fields, such as industry standards, laws and regulations, or medical literature, etc. The general information query API is mainly used to retrieve a wide range of general information, such as encyclopedic knowledge, general Q&A, language translation, or mathematical algorithms, etc., to meet the daily information query needs. The real-time data acquisition API is mainly used to obtain dynamically updated data, such as weather forecasts, stock market conditions, news, or traffic conditions, etc., to improve the timeliness and accuracy of the answer information. These APIs specifically cover multiple fields such as knowledge retrieval, information query, and data acquisition, and can provide rich data support for the large language model. For example, when the user question information is "What's the weather like in Beijing today", the large language model can obtain the real-time weather forecast of Beijing by accessing the real-time data query API. It can be seen that the large language model can accurately and efficiently call external data sources to meet the diverse needs of users.
[0062] Correspondingly, when the large language model determines that the user question information needs to be retrieved, it can further retrieve the user question information, that is, execute step S202. For ease of understanding, the implementation process of step S202 will be introduced below in combination with a possible implementation manner.
[0063] As a possible implementation, step S202 above may specifically include the following steps 21 to 22.
[0064] Step 21: Generate a retrieval strategy based on the user's question information and multiple APIs, where the retrieval strategy is used to instruct the large language model to retrieve the user's question information based on the target API.
[0065] The core function of the retrieval strategy is to enable the large language model to select and call the appropriate API to meet the retrieval requirements corresponding to the user's question information. Based on the user's question information and multiple APIs, the keyword matching algorithm can be used to identify the category of the question and determine the most relevant target API, thereby formulating the corresponding retrieval strategy. The generated retrieval strategy enables the large language model to perform efficient and accurate retrieval based on the user's question information, improving the retrieval accuracy and response speed.
[0066] Step 22: Call the target API based on the retrieval strategy to obtain the first retrieval result.
[0067] In the embodiments of the present application, after determining the most relevant target API based on the retrieval strategy, first, the large language model will automatically write the call code for the target API according to the user's question and the retrieval strategy. For example, when the user's question information is "What's the weather like in Beijing today?", the large language model first extracts keywords from the user's question information through the keyword matching algorithm, thereby identifying keywords such as "weather", "Beijing", and "today", and confirming the most relevant target API, that is, the real-time data query API, based on the retrieval strategy. Subsequently, the large language model will automatically write the API call code, such as for RealTimeData API(query = "Beijing, today"), to obtain the real-time forecast of the weather in Beijing.
[0068] Then, after the call code for the target API is written, the large language model call code will be compiled and executed to correctly process the request of the user's question information and obtain the relevant data of the user's question information from the target API. Through this process, the large language model can extract effective information from the data returned by the target API, thereby obtaining the first retrieval result.
[0069] S103: Generate the answer information corresponding to the user's question information based on the first retrieval result.
[0070] In the embodiments of the present application, before generating the answer information corresponding to the user's question information based on the first retrieval result, the large language model can also verify the first retrieval result to generate the first verification result, and the verification result can indicate whether the keywords of the first retrieval result match the keywords of the user's question information, thereby improving the accuracy of the answer information corresponding to the user's question information generated by the large language model.
[0071] Specifically, the process of the large language model validating the first retrieval result can be reflected as follows: Based on the user's question information, it validates whether the keywords of the first retrieval result match the keywords of the user's question information to obtain the first validation result. In this process, the large language model extracts keywords based on the user's question information and compares them with the keywords in the first retrieval result to check whether they match.
[0072] Correspondingly, if the keywords in the first validation result match the keywords of the user's question information, it indicates that the validation passes, and the obtained first retrieval result is valid and can be used for subsequent answers. Among them, the matching of the keywords in the first validation result and the keywords of the user's question information can mean that the keywords of the two are exactly the same, or although the keywords of the two are different, their meanings are the same or similar.
[0073] In the case where the keywords of the first retrieval result represented by the first validation result do not match the keywords of the user's question information, the large language model will adjust the first retrieval result based on the user's question information to obtain a second retrieval result, and generate answer information based on the second retrieval result.
[0074] It should be noted that in actual applications, the above validation process can also be performed on the second retrieval result to obtain the validation result corresponding to the second retrieval result. When this validation result indicates that the keywords of the second retrieval result do not match the keywords of the user's question information, the second retrieval result is continuously adjusted to obtain a third retrieval result.
[0075] Based on this, it can be seen that the embodiments of the present application do not specifically limit the number of validations and adjustments of the retrieval results. The validation stops until the large language model determines that the keywords of the retrieval result corresponding to the latest validation result match the keywords of the user's question information. In this way, the latest retrieval result can be regarded as a valid retrieval, and the large language model can generate corresponding answer information based on the current latest retrieval result, thereby helping to improve the accuracy of the answer information.
[0076] S104: Output answer information.
[0077] In the embodiments of the present application, the answer information can be output in different forms to improve the user's interaction experience. For example, the answer information can be output in text form, that is, directly display the answer information in text form on the interface provided by the large language model. Another example is that the large language model can also combine text-to-speech technology to convert the answer information into speech for playback. In addition, when it comes to data visualization or complex information, pictures or charts can also be used for output to present the answer information in a more intuitive way. Or, the model can also adopt multimodal output, that is, combine text, speech, and pictures to output the answer information to improve the readability of the information.
[0078] It should be noted that the selection of the output method can be changed or combined according to the input form, requirements, and / or specific application scenarios of the user's question information.
[0079] In addition, before outputting the answer information, the large language model can also verify the answer information first, so as to improve the accuracy of the finally output answer information. For the convenience of understanding, the following will be described with examples.
[0080] As an example, in the embodiments of the present application, the large language model can verify the answer information based on the user's question information and the retrieval results to obtain a second verification result. Among them, the above-mentioned retrieval results refer to the retrieval results whose keywords match the keywords of the user's question information, and the retrieval results are used to generate the answer information.
[0081] More specifically, the process of the large language model verifying the answer information can be reflected as: the large language model verifies whether the keywords of the answer information match the keywords of the user's question information and the keywords of the retrieval results based on the user's question information and the above-mentioned retrieval results (for example, the first retrieval result whose keywords match the keywords of the user's question information), and obtains a second verification result. Among them, verifying whether the keywords of the answer information match the keywords of the user's question information and the keywords of the retrieval results means that the keywords of the answer information are the same as the keywords of the user's question information, and the keywords of the answer information are the same as the keywords of the retrieval results, or have the same or similar meanings.
[0082] Correspondingly, if the second verification result indicates that the keywords of the answer information match the keywords of the user's question information and the keywords of the retrieval results, the large language model can output the answer information.
[0083] If the second verification result indicates that the keywords of the answer information do not match the keywords of the user's question information or the keywords of the retrieval results, the large language model can adjust the answer information based on the user's question information and the retrieval results to obtain a new answer information, and output the new answer information.
[0084] It should be noted that in actual applications, the above-mentioned new answer information can also be verified again to obtain the verification result corresponding to the new answer information. When the verification result indicates that the keywords of the new answer information do not match the keywords of the user's question information and the keywords of the retrieval results, continue to adjust the new answer information.
[0085] Based on this, it can be seen that the embodiments of the present application do not specifically limit the number of times of verifying and adjusting the answer information. It is not until the keywords of the newly determined answer information by the large language model match the keywords of the user's question information and the keywords of the retrieval results that the verification is stopped. In this way, the large language model adjusts the answer information based on the user's question information and the retrieval results to obtain a new answer information, so as to improve the accuracy of the output answer information.
[0086] Based on the relevant content of the above steps S101 - S104, it can be known that in the embodiments of the present application, the large language model can obtain the user's question information. When it is determined that the user's question information needs to be retrieved, among the multiple APIs accessed by the large language model, the target API corresponding to the user's question information is called to obtain the first retrieval result corresponding to the user's question information. The target API retrieves the user's question information and generates the answer information corresponding to the user's question information based on the first retrieval result. Finally, the answer information is output. It can be seen that by accessing multiple APIs, the large language model can dynamically select a suitable API from multiple APIs for retrieval according to the user's question information, thereby improving the flexibility of retrieval. And, with the data update capabilities of the multiple APIs themselves, the large language model can obtain the current latest retrieval result when calling the target API. In this way, the large language model generates the answer information through the first retrieval result with high timeliness and flexibility, which helps to improve the accuracy of the answer information.
[0087] Furthermore, for ease of understanding, the embodiments of the present application may also introduce the information processing method from the perspective of the overall framework in combination with the accompanying drawings.
[0088] Figure 2 It is a schematic diagram of the overall framework of an information processing method provided by the embodiments of the present application. Combining Figure 2 As shown, when the user inputs a query (i.e., obtaining the user's question information in the above embodiments), the large language model first determines whether additional knowledge is needed to answer the question. If no additional knowledge is needed, the large language model will directly generate an answer and reflect on the answer through the large language model (i.e., the verification process in the above embodiments). If the reflection result meets the user's input query, the answer is directly output; if the reflection result does not meet, a new answer is regenerated and then reflected on the new answer until the new answer meets the user's input query, and the final answer is output (i.e., outputting the answer information in the above embodiments).
[0089] If the large language model needs additional knowledge (i.e., the situation of determining the information to be retrieved for the user's question in the above embodiments) to answer the question in the user input query, the large language model can determine the API to be called from the multiple connected APIs through planning (i.e., calling the target API corresponding to the user's question in the above embodiments), generate the call code of the target API, and execute code compilation, so as to obtain relevant knowledge, that is, the retrieval result corresponding to the user input query. Subsequently, the large language model will perform retrieval reflection, that is, judge whether the question in the user input query and the above obtained retrieval result (i.e., the first retrieval result corresponding to the user's question in the above embodiments) meet the user input query, so as to obtain a reflection result (i.e., the first verification result in the above embodiments). If the question in the user input query does not meet the user input query with the retrieval result, re-planning will be carried out until the question in the user input query meets the user input query with the retrieval result, and then an answer will be generated (i.e., generating the answer information corresponding to the user's question based on the first retrieval result in the above embodiments). Then, the generated answer is input into the large language model for answer reflection (i.e., the second verification result in the above embodiments). If the generated answer does not meet the question in the user input query, re-reflection will be carried out until the generated answer meets the question in the user input query, and then the final answer will be output (i.e., outputting the answer information in the above embodiments).
[0090] It should be noted that the question in the user input query meets the user input query with the obtained retrieval result, which means that the keywords of the first retrieval result match the keywords of the user's question information. The generated answer meets the question in the user input query, which means that the keywords of the answer information in the above embodiments match both the keywords of the user's question information and the keywords of the retrieval result.
[0091] Furthermore, based on the information processing method provided in the above embodiments, the embodiments of the present application can also provide an information processing device. The information processing device will be described below in combination with the embodiments and the drawings respectively.
[0092] Figure 3 It is a schematic structural diagram of an information processing device provided by an embodiment of the present application. Combining Figure 3 As shown, the information processing device 300 provided by the embodiments of the present application may include:
[0093] An information acquisition module 301, configured to acquire user question information;
[0094] An interface call module 302, configured to, when determining that the user's question information needs to be retrieved, call a target API corresponding to the user's question information from multiple application programming interfaces (APIs) accessed by the large language model, to obtain a first retrieval result corresponding to the user's question information, where the target API is used to retrieve the user's question information;
[0095] An information generation module 303, configured to generate answer information corresponding to the user's question information based on the first retrieval result;
[0096] An information output module 304, configured to output the answer information.
[0097] Optionally, the interface call module 302 includes:
[0098] A retrieval strategy generation module, configured to generate a retrieval strategy based on the user's question information and multiple APIs, where the retrieval strategy is used to instruct the large language model to retrieve the user's question information based on the target API;
[0099] A retrieval result acquisition module, configured to call the target API based on the retrieval strategy to obtain the first retrieval result.
[0100] Optionally, the retrieval result acquisition module is specifically configured to:
[0101] Write a call code for the target API based on the retrieval strategy;
[0102] Compile the call code to obtain the first retrieval result.
[0103] Optionally, the information processing device 300 further includes:
[0104] A retrieval verification module, configured to verify whether keywords of the first retrieval result match keywords of the user's question information based on the user's question information, to obtain a first verification result;
[0105] The information generation module 303 is specifically configured to:
[0106] Generate the answer information based on the first retrieval result when the first verification result indicates that the keywords of the first retrieval result match the keywords of the user's question information.
[0107] Optionally, the information processing device 300 further includes:
[0108] A retrieval result adjustment module, configured to adjust the first retrieval result based on the user's question information to obtain a second retrieval result when the first verification result indicates that the keywords of the first retrieval result do not match the keywords of the user's question information;
[0109] The information generation module 303 is specifically configured to:
[0110] Generate the answer information based on the second retrieval result.
[0111] Optionally, the information processing device 300 further includes:
[0112] An answer verification module, configured to verify whether the keywords of the answer information match the keywords of the user's question information and the keywords of the first retrieval result based on the user's question information and the first retrieval result, to obtain a second verification result;
[0113] The information output module 304 is specifically configured to:
[0114] Output the answer information when the second verification result indicates that the keywords of the answer information match the keywords of the user's question information and the keywords of the first retrieval result.
[0115] Optionally, the information processing device 300 further includes:
[0116] An answer information adjustment module, configured to adjust the answer information based on the user's question information and the first retrieval result to obtain a new answer information when the second verification result indicates that the keywords of the answer information do not match the keywords of the user's question information or the keywords of the first retrieval result;
[0117] The information output module 304 is specifically configured to:
[0118] Output the new answer information.
[0119] Furthermore, an embodiment of the present application further provides an electronic device, including: a processor, a memory, and a system bus;
[0120] The processor and the memory are connected through the system bus;
[0121] The memory is used to store one or more programs, and the one or more programs include instructions, and when the instructions are executed by the processor, the processor executes any implementation step of the above information processing method.
[0122] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions run on an electronic device, any implementation step of the above information processing method is enabled.
[0123] From the description of the above embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application, 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 storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in each embodiment or some parts of the embodiments of the present application. It should be noted that the embodiments in this specification are described in a progressive manner, and the key point of each embodiment is to explain the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other.
[0124] For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0125] It should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or device. Without further limitations, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or device including the said element.
[0126] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An information processing method, characterized in that, Applied to a large language model, the method includes: Obtain user question information; When it is determined that the user question information needs to be retrieved, from multiple application programming interfaces (APIs) accessed by the large language model, call the target API corresponding to the user question information to obtain a first retrieval result corresponding to the user question information, where the target API is used to retrieve the user question information; Generate answer information corresponding to the user question information based on the first retrieval result; Output the answer information.
2. The information processing method according to claim 1, wherein The step of calling the target API corresponding to the user question information from multiple application programming interfaces (APIs) accessed by the large language model to obtain a first retrieval result corresponding to the user question information includes: Generate a retrieval strategy based on the user question information and multiple APIs, where the retrieval strategy is used to instruct the large language model to retrieve the user question information based on the target API; Call the target API based on the retrieval strategy to obtain the first retrieval result.
3. The information processing method according to claim 2, wherein The step of calling the target API based on the retrieval strategy to obtain the first retrieval result includes: Write the call code of the target API based on the retrieval strategy; Compile the call code to obtain the first retrieval result.
4. The information processing method according to claim 1, wherein Before generating the answer information corresponding to the user question information based on the first retrieval result, the method further includes: Based on the user question information, verify whether the keywords of the first retrieval result match the keywords of the user question information to obtain a first verification result; The step of generating the answer information corresponding to the user question information based on the first retrieval result includes: When the first verification result indicates that the keywords of the first retrieval result match the keywords of the user question information, generate the answer information based on the first retrieval result.
5. The information processing method according to claim 4, wherein The method further includes: When the first verification result indicates that the keywords of the first retrieval result do not match the keywords of the user question information, adjust the first retrieval result based on the user question information to obtain a second retrieval result; The step of generating the answer information corresponding to the user question information based on the first retrieval result includes: Generate the answer information based on the second retrieval result.
6. The information processing method according to any one of claims 1 to 4, characterized in that, Before outputting the answer information, the method further includes: Based on the user question information and the first retrieval result, verify whether the keywords of the answer information match the keywords of the user question information and the keywords of the first retrieval result to obtain a second verification result; The step of outputting the answer information includes: When the second verification result indicates that the keywords of the answer information match both the keywords of the user question information and the keywords of the first retrieval result, output the answer information.
7. The information processing method according to claim 6, wherein The method further includes: In the case that the second verification result indicates that the keywords of the response information do not match the keywords of the user's question information or the keywords of the first retrieval result, adjust the response information based on the user's question information and the first retrieval result to obtain a new response information; The outputting the response information includes: Outputting the new response information.
8. An information processing apparatus, characterized in that, Comprising: An information acquisition module, configured to acquire user question information; An interface call module, configured to, when determining that the user question information is to be retrieved, call a target API corresponding to the user question information from multiple application programming interfaces (APIs) accessed by the large language model, to obtain a first retrieval result corresponding to the user question information, where the target API is used to retrieve the user question information; An information generation module, configured to generate response information corresponding to the user question information based on the first retrieval result; An information output module, configured to output the response information.
9. An electronic device, characterized in that, The device includes: a processor, a memory, and a system bus; The processor and the memory are connected through the system bus; The memory is used to store a program, the program includes instructions, and when the instructions are executed by the processor, the processor is caused to execute the steps of the information processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a terminal device, the steps of the information processing method according to any one of claims 1 to 7 are implemented.